| jgraphics.h | | jgraphics.h | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| | | | |
| #define DEFAULT_FONT_SIZE 20 | | #define DEFAULT_FONT_SIZE 20 | |
| | | | |
| #define TRUNC_COLOR(r, g, b, a) \ | | #define TRUNC_COLOR(r, g, b, a) \ | |
| r = (r < 0)?0:(r > 0xff)?0xff:r; \ | | r = (r < 0)?0:(r > 0xff)?0xff:r; \ | |
| g = (g < 0)?0:(g > 0xff)?0xff:g; \ | | g = (g < 0)?0:(g > 0xff)?0xff:g; \ | |
| b = (b < 0)?0:(b > 0xff)?0xff:b; \ | | b = (b < 0)?0:(b > 0xff)?0xff:b; \ | |
| a = (a < 0)?0:(a > 0xff)?0xff:a; \ | | a = (a < 0)?0:(a > 0xff)?0xff:a; \ | |
| | | | |
| #define SCALE_TO_SCREEN(x, y, z) \ | | #define SCALE_TO_SCREEN(x, y, z) \ | |
|
| (int)floor(((double)x*(double)y)/(double)z) | | (int)round(((double)x*(double)y)/(double)z) | |
| | | | |
| #define SCREEN_TO_SCALE(x, z, y) \ | | #define SCREEN_TO_SCALE(x, z, y) \ | |
|
| (int)floor(((double)x*(double)y)/(double)z) | | (int)round(((double)x*(double)y)/(double)z) | |
| | | | |
| namespace jgui{ | | namespace jgui{ | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| enum jporter_duff_flags_t { | | enum jporter_duff_flags_t { | |
| PDF_NONE = 0x0001, // fs: sa fd: 1.0-sa
(defaults) | | PDF_NONE = 0x0001, // fs: sa fd: 1.0-sa
(defaults) | |
| PDF_CLEAR = 0x0002, // fs: 0.0 fd: 0.0 | | PDF_CLEAR = 0x0002, // fs: 0.0 fd: 0.0 | |
| | | | |
| skipping to change at line 127 | | skipping to change at line 127 | |
| TOP_VALIGN, | | TOP_VALIGN, | |
| CENTER_VALIGN, | | CENTER_VALIGN, | |
| BOTTOM_VALIGN, | | BOTTOM_VALIGN, | |
| JUSTIFY_VALIGN | | JUSTIFY_VALIGN | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| enum jline_type_t { | | enum jline_join_t { | |
| RECT_LINE = 0x01, | | BEVEL_JOIN = 0x01, | |
| ROUND_LINE = 0x02 | | ROUND_JOIN = 0x02, | |
| | | MITER_JOIN = 0x04, | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| enum jline_style_t { | | enum jline_style_t { | |
| SOLID_LINE = 0x01, | | SOLID_LINE = 0x01, | |
| DASH_LINE = 0x02, | | DASH_LINE = 0x02, | |
| DASH_DOT_LINE = 0x04, | | DASH_DOT_LINE = 0x04, | |
| | | | |
| skipping to change at line 234 | | skipping to change at line 235 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| * \author Jeff Ferr | | * \author Jeff Ferr | |
| */ | | */ | |
| class Graphics : public virtual jcommon::Object{ | | class Graphics : public virtual jcommon::Object{ | |
| | | | |
| friend class Window; | | friend class Window; | |
| friend class OffScreenImage; | | friend class OffScreenImage; | |
| | | | |
|
| protected: | | | |
| Graphics(void *s); | | | |
| | | | |
| private: | | private: | |
| jthread::Mutex graphics_mutex; | | jthread::Mutex graphics_mutex; | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| IDirectFBSurface *surface; | | IDirectFBSurface *surface; | |
| #endif | | #endif | |
| | | | |
| struct jregion_t _clip; | | struct jregion_t _clip; | |
| struct jpoint_t _translate; | | struct jpoint_t _translate; | |
| struct jsize_t _screen; | | struct jsize_t _screen; | |
| struct jsize_t _scale; | | struct jsize_t _scale; | |
| struct jcolor_t _color; | | struct jcolor_t _color; | |
|
| jline_type_t _line_type; | | jline_join_t _line_join; | |
| jline_style_t _line_style; | | jline_style_t _line_style; | |
| jdrawing_flags_t _draw_flags; | | jdrawing_flags_t _draw_flags; | |
| jblitting_flags_t _blit_flags; | | jblitting_flags_t _blit_flags; | |
| jporter_duff_flags_t _porter_duff_flags; | | jporter_duff_flags_t _porter_duff_flags; | |
| Font *_font; | | Font *_font; | |
| double _radians; | | double _radians; | |
| int _line_width; | | int _line_width; | |
|
| | | bool _is_premultiply, | |
| | | _antialias_enabled; | |
| | | | |
| #ifdef DIRECTFB_UI | | #ifdef DIRECTFB_UI | |
| struct edge_t { | | struct edge_t { | |
|
| | | struct edge_t *next; | |
| | | | |
| int yUpper; | | int yUpper; | |
| double xIntersect; | | double xIntersect; | |
| double dxPerScan; | | double dxPerScan; | |
|
| struct edge_t *next; | | | |
| }; | | }; | |
| | | | |
|
| void insertEdge(edge_t *list, edge_t *edge); | | void MakeEdgeRec(struct jpoint_t lower, struct jpoint_t uppe | |
| void makeEdgeRec(struct jpoint_t lower, struct jpoint_t uppe | | r, int yComp, edge_t *edge, edge_t *edges[]); | |
| r, int yComp, edge_t *edge, edge_t *edges[]); | | void FillScan(int scan, edge_t *active); | |
| void fillScan(int scan, edge_t *active); | | int YNext(int k, int cnt, jpoint_t pts[]); | |
| int yNext(int k, int cnt, jpoint_t pts[]); | | void BuildEdgeList(int cnt, jpoint_t pts[], edge_t *edges[]) | |
| void buildEdgeList(int cnt, jpoint_t pts[], edge_t *edges[]) | | ; | |
| ; | | void InsertEdge(edge_t *list, edge_t *edge); | |
| void updateActiveList(int scan, edge_t *active); | | void UpdateActiveList(int scan, edge_t *active); | |
| void Polygon(int n, int coordinates[]); | | void Polygon(int n, int coordinates[]); | |
|
| void Fill_polygon(int n, int ppts[]); | | void FillPolygon0(int n, int ppts[]); | |
| | | | |
| | | double EvaluateBezier0(double *data, int ndata, double t); | |
| | | | |
| | | void DrawRectangle0(int xp, int yp, int wp, int hp, int dx, | |
| | | int dy, jline_join_t join, int size); | |
| | | void DrawEllipse0(int xcp, int ycp, int rxp, int ryp, int si | |
| | | ze); | |
| | | void DrawArc0(int xcp, int ycp, int rxp, int ryp, double arc | |
| | | 0, double arc1, int size, int quadrant); | |
| | | void DrawPie0(int xcp, int ycp, int rxp, int ryp, double arc | |
| | | 0, double arc1, int size); | |
| | | void DrawChord0(int xcp, int ycp, int rxp, int ryp, double a | |
| | | rc0, double arc1, int size); | |
| | | | |
| | | void RotateImage0(OffScreenImage *img, int xc, int yc, int x | |
| | | , int y, int width, int height, double angle, uint8_t alpha); | |
| #endif | | #endif | |
| | | | |
|
| void RotateImage(OffScreenImage *img, int xc, int yc, int x, | | protected: | |
| int y, int width, int height, double angle, uint8_t alpha); | | Graphics(void *s, bool offscreen); | |
| | | | |
| public: | | public: | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual ~Graphics(); | | virtual ~Graphics(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 427 | | skipping to change at line 439 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual Font * GetFont(); | | virtual Font * GetFont(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual void SetAntiAliasEnabled(bool b); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual jporter_duff_flags_t GetPorterDuffFlags(); | | virtual jporter_duff_flags_t GetPorterDuffFlags(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jdrawing_flags_t GetDrawingFlags(); | | virtual jdrawing_flags_t GetDrawingFlags(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 475 | | skipping to change at line 493 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual uint32_t GetPixel(int xp, int yp); | | virtual uint32_t GetPixel(int xp, int yp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetLineType(jline_type_t t); | | virtual void SetLineJoin(jline_join_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetLineStyle(jline_style_t t); | | virtual void SetLineStyle(jline_style_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetLineWidth(int size); | | virtual void SetLineWidth(int size); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jline_type_t GetLineType(); | | virtual jline_join_t GetLineJoin(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jline_style_t GetLineStyle(); | | virtual jline_style_t GetLineStyle(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 516 | | skipping to change at line 534 | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawLine(int xp, int yp, int xf, int yf); | | virtual void DrawLine(int xp, int yp, int xf, int yf); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
|
| | | * \param p Vertex array containing (x, y) coordinates of th | |
| | | e points of the bezier curve. | |
| | | * \param npoints Number of points in the vertex array. Mini | |
| | | mum number is 3. | |
| | | * \param interpolation Number of steps for the interpolatio | |
| | | n. Minimum number is 2. | |
| | | * | |
| */ | | */ | |
|
| virtual void DrawBezierCurve(jpoint_t *points, int n_points)
; | | virtual void DrawBezierCurve(jpoint_t *p, int npoints, int i
nterpolation); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillRectangle(int x, int y, int w, int h); | | virtual void FillRectangle(int xp, int yp, int wp, int hp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawRectangle(int x, int y, int w, int h); | | virtual void DrawRectangle(int xp, int yp, int wp, int hp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillBevelRectangle(int x, int y, int w, int h,
int dx = 10, int dy = 10); | | virtual void FillBevelRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawBevelRectangle(int x, int y, int w, int h,
int dx = 10, int dy = 10); | | virtual void DrawBevelRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillRoundRectangle(int x, int y, int w, int h,
int raio = 10); | | virtual void FillRoundRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawRoundRectangle(int x, int y, int w, int h,
int raio = 10); | | virtual void DrawRoundRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillCircle(int xp, int yp, int raio); | | virtual void FillCircle(int xp, int yp, int rp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawCircle(int xp, int yp, int raio); | | virtual void DrawCircle(int xp, int yp, int rp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillArc(int xcp, int ycp, int rxp, int ryp, dou
ble start_angle, double end_angle); | | void FillEllipse(int xcp, int ycp, int rxp, int ryp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawArc(int xcp, int ycp, int rxp, int ryp, dou | | void DrawEllipse(int xcp, int ycp, int rxp, int ryp); | |
| ble start_angle, double end_angle); | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillChord(int xcp, int ycp, int rxp, int ryp, d | |
| | | ouble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void DrawChord(int xcp, int ycp, int rxp, int ryp, d | |
| | | ouble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillArc(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void DrawArc(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillPie(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void DrawPie(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void FillTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | | virtual void FillTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 619 | | skipping to change at line 677 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawGlyph(int symbol, int xp, int yp); | | virtual void DrawGlyph(int symbol, int xp, int yp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int x, int y, int al
pha = 0xff); | | virtual bool DrawImage(std::string img, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int x, int y, int w,
int h, int alpha = 0xff); | | virtual bool DrawImage(std::string img, int x, int y, int w,
int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y, int alpha = 0xff); | | virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y, int w, int h, int alpha = 0xff); | | virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y, int w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int x, int y, in
t alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int x, int y, in
t w, int h, int alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int x, int y, in
t w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y, int alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y, int w, int h, int alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y, int w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void GetStringBreak(std::vector<std::string> *lines,
std::string text, int wp, int hp, jhorizontal_align_t halign = JUSTIFY_HAL
IGN); | | virtual void GetStringBreak(std::vector<std::string> *lines,
std::string text, int wp, int hp, jhorizontal_align_t halign = JUSTIFY_HAL
IGN); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawString(std::string s, int x, int y); | | virtual void DrawString(std::string text, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawString(std::string full_text, int x, int y,
int width, int height, jhorizontal_align_t halign = JUSTIFY_HALIGN, jverti
cal_align_t valign = CENTER_VALIGN, bool clipped = true); | | virtual void DrawString(std::string text, int x, int y, int
width, int height, jhorizontal_align_t halign = JUSTIFY_HALIGN, jvertical_a
lign_t valign = CENTER_VALIGN, bool clipped = true); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf
f000000); | | virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf
f000000); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
End of changes. 36 change blocks. |
| 45 lines changed or deleted | | 116 lines changed or added | |
|
| jnullgraphics.h | | jnullgraphics.h | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void * GetNativeSurface(); | | virtual void * GetNativeSurface(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | static bool GetImageSize(std::string img, int *width, int *h | |
| | | eight); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual void SetNativeSurface(void *surface); | | virtual void SetNativeSurface(void *surface); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetWorkingScreenSize(int width, int height); | | virtual void SetWorkingScreenSize(int width, int height); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual OffScreenImage * Create(); | | virtual OffScreenImage * Create(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetClip(int x, int y, int width, int height); | | virtual void Rotate(double radians); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jregion_t GetClip(); | | virtual void Translate(int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void ReleaseClip(); | | virtual double Rotate(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void Rotate(double radians); | | virtual jpoint_t Translate(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void Translate(int x, int y); | | virtual void SetClip(int x, int y, int width, int height); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual double Rotate(); | | virtual jregion_t GetClip(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jpoint_t Translate(); | | virtual void ReleaseClip(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Clear(int r = 0xff, int g = 0xff, int b = 0xff,
int a = 0x00); | | virtual void Clear(int r = 0xff, int g = 0xff, int b = 0xff,
int a = 0x00); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 149 | | skipping to change at line 155 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual struct jcolor_t GetColor(); | | virtual struct jcolor_t GetColor(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetColor(uint32_t color); | | virtual void SetColor(struct jcolor_t c); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetColor(int r, int g, int b, int a = 0xFF); | | virtual void SetColor(uint32_t c); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void SetColor(int r, int g, int b, int a = 0xff); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual bool HasFont(); | | virtual bool HasFont(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetFont(Font *font); | | virtual void SetFont(Font *font); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| | | virtual Font * GetFont(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void SetAntiAliasEnabled(bool b); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual jporter_duff_flags_t GetPorterDuffFlags(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual jdrawing_flags_t GetDrawingFlags(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual jblitting_flags_t GetBlittingFlags(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| virtual void SetPorterDuffFlags(jporter_duff_flags_t t); | | virtual void SetPorterDuffFlags(jporter_duff_flags_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetDrawingFlags(jdrawing_flags_t t); | | virtual void SetDrawingFlags(jdrawing_flags_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 245 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual uint32_t GetPixel(int xp, int yp); | | virtual uint32_t GetPixel(int xp, int yp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetLineType(jline_type_t t); | | virtual void SetLineJoin(jline_join_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetLineStyle(jline_style_t t); | | virtual void SetLineStyle(jline_style_t t); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void SetLineWidth(int size); | | virtual void SetLineWidth(int size); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual jline_type_t GetLineType(); | | virtual jline_join_t GetLineJoin(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual jline_style_t GetLineStyle(); | | virtual jline_style_t GetLineStyle(); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 244 | | skipping to change at line 286 | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawLine(int xp, int yp, int xf, int yf); | | virtual void DrawLine(int xp, int yp, int xf, int yf); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
|
| | | * \param p Vertex array containing (x, y) coordinates of th | |
| | | e points of the bezier curve. | |
| | | * \param npoints Number of points in the vertex array. Mini | |
| | | mum number is 3. | |
| | | * \param interpolation Number of steps for the interpolatio | |
| | | n. Minimum number is 2. | |
| | | * | |
| */ | | */ | |
|
| virtual void DrawBezierCurve(jpoint_t *points, int n_points)
; | | virtual void DrawBezierCurve(jpoint_t *p, int npoints, int i
nterpolation); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillRectangle(int x, int y, int w, int h); | | virtual void FillRectangle(int xp, int yp, int wp, int hp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawRectangle(int x, int y, int w, int h); | | virtual void DrawRectangle(int xp, int yp, int wp, int hp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillBevelRectangle(int x, int y, int w, int h,
int dx = 10, int dy = 10); | | virtual void FillBevelRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawBevelRectangle(int x, int y, int w, int h,
int dx = 10, int dy = 10); | | virtual void DrawBevelRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillRoundRectangle(int x, int y, int w, int h,
int raio = 10); | | virtual void FillRoundRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawRoundRectangle(int x, int y, int w, int h,
int raio = 10); | | virtual void DrawRoundRectangle(int xp, int yp, int wp, int
hp, int dx = 10, int dy = 10); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillCircle(int xp, int yp, int raio); | | virtual void FillCircle(int xp, int yp, int rp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawCircle(int xp, int yp, int raio); | | virtual void DrawCircle(int xp, int yp, int rp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillArc(int xcp, int ycp, int rxp, int ryp, dou
ble start_angle, double end_angle); | | void FillEllipse(int xcp, int ycp, int rxp, int ryp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawArc(int xcp, int ycp, int rxp, int ryp, dou | | void DrawEllipse(int xcp, int ycp, int rxp, int ryp); | |
| ble start_angle, double end_angle); | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillChord(int xcp, int ycp, int rxp, int ryp, d | |
| | | ouble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void DrawChord(int xcp, int ycp, int rxp, int ryp, d | |
| | | ouble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillArc(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void DrawArc(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void FillPie(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void DrawPie(int xcp, int ycp, int rxp, int ryp, dou | |
| | | ble arc0, double arc1); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void FillTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | | virtual void FillTriangle(int x1, int y1, int x2, int y2, in
t x3, int y3); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| | | | |
| skipping to change at line 335 | | skipping to change at line 417 | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void DrawPolygon(int x, int y, jpoint_t *p, int num,
bool close); | | virtual void DrawPolygon(int x, int y, jpoint_t *p, int num,
bool close); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void FillGradientRectangle(int x, int y, int w, int
h, int sr, int sg, int sb, int sa, int dr, int dg, int db, int da = 0xFF, b
ool horizontal = true); | | virtual void FillGradientRectangle(int x, int y, int w, int
h, jcolor_t scolor, jcolor_t dcolor, bool horizontal = true); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void GetStringBreak(std::vector<std::string> *lines,
std::string text, int wp, int hp, jhorizontal_align_t halign = JUSTIFY_HAL
IGN); | | virtual void DrawGlyph(int symbol, int xp, int yp); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawString(std::string s, int x, int y); | | virtual bool DrawImage(std::string img, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawString(std::string full_text, int x, int y,
int width, int height, jhorizontal_align_t halign = JUSTIFY_HALIGN, jverti
cal_align_t valign = CENTER_VALIGN, bool clipped = true); | | virtual bool DrawImage(std::string img, int x, int y, int w,
int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void DrawGlyph(int symbol, int xp, int yp); | | virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int x, int y, int al
pha = 0xff); | | virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y, int w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int x, int y, int w,
int h, int alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y, int alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int x, int y, in
t w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(std::string img, int sx, int sy, int
sw, int sh, int x, int y, int w, int h, int alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int x, int y, in
t alpha = 0xff); | | virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y, int w, int h); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int x, int y, in
t w, int h, int alpha = 0xff); | | virtual void GetStringBreak(std::vector<std::string> *lines,
std::string text, int wp, int hp, jhorizontal_align_t halign = JUSTIFY_HAL
IGN); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y, int alpha = 0xff); | | virtual void DrawString(std::string text, int x, int y); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual bool DrawImage(OffScreenImage *img, int sx, int sy,
int sw, int sh, int x, int y, int w, int h, int alpha = 0xff); | | virtual void DrawString(std::string text, int x, int y, int
width, int height, jhorizontal_align_t halign = JUSTIFY_HALIGN, jvertical_a
lign_t valign = CENTER_VALIGN, bool clipped = true); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf
f000000); | | virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf
f000000); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void GetRGBArray(int startxp, int startyp, int width
p, int heightp, uint32_t **rgb, int offset, int scansize); | | virtual void GetRGBArray(int startxp, int startyp, int width
p, int heightp, uint32_t **rgb, int offset, int scansize); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetRGB(int xp, int yp, int rgb); | | virtual void SetRGB(int xp, int yp, uint32_t rgb); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
|
| virtual void SetRGB(uint32_t *rgb, int x, int y, int w, int
h, int scanline); | | virtual void SetRGB(uint32_t *rgb, int xp, int yp, int wp, i
nt hp, int scanline); | |
| | | | |
| /** | | /** | |
| * \brief | | * \brief | |
| * | | * | |
| */ | | */ | |
| virtual void Reset(); | | virtual void Reset(); | |
| | | | |
|
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void Lock(); | |
| | | | |
| | | /** | |
| | | * \brief | |
| | | * | |
| | | */ | |
| | | virtual void Unlock(); | |
| | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 41 change blocks. |
| 38 lines changed or deleted | | 141 lines changed or added | |
|