OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "sk_tool_utils.h" | 8 #include "sk_tool_utils.h" |
9 #include "SkBlurImageFilter.h" | 9 #include "SkBlurImageFilter.h" |
10 #include "SkColor.h" | 10 #include "SkColor.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 for (auto& filter : filters) { | 133 for (auto& filter : filters) { |
134 paint.setAntiAlias(false); | 134 paint.setAntiAlias(false); |
135 paint.setImageFilter(filter); | 135 paint.setImageFilter(filter); |
136 | 136 |
137 canvas->save(); | 137 canvas->save(); |
138 | 138 |
139 canvas->drawRect(r, paint); | 139 canvas->drawRect(r, paint); |
140 | 140 |
141 canvas->translate(150, 0); | 141 canvas->translate(150, 0); |
142 canvas->save(); | 142 canvas->save(); |
143 canvas->translate(100, 100); | 143 canvas->rotate(30, 100, 100); |
144 canvas->rotate(30); | |
145 canvas->translate(-100, -100); | |
146 canvas->drawRect(r, paint); | 144 canvas->drawRect(r, paint); |
147 canvas->restore(); | 145 canvas->restore(); |
148 | 146 |
149 paint.setAntiAlias(true); | 147 paint.setAntiAlias(true); |
150 canvas->translate(150, 0); | 148 canvas->translate(150, 0); |
151 canvas->save(); | 149 canvas->save(); |
152 canvas->translate(100, 100); | 150 canvas->rotate(30, 100, 100); |
153 canvas->rotate(30); | |
154 canvas->translate(-100, -100); | |
155 canvas->drawRect(r, paint); | 151 canvas->drawRect(r, paint); |
156 canvas->restore(); | 152 canvas->restore(); |
157 | 153 |
158 canvas->restore(); | 154 canvas->restore(); |
159 canvas->translate(0, 150); | 155 canvas->translate(0, 150); |
160 } | 156 } |
161 } | 157 } |
OLD | NEW |