CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: GDI DrawBitmap

  1. #1
    Join Date
    Nov 2005
    Posts
    281

    GDI DrawBitmap

    Hey everyone, I've been working on a graph lately, and I've noticed in a few defraggers they have something where the images drawn look like they're kind of white'd out on one edge to give it a sorta cool look.

    Here are some examples:



    If you look at the pic above, you'll notice the white at the top of the drawn colors.



    With the pic above it has it on the bottom edge.


    So how can I do the white fade when drawing in MFC?

  2. #2
    Join Date
    Sep 2009
    Posts
    19

    Re: GDI DrawBitmap

    Draw it witha lighter color
    The color blending is an indication of the underlying prostitution system.

  3. #3
    Join Date
    Feb 2005
    Posts
    2,160

    Re: GDI DrawBitmap

    Do you mean a gradient?

  4. #4
    Join Date
    Nov 2005
    Posts
    281

    Re: GDI DrawBitmap

    Quote Originally Posted by hoxsiew View Post
    Do you mean a gradient?
    Yes. Thats the name, I had forgot.

  5. #5
    Join Date
    Feb 2005
    Posts
    2,160

    Re: GDI DrawBitmap

    In GDI+, you can create a gradient brush which is handy. In GDI, it's a bit more complicted. You use GradientFill() with a couple of structures to define the gradient and a RECT to fill. Here's some info from MSDN:

    http://msdn.microsoft.com/en-us/libr...57(VS.85).aspx

  6. #6
    Join Date
    Nov 2005
    Posts
    281

    Re: GDI DrawBitmap

    Quote Originally Posted by hoxsiew View Post
    In GDI+, you can create a gradient brush which is handy. In GDI, it's a bit more complicted. You use GradientFill() with a couple of structures to define the gradient and a RECT to fill. Here's some info from MSDN:

    http://msdn.microsoft.com/en-us/libr...57(VS.85).aspx
    Alright great, thanks for the information. I was thinking of using a brush to draw the individual lines, but it looks like I'll have to do the GradientFill and make sure its just 1 pixel wide with GDI+.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured