| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BASE_GFX_GDI_UTIL_H__ | |
| 6 #define BASE_GFX_GDI_UTIL_H__ | |
| 7 | |
| 8 #include <vector> | |
| 9 #include <windows.h> | |
| 10 #include "base/gfx/rect.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 | |
| 14 // Creates a BITMAPINFOHEADER structure given the bitmap's size. | |
| 15 void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr); | |
| 16 | |
| 17 // Creates a BITMAPINFOHEADER structure given the bitmap's size and | |
| 18 // color depth in bits per pixel. | |
| 19 void CreateBitmapHeaderWithColorDepth(int width, int height, int color_depth, | |
| 20 BITMAPINFOHEADER* hdr); | |
| 21 | |
| 22 // Creates a BITMAPV4HEADER structure given the bitmap's size. You probably | |
| 23 // only need to use BMP V4 if you need transparency (alpha channel). This | |
| 24 // function sets the AlphaMask to 0xff000000. | |
| 25 void CreateBitmapV4Header(int width, int height, BITMAPV4HEADER* hdr); | |
| 26 | |
| 27 // Creates a monochrome bitmap header. | |
| 28 void CreateMonochromeBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr); | |
| 29 | |
| 30 // Modify the given hrgn by subtracting the given rectangles. | |
| 31 void SubtractRectanglesFromRegion(HRGN hrgn, | |
| 32 const std::vector<gfx::Rect>& cutouts); | |
| 33 | |
| 34 } // namespace gfx | |
| 35 | |
| 36 #endif // BASE_GFX_GDI_UTIL_H__ | |
| OLD | NEW |