• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 Google LLC.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "experimental/xform/SkShape.h"
9 #include "experimental/xform/SkXform.h"
10 #include "include/core/SkCanvas.h"
11 
draw(XContext * ctx)12 void GeoShape::draw(XContext* ctx) {
13     ctx->drawRect(fRect, fPaint, this->xform());
14 }
15 
draw(XContext * ctx)16 void GroupShape::draw(XContext* ctx) {
17     if (fArray.count() == 0) {
18         return;
19     }
20 
21     ctx->push(this->xform());
22     for (auto s : fArray) {
23         s->draw(ctx);
24     }
25     ctx->pop();
26 }
27