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

New Post: Beginners question

$
0
0
The DrawableBase class has been deprecated. Below is a step by step translation of your command:
// You can also create an empty (I hope you mean transparent) image instead of// reading 3508x2480empty.png using (MagickImage image = new MagickImage(MagickColors.Transparent, 3508, 2480))
{
  image.Draw(
    new DrawableFillColor(MagickColors.Transparent), // -fill nonenew DrawableStrokeColor(MagickColors.Black), // -stroke blacknew DrawableStrokeWidth(1), // -strokewidth 1new DrawableRectangle(10, 10, 310, 110), // -draw "rectangle 10,10 310,110"new DrawableFontPointSize(34), // -pointsize 34new DrawableFont("Arial"), // -font Arialnew DrawableFillColor(MagickColors.Black), // -fill black// Don't need -strokewidth 1 because it already has this valuenew DrawableText(100, 40, "COMP1"), // -draw "text 100,40 'COMP1'"new DrawableFontPointSize(18), // -pointsize 18new DrawableText(20, 60, "34 vs 18 points"), // -draw "text 20,60 '34 vs 18 points'"// We can just continue drawing instead of writing to 3508x2480rectangle1.pngnew DrawableFillColor(MagickColors.Transparent), // -fill none// Skip: -fill none -stroke black -strokewidth 1new DrawableRectangle(10, 210, 310, 310), // -draw "rectangle 10,210 310,310"new DrawableFontPointSize(34), // -pointsize 34// Skip: -font Arialnew DrawableFillColor(MagickColors.Black), // -fill blacknew DrawableStrokeWidth(0), // -strokewidth 0new DrawableText(100, 240, "COMP2"), // -draw "text 100,240 'COMP2'"new DrawableFontPointSize(22), // -pointsize 22new DrawableText(20, 260, "34 vs 22 points"), // -draw "text 20,60 '34 vs 22 points'"// Continue drawing instead of writing to 3508x2480rectangle2.png// Skip: -stroke blacknew DrawableLine(160, 110, 160, 210) // -draw "line   160,110 160,210"
  );

  image.Write(@"3508x2480rectangle3.png");
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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