From b49bf718965a6e14a38886b8d99c9be27924acbc Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Sun, 4 Sep 2011 20:36:22 +0200 Subject: Add decorate, ellipse, fillColor, fillOpacity, fillRule, font, fontEncodeing, fontFamily, fontSize, fontStretch, fontStyle and fontWeight. --- dmagick/Image.d | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'dmagick/Image.d') diff --git a/dmagick/Image.d b/dmagick/Image.d index ba36135..b7bf41e 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -771,7 +771,7 @@ class Image * Composites dest onto this image using the specified composite operator. * * Params: - * overlay = Image to use in to composite operation. + * overlay = Image to use in the composite operation. * compositeOp = The composite operation to use. * xOffset = The x-offset of the composited image, * measured from the upper-left corner @@ -2768,7 +2768,7 @@ class Image //Use the D GC to accolate the blob. GetMagickMemoryMethods(&oldMalloc, &oldRealloc, &oldFree); - SetMagickMemoryMethods(&GC.malloc, &GC.realloc, &GC.free); + SetMagickMemoryMethods(&Image.malloc, &Image.realloc, &Image.free); scope(exit) SetMagickMemoryMethods(oldMalloc, oldRealloc, oldFree); void* blob = ImageToBlob(options.imageInfo, imageRef, &length, DMagickExceptionInfo()); @@ -2776,6 +2776,24 @@ class Image return blob[0 .. length]; } + private extern(C) + { + static void* malloc(ulong sz) + { + return GC.malloc(sz, GC.BlkAttr.NO_SCAN); + } + + static void* realloc(void* p, ulong sz) + { + return GC.realloc(p, sz, GC.BlkAttr.NO_SCAN); + } + + static void free(void* p) + { + GC.free(p); + } + } + /** * Changes the opacity value of all the pixels that match color to * the value specified by opacity. By default the pixel must match -- cgit v1.2.3