Class: CTioga2::Graphics::Styles::FillPattern
- Inherits:
-
Object
- Object
- CTioga2::Graphics::Styles::FillPattern
- Defined in:
- lib/ctioga2/graphics/styles/fill.rb
Overview
This class handles drawing the pattern in a fill.
It is a base class.
Add transparency !
Class Method Summary collapse
Instance Method Summary collapse
-
#do(t, color, secondary = nil) ⇒ Object
Draws the pattern over the whole output, with primary color color and secondary color secondary (not implemented yet).
Class Method Details
.from_text(str) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/ctioga2/graphics/styles/fill.rb', line 44 def self.from_text(str) els = str.split(/\s*:\s*/) args = [] if els.size > 1 args = els[1].split(/\s*,\s*/) end case els[0] when /^hlines$/i return SingleLineFillPattern.new(0, *args) when /^vlines$/i return SingleLineFillPattern.new(90, *args) when /^lines$/i return SingleLineFillPattern.new(*args) when /^xlines$/i return CrossedLinesFillPattern.new(*args) when /^(solid|plain)$/i return false end end |
Instance Method Details
#do(t, color, secondary = nil) ⇒ Object
Draws the pattern over the whole output, with primary color color and secondary color secondary (not implemented yet).
This does nothing. Derived classes do the job
41 42 |
# File 'lib/ctioga2/graphics/styles/fill.rb', line 41 def do(t, color, secondary = nil) end |