pub enum XfaPaintCommand {
FillRect {
x: f64,
y: f64,
w: f64,
h: f64,
color: Color,
},
StrokeRect {
x: f64,
y: f64,
w: f64,
h: f64,
color: Color,
width: f64,
},
DrawText {
x: f64,
y: f64,
text: String,
font_family: FontFamily,
font_size: f64,
color: Color,
},
DrawMultilineText {
x: f64,
y: f64,
lines: Vec<String>,
font_family: FontFamily,
font_size: f64,
line_height: f64,
color: Color,
text_align: TextAlign,
container_width: f64,
text_padding: f64,
},
DrawImage {
x: f64,
y: f64,
w: f64,
h: f64,
image_data: Vec<u8>,
mime_type: String,
},
DrawCheckbox {
x: f64,
y: f64,
w: f64,
h: f64,
checked: bool,
border_color: [f64; 3],
check_color: [f64; 3],
border_width: f64,
},
}Expand description
An abstract rendering command from XFA layout. Can be consumed by any renderer (Device trait, content stream, SVG, etc.)
Variants§
FillRect
Fill a rectangle with a solid color.
Fields
StrokeRect
Stroke a rectangle outline.
Fields
DrawText
Draw a text string at a position.
Fields
§
font_family: FontFamilyFont family for selecting the PDF font resource.
DrawMultilineText
Draw multiple lines of text with alignment support.
Fields
§
font_family: FontFamilyFont family for selecting the PDF font resource.
DrawImage
Draw an image.
Fields
DrawCheckbox
Draw a checkbox or radio button.
Fields
Trait Implementations§
Source§impl Clone for XfaPaintCommand
impl Clone for XfaPaintCommand
Auto Trait Implementations§
impl !RefUnwindSafe for XfaPaintCommand
impl !UnwindSafe for XfaPaintCommand
impl Freeze for XfaPaintCommand
impl Send for XfaPaintCommand
impl Sync for XfaPaintCommand
impl Unpin for XfaPaintCommand
impl UnsafeUnpin for XfaPaintCommand
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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