Implementation the CGraphics
object for black/white display like LCD Wintek WG19232.
More...
#include <CGraphicsMono.h>
Public Member Functions | |
CGraphicsMono (INT16 width, INT16 height) | |
Creates new Graphics object with specified width and height. | |
CGraphicsMono (void *mem_addr, INT16 width, INT16 height) | |
Creates new Graphics object with specified width and height linear frame buffer starts from mem_addr | |
virtual void | FillRectangle (INT16 x, INT16 y, INT16 width, INT16 height) |
Fills the specified rectangle. | |
virtual void | DrawImage (CImage *img, INT16 x, INT16 y, INT8 anchor) |
Draws the specified image by using the anchor point. | |
Protected Member Functions | |
virtual INT32 | GetPixel (INT16 x, INT16 y) |
Gets the RGB pixel color by the given coordinates. |
Implementation the CGraphics
object for black/white display like LCD Wintek WG19232.
void CGraphicsMono::DrawImage | ( | CImage * | img, | |
INT16 | x, | |||
INT16 | y, | |||
INT8 | anchor | |||
) | [virtual] |
Draws the specified image by using the anchor point.
The image can be drawn in different positions relative to the anchor point by passing the appropriate position constants. See anchor points.
If the source image contains transparent pixels, the corresponding pixels in the destination image must be left untouched. If the source image contains partially transparent pixels, a compositing operation must be performed with the destination pixels, leaving all pixels of the destination image fully opaque.
img | - the specified image to be drawn | |
x | - the x coordinate of the anchor point | |
y | - the y coordinate of the anchor point | |
anchor | - the anchor point for positioning the image |
Reimplemented from CGraphics.
void CGraphicsMono::FillRectangle | ( | INT16 | x, | |
INT16 | y, | |||
INT16 | width, | |||
INT16 | height | |||
) | [virtual] |
Fills the specified rectangle.
The left and right edges of the rectangle are at x
and x + width - 1
. The top and bottom edges are at y
and y + height - 1
. The resulting rectangle covers an area width
pixels wide by height
pixels tall. The rectangle is filled using the graphics context's current color.
x | - the X coordinate of the rectangle to be filled. | |
y | - the Y coordinate of the rectangle to be filled. | |
width | - the width of the rectangle to be filled. | |
height | - the height of the rectangle to be filled. |
Implements CGraphics.
INT32 CGraphicsMono::GetPixel | ( | INT16 | x, | |
INT16 | y | |||
) | [protected, virtual] |
Gets the RGB pixel color by the given coordinates.
x | - the x coordinate | |
y | - the y coordinate |
Implements CGraphics.