source: CIVL/include/headers/gdfx.h@ 1aaefd4

main test-branch
Last change on this file since 1aaefd4 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

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