update : 2015.11.03
php.shukuma.com검색:
|
ps_translate(PECL ps >= 1.1.0) ps_translate — Sets translation 설명
bool ps_translate
( resource
$psdoc
, float $x
, float $y
)Sets a new initial point of the coordinate system. 인수
반환값
성공 시 예제
Example #1 Translation of the coordinate system
<?php The above example demonstrates two possible ways to place a graphic (in this case just a rectangle) at any position on the page, while the graphic itself uses its own coordinate system. The trick is to change the origin of the current coordinate system before drawing the rectangle. The translation has to be undone after the graphic has been drawn. On the second page a slightly different and more elegant approach is applied. Instead of undoing the translation with a second call of ps_translate() the graphics context is saved before modifying the coordinate system and restored after drawing the rectangle. |