Flutter Engine
The Flutter Engine
Functions
thinconcavepaths.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkScalar.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (thinconcavepaths, canvas, 550, 400)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( thinconcavepaths  ,
canvas  ,
550  ,
400   
)

Definition at line 138 of file thinconcavepaths.cpp.

138 {
140
141 paint.setAntiAlias(true);
142 paint.setStyle(SkPaint::kFill_Style);
143
144 canvas->save();
145 for (SkScalar width = 0.5f; width < 2.05f; width += 0.25f) {
146 draw_thin_stroked_rect(canvas, paint, width);
147 canvas->translate(0, 25);
148 }
149 canvas->restore();
150 canvas->translate(50, 0);
151 canvas->save();
152 for (SkScalar width = 0.5f; width < 2.05f; width += 0.25f) {
153 draw_thin_right_angle(canvas, paint, width);
154 canvas->translate(0, 25);
155 }
156 canvas->restore();
157 canvas->translate(40, 0);
158 canvas->save();
159 for (SkScalar width = 0.2f; width < 2.1f; width += 0.2f) {
160 draw_golf_club(canvas, paint, width);
161 canvas->translate(0, 30);
162 }
163 canvas->restore();
164 canvas->translate(70, 0);
165 canvas->save();
166 for (SkScalar width = 0.2f; width < 2.1f; width += 0.2f) {
167 draw_thin_rect_and_triangle(canvas, paint, width);
168 canvas->translate(0, 30);
169 }
170 canvas->restore();
171 canvas->translate(30, 0);
172 canvas->save();
173
174 for (SkScalar width = 0.2f; width < 2.1f; width += 0.2f) {
175 draw_barbell(canvas, paint, width);
176 canvas->translate(0, 30);
177 }
178 canvas->restore();
179 canvas->translate(80, 0);
180 canvas->save();
181 for (SkScalar width = 0.2f; width < 2.1f; width += 0.2f) {
182 draw_hipster_pants(canvas, paint, width);
183 canvas->translate(0, 30);
184 }
185 canvas->restore();
186 canvas->translate(100, 0);
187 canvas->save();
188 for (SkScalar width = 0.2f; width < 2.1f; width += 0.2f) {
189 draw_skinny_snake(canvas, paint, width);
190 canvas->translate(0, 30);
191 }
192 canvas->restore();
193 canvas->translate(30, 0);
194 canvas->save();
195 for (SkScalar width = 0.2f; width < 2.1f; width += 0.2f) {
196 draw_pointy_golf_club(canvas, paint, width);
197 canvas->translate(0, 30);
198 }
199 canvas->restore();
200 canvas->translate(100, 0);
201 canvas->save();
202 for (SkScalar width = 0.0f; width < 0.5f; width += 0.05f) {
203 draw_small_i(canvas, paint, width);
204 canvas->translate(0, 30);
205 }
206 canvas->restore();
207 canvas->translate(100, 0);
208}
@ kFill_Style
set to fill geometry
Definition: SkPaint.h:193
const Paint & paint
Definition: color_source.cc:38
float SkScalar
Definition: extension.cpp:12
int32_t width