summaryrefslogtreecommitdiffstats
path: root/gfx/canvas_skia.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 22:40:49 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 22:40:49 +0000
commit62c6a781a95250f273f3bd3df945b3ff850e913e (patch)
treec28cafb3018b81a85227781fd46c3ebe0160f1d6 /gfx/canvas_skia.h
parent1c53ffde1ea034448b09129c975d93aa83b16c94 (diff)
downloadchromium_src-62c6a781a95250f273f3bd3df945b3ff850e913e.zip
chromium_src-62c6a781a95250f273f3bd3df945b3ff850e913e.tar.gz
chromium_src-62c6a781a95250f273f3bd3df945b3ff850e913e.tar.bz2
Cleanup:
* Remove unnecessary code * Make function declaration style match style guide (one arg per line is preferred when all don't fit, but related args may be together) BUG=none TEST=none Review URL: http://codereview.chromium.org/3109019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/canvas_skia.h')
-rw-r--r--gfx/canvas_skia.h86
1 files changed, 40 insertions, 46 deletions
diff --git a/gfx/canvas_skia.h b/gfx/canvas_skia.h
index 71fbb42..457fa23 100644
--- a/gfx/canvas_skia.h
+++ b/gfx/canvas_skia.h
@@ -48,8 +48,10 @@ class CanvasSkia : public skia::PlatformCanvas,
// Attempts to fit the text with the provided width and height. Increases
// height and then width as needed to make the text fit. This method
// supports multiple lines.
- static void SizeStringInt(const std::wstring& text, const gfx::Font& font,
- int* width, int* height, int flags);
+ static void SizeStringInt(const std::wstring& text,
+ const gfx::Font& font,
+ int* width, int* height,
+ int flags);
// Returns the default text alignment to be used when drawing text on a
// gfx::CanvasSkia based on the directionality of the system locale language.
@@ -74,7 +76,8 @@ class CanvasSkia : public skia::PlatformCanvas,
const gfx::Font& font,
const SkColor& text_color,
const SkColor& halo_color,
- int x, int y, int w, int h, int flags);
+ int x, int y, int w, int h,
+ int flags);
#endif
// Extracts a bitmap from the contents of this canvas.
@@ -88,60 +91,49 @@ class CanvasSkia : public skia::PlatformCanvas,
virtual bool ClipRectInt(int x, int y, int w, int h);
virtual void TranslateInt(int x, int y);
virtual void ScaleInt(int x, int y);
- virtual void FillRectInt(int x, int y, int w, int h,
- const SkPaint& paint);
- virtual void FillRectInt(const SkColor& color, int x, int y, int w,
- int h);
+ virtual void FillRectInt(int x, int y, int w, int h, const SkPaint& paint);
+ virtual void FillRectInt(const SkColor& color, int x, int y, int w, int h);
virtual void FillRectInt(const gfx::Brush* brush, int x, int y, int w, int h);
- virtual void DrawRectInt(const SkColor& color, int x, int y, int w,
- int h);
- virtual void DrawRectInt(const SkColor& color, int x, int y, int w, int h,
+ virtual void DrawRectInt(const SkColor& color, int x, int y, int w, int h);
+ virtual void DrawRectInt(const SkColor& color,
+ int x, int y, int w, int h,
SkXfermode::Mode mode);
- virtual void DrawLineInt(const SkColor& color, int x1, int y1, int x2,
- int y2);
+ virtual void DrawLineInt(const SkColor& color,
+ int x1, int y1,
+ int x2, int y2);
virtual void DrawBitmapInt(const SkBitmap& bitmap, int x, int y);
- virtual void DrawBitmapInt(const SkBitmap& bitmap, int x, int y,
+ virtual void DrawBitmapInt(const SkBitmap& bitmap,
+ int x, int y,
const SkPaint& paint);
- virtual void DrawBitmapInt(const SkBitmap& bitmap, int src_x, int src_y,
- int src_w, int src_h, int dest_x, int dest_y,
- int dest_w, int dest_h, bool filter);
- virtual void DrawBitmapInt(const SkBitmap& bitmap, int src_x, int src_y,
- int src_w, int src_h, int dest_x, int dest_y,
- int dest_w, int dest_h, bool filter,
+ virtual void DrawBitmapInt(const SkBitmap& bitmap,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h,
+ bool filter);
+ virtual void DrawBitmapInt(const SkBitmap& bitmap,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h,
+ bool filter,
const SkPaint& paint);
- virtual void DrawStringInt(const std::wstring& text, const gfx::Font& font,
- const SkColor& color, int x, int y, int w,
- int h);
- virtual void DrawStringInt(const std::wstring& text, const gfx::Font& font,
+ virtual void DrawStringInt(const std::wstring& text,
+ const gfx::Font& font,
+ const SkColor& color,
+ int x, int y, int w, int h);
+ virtual void DrawStringInt(const std::wstring& text,
+ const gfx::Font& font,
const SkColor& color,
const gfx::Rect& display_rect);
- virtual void DrawStringInt(const std::wstring& text, const gfx::Font& font,
- const SkColor& color, int x, int y, int w, int h,
+ virtual void DrawStringInt(const std::wstring& text,
+ const gfx::Font& font,
+ const SkColor& color,
+ int x, int y, int w, int h,
int flags);
virtual void DrawFocusRect(int x, int y, int width, int height);
virtual void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h);
- virtual void TileImageInt(const SkBitmap& bitmap, int src_x, int src_y,
+ virtual void TileImageInt(const SkBitmap& bitmap,
+ int src_x, int src_y,
int dest_x, int dest_y, int w, int h);
virtual gfx::NativeDrawingContext BeginPlatformPaint();
virtual void EndPlatformPaint();
- virtual Brush* CreateLinearGradientBrush(
- const gfx::Point& start_point,
- const gfx::Point& end_point,
- const SkColor colors[],
- const float positions[],
- size_t position_count,
- TileMode tile_mode);
- virtual Brush* CreateRadialGradientBrush(
- const gfx::Point& center_point,
- float radius,
- const SkColor colors[],
- const float positions[],
- size_t position_count,
- TileMode tile_mode);
- virtual Brush* CreateBitmapBrush(
- const SkBitmap& bitmap,
- TileMode tile_mode_x,
- TileMode tile_mode_y);
virtual CanvasSkia* AsCanvasSkia();
virtual const CanvasSkia* AsCanvasSkia() const;
@@ -153,8 +145,10 @@ class CanvasSkia : public skia::PlatformCanvas,
// Draws text with the specified color, font and location. The text is
// aligned to the left, vertically centered, clipped to the region. If the
// text is too big, it is truncated and '...' is added to the end.
- void DrawStringInt(const std::wstring& text, HFONT font,
- const SkColor& color, int x, int y, int w, int h,
+ void DrawStringInt(const std::wstring& text,
+ HFONT font,
+ const SkColor& color,
+ int x, int y, int w, int h,
int flags);
#endif