MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::Pdf:

Public Member Functions

auto convert_to_bool () const -> bool
auto assign_from_another (other:meshlib::Owned< meshlib::Pdf >) -> &mut meshlib::Pdf
void add_text_bool (text:&str, isTitle:Option< bool >)
void add_text_mr_pdf_text_params (text:&str, params:&meshlib::Pdf_TextParams)
auto get_text_width (text:&str, params:&meshlib::Pdf_TextParams) -> f32
void add_table (table:&meshlib::std_vector_std_pair_std_string_float)
void add_palette_stats_table (paletteStats:&meshlib::std_vector_MR_Pdf_PaletteRowStats)
void add_image_from_file (imagePath:&str, params:&meshlib::Pdf_ImageParams)
 Add image from file in current cursor position. If image bigger than page size, autoscale image to page size. Move cursor.
void add_image (image:&meshlib::Image, params:&meshlib::Pdf_ImageParams)
void new_page ()
void set_new_page_action (action:&meshlib::std_function_void_from_MR_Pdf_ref)
void save_to_file (documentPath:&str)
void set_cursor_pos_x (posX:f32)
void set_cursor_pos_y (posY:f32)
auto get_cursor_pos_x () const -> f32
auto get_cursor_pos_y () const -> f32
auto get_page_size () const -> meshlib::Vector2f
auto get_page_work_area () const -> meshlib::Box2f
void new_table (columnCount:core::ffi::c_int)
auto set_table_column_widths (widths:&meshlib::std_vector_float) -> meshlib::Owned< meshlib::expected_void_std_string >
auto add_table_titles (titles:&meshlib::std_vector_std_string) -> meshlib::Owned< meshlib::expected_void_std_string >
auto set_column_values_format (formats:&meshlib::std_vector_std_string) -> meshlib::Owned< meshlib::expected_void_std_string >
auto add_row (cells:&meshlib::std_vector_MR_Pdf_Cell) -> meshlib::Owned< meshlib::expected_void_std_string >
auto get_table_text_width (text:&str) -> f32
void set_table_custom_rule (rule:&meshlib::std_function_MR_Pdf_CellCustomParams_from_int_int_const_std_string_ref)
void draw_text_in_rect (text:&str, rect:&meshlib::Box2f, params:&meshlib::Pdf_TextParams)
void draw_text_cell (text:&str, params:&meshlib::Pdf_TextCellParams)
void draw_rect (rect:&meshlib::Box2f, fillColor:&meshlib::Color, strokeColor:&meshlib::Color)

Static Public Member Functions

static auto construct (params:Option<&meshlib::PdfParameters >) -> meshlib::Owned< meshlib::Pdf >
static auto construct_from_another (other:meshlib::Owned< meshlib::Pdf >) -> meshlib::Owned< meshlib::Pdf >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)

Detailed Description

Class for simple creation pdf.

Generated from class MR::Pdf.

Generated from class MR::Pdf. Heap-allocated instances are held in Owned<Pdf>.

Member Function Documentation

◆ add_image()

void meshlib::Pdf::add_image ( image:&meshlib::Image ,
params:&meshlib::Pdf_ImageParams  )

Generated from method MR::Pdf::addImage.

Calls MR_Pdf_addImage().

◆ add_image_from_file()

void meshlib::Pdf::add_image_from_file ( imagePath:& str,
params:&meshlib::Pdf_ImageParams  )

Add image from file in current cursor position. If image bigger than page size, autoscale image to page size. Move cursor.

Generated from method MR::Pdf::addImageFromFile.

Calls MR_Pdf_addImageFromFile().

◆ add_palette_stats_table()

void meshlib::Pdf::add_palette_stats_table ( paletteStats:&meshlib::std_vector_MR_Pdf_PaletteRowStats )

Generated from method MR::Pdf::addPaletteStatsTable.

Calls MR_Pdf_addPaletteStatsTable().

◆ add_row()

add in pdf table row with values Generated from method MR::Pdf::addRow.

Calls MR_Pdf_addRow().

◆ add_table()

void meshlib::Pdf::add_table ( table:&meshlib::std_vector_std_pair_std_string_float )

Add set of pair string - value in current cursor position. Move cursor. Box horizontal size is page width without offset. Box vertical size is automatically for text.

Generated from method MR::Pdf::addTable.

Calls MR_Pdf_addTable().

◆ add_table_titles()

auto meshlib::Pdf::add_table_titles ( titles:&meshlib::std_vector_std_string ) -> meshlib::Owned< meshlib::expected_void_std_string >

add in pdf table row with titles Generated from method MR::Pdf::addTableTitles.

Calls MR_Pdf_addTableTitles().

◆ add_text_bool()

void meshlib::Pdf::add_text_bool ( text:& str,
isTitle:Option< bool >  )

Add text block in current cursor position. Move cursor. Box horizontal size is page width without offset. Box vertical size is automatically for text. horAlignment = left if isTitle - horAlignment = center, use titleFontSize

Generated from method MR::Pdf::addText.

Calls MR_Pdf_addText_bool().

◆ add_text_mr_pdf_text_params()

void meshlib::Pdf::add_text_mr_pdf_text_params ( text:& str,
params:&meshlib::Pdf_TextParams  )

Generated from method MR::Pdf::addText.

Calls MR_Pdf_addText_MR_Pdf_TextParams().

◆ assign_from_another()

auto meshlib::Pdf::assign_from_another ( other:meshlib::Owned< meshlib::Pdf > ) -> &mut meshlib::Pdf

Generated from method MR::Pdf::operator=.

Calls MR_Pdf_AssignFromAnother(). The reference to things referred to by the parameter other (if any) might be preserved in this object. The reference to this object might be preserved in the return value.

