Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: gfx/canvas_skia.h

Issue 3058012: Add support for Radial Gradient Brush and Bitmap Brush to gfx::Canvas.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gfx/canvas_direct2d_unittest.cc ('k') | gfx/canvas_skia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 GFX_CANVAS_SKIA_H_ 5 #ifndef GFX_CANVAS_SKIA_H_
6 #define GFX_CANVAS_SKIA_H_ 6 #define GFX_CANVAS_SKIA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "gfx/canvas.h" 10 #include "gfx/canvas.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 int dest_x, int dest_y, int w, int h); 124 int dest_x, int dest_y, int w, int h);
125 virtual gfx::NativeDrawingContext BeginPlatformPaint(); 125 virtual gfx::NativeDrawingContext BeginPlatformPaint();
126 virtual void EndPlatformPaint(); 126 virtual void EndPlatformPaint();
127 virtual Brush* CreateLinearGradientBrush( 127 virtual Brush* CreateLinearGradientBrush(
128 const gfx::Point& start_point, 128 const gfx::Point& start_point,
129 const gfx::Point& end_point, 129 const gfx::Point& end_point,
130 const SkColor colors[], 130 const SkColor colors[],
131 const float positions[], 131 const float positions[],
132 size_t position_count, 132 size_t position_count,
133 TileMode tile_mode); 133 TileMode tile_mode);
134 virtual Brush* CreateRadialGradientBrush(
135 const gfx::Point& center_point,
136 float radius,
137 const SkColor colors[],
138 const float positions[],
139 size_t position_count,
140 TileMode tile_mode);
141 virtual Brush* CreateBitmapBrush(
142 const SkBitmap& bitmap,
143 TileMode tile_mode_x,
144 TileMode tile_mode_y);
134 virtual CanvasSkia* AsCanvasSkia(); 145 virtual CanvasSkia* AsCanvasSkia();
135 virtual const CanvasSkia* AsCanvasSkia() const; 146 virtual const CanvasSkia* AsCanvasSkia() const;
136 147
137 private: 148 private:
138 // Test whether the provided rectangle intersects the current clip rect. 149 // Test whether the provided rectangle intersects the current clip rect.
139 bool IntersectsClipRectInt(int x, int y, int w, int h); 150 bool IntersectsClipRectInt(int x, int y, int w, int h);
140 151
141 #if defined(OS_WIN) 152 #if defined(OS_WIN)
142 // Draws text with the specified color, font and location. The text is 153 // Draws text with the specified color, font and location. The text is
143 // aligned to the left, vertically centered, clipped to the region. If the 154 // aligned to the left, vertically centered, clipped to the region. If the
144 // text is too big, it is truncated and '...' is added to the end. 155 // text is too big, it is truncated and '...' is added to the end.
145 void DrawStringInt(const std::wstring& text, HFONT font, 156 void DrawStringInt(const std::wstring& text, HFONT font,
146 const SkColor& color, int x, int y, int w, int h, 157 const SkColor& color, int x, int y, int w, int h,
147 int flags); 158 int flags);
148 #endif 159 #endif
149 160
150 DISALLOW_COPY_AND_ASSIGN(CanvasSkia); 161 DISALLOW_COPY_AND_ASSIGN(CanvasSkia);
151 }; 162 };
152 163
153 } // namespace gfx; 164 } // namespace gfx;
154 165
155 #endif // GFX_CANVAS_SKIA_H_ 166 #endif // GFX_CANVAS_SKIA_H_
OLDNEW
« no previous file with comments | « gfx/canvas_direct2d_unittest.cc ('k') | gfx/canvas_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698