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. Gradiant Color Filling in Irregular Shape

Gradiant Color Filling in Irregular Shape

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialregexhelp
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.
  • S Offline
    S Offline
    SriSubbu
    wrote on last edited by
    #1

    Hi Gurus, I wanted to do gradiant filling of irregular pattern. ie, for example, there is a Text in the DC, and the complex region defines the whole Text. I achived this thru', using paths and then converting paths to region fn. Now i need to fill these each characters with Gradiant filling which has to use the shape of the Text. ie, i need a procedure to seperate each character from the Text into a individual region and fill them with the Gradiant , which actually uses the shape of those character. How to achive this. Pl. Help me. I've a sample image of it. But i don't know how i can attach that image with this post. Advance ThanX, Subbi

    L 1 Reply Last reply
    0
    • S SriSubbu

      Hi Gurus, I wanted to do gradiant filling of irregular pattern. ie, for example, there is a Text in the DC, and the complex region defines the whole Text. I achived this thru', using paths and then converting paths to region fn. Now i need to fill these each characters with Gradiant filling which has to use the shape of the Text. ie, i need a procedure to seperate each character from the Text into a individual region and fill them with the Gradiant , which actually uses the shape of those character. How to achive this. Pl. Help me. I've a sample image of it. But i don't know how i can attach that image with this post. Advance ThanX, Subbi

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

      The easiest solution I can come to think of is alpha-blending that text with a gradient bitmap and the trans-blit it onto the final surface. You didn't mention time/CPU cycles constraints.

      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