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

New Post: Changes in Drawable

$
0
0
Hello, I just updated my application to use the latest version of Magick.Net and am running into a few issues. Most I think I have resolved due to some changes but I am having problems with converting some existing code. For instance the following code is not being accepted when I try to draw an outline. It appears the Drawable class is no longer there. Any ideas what I may need to do differently.

            int DestWidth = DestinationImage.Width;
            int DestHeight = DestinationImage.Height;
            int LineThickness = 1;

            List<Drawable> Outline = new List<Drawable>();

            Outline.Add(new DrawableStrokeColor(Color.LightGray));
            if (useDashedLinesToolStripMenuItem.Checked)
            {

                double[] dash = new double[] { 10, 10 };
                Outline.Add(new DrawableDashArray(dash));

            }

            Outline.Add(new DrawableStrokeWidth(LineThickness));
            Outline.Add(new DrawableLine(LineThickness, LineThickness, DestWidth - LineThickness, LineThickness));
            Outline.Add(new DrawableLine(DestWidth - LineThickness, LineThickness, DestWidth - LineThickness, DestHeight - LineThickness));
            Outline.Add(new DrawableLine(DestWidth - LineThickness, DestHeight - LineThickness, LineThickness, DestHeight - LineThickness));
            Outline.Add(new DrawableLine(1, DestHeight - LineThickness, LineThickness, LineThickness));
            DestinationImage.Draw(Outline);

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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