commitShape method
bool
commitShape(
- ToolContext ctx,
- EntityKind kind,
- GeometryPayload payload, {
- bool fillable = false,
inherited
Spec 05 D13: with Fill on and a fillable shape, one region when the
boundary can fill, and the plain boundary when it cannot.
Implementation
bool commitShape(ToolContext ctx, EntityKind kind, GeometryPayload payload,
{bool fillable = false}) =>
commit(ctx, () {
if (fillable && (fill?.value ?? false)) {
final region = addDraftedRegion(ctx.document, kind, payload,
layer: drawingLayer(ctx.document));
if (region != null) return region;
}
return addDrafted(ctx.document, kind, payload,
layer: drawingLayer(ctx.document));
});