(Defined in: jpgraph_iconplot.php : 17)
Class usage and Overview
Make it possible to add one or several images on top of the background in the graph. This is constructed in the same way as normal plots are created and the images are added as normal with the GRaph::Add() method.
It is possoble to specify arbitrary positions as well as mix (blend) and scaling.
Example:
$icon = new IconPlot('myicon.png',0.5,0.5);
..
$graph->Add($icon);
Class Methods
Argument | Default | Description |
$aStr
| | No description available |
Description:
No description available.
// Nothing to do ...
Argument | Default | Description |
$aGraph
| | No description available |
Description:
No description available.
Description:
No description available.
Description:
No description available.
// The next four function are framework function tht gets called// from Gantt and is not menaiungfull in the context of Icons but// they must be implemented to avoid errors.
Description:
No description available.
Description:
No description available.
Description:
No description available.
// Nothing to do ...
Description:
No description available.
Description:
No description available.
Argument | Default | Description |
$aGraph
| | No description available |
Description:
No description available.
Specify anchor point for image
Argument | Default | Description |
$aXAnchor
|
'left'
| Horizontal anchor |
$aYAnchor
|
'center'
| Verticla anchor |
Description:
Specify anchor point for image.
Horizontal anchor can be "left','center','right' and vertical anchor can be 'top','center','bottom'
By default the anchor is the top left corner ('left','top')
$icon->SetAnchor('center','center');
Use one of the country flags as icons
Argument | Default | Description |
$aFlag
| | Partial or full country name |
$aX
|
0
| X-position |
$aY
|
0
| Y-position |
$aScale
|
1.0
| Scaleing of image |
$aMix
|
100
| Blend factor (0-100) |
$aStdSize
|
3
| Which of the flag standard sizes should be used as the original image (1-4) |
Description:
Use one of the country flags as icons
$icon = new IconPlot();
$icon->SetCountryFlag('norway',0.1,0.1);
Specify mix value in percent (0-100) for image-
Argument | Default | Description |
$aMix
| | Mix value (0-100) |
Description:
Specify mix value in percent (0-100) for image. The mix value can also be specified directly in the constructor IconPlot().
$icon->SetMix(50);
Specify position for image
Argument | Default | Description |
$aX
| | X-position |
$aY
| | Y-position |
Description:
Specify position for image. Position can be specified as either absolute coordinates or as fractions of the width and height.
The anchor point in the image can be adjusted with a call to SetAnchor(). By default the anchor point is the top left corner.
See also:
$icon->SetPos(0.5,0.5);
Set scaling for image
Argument | Default | Description |
$aScale
| | Scale value. |
Description:
Set scaling for image. This allows you to adjust the size of the image.
$icon->SetScale(0.8);
Argument | Default | Description |
$aX
| | No description available |
$aY
| | No description available |
Description:
No description available.
Argument | Default | Description |
&$aImg
| | No description available |
Description:
No description available.
Argument | Default | Description |
$aImg
| | No description available |
$axscale
| | No description available |
$ayscale
| | No description available |
Description:
No description available.
Argument | Default | Description |
$aImg
| | No description available |
$x
|
null
| No description available |
$y
|
null
| No description available |
$aReturnWidthHeight
|
false
| No description available |
Description:
No description available.
Create a new icon image to be added to the graph
Argument | Default | Description |
$aFile
|
""
| File name of image |
$aX
|
0
| X-position |
$aY
|
0
| Y-position |
$aScale
|
1.0
| Scale |
$aMix
|
100
| Mixin value |
Description:
Create a new icon image to be added to the graph. The position can be specified as either absolute coordinates or as fractions of the width and height repsectively.
Scale can be an arbitrary floating point number indicating the scaling of the image.
The mix values specifies (in percent 1-100) how much of the image should be mixed in on top of the background.
$icon = new IconPlot('myfile.png',0.5,0.5,1,50);