@@ -18,20 +18,18 @@ const PANIC_ERROR_MSG: &str = "Text does not hold a font! Return value cannot be
18
18
/// `RcText` is a drawable type that allows to easily
19
19
/// display some text with custom style and color on a render target.
20
20
///
21
- /// __Note:__
22
- /// Currently, it is not feasible to store text long term.
23
- /// A common pattern with rust-sfml is to create a `Text` right before you start drawing,
24
- /// and draw all the text you want with it. You can change its properties using
25
- /// `set_font`, `set_position`, `set_string`, etc., before drawing it, as many times as you need
26
- /// to.
27
- /// This is an improvement upon the [`sfml::graphics::Text`] module which dissallows seperation from the [`Font`]
28
- /// lifetime. The `RcText` allows for complete seperation from the [`RcFont`] while still
29
- /// referencing it. Underneath, it uses reference counting to ensure that the [`RcFont`] is alive,
30
- /// and will throw errors messages if you try to perform function on the sprite while the
31
- /// [`RcFont`] is no longer alive. the only functions that allow usage while the [`RcFont`] is not alive are
21
+ /// This is an alternative to [`Text`], allowing for complete seperation from the font's lifetime.
22
+ ///
23
+ /// Underneath, it uses reference counting to ensure that the [`RcFont`] is alive,
24
+ /// and disallows performing certain actions on the text if the
25
+ /// [`RcFont`] is no longer alive. It will print an error message in these cases.
26
+ ///
27
+ /// The only functions that allow usage while the [`RcFont`] is not alive are
32
28
/// `set_string`, `string`, `character_size`, `set_style`, `set_font`, `set_character_size`, `style`, `font`,
33
29
/// `fill-color`, `outline_color`, `outline_thickness`, `line_spacing`, `set_line_spacing`, `letter_spacing`,
34
30
/// `set_letter_spacing`
31
+ ///
32
+ /// [`Text`]: crate::graphics::Text
35
33
#[ derive( Debug ) ]
36
34
pub struct RcText {
37
35
text : NonNull < ffi:: sfText > ,
0 commit comments