Trait composable::views::Output
source · pub trait Output: Sized {
// Required methods
fn begin(&mut self, x: f32, y: f32, rgba: [u8; 4], transform: &Transform);
fn line_to(&mut self, x: f32, y: f32);
fn quadratic_bezier_to(&mut self, x1: f32, y1: f32, x: f32, y: f32);
fn cubic_bezier_to(
&mut self,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x: f32,
y: f32,
);
fn close(&mut self);
}
Available on crate features
unstable
and views
only.Expand description
A surface, or file format, that views may be rendered to.
Required Methods§
sourcefn begin(&mut self, x: f32, y: f32, rgba: [u8; 4], transform: &Transform)
fn begin(&mut self, x: f32, y: f32, rgba: [u8; 4], transform: &Transform)
Begins a new path.
The path should be continued with a series of line_to
, quadratic_bezier_to
, and/or
cubic_bezier_to
calls and ended with a call to close
.
sourcefn quadratic_bezier_to(&mut self, x1: f32, y1: f32, x: f32, y: f32)
fn quadratic_bezier_to(&mut self, x1: f32, y1: f32, x: f32, y: f32)
Adds a quadratic Bézier to the current path.
(x1
, y1
) represents the Bézier control point.
Object Safety§
This trait is not object safe.