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

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

Issue 2026833003: MD - update checkbox and radio buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review Created 4 years, 6 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
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/gfx/vector_icons/checkbox_active.icon » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/gfx/canvas.h" 5 #include "ui/gfx/canvas.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 SkFloatToScalar(p2.x()), SkFloatToScalar(p2.y()), paint); 280 SkFloatToScalar(p2.x()), SkFloatToScalar(p2.y()), paint);
281 } 281 }
282 282
283 void Canvas::DrawCircle(const Point& center_point, 283 void Canvas::DrawCircle(const Point& center_point,
284 int radius, 284 int radius,
285 const SkPaint& paint) { 285 const SkPaint& paint) {
286 canvas_->drawCircle(SkIntToScalar(center_point.x()), 286 canvas_->drawCircle(SkIntToScalar(center_point.x()),
287 SkIntToScalar(center_point.y()), SkIntToScalar(radius), paint); 287 SkIntToScalar(center_point.y()), SkIntToScalar(radius), paint);
288 } 288 }
289 289
290 void Canvas::DrawCircle(const PointF& center_point,
291 float radius,
292 const SkPaint& paint) {
293 canvas_->drawCircle(SkFloatToScalar(center_point.x()),
294 SkFloatToScalar(center_point.y()), radius, paint);
295 }
296
290 void Canvas::DrawRoundRect(const Rect& rect, 297 void Canvas::DrawRoundRect(const Rect& rect,
291 int radius, 298 int radius,
292 const SkPaint& paint) { 299 const SkPaint& paint) {
293 canvas_->drawRoundRect(RectToSkRect(rect), SkIntToScalar(radius), 300 canvas_->drawRoundRect(RectToSkRect(rect), SkIntToScalar(radius),
294 SkIntToScalar(radius), paint); 301 SkIntToScalar(radius), paint);
295 } 302 }
296 303
297 void Canvas::DrawRoundRect(const RectF& rect, 304 void Canvas::DrawRoundRect(const RectF& rect,
298 float radius, 305 float radius,
299 const SkPaint& paint) { 306 const SkPaint& paint) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 p.setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQuality); 565 p.setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQuality);
559 p.setShader(CreateImageRepShaderForScale( 566 p.setShader(CreateImageRepShaderForScale(
560 image_rep, SkShader::kRepeat_TileMode, shader_scale, 567 image_rep, SkShader::kRepeat_TileMode, shader_scale,
561 remove_image_scale ? image_rep.scale() : 1.f)); 568 remove_image_scale ? image_rep.scale() : 1.f));
562 569
563 // The rect will be filled by the bitmap. 570 // The rect will be filled by the bitmap.
564 canvas_->drawRect(dest_rect, p); 571 canvas_->drawRect(dest_rect, p);
565 } 572 }
566 573
567 } // namespace gfx 574 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/gfx/vector_icons/checkbox_active.icon » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698