(Defined in: jpgraph.php : 7530)
Class usage and Overview
A subclass of Image class which implements a rotated version of all methods in the base Image class.
The Image class used in JpGraph is actually not the class Image but rather this class as we want to have the rotating possibility.
The rotation is accomplished by standard 2D rotation matrices.
See also related classes:
Image
Class Methods
Specify rotation angle
Argument | Default | Description |
$a
| | Angle in degrees |
Description:
Specify the rotation angle for the other graphic primitives in this class.
The rotation is performed around point (0,0).
See also:
$graph->img->SetAngle(45);
Set rotation center
Argument | Default | Description |
$dx
| | Specify rotation center X |
$dy
| | Specify rotation center Y |
Description:
Specify center of rotation. (0,0) is the upper left most point in the image. By default the rotation point is choosen as tjhe midpoint of the image when the RotImage class is initially created.
See also:
$width=600; $height=400;
$graph = new Graph($width,$height);
$graph->img->SetMargin($leftm,$rightm,$topm,$bottomm);
$graph->SetAngle(20);
// Rotate graph around the plots (0,0) point, i.e
// where the graph axis intersect.
$graph->img->SetCenter($leftm,$height-($topm+$bottomm));
Specify margin for plot
Argument | Default | Description |
$lm
| | Left margin |
$rm
| | Right margin |
$tm
| | Top margin |
$bm
| | Bottom margin |
Description:
Specify the margin, i.e. the area on the side of the actual plot which is used for titles, labels, legends ans so on.
$graph->img->SetMargin(30,30,50,20);
Specify translation (in pixels)
Argument | Default | Description |
$dx
| | Horizontal translation |
$dy
| | Vertical translation |
Description:
The translation is applied after the rotation of the image.
See also:
$graph->img->SetTranslation(10,10)