2 Copyright 1999-2014 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 */
58 SeparatorValue = 0x80000, /* 'x' separator found */
60 AllValues = 0x7fffffff
63 #if defined(ForgetGravity)
65 #undef NorthWestGravity
67 #undef NorthEastGravity
71 #undef SouthWestGravity
73 #undef SouthEastGravity
91 typedef struct _AffineMatrix
102 typedef struct _GeometryInfo
112 typedef struct _OffsetInfo
119 typedef struct _PointInfo
126 typedef struct _RectangleInfo
137 extern MagickExport char
138 *GetPageGeometry(const char *);
140 extern MagickExport MagickBooleanType
141 IsGeometry(const char *),
142 IsSceneGeometry(const char *,const MagickBooleanType);
144 extern MagickExport MagickStatusType
145 GetGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
146 ParseAbsoluteGeometry(const char *,RectangleInfo *),
147 ParseAffineGeometry(const char *,AffineMatrix *,ExceptionInfo *),
148 ParseGeometry(const char *,GeometryInfo *),
149 ParseGravityGeometry(const Image *,const char *,RectangleInfo *,
151 ParseMetaGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
152 ParsePageGeometry(const Image *,const char *,RectangleInfo *,ExceptionInfo *),
153 ParseRegionGeometry(const Image *,const char *,RectangleInfo *,
156 extern MagickExport void
157 GravityAdjustGeometry(const size_t,const size_t,
158 const GravityType,RectangleInfo *),
159 SetGeometry(const Image *,RectangleInfo *),
160 SetGeometryInfo(GeometryInfo *);
162 #if defined(__cplusplus) || defined(c_plusplus)