Class: CTioga2::Graphics::Styles::CrossedLinesFillPattern
- Inherits:
-
Object
- Object
- CTioga2::Graphics::Styles::CrossedLinesFillPattern
- Defined in:
- lib/ctioga2/graphics/styles/fill.rb
Instance Method Summary collapse
- #do(t, color, secondary = nil) ⇒ Object
-
#initialize(dst1 = nil, lw1 = nil, angle = 45, dst2 = nil, lw2 = nil, dangle = 90) ⇒ CrossedLinesFillPattern
constructor
A new instance of CrossedLinesFillPattern.
Constructor Details
#initialize(dst1 = nil, lw1 = nil, angle = 45, dst2 = nil, lw2 = nil, dangle = 90) ⇒ CrossedLinesFillPattern
Returns a new instance of CrossedLinesFillPattern.
193 194 195 196 197 198 |
# File 'lib/ctioga2/graphics/styles/fill.rb', line 193 def initialize(dst1 = nil, lw1 = nil, angle = 45, dst2 = nil, lw2 = nil, dangle = 90) @first = SingleLineFillPattern.new(angle, dst1, lw1) @second = SingleLineFillPattern.new(@first.angle + dangle.to_f, dst2 || dst1, lw2 || lw1) end |
Instance Method Details
#do(t, color, secondary = nil) ⇒ Object
201 202 203 204 |
# File 'lib/ctioga2/graphics/styles/fill.rb', line 201 def do(t, color, secondary = nil) @first.do(t, color) @second.do(t, secondary || color) end |