pub struct RotatedRenderer<'a> { /* private fields */ }Expand description
Renderer wrapper that applies 90° CCW rotation for platforms where the physical display is landscape but the framebuffer is portrait.
Maps logical coordinates (800×480 landscape) to framebuffer coordinates (480×800 portrait): fb_x = fb_width - logical_y - logical_height fb_y = logical_x fb_w = logical_height fb_h = logical_width
Implementations§
Trait Implementations§
Source§impl Renderer for RotatedRenderer<'_>
impl Renderer for RotatedRenderer<'_>
Source§fn fill_rect(&mut self, rect: WidgetRect, color: Color)
fn fill_rect(&mut self, rect: WidgetRect, color: Color)
Fill the given rectangle with a solid color.
Source§fn blend_rect(&mut self, rect: WidgetRect, color: Color)
fn blend_rect(&mut self, rect: WidgetRect, color: Color)
Blend a rectangle onto the target, honoring the alpha channel of
color
for source-over compositing. Read moreSource§fn draw_text(&mut self, position: (i32, i32), text: &str, color: Color)
fn draw_text(&mut self, position: (i32, i32), text: &str, color: Color)
Draw UTF‑8 text with its baseline anchored at the provided position using the color.
Source§fn draw_pixels(
&mut self,
position: (i32, i32),
pixels: &[Color],
width: u32,
height: u32,
)
fn draw_pixels( &mut self, position: (i32, i32), pixels: &[Color], width: u32, height: u32, )
Blit a buffer of pixels to the target at the given position. Read more
Source§fn submit(&mut self, list: &CommandList)
fn submit(&mut self, list: &CommandList)
Execute a captured
CommandList against this renderer. Read moreSource§fn blend_row(&mut self, x: i32, y: i32, color: Color, coverage: &[u8])
fn blend_row(&mut self, x: i32, y: i32, color: Color, coverage: &[u8])
Blend a horizontal run of pixels with per-pixel anti-aliased coverage. Read more
Source§fn fill_obb_aa(&mut self, obb: Obb, color: Color)
fn fill_obb_aa(&mut self, obb: Obb, color: Color)
Fill an oriented bounding box with anti-aliased coverage. Read more
Source§fn fill_disc_aa(&mut self, center: PointF, radius: f32, color: Color)
fn fill_disc_aa(&mut self, center: PointF, radius: f32, color: Color)
Fill a disc (filled circle) with anti-aliased coverage at the
boundary. Sub-pixel center; sqrt is restricted to the 1-pixel AA
ring so the inner-area fast-path stays integer-arithmetic only. Read more
Source§fn stroke_line_aa(&mut self, a: PointF, b: PointF, width: f32, color: Color)
fn stroke_line_aa(&mut self, a: PointF, b: PointF, width: f32, color: Color)
Stroke a line between
a and b with given width, anti-aliased.
Endpoints are square-cut; see raster::rasterize_line. Read moreSource§fn fill_arc_aa(
&mut self,
center: PointF,
r_outer: f32,
r_inner: f32,
start_cos: f32,
start_sin: f32,
end_cos: f32,
end_sin: f32,
extent: f32,
color: Color,
)
fn fill_arc_aa( &mut self, center: PointF, r_outer: f32, r_inner: f32, start_cos: f32, start_sin: f32, end_cos: f32, end_sin: f32, extent: f32, color: Color, )
Fill an annular arc / pie slice with anti-aliased coverage.
See
raster::rasterize_arc for the angle convention; in short,
(start_cos, start_sin) and (end_cos, end_sin) are pre-computed
boundary-ray unit vectors and extent is the signed angular
magnitude. r_inner = 0.0 produces a pie slice; r_inner > 0.0
produces a ring segment. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for RotatedRenderer<'a>
impl<'a> !Send for RotatedRenderer<'a>
impl<'a> !Sync for RotatedRenderer<'a>
impl<'a> !UnwindSafe for RotatedRenderer<'a>
impl<'a> Freeze for RotatedRenderer<'a>
impl<'a> Unpin for RotatedRenderer<'a>
impl<'a> UnsafeUnpin for RotatedRenderer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more