Back to index

tetex-bin  3.0
gdfx.h
Go to the documentation of this file.
00001 #ifdef __cplusplus
00002 extern "C" {
00003 #endif
00004 
00005 #ifndef GDFX_H
00006 #define GDFX_H 1
00007 
00008 #include "gd.h"
00009 
00010 /* im MUST be square, but can have any size. Returns a new image 
00011        of width and height radius * 2, in which the X axis of
00012        the original has been remapped to theta (angle) and the Y axis
00013        of the original has been remapped to rho (distance from center).
00014        This is known as a "polar coordinate transform." */
00015 
00016  BGD_DECLARE(gdImagePtr) gdImageSquareToCircle(gdImagePtr im, int radius);
00017 
00018 /* Draws the text 'top' and 'bottom' on 'im', curved along the
00019        edge of a circle of radius 'radius', with its
00020        center at 'cx' and 'cy'. 'top' is written clockwise
00021        along the top; 'bottom' is written counterclockwise
00022        along the bottom. 'textRadius' determines the 'height'
00023        of each character; if 'textRadius' is 1/2 of 'radius',
00024        characters extend halfway from the edge to the center.
00025        'fillPortion' varies from 0 to 1.0, with useful values
00026        from about 0.4 to 0.9, and determines how much of the
00027        180 degrees of arc assigned to each section of text
00028        is actually occupied by text; 0.9 looks better than
00029        1.0 which is rather crowded. 'font' is a freetype
00030        font; see gdImageStringFT. 'points' is passed to the
00031        freetype engine and has an effect on hinting; although
00032        the size of the text is determined by radius, textRadius,
00033        and fillPortion, you should pass a point size that
00034        'hints' appropriately -- if you know the text will be
00035        large, pass a large point size such as 24.0 to get the 
00036        best results. 'fgcolor' can be any color, and may have
00037        an alpha component, do blending, etc. 
00038 
00039        Returns 0 on success, or an error string. */     
00040 
00041 BGD_DECLARE(char *) gdImageStringFTCircle(
00042        gdImagePtr im,
00043        int cx,
00044        int cy,
00045        double radius,
00046        double textRadius,
00047        double fillPortion,
00048        char *font,
00049        double points,
00050        char *top,
00051        char *bottom,
00052        int fgcolor);
00053 
00054  /* 2.0.16: 
00055   * Sharpen function added on 2003-11-19
00056   * by Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
00057   * Simple 3x3 convolution kernel
00058   * Makes use of seperability
00059   * Faster, but less flexible, than full-blown unsharp masking
00060   * pct is sharpening percentage, and can be greater than 100
00061   * Silently does nothing to non-truecolor images
00062   * Silently does nothing for pct<0, as not a useful blurring function
00063   * Leaves transparency/alpha-channel untouched
00064   */
00065 
00066  BGD_DECLARE(void) gdImageSharpen (gdImagePtr im, int pct);
00067 
00068 #endif /* GDFX_H */
00069 
00070 
00071 #ifdef __cplusplus
00072 }
00073 #endif