| 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_CANVAS_SKIA_H_ | 5 #ifndef UI_GFX_CANVAS_SKIA_H_ |
| 6 #define UI_GFX_CANVAS_SKIA_H_ | 6 #define UI_GFX_CANVAS_SKIA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 const SkColor& color, | 151 const SkColor& color, |
| 152 const gfx::Rect& display_rect); | 152 const gfx::Rect& display_rect); |
| 153 #endif | 153 #endif |
| 154 virtual void DrawFocusRect(int x, int y, int width, int height); | 154 virtual void DrawFocusRect(int x, int y, int width, int height); |
| 155 virtual void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h); | 155 virtual void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h); |
| 156 virtual void TileImageInt(const SkBitmap& bitmap, | 156 virtual void TileImageInt(const SkBitmap& bitmap, |
| 157 int src_x, int src_y, | 157 int src_x, int src_y, |
| 158 int dest_x, int dest_y, int w, int h); | 158 int dest_x, int dest_y, int w, int h); |
| 159 virtual gfx::NativeDrawingContext BeginPlatformPaint(); | 159 virtual gfx::NativeDrawingContext BeginPlatformPaint(); |
| 160 virtual void EndPlatformPaint(); | 160 virtual void EndPlatformPaint(); |
| 161 #if !defined(OS_MACOSX) |
| 161 virtual void Transform(const ui::Transform& transform); | 162 virtual void Transform(const ui::Transform& transform); |
| 163 #endif |
| 162 virtual ui::TextureID GetTextureID(); | 164 virtual ui::TextureID GetTextureID(); |
| 163 virtual CanvasSkia* AsCanvasSkia(); | 165 virtual CanvasSkia* AsCanvasSkia(); |
| 164 virtual const CanvasSkia* AsCanvasSkia() const; | 166 virtual const CanvasSkia* AsCanvasSkia() const; |
| 165 | 167 |
| 166 private: | 168 private: |
| 167 // Test whether the provided rectangle intersects the current clip rect. | 169 // Test whether the provided rectangle intersects the current clip rect. |
| 168 bool IntersectsClipRectInt(int x, int y, int w, int h); | 170 bool IntersectsClipRectInt(int x, int y, int w, int h); |
| 169 | 171 |
| 170 #if defined(OS_WIN) | 172 #if defined(OS_WIN) |
| 171 // Draws text with the specified color, font and location. The text is | 173 // Draws text with the specified color, font and location. The text is |
| 172 // aligned to the left, vertically centered, clipped to the region. If the | 174 // aligned to the left, vertically centered, clipped to the region. If the |
| 173 // text is too big, it is truncated and '...' is added to the end. | 175 // text is too big, it is truncated and '...' is added to the end. |
| 174 void DrawStringInt(const string16& text, | 176 void DrawStringInt(const string16& text, |
| 175 HFONT font, | 177 HFONT font, |
| 176 const SkColor& color, | 178 const SkColor& color, |
| 177 int x, int y, int w, int h, | 179 int x, int y, int w, int h, |
| 178 int flags); | 180 int flags); |
| 179 #endif | 181 #endif |
| 180 | 182 |
| 181 DISALLOW_COPY_AND_ASSIGN(CanvasSkia); | 183 DISALLOW_COPY_AND_ASSIGN(CanvasSkia); |
| 182 }; | 184 }; |
| 183 | 185 |
| 184 } // namespace gfx; | 186 } // namespace gfx; |
| 185 | 187 |
| 186 #endif // UI_GFX_CANVAS_SKIA_H_ | 188 #endif // UI_GFX_CANVAS_SKIA_H_ |
| OLD | NEW |