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

New Post: Beginners question

$
0
0
Dirk,

Thanks very much! Very clearly explained.
Are all the "new Draw" actions immediately executed or only when the Write goes?

I don't like the syntax of this way of working.
I am not a very experienced C# programmer so the whole using thing is not my thing. My program is a command line generator and runs for about 19 pictures with schemas on them, I think the GC phase will never be reached anyway :-).
I am guessing I am not able to do another image.Draw outside the using {} scope?
In your other example all the commands are part of a List I guess. The way I do it now works as well for me.
I am just in the process of replacing all my batch convert commands into your class......

I am drawing many boxes on the canvas which sort of logically are created while traversing through an input xml document in a list. So with some struggling I am now able to do it like this.
And yes, empty is transparant :-).
MagickImage image = new MagickImage("3508x2480empty.png");
DrawableFont arial = new DrawableFont("Arial");
image.Settings.FontPointsize = 68;
DrawableText tekst = new DrawableText(200,200,"tesetsetest");
tekst.Value = clusterclean;
tekst.X = titlecenter;
tekst.Y = 200;
image.Draw(tekst);
... logic ....
DrawableRectangle bairectangle = new DrawableRectangle(left, top, right, bottom);
DrawableStrokeWidth strokeWidth = new DrawableStrokeWidth(1);
DrawableStrokeColor strokeColorBlack = new DrawableStrokeColor(new MagickColor("black"));
DrawableFillColor fillColorLime = new DrawableFillColor(new MagickColor("lime"));
image.Draw(strokeColorBlack, strokeWidth, fillColorLime, bairectangle);
.. logic ....
image.Settings.FontPointsize = 34;
tekst.Value = bai.getName();
tekst.X = new_bai_x;
tekst.Y = bsi_y;
image.Draw(tekst);
and so on and so on.

Viewing all articles
Browse latest Browse all 3693

Trending Articles