# geometry.h

Go to the documentation of this file.

    00001 /*
    00002   Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
    00003   dedicated to making software imaging solutions freely available.
    00004
    00005   You may not use this file except in compliance with the License.
    00006   obtain a copy of the License at
    00007
    00008     http://www.imagemagick.org/script/license.php
    00009
    00010   Unless required by applicable law or agreed to in writing, software
    00011   distributed under the License is distributed on an "AS IS" BASIS,
    00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013   See the License for the specific language governing permissions and
    00014   limitations under the License.
    00015
    00016   MagickCore image geometry methods.
    00017 */
    00018 #ifndef _MAGICKCORE_GEOMETRY_H
    00019 #define _MAGICKCORE_GEOMETRY_H
    00020
    00021 #if defined(__cplusplus) || defined(c_plusplus)
    00022 extern "C" {
    00023 #endif
    00024
    00025 typedef enum
    00026 {
    00027 #undef NoValue
    00028   NoValue = 0x0000,
    00029 #undef XValue
    00030   PsiValue = 0x0001,
    00031   XValue = 0x0001,
    00032 #undef YValue
    00033   XiValue = 0x0002,
    00034   YValue = 0x0002,
    00035 #undef WidthValue
    00036   RhoValue = 0x0004,
    00037   WidthValue = 0x0004,
    00038 #undef HeightValue
    00039   SigmaValue = 0x0008,
    00040   HeightValue = 0x0008,
    00041   ChiValue = 0x0010,
    00042   XiNegative = 0x0020,
    00043 #undef XNegative
    00044   XNegative = 0x0020,
    00045   PsiNegative = 0x0040,
    00046 #undef YNegative
    00047   YNegative = 0x0040,
    00048   ChiNegative = 0x0080,
    00049   PercentValue = 0x1000,
    00050   AspectValue = 0x2000,
    00051   LessValue = 0x4000,
    00052   GreaterValue = 0x8000,
    00053   MinimumValue = 0x10000,
    00054   AreaValue = 0x20000,
    00055   DecimalValue = 0x40000,
    00056 #undef AllValues
    00057   AllValues = 0x7fffffff
    00058 } GeometryFlags;
    00059
    00060 #if defined(ForgetGravity)
    00061 #undef ForgetGravity
    00062 #undef NorthWestGravity
    00063 #undef NorthGravity
    00064 #undef NorthEastGravity
    00065 #undef WestGravity
    00066 #undef CenterGravity
    00067 #undef EastGravity
    00068 #undef SouthWestGravity
    00069 #undef SouthGravity
    00070 #undef SouthEastGravity
    00071 #undef StaticGravity
    00072 #endif
    00073
    00074 typedef enum
    00075 {
    00076   UndefinedGravity,
    00077   ForgetGravity = 0,
    00078   NorthWestGravity = 1,
    00079   NorthGravity = 2,
    00080   NorthEastGravity = 3,
    00081   WestGravity = 4,
    00082   CenterGravity = 5,
    00083   EastGravity = 6,
    00084   SouthWestGravity = 7,
    00085   SouthGravity = 8,
    00086   SouthEastGravity = 9,
    00087   StaticGravity = 10
    00088 } GravityType;
    00089
    00090 typedef struct _AffineMatrix
    00091 {
    00092   double
    00093     sx,
    00094     rx,
    00095     ry,
    00096     sy,
    00097     tx,
    00098     ty;
    00099 } AffineMatrix;
    00100
    00101 typedef struct _GeometryInfo
    00102 {
    00103   double
    00104     rho,
    00105     sigma,
    00106     xi,
    00107     psi,
    00108     chi;
    00109 } GeometryInfo;
    00110
    00111 typedef struct _RectangleInfo
    00112 {
    00113   unsigned long
    00114     width,
    00115     height;
    00116
    00117   long
    00118     x,
    00119     y;
    00120 } RectangleInfo;
    00121
    00122 extern MagickExport char
    00123   *GetPageGeometry(const char *);
    00124
    00125 extern MagickExport MagickBooleanType
    00126   IsGeometry(const char *),
    00127   IsSceneGeometry(const char *,const MagickBooleanType);
    00128
    00129 extern MagickExport MagickStatusType
    00130   GetGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
    00131   ParseAbsoluteGeometry(const char *,RectangleInfo *),
    00132   ParseAffineGeometry(const char *,AffineMatrix *),
    00133   ParseGeometry(const char *,GeometryInfo *),
    00134   ParseGravityGeometry(Image *,const char *,RectangleInfo *),
    00135   ParseMetaGeometry(const char *,long *,long *,unsigned long *,unsigned long *),
    00136   ParsePageGeometry(Image *,const char *,RectangleInfo *),
    00137   ParseShapeGeometry(Image *,const char *,RectangleInfo *);
    00138
    00139 extern MagickExport void
    00140   GravityAdjustGeometry(const unsigned long,const unsigned long,
    00141     const GravityType,RectangleInfo *),
    00142   SetGeometry(const Image *,RectangleInfo *),
    00143   SetGeometryInfo(GeometryInfo *);
    00144
    00145 #if defined(__cplusplus) || defined(c_plusplus)
    00146 }
    00147 #endif
    00148
    00149 #endif