Thread: Which BitBlt Raster Op?

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273

    Which BitBlt Raster Op?

    Yo,

    I have a bitmap that contains black text on a white background. I want to copy this bitmap to another bitmap (via BitBlt), but change the white background so it's a light blue. I've created a light blue brush.

    What combination of BitBlt raster ops should I use? PATPAINT, for example, is almost correct but makes the text light blue instead of the background.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    Never mind, given that there's no good reference for each of the ops, I went through every one listed in Petzold's Programming Windows 95 and found 0xA000C9 (P & D) to do the biz.

    So, for reference:- given a destination containing black text on a white background, using the 0xA000C9 ROP will paint the background with the destination DC's currently selected brush and leave the text intact.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. NAQ: Everything you never wanted to know about CPP
    By evildave in forum C Programming
    Replies: 21
    Last Post: 12-12-2005, 10:56 AM
  2. searching problem
    By DaMenge in forum C Programming
    Replies: 9
    Last Post: 09-12-2005, 01:04 AM
  3. Drawing Test with Raster Op
    By genghis in forum Windows Programming
    Replies: 0
    Last Post: 07-02-2004, 12:21 AM
  4. libtiff: TIFFWriteRGBAImage()?
    By dug in forum Game Programming
    Replies: 1
    Last Post: 07-09-2003, 09:01 AM
  5. Replies: 1
    Last Post: 11-19-2001, 04:45 PM