| OLD | NEW |
| 1 |
| 1 /* | 2 /* |
| 2 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 3 * | 4 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 6 */ | 7 */ |
| 7 | |
| 8 #include "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkCanvas.h" | |
| 10 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 11 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
| 12 #include "SkPath.h" | 11 #include "SkView.h" |
| 12 #include "SkCanvas.h" |
| 13 #include "SkUtils.h" | 13 #include "SkUtils.h" |
| 14 #include "SkView.h" | |
| 15 | 14 |
| 16 static void draw_rect(SkCanvas* canvas, const SkRect& r, const SkPaint& p) { | 15 static void draw_rect(SkCanvas* canvas, const SkRect& r, const SkPaint& p) { |
| 17 canvas->drawRect(r, p); | 16 canvas->drawRect(r, p); |
| 18 | 17 |
| 19 SkPaint frame(p); | 18 SkPaint frame(p); |
| 20 frame.setShader(NULL); | 19 frame.setShader(NULL); |
| 21 frame.setStyle(SkPaint::kStroke_Style); | 20 frame.setStyle(SkPaint::kStroke_Style); |
| 22 canvas->drawRect(r, frame); | 21 canvas->drawRect(r, frame); |
| 23 } | 22 } |
| 24 | 23 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 141 } |
| 143 | 142 |
| 144 private: | 143 private: |
| 145 typedef SampleView INHERITED; | 144 typedef SampleView INHERITED; |
| 146 }; | 145 }; |
| 147 | 146 |
| 148 ////////////////////////////////////////////////////////////////////////////// | 147 ////////////////////////////////////////////////////////////////////////////// |
| 149 | 148 |
| 150 static SkView* MyFactory() { return new DitherBitmapView; } | 149 static SkView* MyFactory() { return new DitherBitmapView; } |
| 151 static SkViewRegister reg(MyFactory); | 150 static SkViewRegister reg(MyFactory); |
| OLD | NEW |