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