// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
pub type Matrix

///|
pub(open) trait IMatrix {
  fn as_matrix(Self) -> Matrix
  fn concat(Self, Matrix) -> Unit = _
  fn get_font_scale_factor(Self) -> Double = _
  fn get_font_scale_factors(Self) -> (Double, Double) = _
  fn get_slant_ratio(Self) -> Double = _
  fn rotate(Self, Double) -> Unit = _
  fn scale(Self, Double, Double) -> Unit = _
  fn transform_distance(Self, Double, Double) -> (Double, Double) = _
  fn transform_pixel_rectangle(Self, Rectangle) -> Unit = _
  fn transform_point(Self, Double, Double) -> (Double, Double) = _
  fn transform_rectangle(Self, Rectangle) -> Unit = _
  fn translate(Self, Double, Double) -> Unit = _
}

///|
pub impl IMatrix for Matrix with fn as_matrix(self) {
  self
}

///|
#borrow(self_, new_matrix)
extern "c" fn moonbit_pango_matrix_concat(self_ : Matrix, new_matrix : Matrix) = "moonbit_pango_matrix_concat"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.concat.html).
pub fn Matrix::concat(self : Matrix, new_matrix : Matrix) -> Unit {
  moonbit_pango_matrix_concat(self, new_matrix)
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.get_font_scale_factor.html).
#borrow(self)
pub extern "c" fn Matrix::get_font_scale_factor(self : Matrix) -> Double = "moonbit_pango_matrix_get_font_scale_factor"

///|
#borrow(self_, xscale, yscale)
extern "c" fn moonbit_pango_matrix_get_font_scale_factors(
  self_ : Matrix,
  xscale : Ref[Double],
  yscale : Ref[Double],
) = "moonbit_pango_matrix_get_font_scale_factors"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.get_font_scale_factors.html).
pub fn Matrix::get_font_scale_factors(self : Matrix) -> (Double, Double) {
  let xscale = Ref(0.0)
  let yscale = Ref(0.0)
  moonbit_pango_matrix_get_font_scale_factors(self, xscale, yscale)
  (xscale.val, yscale.val)
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.get_slant_ratio.html).
#borrow(self)
pub extern "c" fn Matrix::get_slant_ratio(self : Matrix) -> Double = "moonbit_pango_matrix_get_slant_ratio"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.rotate.html).
#borrow(self)
pub extern "c" fn Matrix::rotate(self : Matrix, degrees : Double) = "moonbit_pango_matrix_rotate"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.scale.html).
#borrow(self)
pub extern "c" fn Matrix::scale(
  self : Matrix,
  scale_x : Double,
  scale_y : Double,
) = "moonbit_pango_matrix_scale"

///|
#borrow(self_, dx_ref, dy_ref)
extern "c" fn moonbit_pango_matrix_transform_distance(
  self_ : Matrix,
  dx_ref : Ref[Double],
  dy_ref : Ref[Double],
) = "moonbit_pango_matrix_transform_distance"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.transform_distance.html).
pub fn Matrix::transform_distance(
  self : Matrix,
  dx : Double,
  dy : Double,
) -> (Double, Double) {
  let dx_ref = Ref(dx)
  let dy_ref = Ref(dy)
  moonbit_pango_matrix_transform_distance(self, dx_ref, dy_ref)
  (dx_ref.val, dy_ref.val)
}

///|
#borrow(self_, rect)
extern "c" fn moonbit_pango_matrix_transform_pixel_rectangle(
  self_ : Matrix,
  rect : Rectangle,
) = "moonbit_pango_matrix_transform_pixel_rectangle"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.transform_pixel_rectangle.html).
pub fn Matrix::transform_pixel_rectangle(
  self : Matrix,
  rect : Rectangle,
) -> Unit {
  moonbit_pango_matrix_transform_pixel_rectangle(self, rect)
}

