Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 1 | |
| 2 | |
| 3 | |
| 4 | |
cristy | 29dc865 | 2015-05-12 16:26:21 +0000 | [diff] [blame] | 5 | <!DOCTYPE html> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 6 | <html lang="en"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 7 | <head> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 8 | <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 9 | <title>ImageMagick: MagickCore, C API for ImageMagick: Draw on an Image</title> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 10 | <meta http-equiv="content-type" content="text/html; charset=utf-8"/> |
| 11 | <meta name="application-name" content="ImageMagick"/> |
| 12 | <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/> |
| 13 | <meta name="application-url" content="http://www.imagemagick.org"/> |
| 14 | <meta name="generator" content="PHP"/> |
| 15 | <meta name="keywords" content="magickcore, c, api, for, imagemagick:, draw, on, an, image, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/> |
| 16 | <meta name="rating" content="GENERAL"/> |
| 17 | <meta name="robots" content="INDEX, FOLLOW"/> |
| 18 | <meta name="generator" content="ImageMagick Studio LLC"/> |
| 19 | <meta name="author" content="ImageMagick Studio LLC"/> |
| 20 | <meta name="revisit-after" content="2 DAYS"/> |
| 21 | <meta name="resource-type" content="document"/> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 22 | <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 23 | <meta name="distribution" content="Global"/> |
| 24 | <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> |
| 25 | <link rel="icon" href="../images/wand.png"/> |
| 26 | <link rel="shortcut icon" href="../images/wand.ico"/> |
| 27 | <link rel="stylesheet" href="../css/magick.html"/> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 28 | </head> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 29 | <body> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 30 | <div class="main"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 31 | <div class="magick-masthead"> |
| 32 | <div class="container"> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 33 | <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 34 | style="display:block" |
| 35 | data-ad-client="ca-pub-3129977114552745" |
| 36 | data-ad-slot="6345125851" |
| 37 | data-ad-format="auto"></ins> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 38 | <script> |
Cristy | 542697a | 2015-10-12 20:10:32 -0400 | [diff] [blame] | 39 | (adsbygoogle = window.adsbygoogle || []).push({}); |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 40 | </script> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 41 | <nav class="magick-nav"> |
cristy | 2f563d4 | 2015-05-06 23:36:51 +0000 | [diff] [blame] | 42 | <a class="magick-nav-item " href="../index.html">Home</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 43 | <a class="magick-nav-item " href="../binary-releases.html">Download</a> |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 44 | <a class="magick-nav-item " href="../command-line-tools.html">Tools</a> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 45 | <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 46 | <a class="magick-nav-item " href="../resources.html">Resources</a> |
| 47 | <a class="magick-nav-item " href="api.html">Develop</a> |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 48 | <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a> |
cristy | a1890f0 | 2015-05-15 23:32:44 +0000 | [diff] [blame] | 49 | <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 50 | </nav> |
| 51 | </div> |
| 52 | </div> |
| 53 | <div class="container"> |
cristy | 4e638cd | 2015-05-07 16:47:40 +0000 | [diff] [blame] | 54 | <div class="magick-header"> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 55 | <p class="text-center"><a href="draw.html#AcquireDrawInfo">AcquireDrawInfo</a> • <a href="draw.html#CloneDrawInfo">CloneDrawInfo</a> • <a href="draw.html#DestroyDrawInfo">DestroyDrawInfo</a> • <a href="draw.html#DrawAffineImage">DrawAffineImage</a> • <a href="draw.html#DrawClipPath">DrawClipPath</a> • <a href="draw.html#DrawImage">DrawImage</a> • <a href="draw.html#DrawGradientImage">DrawGradientImage</a> • <a href="draw.html#DrawPatternPath">DrawPatternPath</a> • <a href="draw.html#DrawPrimitive">DrawPrimitive</a> • <a href="draw.html#GetAffineMatrix">GetAffineMatrix</a></p> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 56 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 57 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="AcquireDrawInfo">AcquireDrawInfo</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 58 | |
| 59 | <p>AcquireDrawInfo() returns a DrawInfo structure properly initialized.</p> |
| 60 | |
| 61 | <p>The format of the AcquireDrawInfo method is:</p> |
| 62 | |
| 63 | <pre class="text"> |
| 64 | DrawInfo *AcquireDrawInfo(void) |
| 65 | </pre> |
| 66 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 67 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="CloneDrawInfo">CloneDrawInfo</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 68 | |
| 69 | <p>CloneDrawInfo() makes a copy of the given draw_info structure. If NULL is specified, a new DrawInfo structure is created initialized to default values.</p> |
| 70 | |
| 71 | <p>The format of the CloneDrawInfo method is:</p> |
| 72 | |
| 73 | <pre class="text"> |
| 74 | DrawInfo *CloneDrawInfo(const ImageInfo *image_info, |
| 75 | const DrawInfo *draw_info) |
| 76 | </pre> |
| 77 | |
| 78 | <p>A description of each parameter follows:</p> |
| 79 | |
| 80 | <dd> |
| 81 | </dd> |
| 82 | |
| 83 | <dd> </dd> |
| 84 | <dl class="dl-horizontal"> |
| 85 | <dt>image_info</dt> |
| 86 | <dd>the image info. </dd> |
| 87 | |
| 88 | <dd> </dd> |
| 89 | <dt>draw_info</dt> |
| 90 | <dd>the draw info. </dd> |
| 91 | |
| 92 | <dd> </dd> |
| 93 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 94 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DestroyDrawInfo">DestroyDrawInfo</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 95 | |
| 96 | <p>DestroyDrawInfo() deallocates memory associated with an DrawInfo structure.</p> |
| 97 | |
| 98 | <p>The format of the DestroyDrawInfo method is:</p> |
| 99 | |
| 100 | <pre class="text"> |
| 101 | DrawInfo *DestroyDrawInfo(DrawInfo *draw_info) |
| 102 | </pre> |
| 103 | |
| 104 | <p>A description of each parameter follows:</p> |
| 105 | |
| 106 | <dd> |
| 107 | </dd> |
| 108 | |
| 109 | <dd> </dd> |
| 110 | <dl class="dl-horizontal"> |
| 111 | <dt>draw_info</dt> |
| 112 | <dd>the draw info. </dd> |
| 113 | |
| 114 | <dd> </dd> |
| 115 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 116 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DrawAffineImage">DrawAffineImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 117 | |
| 118 | <p>DrawAffineImage() composites the source over the destination image as dictated by the affine transform.</p> |
| 119 | |
| 120 | <p>The format of the DrawAffineImage method is:</p> |
| 121 | |
| 122 | <pre class="text"> |
| 123 | MagickBooleanType DrawAffineImage(Image *image,const Image *source, |
| 124 | const AffineMatrix *affine,ExceptionInfo *exception) |
| 125 | </pre> |
| 126 | |
| 127 | <p>A description of each parameter follows:</p> |
| 128 | |
| 129 | <dd> |
| 130 | </dd> |
| 131 | |
| 132 | <dd> </dd> |
| 133 | <dl class="dl-horizontal"> |
| 134 | <dt>image</dt> |
| 135 | <dd>the image. </dd> |
| 136 | |
| 137 | <dd> </dd> |
| 138 | <dt>source</dt> |
| 139 | <dd>the source image. </dd> |
| 140 | |
| 141 | <dd> </dd> |
| 142 | <dt>affine</dt> |
| 143 | <dd>the affine transform. </dd> |
| 144 | |
| 145 | <dd> </dd> |
| 146 | <dt>exception</dt> |
| 147 | <dd>return any errors or warnings in this structure. </dd> |
| 148 | |
| 149 | <dd> </dd> |
| 150 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 151 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DrawClipPath">DrawClipPath</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 152 | |
| 153 | <p>DrawClipPath() draws the clip path on the image mask.</p> |
| 154 | |
| 155 | <p>The format of the DrawClipPath method is:</p> |
| 156 | |
| 157 | <pre class="text"> |
| 158 | MagickBooleanType DrawClipPath(Image *image,const DrawInfo *draw_info, |
| 159 | const char *name,ExceptionInfo *exception) |
| 160 | </pre> |
| 161 | |
| 162 | <p>A description of each parameter follows:</p> |
| 163 | |
| 164 | <dd> |
| 165 | </dd> |
| 166 | |
| 167 | <dd> </dd> |
| 168 | <dl class="dl-horizontal"> |
| 169 | <dt>image</dt> |
| 170 | <dd>the image. </dd> |
| 171 | |
| 172 | <dd> </dd> |
| 173 | <dt>draw_info</dt> |
| 174 | <dd>the draw info. </dd> |
| 175 | |
| 176 | <dd> </dd> |
| 177 | <dt>name</dt> |
| 178 | <dd>the name of the clip path. </dd> |
| 179 | |
| 180 | <dd> </dd> |
| 181 | <dt>exception</dt> |
| 182 | <dd>return any errors or warnings in this structure. </dd> |
| 183 | |
| 184 | <dd> </dd> |
| 185 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 186 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DrawImage">DrawImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 187 | |
| 188 | <p>DrawImage() draws a graphic primitive on your image. The primitive may be represented as a string or filename. Precede the filename with an "at" sign (@) and the contents of the file are drawn on the image. You can affect how text is drawn by setting one or more members of the draw info structure.</p> |
| 189 | |
| 190 | <p>The format of the DrawImage method is:</p> |
| 191 | |
| 192 | <pre class="text"> |
| 193 | MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, |
| 194 | ExceptionInfo *exception) |
| 195 | </pre> |
| 196 | |
| 197 | <p>A description of each parameter follows:</p> |
| 198 | |
| 199 | <dd> |
| 200 | </dd> |
| 201 | |
| 202 | <dd> </dd> |
| 203 | <dl class="dl-horizontal"> |
| 204 | <dt>image</dt> |
| 205 | <dd>the image. </dd> |
| 206 | |
| 207 | <dd> </dd> |
| 208 | <dt>draw_info</dt> |
| 209 | <dd>the draw info. </dd> |
| 210 | |
| 211 | <dd> </dd> |
| 212 | <dt>exception</dt> |
| 213 | <dd>return any errors or warnings in this structure. </dd> |
| 214 | |
| 215 | <dd> </dd> |
| 216 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 217 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DrawGradientImage">DrawGradientImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 218 | |
| 219 | <p>DrawGradientImage() draws a linear gradient on the image.</p> |
| 220 | |
| 221 | <p>The format of the DrawGradientImage method is:</p> |
| 222 | |
| 223 | <pre class="text"> |
| 224 | MagickBooleanType DrawGradientImage(Image *image, |
| 225 | const DrawInfo *draw_info,ExceptionInfo *exception) |
| 226 | </pre> |
| 227 | |
| 228 | <p>A description of each parameter follows:</p> |
| 229 | |
| 230 | <dd> |
| 231 | </dd> |
| 232 | |
| 233 | <dd> </dd> |
| 234 | <dl class="dl-horizontal"> |
| 235 | <dt>image</dt> |
| 236 | <dd>the image. </dd> |
| 237 | |
| 238 | <dd> </dd> |
| 239 | <dt>draw_info</dt> |
| 240 | <dd>the draw info. </dd> |
| 241 | |
| 242 | <dd> </dd> |
| 243 | <dt>exception</dt> |
| 244 | <dd>return any errors or warnings in this structure. </dd> |
| 245 | |
| 246 | <dd> </dd> |
| 247 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 248 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DrawPatternPath">DrawPatternPath</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 249 | |
| 250 | <p>DrawPatternPath() draws a pattern.</p> |
| 251 | |
| 252 | <p>The format of the DrawPatternPath method is:</p> |
| 253 | |
| 254 | <pre class="text"> |
| 255 | MagickBooleanType DrawPatternPath(Image *image,const DrawInfo *draw_info, |
| 256 | const char *name,Image **pattern,ExceptionInfo *exception) |
| 257 | </pre> |
| 258 | |
| 259 | <p>A description of each parameter follows:</p> |
| 260 | |
| 261 | <dd> |
| 262 | </dd> |
| 263 | |
| 264 | <dd> </dd> |
| 265 | <dl class="dl-horizontal"> |
| 266 | <dt>image</dt> |
| 267 | <dd>the image. </dd> |
| 268 | |
| 269 | <dd> </dd> |
| 270 | <dt>draw_info</dt> |
| 271 | <dd>the draw info. </dd> |
| 272 | |
| 273 | <dd> </dd> |
| 274 | <dt>name</dt> |
| 275 | <dd>the pattern name. </dd> |
| 276 | |
| 277 | <dd> </dd> |
| 278 | <dt>image</dt> |
| 279 | <dd>the image. </dd> |
| 280 | |
| 281 | <dd> </dd> |
| 282 | <dt>exception</dt> |
| 283 | <dd>return any errors or warnings in this structure. </dd> |
| 284 | |
| 285 | <dd> </dd> |
| 286 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 287 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="DrawPrimitive">DrawPrimitive</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 288 | |
| 289 | <p>DrawPrimitive() draws a primitive (line, rectangle, ellipse) on the image.</p> |
| 290 | |
| 291 | <p>The format of the DrawPrimitive method is:</p> |
| 292 | |
| 293 | <pre class="text"> |
| 294 | MagickBooleanType DrawPrimitive(Image *image,const DrawInfo *draw_info, |
| 295 | PrimitiveInfo *primitive_info,ExceptionInfo *exception) |
| 296 | </pre> |
| 297 | |
| 298 | <p>A description of each parameter follows:</p> |
| 299 | |
| 300 | <dd> |
| 301 | </dd> |
| 302 | |
| 303 | <dd> </dd> |
| 304 | <dl class="dl-horizontal"> |
| 305 | <dt>image</dt> |
| 306 | <dd>the image. </dd> |
| 307 | |
| 308 | <dd> </dd> |
| 309 | <dt>draw_info</dt> |
| 310 | <dd>the draw info. </dd> |
| 311 | |
| 312 | <dd> </dd> |
| 313 | <dt>primitive_info</dt> |
| 314 | <dd>Specifies a pointer to a PrimitiveInfo structure. </dd> |
| 315 | |
| 316 | <dd> </dd> |
| 317 | <dt>exception</dt> |
| 318 | <dd>return any errors or warnings in this structure. </dd> |
| 319 | |
| 320 | <dd> </dd> |
| 321 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 322 | <h2><a href="http://www.imagemagick.org/api/MagickCore/draw_8c.html" id="GetAffineMatrix">GetAffineMatrix</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 323 | |
| 324 | <p>GetAffineMatrix() returns an AffineMatrix initialized to the identity matrix.</p> |
| 325 | |
| 326 | <p>The format of the GetAffineMatrix method is:</p> |
| 327 | |
| 328 | <pre class="text"> |
| 329 | void GetAffineMatrix(AffineMatrix *affine_matrix) |
| 330 | </pre> |
| 331 | |
| 332 | <p>A description of each parameter follows:</p> |
| 333 | |
| 334 | <dd> |
| 335 | </dd> |
| 336 | |
| 337 | <dd> </dd> |
| 338 | <dl class="dl-horizontal"> |
| 339 | <dt>affine_matrix</dt> |
| 340 | <dd>the affine matrix. </dd> |
| 341 | |
| 342 | <dd> </dd> |
| 343 | </dl> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 344 | </div> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 345 | <footer class="magick-footer"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 346 | <p><a href="../support.html">Donate</a> • |
| 347 | <a href="../sitemap.html">Sitemap</a> • |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 348 | <a href="../links.html">Related</a> • |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 349 | <a href="../architecture.html">Architecture</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 350 | </p> |
| 351 | <p><a href="draw.html#">Back to top</a> • |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 352 | <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 353 | <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 354 | <p><small>© 1999-2015 ImageMagick Studio LLC</small></p> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 355 | </footer> |
| 356 | </div><!-- /.container --> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 357 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 358 | <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 359 | <script src="http://nextgen.imagemagick.org/js/magick.html"></script> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame] | 360 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 361 | </body> |
cristy | 5a367e4 | 2015-05-05 12:39:18 +0000 | [diff] [blame] | 362 | </html> |