2 Copyright 1999-2012 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
90 typedef struct _AffineMatrix
101 typedef struct _GeometryInfo
111 typedef struct _OffsetInfo
118 typedef struct _PointInfo
125 typedef struct _RectangleInfo
136 extern MagickExport char
137 *GetPageGeometry(const char *);
139 extern MagickExport MagickBooleanType
140 IsGeometry(const char *),
141 IsSceneGeometry(const char *,const MagickBooleanType);
143 extern MagickExport MagickStatusType
144 GetGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
145 ParseAbsoluteGeometry(const char *,RectangleInfo *),
146 ParseAffineGeometry(const char *,AffineMatrix *,ExceptionInfo *),
147 ParseGeometry(const char *,GeometryInfo *),
148 ParseGravityGeometry(const Image *,const char *,RectangleInfo *,
150 ParseMetaGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
151 ParsePageGeometry(const Image *,const char *,RectangleInfo *,ExceptionInfo *),
152 ParseRegionGeometry(const Image *,const char *,RectangleInfo *,
155 extern MagickExport void
156 GravityAdjustGeometry(const size_t,const size_t,
157 const GravityType,RectangleInfo *),
158 SetGeometry(const Image *,RectangleInfo *),
159 SetGeometryInfo(GeometryInfo *);
161 #if defined(__cplusplus) || defined(c_plusplus)