|
MagickCore
6.7.5
|
00001 /* 00002 Copyright 1999-2012 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 drawing methods. 00017 */ 00018 #ifndef _MAGICKCORE_DRAW_H 00019 #define _MAGICKCORE_DRAW_H 00020 00021 #if defined(__cplusplus) || defined(c_plusplus) 00022 extern "C" { 00023 #endif 00024 00025 #include "MagickCore/geometry.h" 00026 #include "MagickCore/image.h" 00027 #include "MagickCore/pixel.h" 00028 #include "MagickCore/type.h" 00029 00030 typedef enum 00031 { 00032 UndefinedAlign, 00033 LeftAlign, 00034 CenterAlign, 00035 RightAlign 00036 } AlignType; 00037 00038 typedef enum 00039 { 00040 UndefinedPathUnits, 00041 UserSpace, 00042 UserSpaceOnUse, 00043 ObjectBoundingBox 00044 } ClipPathUnits; 00045 00046 typedef enum 00047 { 00048 UndefinedDecoration, 00049 NoDecoration, 00050 UnderlineDecoration, 00051 OverlineDecoration, 00052 LineThroughDecoration 00053 } DecorationType; 00054 00055 typedef enum 00056 { 00057 UndefinedDirection, 00058 RightToLeftDirection, 00059 LeftToRightDirection 00060 } DirectionType; 00061 00062 typedef enum 00063 { 00064 UndefinedRule, 00065 #undef EvenOddRule 00066 EvenOddRule, 00067 NonZeroRule 00068 } FillRule; 00069 00070 typedef enum 00071 { 00072 UndefinedGradient, 00073 LinearGradient, 00074 RadialGradient 00075 } GradientType; 00076 00077 typedef enum 00078 { 00079 UndefinedCap, 00080 ButtCap, 00081 RoundCap, 00082 SquareCap 00083 } LineCap; 00084 00085 typedef enum 00086 { 00087 UndefinedJoin, 00088 MiterJoin, 00089 RoundJoin, 00090 BevelJoin 00091 } LineJoin; 00092 00093 typedef enum 00094 { 00095 UndefinedMethod, 00096 PointMethod, 00097 ReplaceMethod, 00098 FloodfillMethod, 00099 FillToBorderMethod, 00100 ResetMethod 00101 } PaintMethod; 00102 00103 typedef enum 00104 { 00105 UndefinedPrimitive, 00106 PointPrimitive, 00107 LinePrimitive, 00108 RectanglePrimitive, 00109 RoundRectanglePrimitive, 00110 ArcPrimitive, 00111 EllipsePrimitive, 00112 CirclePrimitive, 00113 PolylinePrimitive, 00114 PolygonPrimitive, 00115 BezierPrimitive, 00116 ColorPrimitive, 00117 MattePrimitive, 00118 TextPrimitive, 00119 ImagePrimitive, 00120 PathPrimitive 00121 } PrimitiveType; 00122 00123 typedef enum 00124 { 00125 UndefinedReference, 00126 GradientReference 00127 } ReferenceType; 00128 00129 typedef enum 00130 { 00131 UndefinedSpread, 00132 PadSpread, 00133 ReflectSpread, 00134 RepeatSpread 00135 } SpreadMethod; 00136 00137 typedef struct _StopInfo 00138 { 00139 PixelInfo 00140 color; 00141 00142 MagickRealType 00143 offset; 00144 } StopInfo; 00145 00146 typedef struct _GradientInfo 00147 { 00148 GradientType 00149 type; 00150 00151 RectangleInfo 00152 bounding_box; 00153 00154 SegmentInfo 00155 gradient_vector; 00156 00157 StopInfo 00158 *stops; 00159 00160 size_t 00161 number_stops; 00162 00163 SpreadMethod 00164 spread; 00165 00166 MagickBooleanType 00167 debug; 00168 00169 size_t 00170 signature; 00171 00172 PointInfo 00173 center; 00174 00175 MagickRealType 00176 radius; 00177 } GradientInfo; 00178 00179 typedef struct _ElementReference 00180 { 00181 char 00182 *id; 00183 00184 ReferenceType 00185 type; 00186 00187 GradientInfo 00188 gradient; 00189 00190 size_t 00191 signature; 00192 00193 struct _ElementReference 00194 *previous, 00195 *next; 00196 } ElementReference; 00197 00198 typedef struct _DrawInfo 00199 { 00200 char 00201 *primitive, 00202 *geometry; 00203 00204 RectangleInfo 00205 viewbox; 00206 00207 AffineMatrix 00208 affine; 00209 00210 PixelInfo 00211 fill, 00212 stroke, 00213 undercolor, 00214 border_color; 00215 00216 Image 00217 *fill_pattern, 00218 *stroke_pattern; 00219 00220 double 00221 stroke_width; 00222 00223 GradientInfo 00224 gradient; 00225 00226 MagickBooleanType 00227 stroke_antialias, 00228 text_antialias; 00229 00230 FillRule 00231 fill_rule; 00232 00233 LineCap 00234 linecap; 00235 00236 LineJoin 00237 linejoin; 00238 00239 size_t 00240 miterlimit; 00241 00242 double 00243 dash_offset; 00244 00245 DecorationType 00246 decorate; 00247 00248 CompositeOperator 00249 compose; 00250 00251 char 00252 *text, 00253 *font, 00254 *metrics, 00255 *family; 00256 00257 size_t 00258 face; 00259 00260 StyleType 00261 style; 00262 00263 StretchType 00264 stretch; 00265 00266 size_t 00267 weight; 00268 00269 char 00270 *encoding; 00271 00272 double 00273 pointsize; 00274 00275 char 00276 *density; 00277 00278 AlignType 00279 align; 00280 00281 GravityType 00282 gravity; 00283 00284 char 00285 *server_name; 00286 00287 double 00288 *dash_pattern; 00289 00290 char 00291 *clip_mask; 00292 00293 SegmentInfo 00294 bounds; 00295 00296 ClipPathUnits 00297 clip_units; 00298 00299 Quantum 00300 alpha; 00301 00302 MagickBooleanType 00303 render; 00304 00305 ElementReference 00306 element_reference; 00307 00308 double 00309 kerning, 00310 interword_spacing, 00311 interline_spacing; 00312 00313 DirectionType 00314 direction; 00315 00316 MagickBooleanType 00317 debug; 00318 00319 size_t 00320 signature; 00321 } DrawInfo; 00322 00323 00324 typedef struct _PrimitiveInfo 00325 { 00326 PointInfo 00327 point; 00328 00329 size_t 00330 coordinates; 00331 00332 PrimitiveType 00333 primitive; 00334 00335 PaintMethod 00336 method; 00337 00338 char 00339 *text; 00340 } PrimitiveInfo; 00341 00342 typedef struct _TypeMetric 00343 { 00344 PointInfo 00345 pixels_per_em; 00346 00347 double 00348 ascent, 00349 descent, 00350 width, 00351 height, 00352 max_advance, 00353 underline_position, 00354 underline_thickness; 00355 00356 SegmentInfo 00357 bounds; 00358 00359 PointInfo 00360 origin; 00361 } TypeMetric; 00362 00363 extern MagickExport DrawInfo 00364 *AcquireDrawInfo(void), 00365 *CloneDrawInfo(const ImageInfo *,const DrawInfo *), 00366 *DestroyDrawInfo(DrawInfo *); 00367 00368 extern MagickExport MagickBooleanType 00369 DrawAffineImage(Image *,const Image *,const AffineMatrix *,ExceptionInfo *), 00370 DrawClipPath(Image *,const DrawInfo *,const char *,ExceptionInfo *), 00371 DrawGradientImage(Image *,const DrawInfo *,ExceptionInfo *), 00372 DrawImage(Image *,const DrawInfo *,ExceptionInfo *), 00373 DrawPatternPath(Image *,const DrawInfo *,const char *,Image **, 00374 ExceptionInfo *), 00375 DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *,ExceptionInfo *); 00376 00377 extern MagickExport void 00378 GetAffineMatrix(AffineMatrix *), 00379 GetDrawInfo(const ImageInfo *,DrawInfo *); 00380 00381 #if defined(__cplusplus) || defined(c_plusplus) 00382 } 00383 #endif 00384 00385 #endif