Struct pdf_writer::Content [−][src]
pub struct Content { /* fields omitted */ }
Expand description
Builder for a content stream.
Implementations
impl Content
[src]
impl Content
[src]pub fn new() -> Self
[src]
pub fn new() -> Self
[src]Create a new content stream with the default buffer capacity (currently 1 KB).
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn with_capacity(capacity: usize) -> Self
[src]Create a new content stream with the specified initial buffer capacity.
pub fn save_state(&mut self) -> &mut Self
[src]
pub fn save_state(&mut self) -> &mut Self
[src]q
: Save the graphics state on the stack.
pub fn restore_state(&mut self) -> &mut Self
[src]
pub fn restore_state(&mut self) -> &mut Self
[src]Q
: Restore the graphics state from the stack.
pub fn matrix(
&mut self,
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32
) -> &mut Self
[src]
pub fn matrix(
&mut self,
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32
) -> &mut Self
[src]cm
: Modify the transformation matrix.
pub fn line_width(&mut self, width: f32) -> &mut Self
[src]
pub fn line_width(&mut self, width: f32) -> &mut Self
[src]w
: Set the stroke line width.
Panics if width is negative.
pub fn line_cap(&mut self, cap: LineCapStyle) -> &mut Self
[src]
pub fn line_cap(&mut self, cap: LineCapStyle) -> &mut Self
[src]J
: Set the line cap style.
pub fn fill_rgb(&mut self, r: f32, g: f32, b: f32) -> &mut Self
[src]
pub fn fill_rgb(&mut self, r: f32, g: f32, b: f32) -> &mut Self
[src]rg
: Set the fill color to the parameter and the color space to
DeviceRGB
.
pub fn stroke_rgb(&mut self, r: f32, g: f32, b: f32) -> &mut Self
[src]
pub fn stroke_rgb(&mut self, r: f32, g: f32, b: f32) -> &mut Self
[src]RG
: Set the stroke color to the parameter and the color space to
DeviceRGB
.
pub fn fill_cmyk(&mut self, c: f32, m: f32, y: f32, k: f32) -> &mut Self
[src]
pub fn fill_cmyk(&mut self, c: f32, m: f32, y: f32, k: f32) -> &mut Self
[src]k
: Set the fill color to the parameter and the color space to
DeviceCMYK
.
pub fn stroke_cmyk(&mut self, c: f32, m: f32, y: f32, k: f32) -> &mut Self
[src]
pub fn stroke_cmyk(&mut self, c: f32, m: f32, y: f32, k: f32) -> &mut Self
[src]K
: Set the stroke color to the parameter and the color space to
DeviceCMYK
.
pub fn rect(
&mut self,
x: f32,
y: f32,
width: f32,
height: f32,
stroke: bool,
fill: bool
) -> &mut Self
[src]
pub fn rect(
&mut self,
x: f32,
y: f32,
width: f32,
height: f32,
stroke: bool,
fill: bool
) -> &mut Self
[src]re
: Draw a rectangle.