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

Unified Diff: ui/views/round_rect_painter.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/round_rect_painter.h ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/round_rect_painter.cc
diff --git a/ui/views/round_rect_painter.cc b/ui/views/round_rect_painter.cc
deleted file mode 100644
index 1b96a125c43fa151b92b190831af35574a11739e..0000000000000000000000000000000000000000
--- a/ui/views/round_rect_painter.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/round_rect_painter.h"
-
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/path.h"
-#include "ui/gfx/skia_util.h"
-
-namespace views {
-
-RoundRectPainter::RoundRectPainter(SkColor border_color, int corner_radius)
- : border_color_(border_color),
- corner_radius_(corner_radius) {
-}
-
-RoundRectPainter::~RoundRectPainter() {
-}
-
-gfx::Size RoundRectPainter::GetMinimumSize() const {
- return gfx::Size(1, 1);
-}
-
-void RoundRectPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
- SkPaint paint;
- paint.setColor(border_color_);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(1);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- gfx::Rect rect(size);
- rect.Inset(0, 0, 1, 1);
- SkRect skia_rect = gfx::RectToSkRect(rect);
- skia_rect.offset(.5, .5);
- canvas->sk_canvas()->drawRoundRect(skia_rect, SkIntToScalar(corner_radius_),
- SkIntToScalar(corner_radius_), paint);
-}
-
-} // namespace views
« no previous file with comments | « ui/views/round_rect_painter.h ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698