home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / gdfx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-06-28  |  2.3 KB  |  74 lines

  1. #ifdef __cplusplus
  2. extern "C" {
  3. #endif
  4.  
  5. #ifndef GDFX_H
  6. #define GDFX_H 1
  7.  
  8. #include "gd.h"
  9.  
  10. /* im MUST be square, but can have any size. Returns a new image 
  11.     of width and height radius * 2, in which the X axis of
  12.     the original has been remapped to theta (angle) and the Y axis
  13.     of the original has been remapped to rho (distance from center).
  14.     This is known as a "polar coordinate transform." */
  15.  
  16.  BGD_DECLARE(gdImagePtr) gdImageSquareToCircle(gdImagePtr im, int radius);
  17.  
  18. /* Draws the text 'top' and 'bottom' on 'im', curved along the
  19.     edge of a circle of radius 'radius', with its
  20.     center at 'cx' and 'cy'. 'top' is written clockwise
  21.     along the top; 'bottom' is written counterclockwise
  22.     along the bottom. 'textRadius' determines the 'height'
  23.     of each character; if 'textRadius' is 1/2 of 'radius',
  24.     characters extend halfway from the edge to the center.
  25.     'fillPortion' varies from 0 to 1.0, with useful values
  26.     from about 0.4 to 0.9, and determines how much of the
  27.     180 degrees of arc assigned to each section of text
  28.     is actually occupied by text; 0.9 looks better than
  29.     1.0 which is rather crowded. 'font' is a freetype
  30.     font; see gdImageStringFT. 'points' is passed to the
  31.     freetype engine and has an effect on hinting; although
  32.     the size of the text is determined by radius, textRadius,
  33.     and fillPortion, you should pass a point size that
  34.     'hints' appropriately -- if you know the text will be
  35.     large, pass a large point size such as 24.0 to get the 
  36.     best results. 'fgcolor' can be any color, and may have
  37.     an alpha component, do blending, etc. 
  38.  
  39.     Returns 0 on success, or an error string. */    
  40.  
  41. BGD_DECLARE(char *) gdImageStringFTCircle(
  42.     gdImagePtr im,
  43.     int cx,
  44.     int cy,
  45.     double radius,
  46.     double textRadius,
  47.     double fillPortion,
  48.     char *font,
  49.     double points,
  50.     char *top,
  51.     char *bottom,
  52.     int fgcolor);
  53.  
  54.  /* 2.0.16: 
  55.   * Sharpen function added on 2003-11-19
  56.   * by Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
  57.   * Simple 3x3 convolution kernel
  58.   * Makes use of seperability
  59.   * Faster, but less flexible, than full-blown unsharp masking
  60.   * pct is sharpening percentage, and can be greater than 100
  61.   * Silently does nothing to non-truecolor images
  62.   * Silently does nothing for pct<0, as not a useful blurring function
  63.   * Leaves transparency/alpha-channel untouched
  64.   */
  65.  
  66.  BGD_DECLARE(void) gdImageSharpen (gdImagePtr im, int pct);
  67.  
  68. #endif /* GDFX_H */
  69.  
  70.  
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74.