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 / C++ / MFC
  4. How to implement such such a gradient path like a ring?

How to implement such such a gradient path like a ring?

Scheduled Pinned Locked Moved C / C++ / MFC
winformsgraphicstutorialquestion
4 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.
  • K Offline
    K Offline
    kcynic
    wrote on last edited by
    #1

    How to implement such a gradient path like this: http://p13.freep.cn/p.aspx?u=v20_p13_photo_1303041411469897_0.png[^] using gdi or gdi+?

    L 1 Reply Last reply
    0
    • K kcynic

      How to implement such a gradient path like this: http://p13.freep.cn/p.aspx?u=v20_p13_photo_1303041411469897_0.png[^] using gdi or gdi+?

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

      Take a look at the LinearGradientBrush class[^].

      Use the best guess

      K 1 Reply Last reply
      0
      • L Lost User

        Take a look at the LinearGradientBrush class[^].

        Use the best guess

        K Offline
        K Offline
        kcynic
        wrote on last edited by
        #3

        Thanks for your reply. and however, LinearGradientBrush only draw gradient area on straight way. PathGradientBrush might be helpness, but Im not sure how to do with it.

        L 1 Reply Last reply
        0
        • K kcynic

          Thanks for your reply. and however, LinearGradientBrush only draw gradient area on straight way. PathGradientBrush might be helpness, but Im not sure how to do with it.

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

          At a guess you could use either brush type to flood fill a circle, then overpaint an inner circle in the background colour. That would give you the basic ring shape. You need to do some experimentation to figure out the optimum methods.

          Use the best guess

          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