| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | #ifndef _MAGICKCORE_GEOMETRY_H |
|---|
| 19 | #define _MAGICKCORE_GEOMETRY_H |
|---|
| 20 | |
|---|
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | typedef enum |
|---|
| 26 | { |
|---|
| 27 | #undef NoValue |
|---|
| 28 | NoValue = 0x0000, |
|---|
| 29 | #undef XValue |
|---|
| 30 | PsiValue = 0x0001, |
|---|
| 31 | XValue = 0x0001, |
|---|
| 32 | #undef YValue |
|---|
| 33 | XiValue = 0x0002, |
|---|
| 34 | YValue = 0x0002, |
|---|
| 35 | #undef WidthValue |
|---|
| 36 | RhoValue = 0x0004, |
|---|
| 37 | WidthValue = 0x0004, |
|---|
| 38 | #undef HeightValue |
|---|
| 39 | SigmaValue = 0x0008, |
|---|
| 40 | HeightValue = 0x0008, |
|---|
| 41 | ChiValue = 0x0010, |
|---|
| 42 | XiNegative = 0x0020, |
|---|
| 43 | #undef XNegative |
|---|
| 44 | XNegative = 0x0020, |
|---|
| 45 | PsiNegative = 0x0040, |
|---|
| 46 | #undef YNegative |
|---|
| 47 | YNegative = 0x0040, |
|---|
| 48 | ChiNegative = 0x0080, |
|---|
| 49 | PercentValue = 0x1000, |
|---|
| 50 | AspectValue = 0x2000, |
|---|
| 51 | LessValue = 0x4000, |
|---|
| 52 | GreaterValue = 0x8000, |
|---|
| 53 | MinimumValue = 0x10000, |
|---|
| 54 | AreaValue = 0x20000, |
|---|
| 55 | DecimalValue = 0x40000, |
|---|
| 56 | #undef AllValues |
|---|
| 57 | AllValues = 0x7fffffff |
|---|
| 58 | } GeometryFlags; |
|---|
| 59 | |
|---|
| 60 | #if defined(ForgetGravity) |
|---|
| 61 | #undef ForgetGravity |
|---|
| 62 | #undef NorthWestGravity |
|---|
| 63 | #undef NorthGravity |
|---|
| 64 | #undef NorthEastGravity |
|---|
| 65 | #undef WestGravity |
|---|
| 66 | #undef CenterGravity |
|---|
| 67 | #undef EastGravity |
|---|
| 68 | #undef SouthWestGravity |
|---|
| 69 | #undef SouthGravity |
|---|
| 70 | #undef SouthEastGravity |
|---|
| 71 | #undef StaticGravity |
|---|
| 72 | #endif |
|---|
| 73 | |
|---|
| 74 | typedef enum |
|---|
| 75 | { |
|---|
| 76 | UndefinedGravity, |
|---|
| 77 | ForgetGravity = 0, |
|---|
| 78 | NorthWestGravity = 1, |
|---|
| 79 | NorthGravity = 2, |
|---|
| 80 | NorthEastGravity = 3, |
|---|
| 81 | WestGravity = 4, |
|---|
| 82 | CenterGravity = 5, |
|---|
| 83 | EastGravity = 6, |
|---|
| 84 | SouthWestGravity = 7, |
|---|
| 85 | SouthGravity = 8, |
|---|
| 86 | SouthEastGravity = 9, |
|---|
| 87 | StaticGravity = 10 |
|---|
| 88 | } GravityType; |
|---|
| 89 | |
|---|
| 90 | typedef struct _AffineMatrix |
|---|
| 91 | { |
|---|
| 92 | double |
|---|
| 93 | sx, |
|---|
| 94 | rx, |
|---|
| 95 | ry, |
|---|
| 96 | sy, |
|---|
| 97 | tx, |
|---|
| 98 | ty; |
|---|
| 99 | } AffineMatrix; |
|---|
| 100 | |
|---|
| 101 | typedef struct _GeometryInfo |
|---|
| 102 | { |
|---|
| 103 | double |
|---|
| 104 | rho, |
|---|
| 105 | sigma, |
|---|
| 106 | xi, |
|---|
| 107 | psi, |
|---|
| 108 | chi; |
|---|
| 109 | } GeometryInfo; |
|---|
| 110 | |
|---|
| 111 | typedef struct _RectangleInfo |
|---|
| 112 | { |
|---|
| 113 | unsigned long |
|---|
| 114 | width, |
|---|
| 115 | height; |
|---|
| 116 | |
|---|
| 117 | long |
|---|
| 118 | x, |
|---|
| 119 | y; |
|---|
| 120 | } RectangleInfo; |
|---|
| 121 | |
|---|
| 122 | extern MagickExport char |
|---|
| 123 | *GetPageGeometry(const char *); |
|---|
| 124 | |
|---|
| 125 | extern MagickExport MagickBooleanType |
|---|
| 126 | IsGeometry(const char *), |
|---|
| 127 | IsSceneGeometry(const char *,const MagickBooleanType); |
|---|
| 128 | |
|---|
| 129 | extern MagickExport MagickStatusType |
|---|
| 130 | GetGeometry(const char *,long *,long *,unsigned long *,unsigned long *), |
|---|
| 131 | ParseAbsoluteGeometry(const char *,RectangleInfo *), |
|---|
| 132 | ParseAffineGeometry(const char *,AffineMatrix *), |
|---|
| 133 | ParseGeometry(const char *,GeometryInfo *), |
|---|
| 134 | ParseGravityGeometry(Image *,const char *,RectangleInfo *), |
|---|
| 135 | ParseMetaGeometry(const char *,long *,long *,unsigned long *,unsigned long *), |
|---|
| 136 | ParsePageGeometry(Image *,const char *,RectangleInfo *), |
|---|
| 137 | ParseSizeGeometry(Image *,const char *,RectangleInfo *); |
|---|
| 138 | |
|---|
| 139 | extern MagickExport void |
|---|
| 140 | GravityAdjustGeometry(const unsigned long,const unsigned long, |
|---|
| 141 | const GravityType,RectangleInfo *), |
|---|
| 142 | SetGeometry(const Image *,RectangleInfo *), |
|---|
| 143 | SetGeometryInfo(GeometryInfo *); |
|---|
| 144 | |
|---|
| 145 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 146 | } |
|---|
| 147 | #endif |
|---|
| 148 | |
|---|
| 149 | #endif |
|---|