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. C#
  4. GraphicsPath [modified]

GraphicsPath [modified]

Scheduled Pinned Locked Moved C#
tutorial
2 Posts 2 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.
  • Y Offline
    Y Offline
    Yoyosh 0
    wrote on last edited by
    #1

    Suppose I have GraphicsPath object named gp. Please, tell me how to draw these 2 shapes (I tried but it is wird :sigh: ): home.icslab.agh.edu.pl/~martinez/f1.jpg[^] home.icslab.agh.edu.pl/~martinez/f2.jpg[^] thank you very much in advance

    M 1 Reply Last reply
    0
    • Y Yoyosh 0

      Suppose I have GraphicsPath object named gp. Please, tell me how to draw these 2 shapes (I tried but it is wird :sigh: ): home.icslab.agh.edu.pl/~martinez/f1.jpg[^] home.icslab.agh.edu.pl/~martinez/f2.jpg[^] thank you very much in advance

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      The first one can be achieved with GraphicsPath.AddArc(), followed by GraphicsPath.AddLine() to add the lower horizontal line. When you call FillPath() on your given Graphics object, the path will be closed automatically. The second one is very similar, you'll add an Arc, a Line, and another Arc. You might have to set GraphicsPath.FillMode to FillMode.Winding in the second case or you'll get unexpected results.

      Regards, mav -- Black holes are the places where god divided by 0...

      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