Creates a sprite from a texture and retains its reference; rectangle defaults to the entire texture, in pixels.
texturerectangleOptionalCopies sprite appearance and transforms, retaining the same texture reference.
sourceProtecteddrawSubclasses draw synchronously and may compose objects via target.draw(); states is a copy for this call.
targetstatesReturns axis-aligned bounds after applying position, rotation and scale.
Return the read-only cached parent-to-local inverse transform, or the identity matrix when not invertible.
Returns the texture reference retained by the sprite.
Returns a shared view typed as read-only of the texture pixel region.
Return the read-only cached local-to-parent transform. Later reads may update the same object.
Add offset to the current position.
thisoffsetAdd angle to the current rotation.
thisangleMultiply the current X/Y scale factors by the components of factors.
thisfactorsSets the color multiplied channel-wise with the texture; Alpha can control overall opacity.
thiscolorSet the local origin around which rotation and scaling take place.
thisoriginSet the object's origin in parent coordinates, copying position.
thispositionSet the rotation; positive angles are clockwise in screen coordinates.
thisangleSet X/Y scale factors; (1, 1) is original size and negatives flip axes.
thisfactorsReplaces the texture reference; resetRect true resets the texture region to the entire texture.
thistextureresetRectCopies the texture pixel region; width and height determine the local sprite size, and negative values can flip the texture.
thisrectangleReadonly[graphicsReadonly[mutableReadonly[spriteReadonly[transformable
sf::Sprite with the shared Transformable API.