skia2/experimental/xform/SkShape.cpp
Mike Reed d62d406aa2 Revert "Revert "try resolver pattern""
This reverts commit 2bafb64ed3.

Change-Id: I46f29284546a8978fd0005a0937e28410e5ac0da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220518
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-06-12 14:46:56 +00:00

27 lines
547 B
C++

/*
* Copyright 2019 Google LLC.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "experimental/xform/SkShape.h"
#include "experimental/xform/SkXform.h"
#include "include/core/SkCanvas.h"
void GeoShape::draw(XContext* ctx) {
ctx->drawRect(fRect, fPaint, this->xform());
}
void GroupShape::draw(XContext* ctx) {
if (fArray.count() == 0) {
return;
}
ctx->push(this->xform());
for (auto s : fArray) {
s->draw(ctx);
}
ctx->pop();
}