Gradient...

This is a discussion on Gradient... within the Windows Programming forums, part of the Platform Specific Boards category; How can I create a gradient background, you know, like those lame typical windows installers. Should I use paint brush, ...

  1. #1
    _Unregistered_
    Guest

    Question Gradient...

    How can I create a gradient background, you know, like those lame typical windows installers. Should I use paint brush, paint a palette pic and how? any ideas, hints, thanks.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    'GradientFill' will do it, and 'PatBlt' can be adapted too. 'FillRect' is too slow (it uses PatBlt ultimately anyway). BTW I think what you are referring to is called 'smooth shading', which may help if you are searching the web for other examples.

    [blatant plug warning]There's an example on my wee humble website on how to do both[/end blatant plug warning]

    http://www.foosyerdoos.fsnet.co.uk

  3. #3
    _Unregistered_
    Guest
    thanks Ken. I'll see.
    will patblt() work in Win3.0 app? or just W9x and later. is PatBlt() slow and limited to like 8x8 or 16x16 bitmap?

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>will patblt() work in Win3.0 app? or just W9x and later. is PatBlt() slow and limited to like 8x8 or 16x16 bitmap?<<

    PatBlt is good for win95 and later (according to msdn) so won't work on win3.0. PatBlt is probably as fast as you'll get with gdi but it just fills rectangles.

    The 8x8 pixel brush size limit (bitmaps) is for win95 only.

    If you are using win3.0 then forget GradientFill, PatBlt etc as they are unlikely to work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help about point and line
    By audinue in forum Game Programming
    Replies: 12
    Last Post: 01-02-2009, 05:07 PM
  2. Linked List help
    By Scupham in forum C Programming
    Replies: 17
    Last Post: 12-09-2008, 03:51 PM
  3. Need a fast way to check if a point is within a line.
    By mike_g in forum Game Programming
    Replies: 5
    Last Post: 08-05-2008, 12:24 PM
  4. Blending two or more radial gradient fills
    By pronecracker in forum Windows Programming
    Replies: 7
    Last Post: 05-27-2007, 11:39 PM
  5. Gradient fills
    By pronecracker in forum Windows Programming
    Replies: 5
    Last Post: 04-29-2007, 11:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21