From ae933ce0ea5fd9d21cb6ef2cee7e729d32690aac Mon Sep 17 00:00:00 2001 From: "rmistry@google.com" Date: Thu, 23 Aug 2012 18:19:56 +0000 Subject: Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) This CL is part III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleTextOnPath.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'samplecode/SampleTextOnPath.cpp') diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp index 00d9cba76b..976f3c8ca9 100644 --- a/samplecode/SampleTextOnPath.cpp +++ b/samplecode/SampleTextOnPath.cpp @@ -51,19 +51,19 @@ static void textPathMatrix(SkCanvas* canvas) { SkPaint paint; SkPath path; SkMatrix matrix; - + path.moveTo(SkIntToScalar(050), SkIntToScalar(200)); path.quadTo(SkIntToScalar(250), SkIntToScalar(000), SkIntToScalar(450), SkIntToScalar(200)); paint.setAntiAlias(true); - + paint.setStyle(SkPaint::kStroke_Style); canvas->drawPath(path, paint); paint.setStyle(SkPaint::kFill_Style); paint.setTextSize(SkIntToScalar(48)); paint.setTextAlign(SkPaint::kRight_Align); - + const char* text = "Reflection"; size_t len = strlen(text); @@ -71,16 +71,16 @@ static void textPathMatrix(SkCanvas* canvas) { SkScalar pathLen = meas.getLength(); canvas->drawTextOnPath(text, len, path, NULL, paint); - + paint.setColor(SK_ColorRED); matrix.setScale(-SK_Scalar1, SK_Scalar1); matrix.postTranslate(pathLen, 0); canvas->drawTextOnPath(text, len, path, &matrix, paint); - + paint.setColor(SK_ColorBLUE); matrix.setScale(SK_Scalar1, -SK_Scalar1); canvas->drawTextOnPath(text, len, path, &matrix, paint); - + paint.setColor(SK_ColorGREEN); matrix.setScale(-SK_Scalar1, -SK_Scalar1); matrix.postTranslate(pathLen, 0); @@ -92,7 +92,7 @@ public: SkPath fPath; SkScalar fHOffset; - TextOnPathView() { + TextOnPathView() { SkRect r; r.set(SkIntToScalar(100), SkIntToScalar(100), SkIntToScalar(300), SkIntToScalar(300)); @@ -111,7 +111,7 @@ protected: } return this->INHERITED::onQuery(evt); } - + virtual void onDrawContent(SkCanvas* canvas) { SkPaint paint; paint.setAntiAlias(true); @@ -139,27 +139,27 @@ protected: paint.setColor(SK_ColorGREEN); paint.setStyle(SkPaint::kStroke_Style); canvas->drawPath(fPath, paint); - + canvas->translate(SkIntToScalar(275), 0); textStrokePath(canvas); canvas->translate(SkIntToScalar(-275), SkIntToScalar(250)); textPathMatrix(canvas); - + if (REPEAT_COUNT > 1) this->inval(NULL); } - + virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) { fHints += 1; this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y); } - + virtual bool onClick(Click* click) { return this->INHERITED::onClick(click); } - + private: int fHints; typedef SampleView INHERITED; -- cgit v1.2.3