Struct PathBuilder

Source
pub struct PathBuilder { /* private fields */ }

Implementations§

Source§

impl PathBuilder

Source

pub fn new() -> Self

Source

pub fn line_to(&mut self, x: f32, y: f32)

Source

pub fn move_to(&mut self, x: f32, y: f32)

Source

pub fn curve_to( &mut self, c1x: f32, c1y: f32, c2x: f32, c2y: f32, x: f32, y: f32, )

Source

pub fn quad_to(&mut self, cx: f32, cy: f32, x: f32, y: f32)

Source

pub fn close(&mut self)

Source

pub fn set_fill_mode(&mut self, fill_mode: FillMode)

Source

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 with outside_bounds and need_inside = false
  • IN(dest, geometry, alpha) can be done with outside_bounds and need_inside = true

Note: trapezoidal areas won’t be clipped to outside_bounds

Source

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.

Source

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

Source

pub fn get_path(&mut self) -> Option<OutputPath>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.