Myo Scol plugin
|
#include <sPdf.h>
Public Types | |
enum | ElementAlign { EM_LEFT = 0 , EM_RIGHT = 1 , EM_CENTER = 2 , EM_TOP = 4 , EM_BOTTOM = 8 , EM_MIDDLE = 16 } |
Public Member Functions | |
SPdfDoc (std::string title, std::string creator, std::string author, unsigned int dpiResolution=72) | |
~SPdfDoc () | |
void | SetCharset (std::string charset) |
void | SetPageMode (HPDF_PageMode mode) |
HPDF_PageMode | GetPageMode () |
void | SetPageLayout (HPDF_PageLayout layout) |
HPDF_PageLayout | GetPageLayout () |
HPDF_Page | AddPage (HPDF_PageSizes sizes, HPDF_PageDirection direction) |
HPDF_Page | GetPageByIndex (HPDF_UINT index) |
float | GetPageWidth (HPDF_Page page) |
float | GetPageHeight (HPDF_Page page) |
std::string | LoadFontTTF (std::string fontpath) |
void | AddPageLabel (HPDF_UINT pagenum, HPDF_PageNumStyle style, HPDF_UINT firstpage, std::string prefix) |
void | AddPageText (HPDF_Page page, std::string text, float posx, float posy, int color, std::string fontname, float fontsize, int align, bool relative=false) |
void | AddPageBitmap (HPDF_Page page, PtrObjBitmap bitmap, float posx, float posy, float width, float height, int align) |
void | AddPageImage (HPDF_Page page, std::string path, float posx, float posy, float width, float height, int align) |
void | AddPageRectangle (HPDF_Page page, float posx, float posy, float width, float height, float lineWith, int lineColor, int fillColor, bool filled, int align) |
void | AddPageEllipse (HPDF_Page page, float posx, float posy, float xradius, float yradius, float lineWith, int lineColor, int fillColor, bool filled, int align) |
void | AddPageLine (HPDF_Page page, float posx, float posy, float dstx, float dsty, float lineWith, int lineColor) |
float | GetTextWidth (HPDF_Page page, std::string text, std::string fontname, float fontsize) |
void | SaveToFile (std::string path) |
Static Public Member Functions | |
static void | ErrorHandler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void *user_data) |
SPdfDoc::SPdfDoc | ( | std::string | title, |
std::string | creator, | ||
std::string | author, | ||
unsigned int | dpiResolution = 72 |
||
) |
HPDF_Page SPdfDoc::AddPage | ( | HPDF_PageSizes | sizes, |
HPDF_PageDirection | direction | ||
) |
void SPdfDoc::AddPageBitmap | ( | HPDF_Page | page, |
PtrObjBitmap | bitmap, | ||
float | posx, | ||
float | posy, | ||
float | width, | ||
float | height, | ||
int | align | ||
) |
void SPdfDoc::AddPageEllipse | ( | HPDF_Page | page, |
float | posx, | ||
float | posy, | ||
float | xradius, | ||
float | yradius, | ||
float | lineWith, | ||
int | lineColor, | ||
int | fillColor, | ||
bool | filled, | ||
int | align | ||
) |
void SPdfDoc::AddPageImage | ( | HPDF_Page | page, |
std::string | path, | ||
float | posx, | ||
float | posy, | ||
float | width, | ||
float | height, | ||
int | align | ||
) |
void SPdfDoc::AddPageLabel | ( | HPDF_UINT | pagenum, |
HPDF_PageNumStyle | style, | ||
HPDF_UINT | firstpage, | ||
std::string | prefix | ||
) |
void SPdfDoc::AddPageLine | ( | HPDF_Page | page, |
float | posx, | ||
float | posy, | ||
float | dstx, | ||
float | dsty, | ||
float | lineWith, | ||
int | lineColor | ||
) |
void SPdfDoc::AddPageRectangle | ( | HPDF_Page | page, |
float | posx, | ||
float | posy, | ||
float | width, | ||
float | height, | ||
float | lineWith, | ||
int | lineColor, | ||
int | fillColor, | ||
bool | filled, | ||
int | align | ||
) |
void SPdfDoc::AddPageText | ( | HPDF_Page | page, |
std::string | text, | ||
float | posx, | ||
float | posy, | ||
int | color, | ||
std::string | fontname, | ||
float | fontsize, | ||
int | align, | ||
bool | relative = false |
||
) |
|
static |
float SPdfDoc::GetTextWidth | ( | HPDF_Page | page, |
std::string | text, | ||
std::string | fontname, | ||
float | fontsize | ||
) |