Class: Wx::GraphicsMatrix
- Inherits:
-
GraphicsObject
- Object
- Object
- GraphicsObject
- Wx::GraphicsMatrix
- 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)
Instance Method Summary collapse
-
#concat(t) ⇒ void
Concatenates the matrix passed with the current matrix.
-
#get ⇒ Array(Float,Float,Float,Float,Float,Float)
Returns the component values of the matrix via the argument pointers.
-
#invert ⇒ void
Inverts the matrix.
-
#is_equal(t) ⇒ Boolean
(also: #equal?)
Returns true if the elements of the transformation matrix are equal.
-
#is_identity ⇒ Boolean
(also: #identity?)
Return true if this is the identity matrix.
-
#rotate(angle) ⇒ void
Rotates this matrix clockwise (in radians).
-
#scale(xScale, yScale) ⇒ void
Scales this matrix.
-
#set(a = 1.0, b = 0.0, c = 0.0, d = 1.0, tx = 0.0, ty = 0.0) ⇒ void
Sets the matrix to the respective values (default values are the identity matrix).
-
#transform_distance(p) ⇒ Wx::Point2DDouble
Applies this matrix to a distance (i.e., performs all transforms except translations)..
-
#transform_point(pt) ⇒ Wx::Point2DDouble
Applies this matrix to a point.
- #translate(*args) ⇒ Object
Methods inherited from GraphicsObject
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
468 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 468 def concat(t) end |
#get ⇒ Array(Float,Float,Float,Float,Float,Float)
Returns the component values of the matrix via the argument pointers.
472 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 472 def get; end |
#invert ⇒ void
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.
481 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 481 def is_equal(t) end |
#is_identity ⇒ Boolean Also known as: identity?
Return true if this is the identity matrix.
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.
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.
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).
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)..
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.
15 |
# File 'lib/wx/doc/graphics_object.rb', line 15 def transform_point(pt); end |
#translate(dx, dy) ⇒ void #translate(pt) ⇒ void
522 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 522 def translate(*args) end |