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. Are pathgradient brushes slow?

Are pathgradient brushes slow?

Scheduled Pinned Locked Moved C#
question
3 Posts 3 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.
  • V Offline
    V Offline
    VCsamir
    wrote on last edited by
    #1

    hi friends & all contributers!! i am using a pathgradient brush. i am using a loop to add a single ellipse to add to path and filling that ellipse with path gradient brush and resetting the path.. when the points are too many the application slows down.. Is there any way to make this faster?? Thanks in Advance Samir

    L S 2 Replies Last reply
    0
    • V VCsamir

      hi friends & all contributers!! i am using a pathgradient brush. i am using a loop to add a single ellipse to add to path and filling that ellipse with path gradient brush and resetting the path.. when the points are too many the application slows down.. Is there any way to make this faster?? Thanks in Advance Samir

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

      Basically: No. The only things you can do are 1) Use a solid brush instead. This may bring some improvement as the color for each pixel does not have to be interpolated or 2) Use less points in your path. You wrote that performance degrades when too many points are used. This sounds like your graphics path has far too many points. How many are we talking about here? 100? 1000? Especially a curved path can be defined with far less points and still look good.

      A while ago he asked me what he should have printed on my business cards. I said 'Wizard'. I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.

      1 Reply Last reply
      0
      • V VCsamir

        hi friends & all contributers!! i am using a pathgradient brush. i am using a loop to add a single ellipse to add to path and filling that ellipse with path gradient brush and resetting the path.. when the points are too many the application slows down.. Is there any way to make this faster?? Thanks in Advance Samir

        S Offline
        S Offline
        Saksida Bojan
        wrote on last edited by
        #3

        Are you drawing directly to the screen or to the memory? I have found out that it is a lot quicker to draw to the Image, then draw that image to screen

        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