Class: Emfsvg::Brush
- Inherits:
-
Object
- Object
- Emfsvg::Brush
- Defined in:
- lib/emfsvg/device_context.rb
Overview
Brush value object: style, color, hatch.
Constant Summary collapse
- SOLID =
0- NULL =
1- HATCHED =
2- PATTERN =
3- MONOPATTERN =
MONOPATTERN: 8 (BS_MONOPATTERN / U_BS_MONOPATTERN in MS-WMF). Brush references a DIB image stored in the SVG
; fill becomes url(#img-N-ref). brush.image_id is the N. 8
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#hatch ⇒ Object
readonly
Returns the value of attribute hatch.
-
#image_id ⇒ Object
readonly
Returns the value of attribute image_id.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
Class Method Summary collapse
Instance Method Summary collapse
- #dup ⇒ Object
-
#initialize(style: SOLID, color: Emf::Model::Geometry::Color.black, hatch: 0, image_id: nil) ⇒ Brush
constructor
A new instance of Brush.
- #null? ⇒ Boolean
Constructor Details
#initialize(style: SOLID, color: Emf::Model::Geometry::Color.black, hatch: 0, image_id: nil) ⇒ Brush
Returns a new instance of Brush.
185 186 187 188 189 190 |
# File 'lib/emfsvg/device_context.rb', line 185 def initialize(style: SOLID, color: Emf::Model::Geometry::Color.black, hatch: 0, image_id: nil) @style = style @color = color @hatch = hatch @image_id = image_id end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
192 193 194 |
# File 'lib/emfsvg/device_context.rb', line 192 def color @color end |
#hatch ⇒ Object (readonly)
Returns the value of attribute hatch.
192 193 194 |
# File 'lib/emfsvg/device_context.rb', line 192 def hatch @hatch end |
#image_id ⇒ Object (readonly)
Returns the value of attribute image_id.
192 193 194 |
# File 'lib/emfsvg/device_context.rb', line 192 def image_id @image_id end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
192 193 194 |
# File 'lib/emfsvg/device_context.rb', line 192 def style @style end |
Class Method Details
.default ⇒ Object
194 195 196 |
# File 'lib/emfsvg/device_context.rb', line 194 def self.default new end |