Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. Graphics.FillPath( Brush, GraphicsPath ) does not fill a simple P

Graphics.FillPath( Brush, GraphicsPath ) does not fill a simple P

Scheduled Pinned Locked Moved Graphics
graphicscsharplinqcom
2 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    opinas
    wrote on last edited by
    #1

    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);
        }
    }
    

    }

    L 1 Reply Last reply
    0
    • O opinas

      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);
          }
      }
      

      }

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Marked as spam; I see a URL, but not a question.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups