Struct printpdf::types::pdf_layer::PdfLayerReference [] [src]

pub struct PdfLayerReference {
    pub document: Weak<RefCell<PdfDocument>>,
    pub page: PdfPageIndex,
    pub layer: PdfLayerIndex,
}

A "reference" to the current layer, allows for inner mutability but only inside this library

Fields

A weak reference to the document, for inner mutability

The index of the page this layer is on

The index of the layer this layer has (inside the page)

Methods

impl PdfLayerReference
[src]

[src]

Add a shape to the layer. Use closed to indicate whether the line is a closed line Use has_fill to determine if the line should be filled.

[src]

Begins a new text section You have to make sure to call end_text_section afterwards

[src]

Ends a new text section Only valid if begin_text_section has been called

[src]

Set the current fill color for the layer

[src]

Set the current font, only valid in a begin_text_section to end_text_section block

[src]

Set the current line / outline color for the layer

[src]

Set the overprint mode of the stroke color to true (overprint) or false (no overprint)

[src]

Set the overprint mode of the fill color to true (overprint) or false (no overprint) This changes the graphics state of the current page, don't do it too often or you'll bloat the file size

[src]

Set the overprint mode of the fill color to true (overprint) or false (no overprint) This changes the graphics state of the current page, don't do it too often or you'll bloat the file size

[src]

Set the current line thickness, in points

NOTE: 0.0 is a special value, it does not make the line disappear, but rather makes it appear 1px wide across all devices

[src]

Set the current line join style for outlines

[src]

Set the current line join style for outlines

[src]

Set the current line join style for outlines

[src]

Sets (adds to) the current transformation matrix Use save_graphics_state() and restore_graphics_state() to "scope" the transformation matrix to a specific function

[src]

Sets (replaces) the current text matrix This does not have to be scoped, since the matrix is replaced instead of concatenated to the current matrix. However, you should only call this function with in a block scoped by begin_text_section() and end_text_section()

[src]

Sets the position where the text should appear

[src]

If called inside a text block scoped by begin_text_section and end_text_section, moves the cursor to a new line. PDF does not have any concept of "alignment" except left-aligned text Note: Use set_line_height earlier to set the line height first

[src]

Sets the text line height inside a text block (must be called within begin_text_block and end_text_block)

[src]

Sets the character spacing inside a text block Values are given in points. A value of 3 (pt) will increase the spacing inside a word by 3pt.

[src]

Sets the word spacing inside a text block. Same as set_character_spacing, just for words Note: This does currently not work, because PDF does not recognize unicode fonts, only builtin fonts done with PDFDoc encoding However, the function itself is valid

[src]

Sets the horizontal scaling (like a "condensed" font) Default value is 100 (regular scaling). Setting it to 50 will reduce the width of the written text by half, but stretch the text

[src]

Offsets the current text positon (used for superscript and subscript). To reset the superscript / subscript, call this function with 0 as the offset. For superscript, use a positive number, for subscript, use a negative number. This does not change the size of the font

[src]

[src]

Sets the position where the text should appear (in mm)

[src]

Saves the current graphic state

[src]

Restores the previous graphic state

[src]

Add text to the file, x and y are measure in millimeter from the bottom left corner

Trait Implementations

impl Debug for PdfLayerReference
[src]

[src]

Formats the value using the given formatter.

impl Clone for PdfLayerReference
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more