Class: Wx::GraphicsPenInfo

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

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

This class is a helper used for GraphicsPen creation using named parameter idiom: it allows specifying various GraphicsPen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to GraphicsPen constructors.

Typically you would use GraphicsPenInfo with a GraphicsContext, e.g. to start drawing with a dotted blue pen slightly wider than normal you could write the following:

ctx = Wx::GraphicsContext.create(dc)

  ctx.set_pen(Wx::GraphicsPenInfo.new(Wx::BLUE).width(1.25).style(Wx::PENSTYLE_DOT))

Requires:

  • USE_GRAPHICS_CONTEXT

Instance Method Summary collapse

Constructor Details

#initialize(colour = (Wx::Colour.new()), width = 1.0, style = Wx::PenStyle::PENSTYLE_SOLID) ⇒ Wx::GraphicsPenInfo

Parameters:

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


915
# File 'lib/wx/doc/gen/graphics_context.rb', line 915

def initialize(colour=(Wx::Colour.new()), width=1.0, style=Wx::PenStyle::PENSTYLE_SOLID) end

Instance Method Details

#cap(cap) ⇒ Wx::GraphicsPenInfo

Parameters:

Returns:



939
# File 'lib/wx/doc/gen/graphics_context.rb', line 939

def cap(cap) end

#colour(col) ⇒ Wx::GraphicsPenInfo

Parameters:

Returns:



919
# File 'lib/wx/doc/gen/graphics_context.rb', line 919

def colour(col) end

#get_capWx::PenCap

Returns:



994
# File 'lib/wx/doc/gen/graphics_context.rb', line 994

def get_cap; end

#get_colourWx::Colour

Returns:



982
# File 'lib/wx/doc/gen/graphics_context.rb', line 982

def get_colour; end

#get_dash_countInteger Also known as: dash_count

Returns:

  • (Integer)


997
# File 'lib/wx/doc/gen/graphics_context.rb', line 997

def get_dash_count; end

#get_dashesArray<Integer> Also known as: dashes

Returns:

  • (Array<Integer>)


76
# File 'lib/wx/doc/graphics_context.rb', line 76

def get_dashes; end

#get_end_xFloat Also known as: end_x

Returns:

  • (Float)


1036
# File 'lib/wx/doc/gen/graphics_context.rb', line 1036

def get_end_x; end

#get_end_yFloat Also known as: end_y

Returns:

  • (Float)


1040
# File 'lib/wx/doc/gen/graphics_context.rb', line 1040

def get_end_y; end

#get_gradient_typeWx::GradientType Also known as: gradient_type

Returns:



1008
# File 'lib/wx/doc/gen/graphics_context.rb', line 1008

def get_gradient_type; end

#get_joinWx::PenJoin

Returns:



991
# File 'lib/wx/doc/gen/graphics_context.rb', line 991

def get_join; end

#get_radiusFloat Also known as: radius

Returns:

  • (Float)


1044
# File 'lib/wx/doc/gen/graphics_context.rb', line 1044

def get_radius; end

#get_start_xFloat Also known as: start_x

Returns:

  • (Float)


1028
# File 'lib/wx/doc/gen/graphics_context.rb', line 1028

def get_start_x; end

#get_start_yFloat Also known as: start_y

Returns:

  • (Float)


1032
# File 'lib/wx/doc/gen/graphics_context.rb', line 1032

def get_start_y; end

#get_stippleWx::Bitmap

Returns:



985
# File 'lib/wx/doc/gen/graphics_context.rb', line 985

def get_stipple; end

#get_stopsWx::GraphicsGradientStops Also known as: stops



1048
# File 'lib/wx/doc/gen/graphics_context.rb', line 1048

def get_stops; end

#get_styleWx::PenStyle

Returns:



988
# File 'lib/wx/doc/gen/graphics_context.rb', line 988

def get_style; end

#get_widthFloat

Returns:

  • (Float)


1005
# File 'lib/wx/doc/gen/graphics_context.rb', line 1005

def get_width; end

#get_x1Float Also known as: x1

Returns:

  • (Float)


1012
# File 'lib/wx/doc/gen/graphics_context.rb', line 1012

def get_x1; end

#get_x2Float Also known as: x2

Returns:

  • (Float)


1020
# File 'lib/wx/doc/gen/graphics_context.rb', line 1020

def get_x2; end

#get_y1Float Also known as: y1

Returns:

  • (Float)


1016
# File 'lib/wx/doc/gen/graphics_context.rb', line 1016

def get_y1; end

#get_y2Float Also known as: y2

Returns:

  • (Float)


1024
# File 'lib/wx/doc/gen/graphics_context.rb', line 1024

def get_y2; end

#is_transparentBoolean Also known as: transparent?

Returns:

  • (Boolean)


1001
# File 'lib/wx/doc/gen/graphics_context.rb', line 1001

def is_transparent; end

#join(join) ⇒ Wx::GraphicsPenInfo

Parameters:

Returns:



935
# File 'lib/wx/doc/gen/graphics_context.rb', line 935

def join(join) end

#linear_gradient(x1, y1, x2, y2, c1, c2, matrix = Wx::NULL_GRAPHICS_MATRIX) ⇒ Wx::GraphicsPenInfo #linear_gradient(x1, y1, x2, y2, stops, matrix = Wx::NULL_GRAPHICS_MATRIX) ⇒ Wx::GraphicsPenInfo

Overloads:



958
# File 'lib/wx/doc/gen/graphics_context.rb', line 958

def linear_gradient(*args) end

#radial_gradient(startX, startY, endX, endY, radius, oColor, cColor, matrix = Wx::NULL_GRAPHICS_MATRIX) ⇒ Wx::GraphicsPenInfo #radial_gradient(startX, startY, endX, endY, radius, stops, matrix = Wx::NULL_GRAPHICS_MATRIX) ⇒ Wx::GraphicsPenInfo

Overloads:



979
# File 'lib/wx/doc/gen/graphics_context.rb', line 979

def radial_gradient(*args) end

#stipple(stipple) ⇒ Wx::GraphicsPenInfo

Parameters:

Returns:



931
# File 'lib/wx/doc/gen/graphics_context.rb', line 931

def stipple(stipple) end

#style(style) ⇒ Wx::GraphicsPenInfo

Parameters:

Returns:



927
# File 'lib/wx/doc/gen/graphics_context.rb', line 927

def style(style) end

#width(width) ⇒ Wx::GraphicsPenInfo

Parameters:

  • width (Float)

Returns:



923
# File 'lib/wx/doc/gen/graphics_context.rb', line 923

def width(width) end