pub struct RectangleShape<'s> { /* private fields */ }
Expand description

Specialized shape representing a rectangle

Implementations

Returns a new RectangleShape.

Returns a new RectangleShape with the provided texture.

Returns a new RectangleShape with the provided size.

Returns a new RectangleShape created from a FloatRect.

Get the size of a rectangle shape

Return the height Size of the rectangle

Set the size of a rectangle shape

Arguments
  • size - The new size of the rectangle

Trait Implementations

Return a new RectangleShape or panic! if there is not enough memory

Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. 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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.