geometry.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 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.  You may
00006   obtain a copy of the License at
00007   
00008     https://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   XValue = 0x0001,
00031   XiValue = 0x0001,
00032 #undef YValue
00033   YValue = 0x0002,
00034   PsiValue = 0x0002,
00035 #undef WidthValue
00036   WidthValue = 0x0004,
00037   RhoValue = 0x0004,
00038 #undef HeightValue
00039   HeightValue = 0x0008,
00040   SigmaValue = 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,    /* '%'  percentage of something */
00050   AspectValue = 0x2000,     /* '!'  resize no-aspect - special use flag */
00051   NormalizeValue = 0x2000,  /* '!'  ScaleKernelValue() in morphology.c */
00052   LessValue = 0x4000,       /* '<'  resize smaller - special use flag */
00053   GreaterValue = 0x8000,    /* '>'  resize larger - spacial use flag */
00054   MinimumValue = 0x10000,   /* '^'  special handling needed */
00055   CorrelateNormalizeValue = 0x10000, /* '^' see ScaleKernelValue() */
00056   AreaValue = 0x20000,      /* '@'  resize to area - special use flag */
00057   DecimalValue = 0x40000,   /* '.'  floating point numbers found */
00058   SeparatorValue = 0x80000, /* 'x'  separator found  */
00059   AspectRatioValue = 0x100000,    /* '~'  special handling needed  */
00060 #undef AllValues
00061   AllValues = 0x7fffffff
00062 } GeometryFlags;
00063 
00064 #if defined(ForgetGravity)
00065 #undef ForgetGravity
00066 #undef NorthWestGravity
00067 #undef NorthGravity
00068 #undef NorthEastGravity
00069 #undef WestGravity
00070 #undef CenterGravity
00071 #undef EastGravity
00072 #undef SouthWestGravity
00073 #undef SouthGravity
00074 #undef SouthEastGravity
00075 #undef StaticGravity
00076 #endif
00077 
00078 typedef enum
00079 {
00080   UndefinedGravity,
00081   ForgetGravity = 0,
00082   NorthWestGravity = 1,
00083   NorthGravity = 2,
00084   NorthEastGravity = 3,
00085   WestGravity = 4, 
00086   CenterGravity = 5,
00087   EastGravity = 6,
00088   SouthWestGravity = 7,
00089   SouthGravity = 8,
00090   SouthEastGravity = 9,
00091   StaticGravity = 10 
00092 } GravityType;
00093 
00094 typedef struct _AffineMatrix
00095 {
00096   double
00097     sx,
00098     rx,
00099     ry,
00100     sy,
00101     tx,
00102     ty;
00103 } AffineMatrix;
00104 
00105 typedef struct _GeometryInfo
00106 {
00107   double
00108     rho,
00109     sigma,
00110     xi,
00111     psi,
00112     chi;
00113 } GeometryInfo;
00114 
00115 typedef struct _OffsetInfo
00116 {
00117   ssize_t
00118     x,
00119     y;
00120 } OffsetInfo;
00121 
00122 typedef struct _RectangleInfo
00123 {
00124   size_t
00125     width,
00126     height;
00127 
00128   ssize_t
00129     x,
00130     y;
00131 } RectangleInfo;
00132 
00133 extern MagickExport char
00134   *GetPageGeometry(const char *);
00135 
00136 extern MagickExport MagickBooleanType
00137   IsGeometry(const char *),
00138   IsSceneGeometry(const char *,const MagickBooleanType);
00139 
00140 extern MagickExport MagickStatusType
00141   GetGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
00142   ParseAbsoluteGeometry(const char *,RectangleInfo *),
00143   ParseAffineGeometry(const char *,AffineMatrix *,ExceptionInfo *),
00144   ParseGeometry(const char *,GeometryInfo *),
00145   ParseGravityGeometry(const Image *,const char *,RectangleInfo *,
00146     ExceptionInfo *),
00147   ParseMetaGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *),
00148   ParsePageGeometry(const Image *,const char *,RectangleInfo *,ExceptionInfo *),
00149   ParseRegionGeometry(const Image *,const char *,RectangleInfo *,
00150     ExceptionInfo *);
00151 
00152 extern MagickExport void
00153   GravityAdjustGeometry(const size_t,const size_t,const GravityType,
00154     RectangleInfo *),
00155   SetGeometry(const Image *,RectangleInfo *),
00156   SetGeometryInfo(GeometryInfo *);
00157 
00158 #if defined(__cplusplus) || defined(c_plusplus)
00159 }
00160 #endif
00161 
00162 #endif

Generated on 17 Mar 2020 for MagickCore by  doxygen 1.6.1