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

Unified Diff: gm/dftext.cpp

Issue 1253643004: make dftext gm not overlap itself (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move emoji up slightly Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dftext.cpp
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index 5ccdf21749df1b1e27de436b0e8a53e4448405eb..3753283eda66a48d6950c568df9b99fcf3d59eec 100755
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -146,11 +146,11 @@ protected:
};
paint.setColor(0xFFF7F3F7);
- SkRect r = SkRect::MakeLTRB(670, 250, 820, 460);
+ SkRect r = SkRect::MakeLTRB(670, 215, 820, 397);
canvas->drawRect(r, paint);
x = SkIntToScalar(680);
- y = SkIntToScalar(270);
+ y = SkIntToScalar(235);
paint.setTextSize(SkIntToScalar(19));
for (size_t i = 0; i < SK_ARRAY_COUNT(fg); ++i) {
paint.setColor(fg[i]);
@@ -160,11 +160,11 @@ protected:
}
paint.setColor(0xFF181C18);
- r = SkRect::MakeLTRB(820, 250, 970, 460);
+ r = SkRect::MakeLTRB(820, 215, 970, 397);
canvas->drawRect(r, paint);
x = SkIntToScalar(830);
- y = SkIntToScalar(270);
+ y = SkIntToScalar(235);
paint.setTextSize(SkIntToScalar(19));
for (size_t i = 0; i < SK_ARRAY_COUNT(fg); ++i) {
paint.setColor(fg[i]);
@@ -186,14 +186,14 @@ protected:
SkAutoCanvasRestore acr(canvas, true);
canvas->skew(0.5f, 0.0f);
paint.setTextSize(SkIntToScalar(32));
- canvas->drawText(text, textLen, 580, 230, paint);
+ canvas->drawText(text, textLen, 580, 125, paint);
}
// check color emoji
if (fEmojiTypeface) {
paint.setTypeface(fEmojiTypeface);
paint.setTextSize(SkIntToScalar(19));
- canvas->drawText(fEmojiText, strlen(fEmojiText), 670, 100, paint);
+ canvas->drawText(fEmojiText, strlen(fEmojiText), 670, 90, paint);
}
#if SK_SUPPORT_GPU
// render offscreen buffer
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698