class Pango::Matrix

Public Class Methods

new(xx=nil, xy=nil, yx=nil, yy=nil, x0=nil, y0=nil) click to toggle source
# File lib/pango/matrix.rb, line 20
def initialize(xx=nil, xy=nil, yx=nil, yy=nil, x0=nil, y0=nil)
  initialize_raw
  self.xx = xx || 1.0
  self.xy = xy || 0.0
  self.yx = yx || 0.0
  self.yy = yy || 1.0
  self.x0 = x0 || 0.0
  self.y0 = y0 || 0.0
end
Also aliased as: initialize_raw

Public Instance Methods

+(matrix)
Alias for: concat
concat(matrix) click to toggle source
# File lib/pango/matrix.rb, line 57
def concat(matrix)
  copied_matrix = dup
  copied_matrix.concat!(matrix)
  copied_matrix
end
Also aliased as: +
initialize_raw(xx=nil, xy=nil, yx=nil, yy=nil, x0=nil, y0=nil)
Alias for: new
rotate(degree) click to toggle source
# File lib/pango/matrix.rb, line 51
def rotate(degree)
  copied_matrix = dup
  copied_matrix.rotate!(degree)
  copied_matrix
end
scale(scale_x, scale_y) click to toggle source
# File lib/pango/matrix.rb, line 45
def scale(scale_x, scale_y)
  copied_matrix = dup
  copied_matrix.scale!(scale_x, scale_y)
  copied_matrix
end
to_a() click to toggle source
# File lib/pango/matrix.rb, line 30
def to_a
  [
    xx, xy,
    yx, yy,
    x0,
    y0,
  ]
end
translate(tx, ty) click to toggle source
# File lib/pango/matrix.rb, line 39
def translate(tx, ty)
  copied_matrix = dup
  copied_matrix.translate!(tx, ty)
  copied_matrix
end