pub struct StreamGeometryContext { /* private fields */ }Expand description
Describes a geometry using drawing commands.
This type is used to describe a stream geometry: obtain one by calling
StreamGeometry::open. The context
is completed when it is disposed or dropped.
Implementations§
Source§impl StreamGeometryContext
impl StreamGeometryContext
Sourcepub fn new(impl_: Box<dyn IStreamGeometryContextImpl>) -> Self
👎Deprecated: Use StreamGeometry::open instead.
pub fn new(impl_: Box<dyn IStreamGeometryContextImpl>) -> Self
Use StreamGeometry::open instead.
Creates a context over a platform implementation.
Sourcepub fn precise_arc_to(
&mut self,
point: Point,
size: Size,
rotation_angle: f64,
is_large_arc: bool,
sweep_direction: SweepDirection,
)
pub fn precise_arc_to( &mut self, point: Point, size: Size, rotation_angle: f64, is_large_arc: bool, sweep_direction: SweepDirection, )
Draws an arc to the specified point using polylines, quadratic or cubic Bezier curves. This is significantly more precise when drawing elliptic arcs with extreme width:height ratios.
The parameters are those of IGeometryContext::arc_to:
point- The destination point where the arc ends.size- The radii of an ellipse whose path is used to draw the arc.rotation_angle- The rotation angle (in degrees) of the ellipse that specifies the path of the arc; positive values are clockwise. This will rotate the entire arc relative to the X-axis and is not commonly used.is_large_arc- Specifies whether the arc should follow the longer path around an ellipse rather than the shorter one.trueto draw the arc greater than 180 degrees; otherwise,false.sweep_direction- A value that indicates whether the arc is drawn in the Clockwise or Counterclockwise direction.
Trait Implementations§
Source§impl Drop for StreamGeometryContext
impl Drop for StreamGeometryContext
Source§impl IGeometryContext for StreamGeometryContext
impl IGeometryContext for StreamGeometryContext
Source§fn set_fill_rule(&mut self, fill_rule: FillRule)
fn set_fill_rule(&mut self, fill_rule: FillRule)
Sets the fill rule.
Source§fn arc_to(
&mut self,
point: Point,
size: Size,
rotation_angle: f64,
is_large_arc: bool,
sweep_direction: SweepDirection,
is_stroked: bool,
)
fn arc_to( &mut self, point: Point, size: Size, rotation_angle: f64, is_large_arc: bool, sweep_direction: SweepDirection, is_stroked: bool, )
Draws an arc to the specified point. Read more
Source§fn begin_figure(&mut self, start_point: Point, is_filled: bool)
fn begin_figure(&mut self, start_point: Point, is_filled: bool)
Begins a new figure.
Source§fn cubic_bezier_to(
&mut self,
control_point1: Point,
control_point2: Point,
end_point: Point,
is_stroked: bool,
)
fn cubic_bezier_to( &mut self, control_point1: Point, control_point2: Point, end_point: Point, is_stroked: bool, )
Draws a Bezier curve to the specified point.
Source§fn quadratic_bezier_to(
&mut self,
control_point: Point,
end_point: Point,
is_stroked: bool,
)
fn quadratic_bezier_to( &mut self, control_point: Point, end_point: Point, is_stroked: bool, )
Draws a quadratic Bezier curve to the specified point.
Source§fn end_figure(&mut self, is_closed: bool)
fn end_figure(&mut self, is_closed: bool)
Ends the figure started by
begin_figure.Auto Trait Implementations§
impl !RefUnwindSafe for StreamGeometryContext
impl !Send for StreamGeometryContext
impl !Sync for StreamGeometryContext
impl !UnwindSafe for StreamGeometryContext
impl Freeze for StreamGeometryContext
impl Unpin for StreamGeometryContext
impl UnsafeUnpin for StreamGeometryContext
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more