Class: Wx::GraphicsMatrix

Inherits:
GraphicsObject show all
Defined in:
lib/wx/doc/gen/graphics_object.rb,
lib/wx/doc/graphics_object.rb

Overview

A GraphicsMatrix is a native representation of an affine matrix.

The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via Wx::GraphicsContext#create_matrix or Wx::GraphicsRenderer#create_matrix.

Category: Graphics Device Interface (GDI)

Requires:

  • USE_GRAPHICS_CONTEXT

Instance Method Summary collapse

Methods inherited from GraphicsObject

#get_renderer, #is_null

Methods inherited from Object

#clone, #dup, #initialize, #is_same_as, #un_share

Constructor Details

This class inherits a constructor from Wx::Object

Instance Method Details

#concat(t) ⇒ void

This method returns an undefined value.

Concatenates the matrix passed with the current matrix.

The effect of the resulting transformation is to first apply the transformation in t to the coordinates and then apply the transformation in the current matrix to the coordinates.

matrix = t x matrix

Parameters:



468
# File 'lib/wx/doc/gen/graphics_object.rb', line 468

def concat(t) end

#getArray(Float,Float,Float,Float,Float,Float)

Returns the component values of the matrix via the argument pointers.

Returns:

  • (Array(Float,Float,Float,Float,Float,Float))


472
# File 'lib/wx/doc/gen/graphics_object.rb', line 472

def get; end

#invertvoid

This method returns an undefined value.

Inverts the matrix.



476
# File 'lib/wx/doc/gen/graphics_object.rb', line 476

def invert; end

#is_equal(t) ⇒ Boolean Also known as: equal?

Returns true if the elements of the transformation matrix are equal.

Parameters:

Returns:

  • (Boolean)


481
# File 'lib/wx/doc/gen/graphics_object.rb', line 481

def is_equal(t) end

#is_identityBoolean Also known as: identity?

Return true if this is the identity matrix.

Returns:

  • (Boolean)


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

def is_identity; end

#rotate(angle) ⇒ void

This method returns an undefined value.

Rotates this matrix clockwise (in radians).

This can be useful for applying a tilt to your drawing commands or for drawing radial patterns.

Parameters:

  • angle (Float)

    Rotation angle in radians, clockwise.

See Also:



495
# File 'lib/wx/doc/gen/graphics_object.rb', line 495

def rotate(angle) end

#scale(xScale, yScale) ⇒ void

This method returns an undefined value.

Scales this matrix.

Parameters:

  • xScale (Float)
  • yScale (Float)


501
# File 'lib/wx/doc/gen/graphics_object.rb', line 501

def scale(xScale, yScale) end

#set(a = 1.0, b = 0.0, c = 0.0, d = 1.0, tx = 0.0, ty = 0.0) ⇒ void

This method returns an undefined value.

Sets the matrix to the respective values (default values are the identity matrix).

Parameters:

  • a (Float) (defaults to: 1.0)
  • b (Float) (defaults to: 0.0)
  • c (Float) (defaults to: 0.0)
  • d (Float) (defaults to: 1.0)
  • tx (Float) (defaults to: 0.0)
  • ty (Float) (defaults to: 0.0)


511
# File 'lib/wx/doc/gen/graphics_object.rb', line 511

def set(a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0) end

#transform_distance(p) ⇒ Wx::Point2DDouble

Applies this matrix to a distance (i.e., performs all transforms except translations)..

Parameters:

Returns:



20
# File 'lib/wx/doc/graphics_object.rb', line 20

def transform_distance(p); end

#transform_point(pt) ⇒ Wx::Point2DDouble

Applies this matrix to a point.

Parameters:

Returns:



15
# File 'lib/wx/doc/graphics_object.rb', line 15

def transform_point(pt); end

#translate(dx, dy) ⇒ void #translate(pt) ⇒ void

Overloads:

  • #translate(dx, dy) ⇒ void

    This method returns an undefined value.

    Translates this matrix.

    Parameters:

    • dx (Float)
    • dy (Float)
  • #translate(pt) ⇒ void

    This method returns an undefined value.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Parameters:



522
# File 'lib/wx/doc/gen/graphics_object.rb', line 522

def translate(*args) end