PHP Doku:: Creates a new CairoMatrix object - cairomatrix.construct.html

Verlauf / Chronik / History: (4) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzBildverarbeitung und -generierungCairoThe CairoMatrix classCairoMatrix::__construct -- cairo_matrix_init

Ein Service von Reinhard Neidl - Webprogrammierung.

The CairoMatrix class

<<The CairoMatrix class

CairoMatrix::initIdentity -- cairo_matrix_init_identity>>

CairoMatrix::__construct

cairo_matrix_init

(PECL cairo >= 0.1.0)

CairoMatrix::__construct -- cairo_matrix_initCreates a new CairoMatrix object

Beschreibung

Object oriented style (method):

CairoMatrix::__construct ([ float $xx = 1.0 [, float $yx = 0.0 [, float $xy = 0.0 [, float $yy = 1.0 [, float $x0 = 0.0 [, float $y0 = 0.0 ]]]]]] )

Procedural style:

object cairo_matrix_init ([ float $xx = 1.0 [, float $yx = 0.0 [, float $xy = 0.0 [, float $yy = 1.0 [, float $x0 = 0.0 [, float $y0 = 0.0 ]]]]]] )

Returns new CairoMatrix object. Matrices are used throughout cairo to convert between different coordinate spaces. Sets matrix to be the affine transformation given by xx, yx, xy, yy, x0, y0. The transformation is given by: x_new = xx * x + xy * y + x0; and y_new = yx * x + yy * y + y0;

Parameter-Liste

xx

xx component of the affine transformation

yx

yx component of the affine transformation

xy

xy component of the affine transformation

yy

yy component of the affine transformation

x0

X translation component of the affine transformation

y0

Y translation component of the affine transformation

Rückgabewerte

Returns a new CairoMatrix object that can be used with surfaces, contexts, and patterns.

Beispiele

Beispiel #1 Object oriented style

<?php
/* Create a new Matrix */
$matrix = new CairoMatrix(1.00.50.01.00.00.0);
?>

Beispiel #2 Procedural style

<?php
/* Create a new Matrix */
$matrix cairo_matrix_init(1.00.50.01.00.00.0);
?>

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)