SpriteFrame constructor

SpriteFrame(
  1. Pointer<SdlTexture> texture, [
  2. Rectangle<double>? rect
])

Implementation

SpriteFrame(this.texture, [Rectangle<double>? rect]) {
  if (rect == null) {
    var size = texture.getSize()!;
    this.rect = RectangleEx.fromLTWH(Point<double>(0, 0), size);
  } else {
    this.rect = rect;
  }
}