◆ construct()

auto meshlib::Pdf::construct ( params:Option<&meshlib::PdfParameters > ) -> meshlib::Owned< meshlib::Pdf >
static

Ctor. Create a document, but not a page. To create a new page use newPage() method Generated from constructor MR::Pdf::Pdf.

Calls MR_Pdf_Construct(). The reference to the parameter params might be preserved in the constructed object.

◆ construct_from_another()

auto meshlib::Pdf::construct_from_another ( other:meshlib::Owned< meshlib::Pdf > ) -> meshlib::Owned< meshlib::Pdf >
static

Generated from constructor MR::Pdf::Pdf.

Calls MR_Pdf_ConstructFromAnother(). The reference to things referred to by the parameter other (if any) might be preserved in the constructed object.

◆ convert_to_bool()

auto meshlib::Pdf::convert_to_bool ( ) const -> bool

Checking the ability to work with a document Generated from conversion operator MR::Pdf::operator bool.

Calls MR_Pdf_ConvertTo_bool().

◆ draw_rect()

void meshlib::Pdf::draw_rect ( rect:&meshlib::Box2f ,
fillColor:&meshlib::Color ,
strokeColor:&meshlib::Color  )

draw rect (filled with border) Generated from method MR::Pdf::drawRect.

Calls MR_Pdf_drawRect().

◆ draw_text_cell()

void meshlib::Pdf::draw_text_cell ( text:& str,
params:&meshlib::Pdf_TextCellParams  )

Generated from method MR::Pdf::drawTextCell.

Calls MR_Pdf_drawTextCell().

◆ draw_text_in_rect()

void meshlib::Pdf::draw_text_in_rect ( text:& str,
rect:&meshlib::Box2f ,
params:&meshlib::Pdf_TextParams  )

draw text in specific rect on page text will be cropped by rect Generated from method MR::Pdf::drawTextInRect.

Calls MR_Pdf_drawTextInRect().

◆ get_cursor_pos_x()

auto meshlib::Pdf::get_cursor_pos_x ( ) const -> f32

Generated from method MR::Pdf::getCursorPosX.

Calls MR_Pdf_getCursorPosX().

◆ get_cursor_pos_y()

auto meshlib::Pdf::get_cursor_pos_y ( ) const -> f32

Generated from method MR::Pdf::getCursorPosY.

Calls MR_Pdf_getCursorPosY().

◆ get_page_size()

auto meshlib::Pdf::get_page_size ( ) const -> meshlib::Vector2f

Generated from method MR::Pdf::getPageSize.

Calls MR_Pdf_getPageSize().

◆ get_page_work_area()

auto meshlib::Pdf::get_page_work_area ( ) const -> meshlib::Box2f

Generated from method MR::Pdf::getPageWorkArea.

Calls MR_Pdf_getPageWorkArea().

◆ get_table_text_width()

auto meshlib::Pdf::get_table_text_width ( text:& str) -> f32

parameters to customization table cell return text width (for table font parameters) Generated from method MR::Pdf::getTableTextWidth.

Calls MR_Pdf_getTableTextWidth().

◆ get_text_width()

auto meshlib::Pdf::get_text_width ( text:& str,
params:&meshlib::Pdf_TextParams  ) -> f32

return text width Generated from method MR::Pdf::getTextWidth.

Calls MR_Pdf_getTextWidth().

◆ new_page()

void meshlib::Pdf::new_page ( )

Add new pageand move cursor on it Generated from method MR::Pdf::newPage.

Calls MR_Pdf_newPage().

◆ new_table()

void meshlib::Pdf::new_table ( columnCount:core::ffi::c_int )

set up new table (clear table customization, reset parameters to default values) Generated from method MR::Pdf::newTable.

Calls MR_Pdf_newTable().

◆ save_to_file()

void meshlib::Pdf::save_to_file ( documentPath:& str)

Save document to file Generated from method MR::Pdf::saveToFile.

Calls MR_Pdf_saveToFile().

◆ set_column_values_format()

auto meshlib::Pdf::set_column_values_format ( formats:&meshlib::std_vector_std_string ) -> meshlib::Owned< meshlib::expected_void_std_string >

set format for conversion values to string for each column Generated from method MR::Pdf::setColumnValuesFormat.

Calls MR_Pdf_setColumnValuesFormat().

◆ set_cursor_pos_x()

void meshlib::Pdf::set_cursor_pos_x ( posX:f32 )

Generated from method MR::Pdf::setCursorPosX.

Calls MR_Pdf_setCursorPosX().

◆ set_cursor_pos_y()

void meshlib::Pdf::set_cursor_pos_y ( posY:f32 )

Generated from method MR::Pdf::setCursorPosY.

Calls MR_Pdf_setCursorPosY().

◆ set_new_page_action()

void meshlib::Pdf::set_new_page_action ( action:&meshlib::std_function_void_from_MR_Pdf_ref )

set function to customize new page after creation Generated from method MR::Pdf::setNewPageAction.

Calls MR_Pdf_setNewPageAction().

◆ set_table_column_widths()

auto meshlib::Pdf::set_table_column_widths ( widths:&meshlib::std_vector_float ) -> meshlib::Owned< meshlib::expected_void_std_string >

set table column widths Generated from method MR::Pdf::setTableColumnWidths.

Calls MR_Pdf_setTableColumnWidths().

◆ set_table_custom_rule()

void meshlib::Pdf::set_table_custom_rule ( rule:&meshlib::std_function_MR_Pdf_CellCustomParams_from_int_int_const_std_string_ref )

add rule to customize table cells Generated from method MR::Pdf::setTableCustomRule.

Calls MR_Pdf_setTableCustomRule().


The documentation for this struct was generated from the following file: