AppCore
Loading...
Searching...
No Matches
EImageIface.h
Go to the documentation of this file.
1#ifndef _EIMAGEIFACE_H_
2#define _EIMAGEIFACE_H_
3
4#include <string>
5#include "appcore/printertemplate/EMPrinterTemplate.h"
6
8{
9 Left = 0, // = TOP_LEFT
10 Center = 1, // = TOP_CENTER
11 Right = 2, // = TOP_RIGHT
17 BottomRight = 8
18};
19
26namespace EM
27{
28 namespace Printer
29 {
35 {
36 public:
37 enum Metrics { Pixel = 0, Milimeter = 1, Centimeter = 2 };
38 enum FontEncoding { None = 0, Utf8 = 1 };
39
41 virtual ~EImageIface();
42
43 virtual long SetSize( float width, float height );
44 virtual long GetWidth();
45 virtual long GetHeight();
46 virtual long GetTextWidth( std::string text );
47 virtual long GetTextHeight();
48 virtual float GetTextHeightMM();
49 virtual Metrics GetMetrics();
50 virtual FontEncoding GetFontEncoding();
51 virtual long CalculateMetrics();
52 virtual long SetCurrentPos( float x, float y);
53 virtual long GetPositionX();
54 virtual long GetPositionY();
55 virtual long SetMetrics( Metrics metric );
56 virtual long SetFontEncoding( FontEncoding encode );
57 virtual long SetAlign( Alignement align );
58 virtual long SetBkColor( int colorIdx );
59 virtual long SetTextColor( int colorIdx );
60 virtual long SetDrawedObjectColors( int borderColorIdx, int fillColorIdx );
61 virtual long SetFont( std::string fontName, long size, bool bold, bool italic);
62 virtual long SetFont( std::string fontName, long size, bool bold, bool italic, bool underline );
63 virtual long DrawText( float x, float y, long width, long height, std::string text, Alignement align, short rotation = 0 );
64 virtual long DrawBox( float x1, float y1, float x2, float y2 );
65 virtual long DrawEllipse( float x, float y, float w, float h );
66 virtual long DrawLine( float x1, float y1, float x2, float y2 );
67 virtual long DrawPicture( float x, float y, std::string fileName );
68 virtual long DrawPicture( float x, float y, std::string fileName, long width, long height );
69
79 virtual long DrawQRCode( long x, long y, long width, long height, std::string data );
80
81 void SetDefaultPath( const std::string &defaultPath );
82 std::string GetDefaultPath() const;
83
84 private:
85 class DataClass;
86 DataClass *d;
87 };
88 }
89}
90
91#endif //_EIMAGEIFACE_H
Alignement
Definition EImageIface.h:8
@ MiddleLeft
Definition EImageIface.h:12
@ BottomRight
Definition EImageIface.h:17
@ MiddleRight
Definition EImageIface.h:14
@ BottomCenter
Definition EImageIface.h:16
@ Left
Definition EImageIface.h:9
@ Center
Definition EImageIface.h:10
@ Right
Definition EImageIface.h:11
@ BottomLeft
Definition EImageIface.h:15
@ MiddleCenter
Definition EImageIface.h:13
#define EMPRINTERTEMPLATE_API
Definition EMPrinterTemplate.h:9
Definition EImageIface.cpp:8
properties of draw objects
Definition EImageIface.h:35
virtual long DrawPicture(float x, float y, std::string fileName)
virtual long DrawText(float x, float y, long width, long height, std::string text, Alignement align, short rotation=0)
Metrics
Definition EImageIface.h:37
FontEncoding
Definition EImageIface.h:38
virtual long DrawQRCode(long x, long y, long width, long height, std::string data)
DrawQRCode.
virtual long SetFont(std::string fontName, long size, bool bold, bool italic)
virtual long SetFont(std::string fontName, long size, bool bold, bool italic, bool underline)
virtual long DrawPicture(float x, float y, std::string fileName, long width, long height)
virtual long GetTextWidth(std::string text)
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7