Which BitBlt Raster Op?

This is a discussion on Which BitBlt Raster Op? within the Windows Programming forums, part of the Platform Specific Boards category; Yo, I have a bitmap that contains black text on a white background. I want to copy this bitmap to ...

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

    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,263
    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, 09: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, 03:45 PM

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