pub struct RadialShading {
pub name: String,
pub start_center: Point,
pub start_radius: f64,
pub end_center: Point,
pub end_radius: f64,
pub color_stops: Vec<ColorStop>,
pub extend_start: bool,
pub extend_end: bool,
}Expand description
Radial shading definition
Fields§
§name: StringShading name for referencing
start_center: PointCenter point of the start circle
start_radius: f64Radius of the start circle
end_center: PointCenter point of the end circle
end_radius: f64Radius of the end circle
color_stops: Vec<ColorStop>Color stops along the gradient
extend_start: boolWhether to extend beyond the start circle
extend_end: boolWhether to extend beyond the end circle
Implementations§
Source§impl RadialShading
impl RadialShading
Sourcepub fn new(
name: String,
start_center: Point,
start_radius: f64,
end_center: Point,
end_radius: f64,
color_stops: Vec<ColorStop>,
) -> Self
pub fn new( name: String, start_center: Point, start_radius: f64, end_center: Point, end_radius: f64, color_stops: Vec<ColorStop>, ) -> Self
Create a new radial shading
Sourcepub fn with_extend(self, extend_start: bool, extend_end: bool) -> Self
pub fn with_extend(self, extend_start: bool, extend_end: bool) -> Self
Set extension options
Sourcepub fn radial_gradient(
name: String,
center: Point,
start_radius: f64,
end_radius: f64,
start_color: Color,
end_color: Color,
) -> Self
pub fn radial_gradient( name: String, center: Point, start_radius: f64, end_radius: f64, start_color: Color, end_color: Color, ) -> Self
Create a simple two-color radial gradient
Sourcepub fn to_pdf_dictionary(&self) -> Result<Dictionary>
pub fn to_pdf_dictionary(&self) -> Result<Dictionary>
Generate PDF shading dictionary
Trait Implementations§
Source§impl Clone for RadialShading
impl Clone for RadialShading
Source§fn clone(&self) -> RadialShading
fn clone(&self) -> RadialShading
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RadialShading
impl RefUnwindSafe for RadialShading
impl Send for RadialShading
impl Sync for RadialShading
impl Unpin for RadialShading
impl UnwindSafe for RadialShading
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more