| 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 PDF_DRAW_UTILS_H_ | 5 #ifndef PDF_DRAW_UTILS_H_ |
| 6 #define PDF_DRAW_UTILS_H_ | 6 #define PDF_DRAW_UTILS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "ppapi/cpp/image_data.h" | 11 #include "ppapi/cpp/image_data.h" |
| 12 #include "ppapi/cpp/rect.h" | 12 #include "ppapi/cpp/rect.h" |
| 13 | 13 |
| 14 namespace chrome_pdf { | 14 namespace chrome_pdf { |
| 15 | 15 |
| 16 const uint8 kOpaqueAlpha = 0xFF; | 16 const uint8 kOpaqueAlpha = 0xFF; |
| 17 const uint8 kTransparentAlpha = 0x00; | 17 const uint8 kTransparentAlpha = 0x00; |
| 18 | 18 |
| 19 bool AlphaBlend(const pp::ImageData& src, const pp::Rect& src_rc, | 19 void AlphaBlend(const pp::ImageData& src, const pp::Rect& src_rc, |
| 20 pp::ImageData* dest, const pp::Point& dest_origin, | 20 pp::ImageData* dest, const pp::Point& dest_origin, |
| 21 uint8 alpha_adjustment); | 21 uint8 alpha_adjustment); |
| 22 | 22 |
| 23 // Fill rectangle with gradient horizontally or vertically. Start is a color of | 23 // Fill rectangle with gradient horizontally or vertically. Start is a color of |
| 24 // top-left point of the rectangle, end color is a color of | 24 // top-left point of the rectangle, end color is a color of |
| 25 // top-right (horizontal==true) or bottom-left (horizontal==false) point. | 25 // top-right (horizontal==true) or bottom-left (horizontal==false) point. |
| 26 void GradientFill(pp::ImageData* image, | 26 void GradientFill(pp::ImageData* image, |
| 27 const pp::Rect& rc, | 27 const pp::Rect& rc, |
| 28 uint32 start_color, | 28 uint32 start_color, |
| 29 uint32 end_color, | 29 uint32 end_color, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // clip_rc - clipping region | 85 // clip_rc - clipping region |
| 86 void DrawShadow(pp::ImageData* image, | 86 void DrawShadow(pp::ImageData* image, |
| 87 const pp::Rect& shadow_rc, | 87 const pp::Rect& shadow_rc, |
| 88 const pp::Rect& object_rc, | 88 const pp::Rect& object_rc, |
| 89 const pp::Rect& clip_rc, | 89 const pp::Rect& clip_rc, |
| 90 const ShadowMatrix& matrix); | 90 const ShadowMatrix& matrix); |
| 91 | 91 |
| 92 } // namespace chrome_pdf | 92 } // namespace chrome_pdf |
| 93 | 93 |
| 94 #endif // PDF_DRAW_UTILS_H_ | 94 #endif // PDF_DRAW_UTILS_H_ |
| OLD | NEW |