root / ImageMagick / trunk / magick / geometry.h

Revision 9262, 3.3 kB (checked in by cristy, 7 months ago)
Line 
1/*
2  Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License.
6  obtain a copy of the License at
7 
8    http://www.imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15
16  MagickCore image geometry methods.
17*/
18#ifndef _MAGICKCORE_GEOMETRY_H
19#define _MAGICKCORE_GEOMETRY_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25typedef enum
26{
27#undef NoValue
28  NoValue = 0x0000,
29#undef XValue
30  PsiValue = 0x0001,
31  XValue = 0x0001,
32#undef YValue
33  XiValue = 0x0002,
34  YValue = 0x0002,
35#undef WidthValue
36  RhoValue = 0x0004,
37  WidthValue = 0x0004,
38#undef HeightValue
39  SigmaValue = 0x0008,
40  HeightValue = 0x0008,
41  ChiValue = 0x0010,
42  XiNegative = 0x0020,
43#undef XNegative
44  XNegative = 0x0020,
45  PsiNegative = 0x0040,
46#undef YNegative
47  YNegative = 0x0040,
48  ChiNegative = 0x0080,
49  PercentValue = 0x1000,
50  AspectValue = 0x2000,
51  LessValue = 0x4000,
52  GreaterValue = 0x8000,
53  MinimumValue = 0x10000,
54  AreaValue = 0x20000,
55  DecimalValue = 0x40000,
56#undef AllValues
57  AllValues = 0x7fffffff
58} GeometryFlags;
59
60#if defined(ForgetGravity)
61#undef ForgetGravity
62#undef NorthWestGravity
63#undef NorthGravity
64#undef NorthEastGravity
65#undef WestGravity
66#undef CenterGravity
67#undef EastGravity
68#undef SouthWestGravity
69#undef SouthGravity
70#undef SouthEastGravity
71#undef StaticGravity
72#endif
73
74typedef enum
75{
76  UndefinedGravity,
77  ForgetGravity = 0,
78  NorthWestGravity = 1,
79  NorthGravity = 2,
80  NorthEastGravity = 3,
81  WestGravity = 4,
82  CenterGravity = 5,
83  EastGravity = 6,
84  SouthWestGravity = 7,
85  SouthGravity = 8,
86  SouthEastGravity = 9,
87  StaticGravity = 10
88} GravityType;
89
90typedef struct _AffineMatrix
91{
92  double
93    sx,
94    rx,
95    ry,
96    sy,
97    tx,
98    ty;
99} AffineMatrix;
100
101typedef struct _GeometryInfo
102{
103  double
104    rho,
105    sigma,
106    xi,
107    psi,
108    chi;
109} GeometryInfo;
110
111typedef struct _RectangleInfo
112{
113  unsigned long
114    width,
115    height;
116
117  long
118    x,
119    y;
120} RectangleInfo;
121
122extern MagickExport char
123  *GetPageGeometry(const char *);
124
125extern MagickExport MagickBooleanType
126  IsGeometry(const char *),
127  IsSceneGeometry(const char *,const MagickBooleanType);
128
129extern MagickExport MagickStatusType
130  GetGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
131  ParseAbsoluteGeometry(const char *,RectangleInfo *),
132  ParseAffineGeometry(const char *,AffineMatrix *),
133  ParseGeometry(const char *,GeometryInfo *),
134  ParseGravityGeometry(Image *,const char *,RectangleInfo *),
135  ParseMetaGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
136  ParsePageGeometry(Image *,const char *,RectangleInfo *),
137  ParseSizeGeometry(Image *,const char *,RectangleInfo *);
138
139extern MagickExport void
140  GravityAdjustGeometry(const unsigned long,const unsigned long,
141    const GravityType,RectangleInfo *),
142  SetGeometry(const Image *,RectangleInfo *),
143  SetGeometryInfo(GeometryInfo *);
144
145#if defined(__cplusplus) || defined(c_plusplus)
146}
147#endif
148
149#endif
Note: See TracBrowser for help on using the browser.