draw.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 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 "magick/geometry.h"
00026 #include "magick/image.h"
00027 #include "magick/pixel.h"
00028 #include "magick/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   UndefinedRule,
00058 #undef EvenOddRule
00059   EvenOddRule,
00060   NonZeroRule
00061 } FillRule;
00062 
00063 typedef enum
00064 {
00065   UndefinedGradient,
00066   LinearGradient,
00067   RadialGradient
00068 } GradientType;
00069 
00070 typedef enum
00071 {
00072   UndefinedCap,
00073   ButtCap,
00074   RoundCap,
00075   SquareCap
00076 } LineCap;
00077 
00078 typedef enum
00079 {
00080   UndefinedJoin,
00081   MiterJoin,
00082   RoundJoin,
00083   BevelJoin
00084 } LineJoin;
00085 
00086 typedef enum
00087 {
00088   UndefinedMethod,
00089   PointMethod,
00090   ReplaceMethod,
00091   FloodfillMethod,
00092   FillToBorderMethod,
00093   ResetMethod
00094 } PaintMethod;
00095 
00096 typedef enum
00097 {
00098   UndefinedPrimitive,
00099   PointPrimitive,
00100   LinePrimitive,
00101   RectanglePrimitive,
00102   RoundRectanglePrimitive,
00103   ArcPrimitive,
00104   EllipsePrimitive,
00105   CirclePrimitive,
00106   PolylinePrimitive,
00107   PolygonPrimitive,
00108   BezierPrimitive,
00109   ColorPrimitive,
00110   MattePrimitive,
00111   TextPrimitive,
00112   ImagePrimitive,
00113   PathPrimitive
00114 } PrimitiveType;
00115 
00116 typedef enum
00117 {
00118   UndefinedReference,
00119   GradientReference
00120 } ReferenceType;
00121 
00122 typedef enum
00123 {
00124   UndefinedSpread,
00125   PadSpread,
00126   ReflectSpread,
00127   RepeatSpread
00128 } SpreadMethod;
00129 
00130 typedef struct _PointInfo
00131 { 
00132   double
00133     x,
00134     y;
00135 } PointInfo;
00136 
00137 typedef struct _StopInfo
00138 {
00139   MagickPixelPacket
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   unsigned long
00161     number_stops;
00162 
00163   SpreadMethod
00164     spread;
00165 
00166   MagickBooleanType
00167     debug;
00168 
00169   unsigned long
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   unsigned long
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   GravityType
00211     gravity;
00212 
00213   PixelPacket
00214     fill,
00215     stroke;
00216 
00217   double
00218     stroke_width;
00219 
00220   GradientInfo
00221     gradient;
00222 
00223   Image
00224     *fill_pattern,
00225     *tile,
00226     *stroke_pattern;
00227 
00228   MagickBooleanType
00229     stroke_antialias,
00230     text_antialias;
00231 
00232   FillRule
00233     fill_rule;
00234 
00235   LineCap
00236     linecap;
00237 
00238   LineJoin
00239     linejoin;
00240 
00241   unsigned long
00242     miterlimit;
00243 
00244   double
00245     dash_offset;
00246 
00247   DecorationType
00248     decorate;
00249 
00250   CompositeOperator
00251     compose;
00252 
00253   char
00254     *text;
00255 
00256   unsigned long
00257     face;
00258 
00259   char
00260     *font,
00261     *metrics,
00262     *family;
00263 
00264   StyleType
00265     style;
00266 
00267   StretchType
00268     stretch;
00269 
00270   unsigned long
00271     weight;
00272 
00273   char
00274     *encoding;
00275 
00276   double
00277     pointsize;
00278 
00279   char
00280     *density;
00281 
00282   AlignType
00283     align;
00284 
00285   PixelPacket
00286     undercolor,
00287     border_color;
00288 
00289   char
00290     *server_name;
00291 
00292   double
00293     *dash_pattern;
00294 
00295   char
00296     *clip_mask;
00297 
00298   SegmentInfo
00299     bounds;
00300 
00301   ClipPathUnits
00302     clip_units;
00303 
00304   Quantum
00305     opacity;
00306 
00307   MagickBooleanType
00308     render;
00309 
00310   ElementReference
00311     element_reference;
00312 
00313   MagickBooleanType
00314     debug;
00315 
00316   unsigned long
00317     signature;
00318 
00319   double
00320     kerning,
00321     interword_spacing;
00322 } DrawInfo;
00323 
00324 typedef struct _PrimitiveInfo
00325 {
00326   PointInfo
00327     point;
00328 
00329   unsigned long
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 *),
00370   DrawClipPath(Image *,const DrawInfo *,const char *),
00371   DrawGradientImage(Image *,const DrawInfo *),
00372   DrawImage(Image *,const DrawInfo *),
00373   DrawPatternPath(Image *,const DrawInfo *,const char *,Image **),
00374   DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *);
00375 
00376 extern MagickExport void
00377   GetAffineMatrix(AffineMatrix *),
00378   GetDrawInfo(const ImageInfo *,DrawInfo *);
00379 
00380 #if defined(__cplusplus) || defined(c_plusplus)
00381 }
00382 #endif
00383 
00384 #endif

Generated on Thu Jul 2 12:03:19 2009 for MagickCore by  doxygen 1.5.8