Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: GetReadOnlyPixels not accessible

$
0
0
This is slightly different from the original subject but still along the same lines. I can now make code like this work:
img.Draw(
                              new DrawableFillColor(MagickColors.Transparent), // no fill 
                              new DrawableStrokeColor(MagickColors.Gray),
                              new DrawableStrokeWidth(width / 480),
                              new DrawableLine(width / 3, 0, width / 3, height),
                              new DrawableLine(width * 2 / 3, 0, width * 2 / 3, height),
                              new DrawableLine(0, height / 3, width, height / 3),
                              new DrawableLine(0, height * 2 / 3, width, height * 2 / 3)
                            );
but since I need to draw multiple lines in a loop, I looked at another code example dlemstra suggested (in 2013),
using (MagickImage img = new MagickImage(path))
{
    List<DrawableBase> drawables = new List<DrawableBase>();
    drawables.Add(new DrawableFont("Comic Sans Is Evil", FontStyleType.Italic, FontWeight.Weight400, FontStretch.Normal));
    drawables.Add(new DrawableFillColor(new MagickColor(10, 10, 10)));
    drawables.Add(new DrawableText(50, 15, "Shafi"));
    img.Draw(drawables);
}
then checked the change log and found that version 6.8.5.1001 renamed DrawableBase to Drawable, only to find that the example wouldn't work with Drawable, either. ("The type or namespace name 'Drawable' could not be found") I can't seem to find any further related info in the change log. What else do I need to change to make the example work, and is there a library of current code examples that goes beyond the (useful, but not extensive) code examples included on the documentation page?

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>