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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. FillPolygon problem?

FillPolygon problem?

Scheduled Pinned Locked Moved C#
graphicshelpquestion
1 Posts 1 Posters 0 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.
  • R Offline
    R Offline
    r9
    wrote on last edited by
    #1

    I have a figure that I want to fill with black color, but it don't work!! private void button11_Click(object sender, System.EventArgs e) { System.Drawing.Graphics formGraphics = null; System.Drawing.Pen myPen; formGraphics = pictureBox7.CreateGraphics(); myPen = new System.Drawing.Pen(System.Drawing.Color.Black,1); formGraphics.DrawLine(myPen, 4, 4, 50, 4); formGraphics.DrawLine(myPen, 4, 4, 4, 100); formGraphics.DrawLine(myPen, 50, 4, 50, 100); formGraphics.DrawLine(myPen, 4, 100, 27, 120); formGraphics.DrawLine(myPen, 50, 100, 27, 120); SolidBrush Brush = new SolidBrush(Color.Black); Point point1 = new Point(4, 4); Point point2 = new Point(50, 4); Point point3 = new Point(4, 4); Point point4 = new Point(4, 100); Point point5 = new Point(50, 4); Point point6 = new Point(50, 100); Point point7 = new Point(4, 100); Point point8 = new Point(27, 120); Point point9 = new Point(50, 100); Point point10 = new Point(27, 120); Point[] curvePoints = new Point[] { point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, }; formGraphics.FillPolygon(Brush, curvePoints); myPen.Dispose(); formGraphics.Dispose(); } Any idea?

    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