pub struct Kludgine { /* private fields */ }
Trait Implementations
sourceimpl Renderer for Kludgine
impl Renderer for Kludgine
sourcefn theme(&self) -> SystemTheme
fn theme(&self) -> SystemTheme
Returns the current system theme.
sourcefn clip_bounds(&self) -> Rect<f32, Scaled>
fn clip_bounds(&self) -> Rect<f32, Scaled>
sourcefn clip_to(&self, bounds: Rect<f32, Scaled>) -> Kludgine
fn clip_to(&self, bounds: Rect<f32, Scaled>) -> Kludgine
Returns a new renderer instance with the state such that each operation
executes as if the origin is bounds.origin
. The returned instance’s
size()
should equal bounds.size
. Read more
sourcefn scale(&self) -> DisplayScale<f32>
fn scale(&self) -> DisplayScale<f32>
The scaling factors to use when rendering.
sourcefn render_text(
&self,
text: &str,
baseline_origin: impl Displayable<f32, Pixels = Point<f32, Pixels>>,
options: &TextOptions
)
fn render_text(
&self,
text: &str,
baseline_origin: impl Displayable<f32, Pixels = Point<f32, Pixels>>,
options: &TextOptions
)
Renders text
at baseline_origin
with options
.
sourcefn measure_text(&self, text: &str, options: &TextOptions) -> TextMetrics<Scaled>
fn measure_text(&self, text: &str, options: &TextOptions) -> TextMetrics<Scaled>
Measures text
using options
.
sourcefn stroke_rect(
&self,
rect: &impl Displayable<f32, Pixels = Rect<f32, Pixels>>,
options: &StrokeOptions
)
fn stroke_rect(
&self,
rect: &impl Displayable<f32, Pixels = Rect<f32, Pixels>>,
options: &StrokeOptions
)
Strokes the outline of rect
using options
.
sourcefn fill_rect(
&self,
rect: &impl Displayable<f32, Pixels = Rect<f32, Pixels>>,
color: Color
)
fn fill_rect(
&self,
rect: &impl Displayable<f32, Pixels = Rect<f32, Pixels>>,
color: Color
)
Fills rect
using color
.
sourcefn stroke_line<P>(&self, point_a: P, point_b: P, options: &StrokeOptions) where
P: Displayable<f32, Pixels = Point<f32, Pixels>>,
fn stroke_line<P>(&self, point_a: P, point_b: P, options: &StrokeOptions) where
P: Displayable<f32, Pixels = Point<f32, Pixels>>,
Draws a line between point_a
and point_b
using options
.
sourcefn draw_image(
&self,
image: &Image,
location: impl Displayable<f32, Pixels = Point<f32, Pixels>>
)
fn draw_image(
&self,
image: &Image,
location: impl Displayable<f32, Pixels = Point<f32, Pixels>>
)
Draws an image
at location
.
sourcefn render_text_with_style<F, P>(
&self,
text: &str,
baseline_origin: P,
style: &Style
) where
F: FallbackComponent<Value = ColorPair>,
P: Displayable<f32, Pixels = Point<f32, Pixels>>,
fn render_text_with_style<F, P>(
&self,
text: &str,
baseline_origin: P,
style: &Style
) where
F: FallbackComponent<Value = ColorPair>,
P: Displayable<f32, Pixels = Point<f32, Pixels>>,
Renders text
at baseline_origin
with options
.
sourcefn measure_text_with_style(
&self,
text: &str,
style: &Style
) -> TextMetrics<Scaled>
fn measure_text_with_style(
&self,
text: &str,
style: &Style
) -> TextMetrics<Scaled>
Measures text
using style
.
sourcefn fill_rect_with_style<F, R>(&self, rect: &R, style: &Style) where
F: FallbackComponent<Value = ColorPair>,
R: Displayable<f32, Pixels = Rect<f32, Pixels>>,
fn fill_rect_with_style<F, R>(&self, rect: &R, style: &Style) where
F: FallbackComponent<Value = ColorPair>,
R: Displayable<f32, Pixels = Rect<f32, Pixels>>,
Fills rect
using style
.
sourcefn stroke_rect_with_style<F, R>(&self, rect: &R, style: &Style) where
F: FallbackComponent<Value = ColorPair>,
R: Displayable<f32, Pixels = Rect<f32, Pixels>>,
fn stroke_rect_with_style<F, R>(&self, rect: &R, style: &Style) where
F: FallbackComponent<Value = ColorPair>,
R: Displayable<f32, Pixels = Rect<f32, Pixels>>,
Strokes the outline of rect
using style
.
sourcefn stroke_line_with_style<F, P>(&self, point_a: P, point_b: P, style: &Style) where
F: FallbackComponent<Value = ColorPair>,
P: Displayable<f32, Pixels = Point<f32, Pixels>>,
fn stroke_line_with_style<F, P>(&self, point_a: P, point_b: P, style: &Style) where
F: FallbackComponent<Value = ColorPair>,
P: Displayable<f32, Pixels = Point<f32, Pixels>>,
Draws a line between point_a
and point_b
using style
.
Auto Trait Implementations
impl RefUnwindSafe for Kludgine
impl Send for Kludgine
impl Sync for Kludgine
impl Unpin for Kludgine
impl UnwindSafe for Kludgine
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more