pub enum GraphicxOp {
Page(u32),
Trim {
l: f64,
b: f64,
r: f64,
t: f64,
},
Clip {
l: f64,
b: f64,
r: f64,
t: f64,
},
Rotate(f64),
Reflect,
Scale {
x: f64,
y: f64,
},
ScaleTo {
w: Option<f64>,
h: Option<f64>,
keep_aspect: bool,
},
}Expand description
One graphicx transformation, as compiled from the option string.
Port of the @transform list Perl image_graphicx_parse builds
(Util/Image.pm L142-196). Lengths are in bp, the unit to_bp yields,
and angles in degrees counter-clockwise, as graphicx states them.
Variants§
Page(u32)
page=N — which page of a multi-page source to take.
Trim
trim=l b r t — amounts to remove from each edge.
Clip
viewport=llx lly urx ury — an absolute box (Perl’s clip op).
Rotate(f64)
angle=N, counter-clockwise.
Reflect
Scale
scale=/xscale=/yscale=.
ScaleTo
width=/height=/totalheight=. A dimension left None is derived
from the other through the aspect ratio; Perl spells that as a 999999
sentinel with keep_aspect forced on (L188-189).
Trait Implementations§
Source§impl Clone for GraphicxOp
impl Clone for GraphicxOp
Source§fn clone(&self) -> GraphicxOp
fn clone(&self) -> GraphicxOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphicxOp
impl Debug for GraphicxOp
Source§impl PartialEq for GraphicxOp
impl PartialEq for GraphicxOp
impl StructuralPartialEq for GraphicxOp
Auto Trait Implementations§
impl Freeze for GraphicxOp
impl RefUnwindSafe for GraphicxOp
impl Send for GraphicxOp
impl Sync for GraphicxOp
impl Unpin for GraphicxOp
impl UnsafeUnpin for GraphicxOp
impl UnwindSafe for GraphicxOp
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