pub struct PathBuilder { /* private fields */ }
Implementations§
Source§impl PathBuilder
impl PathBuilder
pub fn new() -> Self
pub fn line_to(&mut self, x: f32, y: f32)
pub fn move_to(&mut self, x: f32, y: f32)
pub fn curve_to( &mut self, c1x: f32, c1y: f32, c2x: f32, c2y: f32, x: f32, y: f32, )
pub fn quad_to(&mut self, cx: f32, cy: f32, x: f32, y: f32)
pub fn close(&mut self)
pub fn set_fill_mode(&mut self, fill_mode: FillMode)
Sourcepub fn set_outside_bounds(
&mut self,
outside_bounds: Option<(i32, i32, i32, i32)>,
need_inside: bool,
)
pub fn set_outside_bounds( &mut self, outside_bounds: Option<(i32, i32, i32, i32)>, need_inside: bool, )
Enables rendering geometry for areas outside the shape but within the bounds. These areas will be created with zero alpha.
This is useful for creating geometry for other blend modes. For example:
IN(dest, geometry)
can be done withoutside_bounds
andneed_inside = false
IN(dest, geometry, alpha)
can be done withoutside_bounds
andneed_inside = true
Note: trapezoidal areas won’t be clipped to outside_bounds
Sourcepub fn set_rasterization_truncates(&mut self, rasterization_truncates: bool)
pub fn set_rasterization_truncates(&mut self, rasterization_truncates: bool)
Set this to true if post vertex shader coordinates are converted to fixed point via truncation. This has been observed with OpenGL on AMD GPUs on macOS.
Sourcepub fn rasterize_to_tri_list(
&self,
clip_x: i32,
clip_y: i32,
clip_width: i32,
clip_height: i32,
) -> Box<[OutputVertex]>
pub fn rasterize_to_tri_list( &self, clip_x: i32, clip_y: i32, clip_width: i32, clip_height: i32, ) -> Box<[OutputVertex]>
Note: trapezoidal areas won’t necessarily be clipped to the clip rect
pub fn get_path(&mut self) -> Option<OutputPath>
Auto Trait Implementations§
impl Freeze for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl UnwindSafe for PathBuilder
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