Struct sfml::graphics::CustomShape

source ·
pub struct CustomShape<'s> { /* private fields */ }
Expand description

A custom textured shape with outline.

Implementations§

Create a new CustomShape

Arguments

Create a new CustomShape with a texture

Arguments
  • points - Implementation of CustomShapePoints trait
  • texture - The texture to bind to the CustomShape

Recompute the internal geometry of a shape

This function must be called by specialized shape objects everytime their points change (ie. the result of either the point_count or point callbacks is different).

Trait Implementations§

Formats the value using the given formatter. Read more
Draws into target with RenderStates states.
Executes the destructor for this type. Read more
Changes the source texture of the shape. Read more
Disables texturing for this shape.
Sets the sub-rectangle of the texture that the shape will display. Read more
Sets the fill color of the shape. Read more
Sets the outline color of the shape. Read more
Sets the thickness of the shape’s outline. Read more
Gets the source texture of the shape. Read more
Gets the sub-rectangle of the texture displayed by the shape.
Gets the fill color of this shape.
Gets the outline color of this shape.
Gets the outline thickness of this shape.
Gets the total number of points of the shape.
Gets a point of the shape. Read more
Gets the local bounding rectangle of the entity. Read more
Gets the global (non-minimal) bounding rectangle of the entity. Read more
Sets the position of the object. Read more
Set the orientation of the object. Read more
Sets the scale factors of the object. Read more
Sets the local origin of the object. Read more
Gets the position of the object.
Gets the rotation of the object. Read more
Gets the current scale of the object.
Gets the local origin of the object.
Moves the object by a given offset. Read more
Rotates the object. Read more
Scales the object. Read more
Gets the combined transform of the object.
Gets the inverse combined transform of the object.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.