249 {
250
253
254
259
260
262
264 line.setAntiAlias(
true);
266 line.setStrokeWidth(3.f);
267
268
270 canvas->
translate(0, nodeResults->height());
273
274
276 line);
277
278 static const float kPad = 20.f;
279 float x = nodeResults->width() +
kPad;
281 for (size_t i = 0; i < node.fInputNodes.size(); ++i) {
282
283 canvas->
drawLine(nodeResults->width(), 0.5f * nodeResults->height(),
284 x,
y + 0.5f * nodeResults->height(), line);
287 y +=
draw_dag(canvas, nodeSurface, node.fInputNodes[i]);
289 }
290 return std::max(
y, nodeResults->height() + textHeight +
kPad);
291}
static float print_info(SkCanvas *canvas, const FilterNode &node)
static void draw_node(SkCanvas *canvas, const FilterNode &node)
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorGRAY
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
@ kStroke_Style
set to stroke geometry
sk_sp< SkImage > makeImageSnapshot()
static constexpr SkRect MakeWH(float w, float h)