2 Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 http://www.imagemagick.org/script/license.php
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.
16 MagickCore image geometry methods.
18 #ifndef _MAGICKCORE_GEOMETRY_H
19 #define _MAGICKCORE_GEOMETRY_H
21 #if defined(__cplusplus) || defined(c_plusplus)
49 PercentValue = 0x1000, /* '%' percentage of something */
50 AspectValue = 0x2000, /* '!' resize no-aspect - special use flag */
51 NormalizeValue = 0x2000, /* '!' ScaleKernelValue() in morphology.c */
52 LessValue = 0x4000, /* '<' resize smaller - special use flag */
53 GreaterValue = 0x8000, /* '>' resize larger - spacial use flag */
54 MinimumValue = 0x10000, /* '^' special handling needed */
55 CorrelateNormalizeValue = 0x10000, /* '^' see ScaleKernelValue() */
56 AreaValue = 0x20000, /* '@' resize to area - special use flag */
57 DecimalValue = 0x40000, /* '.' floating point numbers found */
59 AllValues = 0x7fffffff
62 #if defined(ForgetGravity)
64 #undef NorthWestGravity
66 #undef NorthEastGravity
70 #undef SouthWestGravity
72 #undef SouthEastGravity
92 typedef struct _AffineMatrix
103 typedef struct _GeometryInfo
113 typedef struct _OffsetInfo
120 typedef struct _RectangleInfo
131 extern MagickExport char
132 *GetPageGeometry(const char *);
134 extern MagickExport MagickBooleanType
135 IsGeometry(const char *),
136 IsSceneGeometry(const char *,const MagickBooleanType);
138 extern MagickExport MagickStatusType
139 GetGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
140 ParseAbsoluteGeometry(const char *,RectangleInfo *),
141 ParseAffineGeometry(const char *,AffineMatrix *,ExceptionInfo *),
142 ParseGeometry(const char *,GeometryInfo *),
143 ParseGravityGeometry(const Image *,const char *,RectangleInfo *,
145 ParseMetaGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
146 ParsePageGeometry(const Image *,const char *,RectangleInfo *,ExceptionInfo *),
147 ParseRegionGeometry(const Image *,const char *,RectangleInfo *,
150 extern MagickExport void
151 GravityAdjustGeometry(const unsigned long,const unsigned long,
152 const GravityType,RectangleInfo *),
153 SetGeometry(const Image *,RectangleInfo *),
154 SetGeometryInfo(GeometryInfo *);
156 #if defined(__cplusplus) || defined(c_plusplus)