diff options
| author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:19:56 +0000 |
|---|---|---|
| committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:19:56 +0000 |
| commit | ae933ce0ea5fd9d21cb6ef2cee7e729d32690aac (patch) | |
| tree | 62d80e33b16679d01454cf814977a7030d3a5462 /samplecode/SampleDitherBitmap.cpp | |
| parent | d6176b0dcacb124539e0cfd051e6d93a9782f020 (diff) | |
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
Diffstat (limited to 'samplecode/SampleDitherBitmap.cpp')
| -rw-r--r-- | samplecode/SampleDitherBitmap.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp index c243782b68..b84d0dde78 100644 --- a/samplecode/SampleDitherBitmap.cpp +++ b/samplecode/SampleDitherBitmap.cpp @@ -40,7 +40,7 @@ static void draw_gradient(SkCanvas* canvas) { static void test_pathregion() { SkPath path; SkRegion region; - path.moveTo(25071800.f, -141823808.f); + path.moveTo(25071800.f, -141823808.f); path.lineTo(25075500.f, -141824000.f); path.lineTo(25075400.f, -141827712.f); path.lineTo(25071810.f, -141827600.f); @@ -81,14 +81,14 @@ class DitherBitmapView : public SampleView { SkBitmap fBM8; SkBitmap fBM32; public: - DitherBitmapView() { + DitherBitmapView() { test_pathregion(); fBM8 = make_bitmap(); fBM8.copyTo(&fBM32, SkBitmap::kARGB_8888_Config); - + this->setBGColor(0xFFDDDDDD); } - + protected: // overrides from SkEventSink virtual bool onQuery(SkEvent* evt) { @@ -98,7 +98,7 @@ protected: } return this->INHERITED::onQuery(evt); } - + static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) { SkAutoLockPixels alp(*bm); // needed for ctable bm->setIsOpaque(isOpaque); @@ -107,7 +107,7 @@ protected: ctable->setIsOpaque(isOpaque); } } - + static void draw2(SkCanvas* canvas, const SkBitmap& bm) { SkPaint paint; SkBitmap bitmap(bm); @@ -125,7 +125,7 @@ protected: paint.setDither(true); canvas->drawBitmap(bitmap, x, SkIntToScalar(bm.height() + 10), &paint); } - + virtual void onDrawContent(SkCanvas* canvas) { canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); @@ -136,7 +136,7 @@ protected: canvas->translate(0, SkIntToScalar(fBM8.height() *3)); draw_gradient(canvas); } - + private: typedef SampleView INHERITED; }; |
