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

Side by Side Diff: app/gfx/canvas.cc

Issue 150079: Enable opening downloads from the Mac download shelf (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | chrome/browser/download/download_shelf.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "app/gfx/canvas.h" 5 #include "app/gfx/canvas.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "app/gfx/font.h" 9 #include "app/gfx/font.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 void Canvas::DrawStringInt(const std::wstring& text, 216 void Canvas::DrawStringInt(const std::wstring& text,
217 const gfx::Font& font, 217 const gfx::Font& font,
218 const SkColor& color, 218 const SkColor& color,
219 int x, int y, int w, int h) { 219 int x, int y, int w, int h) {
220 DrawStringInt(text, font, color, x, y, w, h, 220 DrawStringInt(text, font, color, x, y, w, h,
221 l10n_util::DefaultCanvasTextAlignment()); 221 l10n_util::DefaultCanvasTextAlignment());
222 } 222 }
223 223
224 #if defined(OS_MACOSX)
225 void Canvas::DrawStringInt(const std::wstring& text,
226 const gfx::Font& font,
227 const SkColor& color,
228 int x, int y, int w, int h,
229 int flags) {
230 NOTIMPLEMENTED();
231 }
232 #endif
233
224 void Canvas::TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h) { 234 void Canvas::TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h) {
225 TileImageInt(bitmap, 0, 0, x, y, w, h); 235 TileImageInt(bitmap, 0, 0, x, y, w, h);
226 } 236 }
227 237
228 void Canvas::TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, 238 void Canvas::TileImageInt(const SkBitmap& bitmap, int src_x, int src_y,
229 int dest_x, int dest_y, int w, int h) { 239 int dest_x, int dest_y, int w, int h) {
230 if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) 240 if (!IntersectsClipRectInt(dest_x, dest_y, w, h))
231 return; 241 return;
232 242
233 SkPaint paint; 243 SkPaint paint;
(...skipping 19 matching lines...) Expand all
253 263
254 // Make a bitmap to return, and a canvas to draw into it. We don't just want 264 // Make a bitmap to return, and a canvas to draw into it. We don't just want
255 // to call extractSubset or the copy constuctor, since we want an actual copy 265 // to call extractSubset or the copy constuctor, since we want an actual copy
256 // of the bitmap. 266 // of the bitmap.
257 SkBitmap result; 267 SkBitmap result;
258 device_bitmap.copyTo(&result, SkBitmap::kARGB_8888_Config); 268 device_bitmap.copyTo(&result, SkBitmap::kARGB_8888_Config);
259 return result; 269 return result;
260 } 270 }
261 271
262 } // namespace gfx 272 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698