module HexaPDF::Content::LineJoinStyle
Defines all available line join styles as constants. Each line join style is an instance of NamedValue
. For use with Content::GraphicsState#line_join_style
.
See: PDF1.7 s8.4.3.4
Constants
- BEVEL_JOIN
The two segments are finished with butt caps and the space between the ends is filled with a triangle.
- MITER_JOIN
The outer lines of the two segments continue until the meet at an angle.
- ROUND_JOIN
An arc of a circle is drawn around the point where the segments meet.
Public Class Methods
normalize(style)
click to toggle source
Returns the argument normalized to a valid line join style.
-
0 or
:miter
can be used for theMITER_JOIN
style. -
1 or
:round
can be used for theROUND_JOIN
style. -
2 or
:bevel
can be used for theBEVEL_JOIN
style. -
Otherwise an error is raised.
# File lib/hexapdf/content/graphics_state.rb, line 119 def self.normalize(style) case style when :miter, 0 then MITER_JOIN when :round, 1 then ROUND_JOIN when :bevel, 2 then BEVEL_JOIN else raise ArgumentError, "Unknown line join style: #{style}" end end