Graphics.FillPath( Brush, GraphicsPath ) does not fill a simple P
Graphics
2
Posts
2
Posters
4
Views
1
Watching
-
using System; Dịch vụ cho thuê văn phòng giá rẻ tại Hà Nội[^]
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;namespace FillTriangle
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void Form1\_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; GraphicsPath gp = new GraphicsPath(FillMode.Winding); gp.AddLine(new PointF(290, 170),new PointF(98, 128)); gp.AddLine(new PointF(110, 170), new PointF(290, 170)); gp.AddLine(new PointF(110, 170), new PointF(98, 128)); g.FillPath(new SolidBrush(Color.Red), gp); } }
}
-
using System; Dịch vụ cho thuê văn phòng giá rẻ tại Hà Nội[^]
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;namespace FillTriangle
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void Form1\_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; GraphicsPath gp = new GraphicsPath(FillMode.Winding); gp.AddLine(new PointF(290, 170),new PointF(98, 128)); gp.AddLine(new PointF(110, 170), new PointF(290, 170)); gp.AddLine(new PointF(110, 170), new PointF(98, 128)); g.FillPath(new SolidBrush(Color.Red), gp); } }
}