module HexaPDF:: Type:: Annotations:: BorderStyling
This module provides a convenience method for getting and setting the border style and is included in the annotations that need it.
See: PDF2.0 s12.5.4
Constants
- BorderStyle¶
Describes the border of an annotation.
The
colorproperty is eithernilif the border is transparent or else a device color object - seeHexaPDF::Content::ColorSpace.The
styleproperty can be one of the following:- :solid
-
Solid line.
- :beveled
-
Embossed rectangle seemingly raised above the surface of the page.
- :inset
-
Engraved rectangle receeding into the page.
- :underlined
-
Underlined, i.e. only the bottom border is draw.
Array: Dash array describing how to dash the line.
Public Instance Methods
Returns a BorderStyle instance representing the border style of the annotation when no argument is given. Otherwise sets the border style of the annotation and returns self.
When setting a border style, arguments that are not provided will use the default: a border with a solid, black, 1pt wide line. This also means that multiple invocations will reset all prior values.
color-
The color of the border. See
HexaPDF::Content::ColorSpace.device_color_from_specificationfor information on the allowed arguments.If the special value
:transparentis used when setting the color, a transparent is used. A transparent border will return anilvalue when getting the border color. width-
The width of the border. If set to 0, no border is shown.
style-
Defines how the border is drawn. can be one of the following:
:solid-
Draws a solid border.
:beveled-
Draws a beveled border.
:inset-
Draws an inset border.
:underlined-
Draws only the bottom border.
- Array
-
An array specifying a line dash pattern (see
HexaPDF::Content::LineDashPattern)