Image |
RoundedRectangle() SetAlphaBlending() SetAntiAliasing() SetCanvasColor() SetExpired() SetImgFormat() SetMargin() SetQuality() SetTransparent() |
By replacing Image (and RotImage) it is possible to change the output driver for the whole library withou any further changes.
A very close related class is RotImage which builds directly on Image but in additoin provides a 2D rotation featire, i.e the image may be rotated around a given point and possible also translated.
The image gets instantiated through in the Graph::Img property, or more accurate the RotImage class gets instantiated. The only method in this class that any end user is likely to need (and use) is the SetMargin() method used to give the margins around between the end of the image and the actual plotarea.
Note that all coordinates in methods belonging to Image is given in direct screen coordinates.
Draw a rectangle with rounded corners
Argument | Default | Description |
---|---|---|
$xt | Top left X | |
$yt | Top left Y | |
$xr | Bottom right X | |
$yl | Bottom right Y | |
$r | 5 | Corner radius |
Example:
Enable alpha blending of colors
Argument | Default | Description |
---|---|---|
$aFlg | true | True/false = Enable/Disable alpha blending |
Alphablending is enabled by default (when GD2 is used) but can be turned off by a call to this function with the argument false.
Example:
Specify if anti-aliasing should be used
Example:
Set canvas color
Argument | Default | Description |
---|---|---|
$aColor | Color |
The one time it matters is when you use a drop shadow on the graph. In the small area (top right and bottom left) where there is an empty are which is covered by neither the shadow nor the graph margin this area will have the canvas color.
Example:
Turn on/off expired header
Argument | Default | Description |
---|---|---|
$aFlg | true | True=Return expired header. |
By default this is turned on.
Note: There is no reason as far as we can tell to turn this off.
Example:
Specify what image format to use
Argument | Default | Description |
---|---|---|
$aFormat | Image format | |
$aQuality | 75 | No description available |
Example:
Specify margin for the plot area
Argument | Default | Description |
---|---|---|
$lm | Left margin | |
$rm | Right margin | |
$tm | Top margin | |
$bm | Bottom margin |
Example:
Specify JPEG image quality
Argument | Default | Description |
---|---|---|
$q | Image quality paramer (0-100) |
Example:
Specify transparent color
Argument | Default | Description |
---|---|---|
$color | Color |
Example: