Class: Wx::PenInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/pen.rb,
lib/wx/doc/pen.rb

Overview

Note:

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

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.

Parameters:

  • colour (Wx::Colour, String, Symbol) (defaults to: (Wx::Colour.new()))
  • width (Integer) (defaults to: 1)
  • style (Wx::PenStyle) (defaults to: Wx::PenStyle::PENSTYLE_SOLID)


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.

Parameters:

Returns:



458
# File 'lib/wx/doc/gen/pen.rb', line 458

def cap(cap) end

#colour(col) ⇒ Wx::PenInfo

Sets the colour for the pen.

Parameters:

Returns:



431
# File 'lib/wx/doc/gen/pen.rb', line 431

def colour(col) end

#get_capWx::PenCap

Returns the pen’s cap (i.e., end-point style).

Returns:



498
# File 'lib/wx/doc/gen/pen.rb', line 498

def get_cap; end

#get_colourWx::Colour

Returns the pen’s colour.

Returns:



482
# File 'lib/wx/doc/gen/pen.rb', line 482

def get_colour; end

#get_dash_countInteger Also known as: dash_count

Returns the number of dashes in the pen’s dash pattern.

Returns:

  • (Integer)


506
# File 'lib/wx/doc/gen/pen.rb', line 506

def get_dash_count; end

#get_dashesArray<Integer> Also known as: dashes

Returns:

  • (Array<Integer>)


44
# File 'lib/wx/doc/pen.rb', line 44

def get_dashes; end

#get_joinWx::PenJoin

Returns the pen’s joining method.

Returns:



494
# File 'lib/wx/doc/gen/pen.rb', line 494

def get_join; end

#get_qualityWx::PenQuality

Returns the pen’s quality.

Returns:



502
# File 'lib/wx/doc/gen/pen.rb', line 502

def get_quality; end

#get_stippleWx::Bitmap

Returns the pen’s stipple bitmap.

Returns:



486
# File 'lib/wx/doc/gen/pen.rb', line 486

def get_stipple; end

#get_styleWx::PenStyle

Returns the pen’s style.

Returns:



490
# File 'lib/wx/doc/gen/pen.rb', line 490

def get_style; end

#get_widthInteger

Returns the pen’s line width.

Returns:

  • (Integer)


516
# File 'lib/wx/doc/gen/pen.rb', line 516

def get_width; end

#high_qualityWx::PenInfo

Set high pen quality.

This is the same as calling #quality with Wx::PenQuality::PEN_QUALITY_HIGH.

Returns:



478
# File 'lib/wx/doc/gen/pen.rb', line 478

def high_quality; end

#is_transparentBoolean Also known as: transparent?

Returns whether the pen is transparent.

Returns:

  • (Boolean)


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.

Parameters:

Returns:



453
# File 'lib/wx/doc/gen/pen.rb', line 453

def join(join) end

#low_qualityWx::PenInfo

Set low pen quality.

This is the same as calling #quality with Wx::PenQuality::PEN_QUALITY_LOW.

Returns:



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.

Parameters:

Returns:

See Also:



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.

Parameters:

Returns:



448
# File 'lib/wx/doc/gen/pen.rb', line 448

def stipple(stipple) end

#style(style) ⇒ Wx::PenInfo

Sets the style for the pen.

Parameters:

Returns:



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.

Parameters:

  • width (Integer)

Returns:



436
# File 'lib/wx/doc/gen/pen.rb', line 436

def width(width) end