Class: Emfsvg::Pen
- Inherits:
-
Object
- Object
- Emfsvg::Pen
- Defined in:
- lib/emfsvg/device_context.rb
Overview
Pen value object: style, width, color.
Constant Summary collapse
- SOLID =
0- DASH =
1- DOT =
2- DASHDOT =
3- DASHDOTDOT =
4- NULL =
5- INSIDEFRAME =
6
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
- #dup ⇒ Object
-
#initialize(style: SOLID, width: 1, color: Emf::Model::Geometry::Color.black) ⇒ Pen
constructor
A new instance of Pen.
- #null? ⇒ Boolean
Constructor Details
#initialize(style: SOLID, width: 1, color: Emf::Model::Geometry::Color.black) ⇒ Pen
Returns a new instance of Pen.
153 154 155 156 157 |
# File 'lib/emfsvg/device_context.rb', line 153 def initialize(style: SOLID, width: 1, color: Emf::Model::Geometry::Color.black) @style = style @width = width @color = color end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
159 160 161 |
# File 'lib/emfsvg/device_context.rb', line 159 def color @color end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
159 160 161 |
# File 'lib/emfsvg/device_context.rb', line 159 def style @style end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
159 160 161 |
# File 'lib/emfsvg/device_context.rb', line 159 def width @width end |
Class Method Details
.default ⇒ Object
161 162 163 |
# File 'lib/emfsvg/device_context.rb', line 161 def self.default new end |