* Do bits copy depending on if we're using color or not */
| 466 | * Do bits copy depending on if we're using color or not |
| 467 | */ |
| 468 | static void |
| 469 | copy_bits(tty_record *record, Rect *bounds, short xfer_mode, |
| 470 | RgnHandle mask_rgn) |
| 471 | { |
| 472 | GWorldFlags pix_state; |
| 473 | BitMap *source; |
| 474 | |
| 475 | if (record->uses_gworld) { |
| 476 | pix_state = GetPixelsState(GetGWorldPixMap(record->offscreen_world)); |
| 477 | LockPixels(GetGWorldPixMap(record->offscreen_world)); |
| 478 | source = (BitMapPtr) *GetGWorldPixMap(record->offscreen_world); |
| 479 | } else |
| 480 | source = &record->its_bits; |
| 481 | |
| 482 | SetPortWindowPort(record->its_window); |
| 483 | CopyBits(source, |
| 484 | GetPortBitMapForCopyBits(GetWindowPort(record->its_window)), |
| 485 | bounds, bounds, xfer_mode, mask_rgn); |
| 486 | |
| 487 | if (record->uses_gworld) { |
| 488 | SetPixelsState(GetGWorldPixMap(record->offscreen_world), pix_state); |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | /* |
| 493 | * Fill an area with the background color |
no outgoing calls
no test coverage detected