2 /*=======================================================================
3 // File: JPGRAPH_POLAR.PHP
4 // Description: Polar plot extension for JpGraph
6 // Author: Johan Persson (johanp@aditus.nu)
7 // Ver: $Id: jpgraph_polar.php,v 1.1 2006/07/07 13:37:14 powles Exp $
9 // Copyright (c) Aditus Consulting. All rights reserved.
10 //========================================================================
13 require_once ('jpgraph_plotmark.inc');
16 require_once "jpgraph_log.php";
19 DEFINE('POLAR_360',1);
20 DEFINE('POLAR_180',2);
23 // Note. Don't attempt to make sense of this code.
24 // In order not to have to be able to inherit the scaling code
25 // from the main graph package we have had to make some "tricks" since
26 // the original scaling and axis was not designed to do what is
28 // There were two option. 1: Re-implement everything and get a clean design
29 // and 2: do some "small" trickery and be able to inherit most of
30 // the functionlity from the main graph package.
31 // We choose 2: here in order to save some time.
34 //--------------------------------------------------------------------------
36 //--------------------------------------------------------------------------
39 var $iColor='navy',$iFillColor='';
42 var $legendcsimtarget='';
43 var $legendcsimalt='';
45 var $csimtargets=array(); // Array of targets for CSIM
46 var $csimareas=""; // Resultant CSIM area tags
47 var $csimalts=null; // ALT:s for corresponding target
48 var $line_style='solid',$mark;
50 function __construct($aData) {
53 JpGraphError
::RaiseL(17001);
54 //('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).');
56 $this->numpoints
= $n/2;
57 $this->coord
= $aData;
58 $this->mark
= new PlotMark();
61 function SetWeight($aWeight) {
62 $this->iLineWeight
= $aWeight;
65 function SetColor($aColor){
66 $this->iColor
= $aColor;
69 function SetFillColor($aColor){
70 $this->iFillColor
= $aColor;
76 while( $i < $this->numpoints
) {
77 $m = max($m,$this->coord
[2*$i+
1]);
82 // Set href targets for CSIM
83 function SetCSIMTargets($aTargets,$aAlts=null) {
84 $this->csimtargets
=$aTargets;
85 $this->csimalts
=$aAlts;
88 // Get all created areas
89 function GetCSIMareas() {
90 return $this->csimareas
;
93 function SetLegend($aLegend,$aCSIM="",$aCSIMAlt="") {
94 $this->legend
= $aLegend;
95 $this->legendcsimtarget
= $aCSIM;
96 $this->legendcsimalt
= $aCSIMAlt;
101 function Legend(&$aGraph) {
102 $color = $this->iColor
;
103 if( $this->legend
!= "" ) {
104 if( $this->iFillColor
!='' ) {
105 $color = $this->iFillColor
;
106 $aGraph->legend
->Add($this->legend
,$color,$this->mark
,0,
107 $this->legendcsimtarget
,$this->legendcsimalt
);
110 $aGraph->legend
->Add($this->legend
,$color,$this->mark
,$this->line_style
,
111 $this->legendcsimtarget
,$this->legendcsimalt
);
116 function Stroke(&$img,$scale) {
121 while($i < $this->numpoints
) {
122 list($x1,$y1) = $scale->PTranslate($this->coord
[2*$i],$this->coord
[2*$i+
1]);
126 if( isset($this->csimtargets
[$i]) ) {
127 $this->mark
->SetCSIMTarget($this->csimtargets
[$i]);
128 $this->mark
->SetCSIMAlt($this->csimalts
[$i]);
129 $this->mark
->SetCSIMAltVal($this->coord
[2*$i], $this->coord
[2*$i+
1]);
130 $this->mark
->Stroke($img,$x1,$y1);
131 $this->csimareas
.= $this->mark
->GetCSIMAreas();
134 $this->mark
->Stroke($img,$x1,$y1);
139 if( $this->iFillColor
!= '' ) {
140 $img->SetColor($this->iFillColor
);
141 $img->FilledPolygon($p);
143 $img->SetLineWeight($this->iLineWeight
);
144 $img->SetColor($this->iColor
);
145 $img->Polygon($p,$this->iFillColor
!='');
149 //--------------------------------------------------------------------------
151 //--------------------------------------------------------------------------
152 class PolarAxis
extends Axis
{
153 var $angle_step=15,$angle_color='lightgray',$angle_label_color='black';
154 var $angle_fontfam=FF_FONT1
,$angle_fontstyle=FS_NORMAL
,$angle_fontsize=10;
155 var $angle_fontcolor = 'navy';
156 var $gridminor_color='lightgray',$gridmajor_color='lightgray';
157 var $show_minor_grid = false, $show_major_grid = true ;
158 var $show_angle_mark=true, $show_angle_grid=true, $show_angle_label=true;
159 var $angle_tick_len=3, $angle_tick_len2=3, $angle_tick_color='black';
160 var $show_angle_tick=true;
161 var $radius_tick_color='black';
163 function PolarAxis(&$img,&$aScale) {
164 parent
::Axis($img,$aScale);
167 function ShowAngleDegreeMark($aFlg=true) {
168 $this->show_angle_mark
= $aFlg;
171 function SetAngleStep($aStep) {
172 $this->angle_step
=$aStep;
175 function HideTicks($aFlg=true,$aAngleFlg=true) {
176 parent
::HideTicks($aFlg,$aFlg);
177 $this->show_angle_tick
= !$aAngleFlg;
180 function ShowAngleLabel($aFlg=true) {
181 $this->show_angle_label
= $aFlg;
184 function ShowGrid($aMajor=true,$aMinor=false,$aAngle=true) {
185 $this->show_minor_grid
= $aMinor;
186 $this->show_major_grid
= $aMajor;
187 $this->show_angle_grid
= $aAngle ;
190 function SetAngleFont($aFontFam,$aFontStyle=FS_NORMAL
,$aFontSize=10) {
191 $this->angle_fontfam
= $aFontFam;
192 $this->angle_fontstyle
= $aFontStyle;
193 $this->angle_fontsize
= $aFontSize;
196 function SetColor($aColor,$aRadColor='',$aAngleColor='') {
197 if( $aAngleColor == '' )
198 $aAngleColor=$aColor;
199 parent
::SetColor($aColor,$aRadColor);
200 $this->angle_fontcolor
= $aAngleColor;
203 function SetGridColor($aMajorColor,$aMinorColor='',$aAngleColor='') {
204 if( $aMinorColor == '' )
205 $aMinorColor = $aMajorColor;
206 if( $aAngleColor == '' )
207 $aAngleColor = $aMajorColor;
209 $this->gridminor_color
= $aMinorColor;
210 $this->gridmajor_color
= $aMajorColor;
211 $this->angle_color
= $aAngleColor;
214 function SetTickColors($aRadColor,$aAngleColor='') {
215 $this->radius_tick_color
= $aRadColor;
216 $this->angle_tick_color
= $aAngleColor;
220 function StrokeGrid($pos) {
221 $x = round($this->img
->left_margin +
$this->img
->plotwidth
/2);
222 $this->scale
->ticks
->Stroke($this->img
,$this->scale
,$pos);
224 // Stroke the minor arcs
226 $p = $this->scale
->ticks
->ticks_pos
;
229 $this->img
->SetColor($this->gridminor_color
);
233 if( $this->show_minor_grid
) {
234 $this->img
->Circle($x,$pos,$r);
239 $limit = max($this->img
->plotwidth
,$this->img
->plotheight
)*1.4 ;
240 while( $r < $limit ) {
243 $r = $off +
round($p[$i]-$x+
1);
244 while( $r < $limit && $i < $n ) {
247 if( $this->show_minor_grid
) {
248 $this->img
->Circle($x,$pos,$r);
254 // Stroke the major arcs
255 if( $this->show_major_grid
) {
256 // First determine how many minor step on
257 // every major step. We have recorded the minor radius
258 // in pmin and use these values. This is done in order
259 // to avoid rounding errors if we were to recalculate the
260 // different major radius.
261 $pmaj = $this->scale
->ticks
->maj_ticks_pos
;
262 $p = $this->scale
->ticks
->ticks_pos
;
263 if( $this->scale
->name
== 'lin' ) {
264 $step=round(($pmaj[1] - $pmaj[0])/($p[1] - $p[0]));
269 $n = round(count($pmin)/$step);
271 $this->img
->SetColor($this->gridmajor_color
);
272 $limit = max($this->img
->plotwidth
,$this->img
->plotheight
)*1.4 ;
275 $r = $pmin[$i*$step];
276 while( $r < $limit && $i < $n ) {
277 $r = $pmin[$i*$step];
278 $this->img
->Circle($x,$pos,$r);
284 if( $this->show_angle_grid
) {
285 $this->img
->SetColor($this->angle_color
);
286 $d = max($this->img
->plotheight
,$this->img
->plotwidth
)*1.4 ;
288 $p = $this->scale
->ticks
->ticks_pos
;
289 $start_radius = $p[1]-$x;
291 if( $a == 90 ||
$a == 270 ) {
292 // Make sure there are no rounding problem with
293 // exactly vertical lines
294 $this->img
->Line($x+
$start_radius*cos($a/180*M_PI
)+
1,
295 $pos-$start_radius*sin($a/180*M_PI
),
296 $x+
$start_radius*cos($a/180*M_PI
)+
1,
297 $pos-$d*sin($a/180*M_PI
));
301 $this->img
->Line($x+
$start_radius*cos($a/180*M_PI
)+
1,
302 $pos-$start_radius*sin($a/180*M_PI
),
303 $x+
$d*cos($a/180*M_PI
),
304 $pos-$d*sin($a/180*M_PI
));
306 $a +
= $this->angle_step
;
311 function StrokeAngleLabels($pos,$type) {
313 if( !$this->show_angle_label
)
316 $x0 = round($this->img
->left_margin+
$this->img
->plotwidth
/2)+
1;
318 $d = max($this->img
->plotwidth
,$this->img
->plotheight
)*1.42;
319 $a = $this->angle_step
;
321 $t->SetColor($this->angle_fontcolor
);
322 $t->SetFont($this->angle_fontfam
,$this->angle_fontstyle
,$this->angle_fontsize
);
323 $xright = $this->img
->width
- $this->img
->right_margin
;
324 $ytop = $this->img
->top_margin
;
325 $xleft = $this->img
->left_margin
;
326 $ybottom = $this->img
->height
- $this->img
->bottom_margin
;
329 $w = $this->img
->plotwidth
/2;
330 $h = $this->img
->plotheight
/2;
331 $xt = $x0; $yt = $pos;
334 $tl = $this->angle_tick_len
; // Outer len
335 $tl2 = $this->angle_tick_len2
; // Interior len
337 $this->img
->SetColor($this->angle_tick_color
);
338 $rot90 = $this->img
->a
== 90 ;
340 if( $type == POLAR_360
) {
341 $ca1 = atan($h/$w)/M_PI
*180;
347 $ca = cos($a/180*M_PI
);
348 $sa = sin($a/180*M_PI
);
352 if( $a <= $ca1 ||
$a >= $ca4 ) {
353 $yt = $pos - $w * $y/$x;
354 $xt = $xright +
$margin;
363 $x1=$xright-$tl2; $x2=$xright+
$tl;
366 elseif( $a > $ca1 && $a < $ca2 ) {
367 $xt = $x0 +
$h * $x/$y;
368 $yt = $ytop - $margin;
377 $y1=$ytop+
$tl2;$y2=$ytop-$tl;
380 elseif( $a >= $ca2 && $a <= $ca3 ) {
381 $yt = $pos +
$w * $y/$x;
382 $xt = $xleft - $margin;
391 $x1=$xleft+
$tl2;$x2=$xleft-$tl;
395 $xt = $x0 - $h * $x/$y;
396 $yt = $ybottom +
$margin;
405 $y1=$ybottom-$tl2;$y2=$ybottom+
$tl;
408 if( $a != 0 && $a != 180 ) {
410 if( $this->show_angle_mark
)
413 $t->Stroke($this->img
,$xt,$yt);
414 if( $this->show_angle_tick
)
415 $this->img
->Line($x1,$y1,$x2,$y2);
417 $a +
= $this->angle_step
;
422 $ca1 = atan($h/$w*2)/M_PI
*180;
426 $ca = cos($a/180*M_PI
);
427 $sa = sin($a/180*M_PI
);
431 $yt = $pos - $w * $y/$x;
432 $xt = $xright +
$margin;
441 $x1=$xright-$tl2; $x2=$xright+
$tl;
444 elseif( $a > $ca1 && $a < $ca2 ) {
445 $xt = $x0 +
2*$h * $x/$y;
446 $yt = $ytop - $margin;
455 $y1=$ytop+
$tl2;$y2=$ytop-$tl;
458 elseif( $a >= $ca2 ) {
459 $yt = $pos +
$w * $y/$x;
460 $xt = $xleft - $margin;
469 $x1=$xleft+
$tl2;$x2=$xleft-$tl;
473 if( $this->show_angle_mark
)
476 $t->Stroke($this->img
,$xt,$yt);
477 if( $this->show_angle_tick
)
478 $this->img
->Line($x1,$y1,$x2,$y2);
479 $a +
= $this->angle_step
;
484 function Stroke($pos) {
486 $this->img
->SetLineWeight($this->weight
);
487 $this->img
->SetColor($this->color
);
488 $this->img
->SetFont($this->font_family
,$this->font_style
,$this->font_size
);
489 if( !$this->hide_line
)
490 $this->img
->FilledRectangle($this->img
->left_margin
,$pos,
491 $this->img
->width
-$this->img
->right_margin
,$pos+
$this->weight
-1);
492 $y=$pos+
$this->img
->GetFontHeight()+
$this->title_margin+
$this->title
->margin
;
493 if( $this->title_adjust
=="high" )
494 $this->title
->Pos($this->img
->width
-$this->img
->right_margin
,$y,"right","top");
495 elseif( $this->title_adjust
=="middle" ||
$this->title_adjust
=="center" )
496 $this->title
->Pos(($this->img
->width
-$this->img
->left_margin
-
497 $this->img
->right_margin
)/2+
$this->img
->left_margin
,
499 elseif($this->title_adjust
=="low")
500 $this->title
->Pos($this->img
->left_margin
,$y,"left","top");
502 JpGraphError
::RaiseL(17002,$this->title_adjust
);
503 //('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')');
507 if (!$this->hide_labels
) {
508 $this->StrokeLabels($pos,false);
510 $this->img
->SetColor($this->radius_tick_color
);
511 $this->scale
->ticks
->Stroke($this->img
,$this->scale
,$pos);
514 // Mirror the positions for the left side of the scale
516 $mid = 2*($this->img
->left_margin+
$this->img
->plotwidth
/2);
517 $n = count($this->scale
->ticks
->ticks_pos
);
520 $this->scale
->ticks
->ticks_pos
[$i] =
521 $mid-$this->scale
->ticks
->ticks_pos
[$i] ;
525 $n = count($this->scale
->ticks
->maj_ticks_pos
);
528 $this->scale
->ticks
->maj_ticks_pos
[$i] =
529 $mid-$this->scale
->ticks
->maj_ticks_pos
[$i] ;
533 $n = count($this->scale
->ticks
->maj_ticklabels_pos
);
536 $this->scale
->ticks
->maj_ticklabels_pos
[$i] =
537 $mid-$this->scale
->ticks
->maj_ticklabels_pos
[$i] ;
541 // Draw the left side of the scale
542 $n = count($this->scale
->ticks
->ticks_pos
);
543 $yu = $pos - $this->scale
->ticks
->direction
*$this->scale
->ticks
->GetMinTickAbsSize();
547 if( ! $this->scale
->ticks
->supress_minor_tickmarks
) {
550 $x = round($this->scale
->ticks
->ticks_pos
[$i]) ;
551 $this->img
->Line($x,$pos,$x,$yu);
556 $n = count($this->scale
->ticks
->maj_ticks_pos
);
557 $yu = $pos - $this->scale
->ticks
->direction
*$this->scale
->ticks
->GetMajTickAbsSize();
561 if( ! $this->scale
->ticks
->supress_tickmarks
) {
564 $x = round($this->scale
->ticks
->maj_ticks_pos
[$i]) ;
565 $this->img
->Line($x,$pos,$x,$yu);
569 if (!$this->hide_labels
) {
570 $this->StrokeLabels($pos,false);
572 $this->title
->Stroke($this->img
);
576 class PolarScale
extends LinearScale
{
578 function PolarScale($aMax=0,&$graph) {
579 parent
::LinearScale(0,$aMax,'x');
580 $this->graph
= &$graph;
583 function _Translate($v) {
584 return parent
::Translate($v);
587 function PTranslate($aAngle,$aRad) {
589 $m = $this->scale
[1];
590 $w = $this->graph
->img
->plotwidth
/2;
593 $x = cos( $aAngle/180 * M_PI
) * $aRad;
594 $y = sin( $aAngle/180 * M_PI
) * $aRad;
596 $x +
= $this->_Translate(0);
598 if( $this->graph
->iType
== POLAR_360
) {
599 $y = ($this->graph
->img
->top_margin +
$this->graph
->img
->plotheight
/2) - $y;
602 $y = ($this->graph
->img
->top_margin +
$this->graph
->img
->plotheight
) - $y;
608 class PolarLogScale
extends LogScale
{
610 function PolarLogScale($aMax=1,&$graph) {
611 parent
::LogScale(0,$aMax,'x');
612 $this->graph
= &$graph;
613 $this->ticks
->SetLabelLogType(LOGLABELS_MAGNITUDE
);
617 function PTranslate($aAngle,$aRad) {
621 $aRad = log10($aRad);
622 $m = $this->scale
[1];
623 $w = $this->graph
->img
->plotwidth
/2;
626 $x = cos( $aAngle/180 * M_PI
) * $aRad;
627 $y = sin( $aAngle/180 * M_PI
) * $aRad;
629 $x +
= $w+
$this->graph
->img
->left_margin
;//$this->_Translate(0);
630 if( $this->graph
->iType
== POLAR_360
) {
631 $y = ($this->graph
->img
->top_margin +
$this->graph
->img
->plotheight
/2) - $y;
634 $y = ($this->graph
->img
->top_margin +
$this->graph
->img
->plotheight
) - $y;
640 class PolarGraph
extends Graph
{
642 var $iType=POLAR_360
;
645 function PolarGraph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) {
646 parent
::Graph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) ;
647 $this->SetDensity(TICKD_DENSE
);
649 $this->SetMarginColor('white');
652 function SetDensity($aDense) {
653 $this->SetTickDensity(TICKD_NORMAL
,$aDense);
656 function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) {
657 $adj = ($this->img
->height
- $this->img
->width
)/2;
659 $this->img
->SetMargin($lm-$adj,$rm-$adj,$tm+
$adj,$bm+
$adj);
660 $this->img
->SetCenter(floor($this->img
->width
/2),floor($this->img
->height
/2));
661 $this->axis
->SetLabelAlign('right','center');
662 //JpGraphError::Raise('Set90AndMargin() is not supported for polar graphs.');
665 function SetScale($aScale,$rmax=0) {
666 if( $aScale == 'lin' )
667 $this->scale
= new PolarScale($rmax,$this);
668 elseif( $aScale == 'log' ) {
669 $this->scale
= new PolarLogScale($rmax,$this);
672 JpGraphError
::RaiseL(17004);//('Unknown scale type for polar graph. Must be "lin" or "log"');
675 $this->axis
= new PolarAxis($this->img
,$this->scale
);
676 $this->SetMargin(40,40,50,40);
679 function SetType($aType) {
680 $this->iType
= $aType;
683 function SetPlotSize($w,$h) {
684 $this->SetMargin(($this->img
->width
-$w)/2,($this->img
->width
-$w)/2,
685 ($this->img
->height
-$h)/2,($this->img
->height
-$h)/2);
689 function GetPlotsMax() {
690 $n = count($this->plots
);
691 $m = $this->plots
[0]->Max();
694 $m = max($this->plots
[$i]->Max(),$m);
700 function Stroke($aStrokeFileName="") {
702 // Start by adjusting the margin so that potential titles will fit.
703 $this->AdjustMarginsForTitles();
705 // If the filename is the predefined value = '_csim_special_'
706 // we assume that the call to stroke only needs to do enough
707 // to correctly generate the CSIM maps.
708 // We use this variable to skip things we don't strictly need
709 // to do to generate the image map to improve performance
710 // a best we can. Therefor you will see a lot of tests !$_csim in the
712 $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE
);
714 // We need to know if we have stroked the plot in the
715 // GetCSIMareas. Otherwise the CSIM hasn't been generated
716 // and in the case of GetCSIM called before stroke to generate
717 // CSIM without storing an image to disk GetCSIM must call Stroke.
718 $this->iHasStroked
= true;
720 //Check if we should autoscale axis
721 if( !$this->scale
->IsSpecified() && count($this->plots
)>0 ) {
722 $max = $this->GetPlotsMax();
723 $t1 = $this->img
->plotwidth
;
724 $this->img
->plotwidth
/= 2;
725 $t2 = $this->img
->left_margin
;
726 $this->img
->left_margin +
= $this->img
->plotwidth+
1;
727 $this->scale
->AutoScale($this->img
,0,$max,
728 $this->img
->plotwidth
/$this->xtick_factor
/2);
729 $this->img
->plotwidth
= $t1;
730 $this->img
->left_margin
= $t2;
733 // The tick calculation will use the user suplied min/max values to determine
734 // the ticks. If auto_ticks is false the exact user specifed min and max
735 // values will be used for the scale.
736 // If auto_ticks is true then the scale might be slightly adjusted
737 // so that the min and max values falls on an even major step.
739 $max = $this->scale
->scale
[1];
740 $t1 = $this->img
->plotwidth
;
741 $this->img
->plotwidth
/= 2;
742 $t2 = $this->img
->left_margin
;
743 $this->img
->left_margin +
= $this->img
->plotwidth+
1;
744 $this->scale
->AutoScale($this->img
,0,$max,
745 $this->img
->plotwidth
/$this->xtick_factor
/2);
746 $this->img
->plotwidth
= $t1;
747 $this->img
->left_margin
= $t2;
750 if( $this->iType
== POLAR_180
)
751 $pos = $this->img
->height
- $this->img
->bottom_margin
;
753 $pos = $this->img
->plotheight
/2 +
$this->img
->top_margin
;
757 $this->StrokePlotArea();
760 $this->iDoClipping
= true;
762 if( $this->iDoClipping
) {
763 $oldimage = $this->img
->CloneCanvasH();
767 $this->axis
->StrokeGrid($pos);
770 // Stroke all plots for Y1 axis
771 for($i=0; $i < count($this->plots
); ++
$i) {
772 $this->plots
[$i]->Stroke($this->img
,$this->scale
);
776 if( $this->iDoClipping
) {
777 // Clipping only supports graphs at 0 and 90 degrees
778 if( $this->img
->a
== 0 ) {
779 $this->img
->CopyCanvasH($oldimage,$this->img
->img
,
780 $this->img
->left_margin
,$this->img
->top_margin
,
781 $this->img
->left_margin
,$this->img
->top_margin
,
782 $this->img
->plotwidth+
1,$this->img
->plotheight+
1);
784 elseif( $this->img
->a
== 90 ) {
785 $adj = round(($this->img
->height
- $this->img
->width
)/2);
786 $this->img
->CopyCanvasH($oldimage,$this->img
->img
,
787 $this->img
->bottom_margin
-$adj,$this->img
->left_margin+
$adj,
788 $this->img
->bottom_margin
-$adj,$this->img
->left_margin+
$adj,
789 $this->img
->plotheight
,$this->img
->plotwidth
);
791 $this->img
->Destroy();
792 $this->img
->SetCanvasH($oldimage);
796 $this->axis
->Stroke($pos);
797 $this->axis
->StrokeAngleLabels($pos,$this->iType
);
801 $this->StrokePlotBox();
802 $this->footer
->Stroke($this->img
);
804 // The titles and legends never gets rotated so make sure
805 // that the angle is 0 before stroking them
806 $aa = $this->img
->SetAngle(0);
807 $this->StrokeTitles();
810 for($i=0; $i < count($this->plots
) ; ++
$i ) {
811 $this->plots
[$i]->Legend($this);
814 $this->legend
->Stroke($this->img
);
818 $this->StrokeTexts();
819 $this->img
->SetAngle($aa);
821 // Draw an outline around the image map
823 $this->DisplayClientSideaImageMapAreas();
825 // Adjust the appearance of the image
826 $this->AdjustSaturationBrightnessContrast();
828 // If the filename is given as the special "__handle"
829 // then the image handler is returned and the image is NOT
831 if( $aStrokeFileName == _IMG_HANDLER
) {
832 return $this->img
->img
;
835 // Finally stream the generated picture
836 $this->cache
->PutAndStream($this->img
,$this->cache_name
,$this->inline
,