2 Copyright 1999-2011 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 _PointInfo
127 typedef struct _RectangleInfo
138 extern MagickExport char
139 *GetPageGeometry(const char *);
141 extern MagickExport MagickBooleanType
142 IsGeometry(const char *),
143 IsSceneGeometry(const char *,const MagickBooleanType);
145 extern MagickExport MagickStatusType
146 GetGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
147 ParseAbsoluteGeometry(const char *,RectangleInfo *),
148 ParseAffineGeometry(const char *,AffineMatrix *,ExceptionInfo *),
149 ParseGeometry(const char *,GeometryInfo *),
150 ParseGravityGeometry(const Image *,const char *,RectangleInfo *,
152 ParseMetaGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
153 ParsePageGeometry(const Image *,const char *,RectangleInfo *,ExceptionInfo *),
154 ParseRegionGeometry(const Image *,const char *,RectangleInfo *,
157 extern MagickExport void
158 GravityAdjustGeometry(const size_t,const size_t,
159 const GravityType,RectangleInfo *),
160 SetGeometry(const Image *,RectangleInfo *),
161 SetGeometryInfo(GeometryInfo *);
163 #if defined(__cplusplus) || defined(c_plusplus)