[英]How do I draw a filled circle onto a graphics object in a hexadecimal colour?
[英]How to draw a filled polygon using Graphics
在System.Drawing.Graphics命名空間內,您可以繪制一個像這樣的多邊形:
using (Graphics g = Graphics.FromImage(bmp))
{
g.DrawPolygon(Pens.Black, myArray);
}
還有一種創建填充多邊形g.FillPolygon()
。
如何創建多邊形(使其具有邊框)然后填充它?
只需繪制填充的多邊形,然后繪制周長,使其看起來像具有邊框即可:
using (Graphics g = Graphics.FromImage(bmp))
{
g.FillPolygon(fillBrush, myArray);
g.DrawPolygon(borderPen, myArray);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.