Skeleton.withOffsetAndCrop constructor
Implementation
Skeleton.withOffsetAndCrop(
Skeleton skeleton,
Rect? parentRect,
Offset offset,
) {
if (parentRect != null)
this.rect = skeleton.rect!.shift(offset).intersect(parentRect);
else
this.rect = skeleton.rect!.shift(offset);
this.isText = skeleton.isText;
this.color = skeleton.color;
this.opacity = skeleton.opacity;
}