///|
#borrow(self_, x_ref, y_ref)
extern "c" fn moonbit_pango_matrix_transform_point(
  self_ : Matrix,
  x_ref : Ref[Double],
  y_ref : Ref[Double],
) = "moonbit_pango_matrix_transform_point"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.transform_point.html).
pub fn Matrix::transform_point(
  self : Matrix,
  x : Double,
  y : Double,
) -> (Double, Double) {
  let x_ref = Ref(x)
  let y_ref = Ref(y)
  moonbit_pango_matrix_transform_point(self, x_ref, y_ref)
  (x_ref.val, y_ref.val)
}

///|
#borrow(self_, rect)
extern "c" fn moonbit_pango_matrix_transform_rectangle(
  self_ : Matrix,
  rect : Rectangle,
) = "moonbit_pango_matrix_transform_rectangle"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.transform_rectangle.html).
pub fn Matrix::transform_rectangle(self : Matrix, rect : Rectangle) -> Unit {
  moonbit_pango_matrix_transform_rectangle(self, rect)
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.Matrix.translate.html).
#borrow(self)
pub extern "c" fn Matrix::translate(self : Matrix, tx : Double, ty : Double) = "moonbit_pango_matrix_translate"

///|
impl IMatrix with fn concat(self, new_matrix) -> Unit {
  self.as_matrix().concat(new_matrix)
}

///|
impl IMatrix with fn get_font_scale_factor(self) -> Double {
  self.as_matrix().get_font_scale_factor()
}

///|
impl IMatrix with fn get_font_scale_factors(self) -> (Double, Double) {
  self.as_matrix().get_font_scale_factors()
}

///|
impl IMatrix with fn get_slant_ratio(self) -> Double {
  self.as_matrix().get_slant_ratio()
}

///|
impl IMatrix with fn rotate(self, degrees) -> Unit {
  self.as_matrix().rotate(degrees)
}

///|
impl IMatrix with fn scale(self, scale_x, scale_y) -> Unit {
  self.as_matrix().scale(scale_x, scale_y)
}

///|
impl IMatrix with fn transform_distance(self, dx, dy) -> (Double, Double) {
  self.as_matrix().transform_distance(dx, dy)
}

///|
impl IMatrix with fn transform_pixel_rectangle(self, rect) -> Unit {
  self.as_matrix().transform_pixel_rectangle(rect)
}

///|
impl IMatrix with fn transform_point(self, x, y) -> (Double, Double) {
  self.as_matrix().transform_point(x, y)
}

///|
impl IMatrix with fn transform_rectangle(self, rect) -> Unit {
  self.as_matrix().transform_rectangle(rect)
}

///|
impl IMatrix with fn translate(self, tx, ty) -> Unit {
  self.as_matrix().translate(tx, ty)
}

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::get_xx(self_ : Matrix) -> Double = "moonbit_pango_matrix_xx_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::set_xx(self_ : Matrix, value : Double) = "moonbit_pango_matrix_xx_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::get_xy(self_ : Matrix) -> Double = "moonbit_pango_matrix_xy_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::set_xy(self_ : Matrix, value : Double) = "moonbit_pango_matrix_xy_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::get_yx(self_ : Matrix) -> Double = "moonbit_pango_matrix_yx_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::set_yx(self_ : Matrix, value : Double) = "moonbit_pango_matrix_yx_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::get_yy(self_ : Matrix) -> Double = "moonbit_pango_matrix_yy_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::set_yy(self_ : Matrix, value : Double) = "moonbit_pango_matrix_yy_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::get_x0(self_ : Matrix) -> Double = "moonbit_pango_matrix_x0_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::set_x0(self_ : Matrix, value : Double) = "moonbit_pango_matrix_x0_set"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::get_y0(self_ : Matrix) -> Double = "moonbit_pango_matrix_y0_get"

///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/struct.Matrix.html).
#borrow(self_)
pub extern "c" fn Matrix::set_y0(self_ : Matrix, value : Double) = "moonbit_pango_matrix_y0_set"

///|
pub extern "c" fn Matrix::_zero() -> Matrix = "moonbit_pango_matrix__zero"