Mercurial > fife-parpg
comparison engine/core/video/image.h @ 583:47b49b9b0c0a
* Improved the floatingtextrenderer. Now you can set an alpha value for font, background quad and border. Splited quad and border into own commands.
* Added a triangle function to backends and genericrenderer, also added the functions to set an alpha value for geometric figures.
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 07 Aug 2010 16:36:35 +0000 |
parents | ad1f09d954f9 |
children | c0c3f64bfc2d |
comparison
equal
deleted
inserted
replaced
582:5e04f6349894 | 583:47b49b9b0c0a |
---|---|
66 */ | 66 */ |
67 virtual const Rect& getArea() = 0; | 67 virtual const Rect& getArea() = 0; |
68 | 68 |
69 /** Writes pixel to given position. Returns true, if pixel was written (not out of bounds) | 69 /** Writes pixel to given position. Returns true, if pixel was written (not out of bounds) |
70 */ | 70 */ |
71 virtual bool putPixel(int x, int y, int r, int g, int b) = 0; | 71 virtual bool putPixel(int x, int y, int r, int g, int b, int a = 255) = 0; |
72 | 72 |
73 /** Draws line between given points with given RGBA | 73 /** Draws line between given points with given RGBA |
74 */ | 74 */ |
75 virtual void drawLine(const Point& p1, const Point& p2, int r, int g, int b) = 0; | 75 virtual void drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a = 255) = 0; |
76 | |
77 /** Draws triangle between given points with given RGBA | |
78 */ | |
79 virtual void drawTriangle(const Point& p1, const Point& p2, const Point& p3, int r, int g, int b, int a = 255) = 0; | |
76 | 80 |
77 /** Draws quad between given points with given RGBA | 81 /** Draws quad between given points with given RGBA |
78 */ | 82 */ |
79 virtual void drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b) = 0; | 83 virtual void drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b, int a = 255) = 0; |
80 | 84 |
81 /** Draws a quad that represents a vertex with given RGBA | 85 /** Draws a quad that represents a vertex with given RGBA |
82 */ | 86 */ |
83 virtual void drawVertex(const Point& p, const uint8_t size, int r, int g, int b) = 0; | 87 virtual void drawVertex(const Point& p, const uint8_t size, int r, int g, int b, int a = 255) = 0; |
84 | 88 |
85 /** Returns pixel RGBA values from given position | 89 /** Returns pixel RGBA values from given position |
86 */ | 90 */ |
87 virtual void getPixelRGBA(int x, int y, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) = 0; | 91 virtual void getPixelRGBA(int x, int y, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) = 0; |
88 | 92 |