| Index: gm/dftext.cpp
|
| diff --git a/gm/dftext.cpp b/gm/dftext.cpp
|
| index 42d650ed2f4508189089336ee1a1e2b8878ef3ea..e64c1df4ca805282889a476f22acf534bb774cfd 100644
|
| --- a/gm/dftext.cpp
|
| +++ b/gm/dftext.cpp
|
| @@ -10,6 +10,7 @@
|
| #include "SkStream.h"
|
| #include "SkSurface.h"
|
| #include "SkTypeface.h"
|
| +#include "sk_tool_utils.h"
|
|
|
| class DFTextGM : public skiagm::GM {
|
| public:
|
| @@ -33,14 +34,6 @@ protected:
|
| return SkISize::Make(1024, 768);
|
| }
|
|
|
| - static void rotate_about(SkCanvas* canvas,
|
| - SkScalar degrees,
|
| - SkScalar px, SkScalar py) {
|
| - canvas->translate(px, py);
|
| - canvas->rotate(degrees);
|
| - canvas->translate(-px, -py);
|
| - }
|
| -
|
| virtual void onDraw(SkCanvas* inputCanvas) override {
|
| SkScalar textSizes[] = { 9.0f, 9.0f*2.0f, 9.0f*5.0f, 9.0f*2.0f*5.0f };
|
| SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f };
|
| @@ -95,7 +88,7 @@ protected:
|
|
|
| SkAutoCanvasRestore acr(canvas, true);
|
| canvas->translate(SkIntToScalar(10 + i * 200), -80);
|
| - rotate_about(canvas, SkIntToScalar(i * 5), rotX, rotY);
|
| + sk_tool_utils::rotate_about(canvas, SkIntToScalar(i * 5), rotX, rotY);
|
| for (int ps = 6; ps <= 32; ps += 3) {
|
| paint.setTextSize(SkIntToScalar(ps));
|
| canvas->drawText(text, textLen, rotX, rotY, paint);
|
|
|