[−][src]Struct sfml::graphics::CircleShape
Specialized shape representing a circle.
Methods
impl<'s> CircleShape<'s>
[src]
pub fn with_texture(texture: &'s Texture) -> CircleShape<'s>
[src]
Create a new circle shape initialized with a texture
Arguments
- texture - The texture to initialize the
CircleShape
with.
Return Some(CircleShape) or None
pub fn new(radius: f32, point_count: u32) -> CircleShape<'s>
[src]
Create a new CircleShape
and initialize it.
Arguments:
- radius - The radius of the
CircleShape
- point_count - The number of points to define the
CircleShape
Default value on SFML are radius = 0 / pointCount = 30
pub fn set_radius(&self, radius: f32)
[src]
pub fn radius(&self) -> f32
[src]
Set the radius of a circle
Return the radius of the circle
pub fn set_point_count(&mut self, count: u32)
[src]
Trait Implementations
impl<'s> Drawable for CircleShape<'s>
[src]
fn draw<'a: 'shader, 'texture, 'shader, 'shader_texture>(
&'a self,
target: &mut dyn RenderTarget,
states: RenderStates<'texture, 'shader, 'shader_texture>
)
[src]
&'a self,
target: &mut dyn RenderTarget,
states: RenderStates<'texture, 'shader, 'shader_texture>
)
impl<'s> Shape<'s> for CircleShape<'s>
[src]
fn set_texture(&mut self, texture: &'s Texture, reset_rect: bool)
[src]
fn disable_texture(&mut self)
[src]
fn set_texture_rect(&mut self, rect: &IntRect)
[src]
fn set_fill_color(&mut self, color: Color)
[src]
fn set_outline_color(&mut self, color: Color)
[src]
fn set_outline_thickness(&mut self, thickness: f32)
[src]
fn texture(&self) -> Option<&'s Texture>
[src]
fn texture_rect(&self) -> IntRect
[src]
fn fill_color(&self) -> Color
[src]
fn outline_color(&self) -> Color
[src]
fn outline_thickness(&self) -> f32
[src]
fn point_count(&self) -> u32
[src]
fn point(&self, index: u32) -> Vector2f
[src]
fn local_bounds(&self) -> FloatRect
[src]
fn global_bounds(&self) -> FloatRect
[src]
impl<'s> Transformable for CircleShape<'s>
[src]
fn set_position<P: Into<Vector2f>>(&mut self, position: P)
[src]
fn set_rotation(&mut self, angle: f32)
[src]
fn set_scale<S: Into<Vector2f>>(&mut self, scale: S)
[src]
fn set_origin<O: Into<Vector2f>>(&mut self, origin: O)
[src]
fn position(&self) -> Vector2f
[src]
fn rotation(&self) -> f32
[src]
fn get_scale(&self) -> Vector2f
[src]
fn origin(&self) -> Vector2f
[src]
fn move_<O: Into<Vector2f>>(&mut self, offset: O)
[src]
fn rotate(&mut self, angle: f32)
[src]
fn scale<F: Into<Vector2f>>(&mut self, factors: F)
[src]
fn transform(&self) -> Transform
[src]
fn inverse_transform(&self) -> Transform
[src]
impl<'s> Drop for CircleShape<'s>
[src]
impl<'s> Clone for CircleShape<'s>
[src]
fn clone(&self) -> CircleShape<'s>
[src]
Return a new CircleShape
or panic if there is not enough memory
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'s> Default for CircleShape<'s>
[src]
impl<'s> Debug for CircleShape<'s>
[src]
Auto Trait Implementations
impl<'s> !Send for CircleShape<'s>
impl<'s> !Sync for CircleShape<'s>
impl<'s> Unpin for CircleShape<'s>
impl<'s> UnwindSafe for CircleShape<'s>
impl<'s> RefUnwindSafe for CircleShape<'s>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,