Class: HexaPDF::Type::Annotations::Widget::MarkerStyle
- Inherits:
-
Object
- Object
- HexaPDF::Type::Annotations::Widget::MarkerStyle
- Defined in:
- lib/hexapdf/type/annotations/widget.rb
Overview
Describes the marker style of a check box or radio button widget.
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
A device color object representing the color of the marker - see HexaPDF::Content::ColorSpace.
-
#size ⇒ Object
readonly
The size of the marker in PDF points that is shown inside the widget.
-
#style ⇒ Object
readonly
The kind of marker that is shown inside the widget.
Instance Method Summary collapse
-
#initialize(style, size, color) ⇒ MarkerStyle
constructor
Creates a new instance with the given values.
Constructor Details
#initialize(style, size, color) ⇒ MarkerStyle
Creates a new instance with the given values.
147 148 149 150 151 |
# File 'lib/hexapdf/type/annotations/widget.rb', line 147 def initialize(style, size, color) @style = style @size = size @color = color end |
Instance Attribute Details
#color ⇒ Object (readonly)
A device color object representing the color of the marker - see HexaPDF::Content::ColorSpace.
144 145 146 |
# File 'lib/hexapdf/type/annotations/widget.rb', line 144 def color @color end |
#size ⇒ Object (readonly)
The size of the marker in PDF points that is shown inside the widget. The special value 0 means that the marker should be auto-sized based on the widget’s rectangle.
140 141 142 |
# File 'lib/hexapdf/type/annotations/widget.rb', line 140 def size @size end |
#style ⇒ Object (readonly)
The kind of marker that is shown inside the widget. Can either be one of the symbols :check, :circle, :cross, :diamond, :square or :star, or a one character string. The latter is interpreted using the ZapfDingbats font.
If an empty string is set, it is treated as if nil was set, i.e. it shows the default marker for the field type.
136 137 138 |
# File 'lib/hexapdf/type/annotations/widget.rb', line 136 def style @style end |