The simplest way of creating a creating a CSIM image is with the StrokeCSIM() method. As mentioned before this method actually returns a (small) HTML page containing both the image-tag as well as the image map specification. Hence it is not possible to use a script that ends with this method in a standard image-tags src property.
There are two ways to create CSIM (or get hold of) the image maps
<a href="mycsimscript.html">
This has the drawback that the image page will only contain the
image and nothing else.
<h2> This is an CSIM image </h2>
<?php
include "mycsimscript.php"
?>
The process to replace Stroke() with StrokeCSIM() is strait forward. Replace all existing calls to Stroke() with the equivalent calls to StrokeCSIM().
The only difference is that it is necessary ti supply a minimum of
one file name in the StrokeCSIM() method. The first argument must be
the name of the actual image script file including the extension. So
for example if the image script is called "mycsimscript.php" it is
necessary to write
$graph->
StrokeCSIM(
'mycsimscript.php')
However, it is possible to apply a small "trick" here. PHP maintain
a special variable called "__FILE__" which is always set to the current
file name. This means you could use the following construction:
$graph->
StrokeCSIM(
basename(
__FILE__))
This is a better way since the script can now be renamed without having to change any code in the file which otherwise would be needed.
The other arguments to StrokeCSIM() are optional. Please note that if several CSIM images are used in the same HTML page it is also necessary to specify the image map name as the second parameter since all image maps must be unique to properly match each image map against each image. Please consult the class reference StrokeCSIM() for more details.