Class IconPlot
(Defined in: jpgraph_iconplot.php : 17)
 
 IconPlot 
 CreateFromString() 
 DoLegend() 
 GetAbsHeight() 
 GetLineNbr() 
 GetMaxDate() 
 GetMinDate() 
 GetWidthHeight() 
 Max() 
 Min() 
 PreStrokeAdjust() 
 SetAnchor() 
 SetCountryFlag() 
 SetMix() 
 SetPos() 
 SetScale() 
 SetScalePos() 
 StrokeMargin() 
 StrokeWithScale() 
 _Stroke() 
 __construct() 
 

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

 

IconPlot ::
CreateFromString($aStr)

ArgumentDefaultDescription
$aStr  No description available

Description:
No description available.

 

IconPlot ::
DoLegend($aGraph)
// Nothing to do ...

ArgumentDefaultDescription
$aGraph  No description available

Description:
No description available.

 

IconPlot ::
GetAbsHeight()


Description:
No description available.

 

IconPlot ::
GetLineNbr()


Description:
No description available.

 

IconPlot ::
GetMaxDate()
// 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.

 

IconPlot ::
GetMinDate()


Description:
No description available.

 

IconPlot ::
GetWidthHeight()


Description:
No description available.

 

IconPlot ::
Max()
// Nothing to do ...


Description:
No description available.

 

IconPlot ::
Min()


Description:
No description available.

 

IconPlot ::
PreStrokeAdjust($aGraph)

ArgumentDefaultDescription
$aGraph  No description available

Description:
No description available.

 

IconPlot ::
SetAnchor($aXAnchor, $aYAnchor)
Specify anchor point for image

ArgumentDefaultDescription
$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') 

Example:

$icon->SetAnchor('center','center');

 

IconPlot ::
SetCountryFlag($aFlag, $aX, $aY, $aScale, $aMix, $aStdSize)
Use one of the country flags as icons

ArgumentDefaultDescription
$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  

Example:

$icon = new IconPlot();
$icon->SetCountryFlag('norway',0.1,0.1);

 

IconPlot ::
SetMix($aMix)
Specify mix value in percent (0-100) for image-

ArgumentDefaultDescription
$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().  

Example:

$icon->SetMix(50);

 

IconPlot ::
SetPos($aX, $aY)
Specify position for image

ArgumentDefaultDescription
$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:

Example:

$icon->SetPos(0.5,0.5);

 

IconPlot ::
SetScale($aScale)
Set scaling for image

ArgumentDefaultDescription
$aScale  Scale value.

Description:
Set scaling for image. This allows you to adjust the size of the image. 

Example:

$icon->SetScale(0.8);

 

IconPlot ::
SetScalePos($aX, $aY)

ArgumentDefaultDescription
$aX  No description available
$aY  No description available

Description:
No description available.

 

IconPlot ::
StrokeMargin(&$aImg)

ArgumentDefaultDescription
&$aImg  No description available

Description:
No description available.

 

IconPlot ::
StrokeWithScale($aImg, $axscale, $ayscale)

ArgumentDefaultDescription
$aImg  No description available
$axscale  No description available
$ayscale  No description available

Description:
No description available.

 

IconPlot ::
_Stroke($aImg, $x, $y, $aReturnWidthHeight)

ArgumentDefaultDescription
$aImg  No description available
$x null No description available
$y null No description available
$aReturnWidthHeight false No description available

Description:
No description available.

 

IconPlot ::
__construct($aFile, $aX, $aY, $aScale, $aMix)
Create a new icon image to be added to the graph

ArgumentDefaultDescription
$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.  

Example:

$icon = new IconPlot('myfile.png',0.5,0.5,1,50);