12 #include <sys/ioctl.h>
20 #define FB_DEV "/dev/fb/0"
24 #include FT_FREETYPE_H
26 #include FT_CACHE_SMALL_BITMAPS_H
27 #define FONT "/share/fonts/pakenham.ttf"
38 #if FREETYPE_MAJOR == 2 && FREETYPE_MINOR == 0
41 FTC_ImageTypeRec desc
;
44 FT_UInt prev_glyphindex
;
46 int RenderChar(FT_ULong currentchar
, int sx
, int sy
, int ex
, int r
, int g
, int b
);
47 int GetStringLen(unsigned char *string
);
50 unsigned int xRes
, yRes
, stride
, bpp
;
51 unsigned long x_stride
;
52 struct fb_var_screeninfo screeninfo
, oldscreen
;
53 unsigned short red
[256], green
[256], blue
[256], trans
[256];
55 static fbClass
*instance
;
56 int showConsole(int state
);
58 void blit2FB(void *fbbuff
,unsigned char *alpha
,unsigned int pic_xs
,unsigned int pic_ys
,unsigned int scr_xs
,unsigned int scr_ys
, unsigned int xp
, unsigned int yp
,unsigned int xoffs
, unsigned int yoffs
,int cpp
);
64 void PaintPixel(int x
, int y
, int r
, int g
, int b
);
67 unsigned char* c_rect_buffer
;
68 int c_rect_buffer_cpp
;
71 enum {LEFT
, CENTER
, RIGHT
};
72 static fbClass
*getInstance();
76 int SetSAA(int value
);//setzt den saa
77 int SetMode(unsigned int nxRes
, unsigned int nyRes
, unsigned int nbpp
);//setzt den Framebuffer
79 FT_Error
FTC_Face_Requester(FTC_FaceID face_id
, FT_Face
* aface
);
80 void RenderString(std::string word
, int sx
, int sy
, int maxwidth
, int layout
, int size
, int r
, int g
, int b
);
82 int DrawString( int xpos
, int ypos
, int height
, const char *msg
, int r
,int g
, int b
);
84 void FillRect(int x
, int y
, int width
, int height
, int r
, int g
, int b
);
85 void DrawRect( int x
, int y
, int width
, int height
, int r
, int g
, int b
);
86 void DrawVLine(int x
, int y
, int sy
, int r
, int g
, int b
);
87 void DrawHLine(int x
, int y
, int sx
, int r
, int g
, int b
);
88 void RenderCircle(int sx
, int sy
, int r
, int g
, int b
);
89 void fb_display(unsigned char *rgbbuff
,unsigned char * alpha
,int x_size
,int y_size
,int x_pan
,int y_pan
,int x_offs
,int y_offs
);//für Bilder
90 void W_buffer(int sx
, int sy
, int width
, int height
); //stellt den Bildausschnitt wieder her
91 void Fill_buffer(int sx
, int sy
, int width
, int height
);//merkt sich einen Bildausschnitt