Class: Wx::PenInfo
- Inherits:
-
Object
- Object
- Wx::PenInfo
- Defined in:
- lib/wx/doc/gen/pen.rb,
lib/wx/doc/pen.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This class is a helper used for Pen creation using named parameter idiom: it allows specifying various Pen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to Pen constructors.
For instance, to create a dotted blue pen with the given join style you could do
pen = Wx::Pen.new(Wx::PenInfo.new(Wx::BLUE).style(Wx::PENSTYLE_DOT).join(Wx::JOIN_BEVEL))
Instance Method Summary collapse
-
#cap(cap) ⇒ Wx::PenInfo
Sets the cap (i.e., the end point) for the pen.
-
#colour(col) ⇒ Wx::PenInfo
Sets the colour for the pen.
-
#get_cap ⇒ Wx::PenCap
Returns the pen’s cap (i.e., end-point style).
-
#get_colour ⇒ Wx::Colour
Returns the pen’s colour.
-
#get_dash_count ⇒ Integer
(also: #dash_count)
Returns the number of dashes in the pen’s dash pattern.
- #get_dashes ⇒ Array<Integer> (also: #dashes)
-
#get_join ⇒ Wx::PenJoin
Returns the pen’s joining method.
-
#get_quality ⇒ Wx::PenQuality
Returns the pen’s quality.
-
#get_stipple ⇒ Wx::Bitmap
Returns the pen’s stipple bitmap.
-
#get_style ⇒ Wx::PenStyle
Returns the pen’s style.
-
#get_width ⇒ Integer
Returns the pen’s line width.
-
#high_quality ⇒ Wx::PenInfo
Set high pen quality.
-
#initialize(colour = (Wx::Colour.new()), width = 1, style = Wx::PenStyle::PENSTYLE_SOLID) ⇒ Wx::PenInfo
constructor
Constructor, which can set the colour, width and style for the pen.
-
#is_transparent ⇒ Boolean
(also: #transparent?)
Returns whether the pen is transparent.
-
#join(join) ⇒ Wx::PenInfo
Sets the join for the pen, which is the appearance of where two lines meet or overlap.
-
#low_quality ⇒ Wx::PenInfo
Set low pen quality.
-
#quality(quality) ⇒ Wx::PenInfo
Set the pen quality.
-
#stipple(stipple) ⇒ Wx::PenInfo
Sets the bitmap used for stippling.
-
#style(style) ⇒ Wx::PenInfo
Sets the style for the pen.
-
#width(width) ⇒ Wx::PenInfo
Sets the line width for the pen.
Constructor Details
#initialize(colour = (Wx::Colour.new()), width = 1, style = Wx::PenStyle::PENSTYLE_SOLID) ⇒ Wx::PenInfo
Constructor, which can set the colour, width and style for the pen.
426 |
# File 'lib/wx/doc/gen/pen.rb', line 426 def initialize(colour=(Wx::Colour.new()), width=1, style=Wx::PenStyle::PENSTYLE_SOLID) end |
Instance Method Details
#cap(cap) ⇒ Wx::PenInfo
Sets the cap (i.e., the end point) for the pen.
458 |
# File 'lib/wx/doc/gen/pen.rb', line 458 def cap(cap) end |
#colour(col) ⇒ Wx::PenInfo
Sets the colour for the pen.
431 |
# File 'lib/wx/doc/gen/pen.rb', line 431 def colour(col) end |
#get_cap ⇒ Wx::PenCap
Returns the pen’s cap (i.e., end-point style).
498 |
# File 'lib/wx/doc/gen/pen.rb', line 498 def get_cap; end |
#get_colour ⇒ Wx::Colour
Returns the pen’s colour.
482 |
# File 'lib/wx/doc/gen/pen.rb', line 482 def get_colour; end |
#get_dash_count ⇒ Integer Also known as: dash_count
Returns the number of dashes in the pen’s dash pattern.
506 |
# File 'lib/wx/doc/gen/pen.rb', line 506 def get_dash_count; end |
#get_dashes ⇒ Array<Integer> Also known as: dashes
44 |
# File 'lib/wx/doc/pen.rb', line 44 def get_dashes; end |
#get_join ⇒ Wx::PenJoin
Returns the pen’s joining method.
494 |
# File 'lib/wx/doc/gen/pen.rb', line 494 def get_join; end |
#get_quality ⇒ Wx::PenQuality
Returns the pen’s quality.
502 |
# File 'lib/wx/doc/gen/pen.rb', line 502 def get_quality; end |
#get_stipple ⇒ Wx::Bitmap
Returns the pen’s stipple bitmap.
486 |
# File 'lib/wx/doc/gen/pen.rb', line 486 def get_stipple; end |
#get_style ⇒ Wx::PenStyle
Returns the pen’s style.
490 |
# File 'lib/wx/doc/gen/pen.rb', line 490 def get_style; end |
#get_width ⇒ Integer
Returns the pen’s line width.
516 |
# File 'lib/wx/doc/gen/pen.rb', line 516 def get_width; end |
#high_quality ⇒ Wx::PenInfo
Set high pen quality.
This is the same as calling #quality with Wx::PenQuality::PEN_QUALITY_HIGH.
478 |
# File 'lib/wx/doc/gen/pen.rb', line 478 def high_quality; end |
#is_transparent ⇒ Boolean Also known as: transparent?
Returns whether the pen is transparent.
511 |
# File 'lib/wx/doc/gen/pen.rb', line 511 def is_transparent; end |
#join(join) ⇒ Wx::PenInfo
Sets the join for the pen, which is the appearance of where two lines meet or overlap.
453 |
# File 'lib/wx/doc/gen/pen.rb', line 453 def join(join) end |
#low_quality ⇒ Wx::PenInfo
Set low pen quality.
This is the same as calling #quality with Wx::PenQuality::PEN_QUALITY_LOW.
472 |
# File 'lib/wx/doc/gen/pen.rb', line 472 def low_quality; end |
#quality(quality) ⇒ Wx::PenInfo
Set the pen quality.
Using #low_quality or #high_quality is usually more convenient.
466 |
# File 'lib/wx/doc/gen/pen.rb', line 466 def quality(quality) end |
#stipple(stipple) ⇒ Wx::PenInfo
Sets the bitmap used for stippling.
When the pen is used, a repeating pattern of this bitmap will be drawn.
448 |
# File 'lib/wx/doc/gen/pen.rb', line 448 def stipple(stipple) end |
#style(style) ⇒ Wx::PenInfo
Sets the style for the pen.
441 |
# File 'lib/wx/doc/gen/pen.rb', line 441 def style(style) end |
#width(width) ⇒ Wx::PenInfo
Sets the line width for the pen.
436 |
# File 'lib/wx/doc/gen/pen.rb', line 436 def width(width) end |