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

Unified Diff: ui/gfx/shadow_value.cc

Issue 884653003: gfx::ShadowValue: offset is a Vector2d, not Point. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. Created 5 years, 10 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/gfx/shadow_value.h ('k') | ui/gfx/shadow_value_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/shadow_value.cc
diff --git a/ui/gfx/shadow_value.cc b/ui/gfx/shadow_value.cc
index 3bef43ad82600e490fc073f7e2e7a301aaf357a9..7e310578c3d19656803f1b0c26d845da1dfec1f4 100644
--- a/ui/gfx/shadow_value.cc
+++ b/ui/gfx/shadow_value.cc
@@ -8,7 +8,7 @@
#include "base/strings/stringprintf.h"
#include "ui/gfx/geometry/insets.h"
-#include "ui/gfx/geometry/point_conversions.h"
+#include "ui/gfx/geometry/vector2d_conversions.h"
namespace gfx {
@@ -17,20 +17,18 @@ ShadowValue::ShadowValue()
color_(0) {
}
-ShadowValue::ShadowValue(const gfx::Point& offset,
+ShadowValue::ShadowValue(const gfx::Vector2d& offset,
double blur,
SkColor color)
- : offset_(offset),
- blur_(blur),
- color_(color) {
+ : offset_(offset), blur_(blur), color_(color) {
}
ShadowValue::~ShadowValue() {
}
ShadowValue ShadowValue::Scale(float scale) const {
- gfx::Point scaled_offset =
- gfx::ToFlooredPoint(gfx::ScalePoint(offset_, scale));
+ gfx::Vector2d scaled_offset =
+ gfx::ToFlooredVector2d(gfx::ScaleVector2d(offset_, scale));
return ShadowValue(scaled_offset, blur_ * scale, color_);
}
« no previous file with comments | « ui/gfx/shadow_value.h ('k') | ui/gfx/shadow_value_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698