pub struct PsPage { /* private fields */ }Expand description
PostScript page builder
Implementations§
Source§impl PsPage
impl PsPage
Sourcepub fn add_background(
&mut self,
x: Length,
y: Length,
width: Length,
height: Length,
color: Color,
)
pub fn add_background( &mut self, x: Length, y: Length, width: Length, height: Length, color: Color, )
Add a filled rectangle (for backgrounds)
Sourcepub fn add_borders(
&mut self,
x: Length,
y: Length,
width: Length,
height: Length,
border_widths: [Length; 4],
border_colors: [Color; 4],
border_styles: [BorderStyle; 4],
)
pub fn add_borders( &mut self, x: Length, y: Length, width: Length, height: Length, border_widths: [Length; 4], border_colors: [Color; 4], border_styles: [BorderStyle; 4], )
Add borders
Sourcepub fn add_text(
&mut self,
text: &str,
x: Length,
y: Length,
font_size: Length,
color: Option<Color>,
)
pub fn add_text( &mut self, text: &str, x: Length, y: Length, font_size: Length, color: Option<Color>, )
Add text using the improved FN helper.
Font selection: bold/italic variants are chosen from traits; when no
trait information is available the base Helvetica family is used.
Sourcepub fn add_text_styled(
&mut self,
text: &str,
x: Length,
y: Length,
font_size: Length,
color: Option<Color>,
bold: bool,
italic: bool,
)
pub fn add_text_styled( &mut self, text: &str, x: Length, y: Length, font_size: Length, color: Option<Color>, bold: bool, italic: bool, )
Add text with explicit font-weight / font-style information.
Sourcepub fn add_line(
&mut self,
x1: Length,
y1: Length,
x2: Length,
y2: Length,
color: Color,
width: Length,
_style: &str,
)
pub fn add_line( &mut self, x1: Length, y1: Length, x2: Length, y2: Length, color: Color, width: Length, _style: &str, )
Add a line (for rules, borders)
Sourcepub fn save_clip_state(
&mut self,
x: Length,
y: Length,
width: Length,
height: Length,
)
pub fn save_clip_state( &mut self, x: Length, y: Length, width: Length, height: Length, )
Set clipping rectangle
Sourcepub fn restore_clip_state(&mut self)
pub fn restore_clip_state(&mut self)
Restore graphics state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PsPage
impl RefUnwindSafe for PsPage
impl Send for PsPage
impl Sync for PsPage
impl Unpin for PsPage
impl UnsafeUnpin for PsPage
impl UnwindSafe for PsPage
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> 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