Class: Emfsvg::Svg::Paint
- Inherits:
-
Object
- Object
- Emfsvg::Svg::Paint
- Defined in:
- lib/emfsvg/svg/paint.rb
Overview
Parsed SVG stroke= and fill= attribute values, mapped to a
value object the translation layer can consume.
Paint is a thin struct: it carries a Color (which may be the
NULL sentinel for "none") and the original brush/pen style bits.
Constant Summary collapse
- SOLID =
0- NULL =
1
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(color:, style: SOLID) ⇒ Paint
constructor
A new instance of Paint.
- #null? ⇒ Boolean
Constructor Details
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
19 20 21 |
# File 'lib/emfsvg/svg/paint.rb', line 19 def color @color end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
19 20 21 |
# File 'lib/emfsvg/svg/paint.rb', line 19 def style @style end |
Class Method Details
Instance Method Details
#null? ⇒ Boolean
21 22 23 |
# File 'lib/emfsvg/svg/paint.rb', line 21 def null? style == NULL || color.null? end |