Posted 7 October 2020, 6:52 pm EST
I’d like to draw a rectangle (and circle) with a stroke. I accomplish it fine by first calling FillRoundRect, then DrawRoundRect. But if I put a transparency on the color, I’m not getting the expected result, do you have any suggestions? In practice, the “radius” parameter of 10 is a variable, along with the color and size…but hopefully you see what I’m talking about.
using (var bmp = new GcBitmap(200, 200, false)) {
using(var g = bmp.CreateGraphics(Color.White)) {
var rect = new RectangleF(20, 20, 160, 160);
g.FillRoundRect(rect, 10, Color.FromArgb(100, Color.Red));
g.DrawRoundRect(rect, 10, Color.FromArgb(100, Color.Black), 10, DashStyle.Solid);
}
bmp.SaveAsPng(@"D:\Temp\EditorTests\_Output\grape_demo.png");
}
```[img]https://gccontent.blob.core.windows.net/forum-uploads/file-0eb1a936-cb27-4f27-9263-d8376abbec86.png[/img]