You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
547 B
27 lines
547 B
/*
|
|
* 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();
|
|
}
|