GD-Chart
view release on metacpan or search on metacpan
gdchart0.11.4dev/gdchart.c view on Meta::CPAN
/* prspective line */
gdImageLine( im, x1, y1, x2, PY(highest), AnnoteColor );
}
else /* for 3D done with back line */
{
x2 = PX(GDC_annotation->point+(do_bar?1:0));
gdImageLine( im, x1, y1, x1, y1-2, AnnoteColor );
}
/* line-to and note */
if( *(GDC_annotation->note) ) /* any note? */
{
if( GDC_annotation->point >= (num_points/2) ) /* note to the left */
{
gdImageLine( im, x2, PY(highest)-2,
x2-annote_hgt/2, PY(highest)-2-annote_hgt/2,
AnnoteColor );
GDCImageStringNL( im,
&GDC_fontc[GDC_annotation_font_size],
gdc_annotation_font, gdc_annotation_ptsize,
0.0,
x2-annote_hgt/2-1-annote_len - 1,
PY(highest)-annote_hgt+1,
GDC_annotation->note,
AnnoteColor,
GDC_JUSTIFY_RIGHT,
NULL );
}
else /* note to right */
{
gdImageLine( im, x2, PY(highest)-2,
x2+annote_hgt/2, PY(highest)-2-annote_hgt/2,
AnnoteColor );
GDCImageStringNL( im,
&GDC_fontc[GDC_annotation_font_size],
gdc_annotation_font, gdc_annotation_ptsize,
0.0,
x2+annote_hgt/2+1 + 1,
PY(highest)-annote_hgt+1,
GDC_annotation->note,
AnnoteColor,
GDC_JUSTIFY_LEFT,
NULL );
}
}
setno = 0;
}
/* usually GDC_generate_img is used in conjunction with hard or hold options */
if( GDC_generate_img )
{
fflush(img_fptr); /* clear anything buffered */
switch( GDC_image_type )
{
#ifdef HAVE_JPEG
case GDC_JPEG: gdImageJpeg( im, img_fptr, GDC_jpeg_quality ); break;
#endif
case GDC_WBMP: gdImageWBMP( im, PlotColor, img_fptr ); break;
case GDC_GIF: gdImageGif( im, img_fptr); break;
case GDC_PNG:
default: gdImagePng( im, img_fptr );
}
}
if( bg_img )
gdImageDestroy(bg_img);
if( GDC_hold_img & GDC_EXPOSE_IMAGE )
GDC_image = (void*)im;
else
gdImageDestroy(im);
FREE_ARRAY1( uvals );
FREE_ARRAY1( ExtVolColor );
FREE_ARRAY2( ExtColor );
FREE_ARRAY2( ExtColorShd );
return 0;
}
( run in 1.055 second using v1.01-cache-2.11-cpan-39bf76dae61 )