193 void scroll(
int offsetX,
int offsetY);
224 void setPenColor(uint8_t red, uint8_t green, uint8_t blue);
265 void setBrushColor(uint8_t red, uint8_t green, uint8_t blue);
562 void renderGlyphsBuffer(
int itemX,
int itemY, GlyphsBuffer
const * glyphsBuffer);
627 void drawText(
int X,
int Y,
char const * text,
bool wrap =
false);
645 void drawText(FontInfo
const * fontInfo,
int X,
int Y,
char const * text,
bool wrap =
false);
664 int textExtent(FontInfo
const * fontInfo,
char const * text);
760 FontInfo
const * m_fontInfo;
761 uint8_t m_textHorizRate;
int textExtent(FontInfo const *fontInfo, char const *text)
Calculates text extension in pixels.
Represents a 24 bit RGB color.
A class with a set of drawing methods.
void swapBuffers()
Swaps screen buffer when double buffering is enabled.
int getHeight()
Determines the canvas height in pixels.
void reset()
Resets paint state and other display controller settings.
void drawTextFmt(int X, int Y, const char *format,...)
Draws formatted text at specified position.
void scroll(int offsetX, int offsetY)
Scrolls pixels horizontally and/or vertically.
void selectFont(FontInfo const *fontInfo)
Selects a font to use for the next text drawings.
void resetGlyphOptions()
Resets glyph options.
This file contains fabgl::BitmappedDisplayController definition.
Color
This enum defines named colors.
RGB888 getPixel(int X, int Y)
Reads the pixel at specified position.
Represents the base abstract class for bitmapped display controllers.
Rect getClippingRect()
Gets last clipping rectangle set using setClippingRect().
int getWidth()
Determines the canvas width in pixels.
void setPaintOptions(PaintOptions options)
Sets paint options.
LineEnds
This enum defines line ends when pen width is greater than 1.
void fillEllipse(int X, int Y, int width, int height)
Fills an ellipse specifying center and size, using current brush color.
void swapRectangle(int X1, int Y1, int X2, int Y2)
Swaps pen and brush colors of the specified rectangle.
void setBrushColor(uint8_t red, uint8_t green, uint8_t blue)
Sets brush (background) color specifying color components.
void setClippingRect(Rect const &rect)
Sets clipping rectangle relative to the origin.
virtual int getViewPortWidth()=0
Determines horizontal size of the viewport.
virtual int getViewPortHeight()=0
Determines vertical size of the viewport.
void waitCompletion(bool waitVSync=true)
Waits for drawing queue to become empty.
void endUpdate()
Resumes drawings after beginUpdate().
Represents the coordinate of a point.
void fillRectangle(int X1, int Y1, int X2, int Y2)
Fills a rectangle using the current brush color.
void drawGlyph(int X, int Y, int width, int height, uint8_t const *data, int index=0)
Draws a glyph at specified position.
Specifies various glyph painting options.
void setLineEnds(LineEnds value)
Sets line ends shape.
void drawTextWithEllipsis(FontInfo const *fontInfo, int X, int Y, char const *text, int maxX)
Draws a string at specified position. Add ellipses before truncation.
void drawChar(int X, int Y, char c)
Draws a character at specified position.
void beginUpdate()
Suspends drawings.
void setScrollingRegion(int X1, int Y1, int X2, int Y2)
Defines the scrolling region.
void clear()
Fills the entire canvas with the brush color.
void setGlyphOptions(GlyphOptions options)
Sets drawing options for the next glyphs.
void drawLine(int X1, int Y1, int X2, int Y2)
Draws a line specifying initial and ending coordinates.
Point getOrigin()
Gets last origin set using setOrigin().
void drawEllipse(int X, int Y, int width, int height)
Draws an ellipse specifying center and size, using current pen color.
void setPenColor(uint8_t red, uint8_t green, uint8_t blue)
Sets pen (foreground) color specifying color components.
void drawPath(Point const *points, int pointsCount)
Draws a sequence of lines.
void drawText(int X, int Y, char const *text, bool wrap=false)
Draws a string at specified position.
void invertRectangle(int X1, int Y1, int X2, int Y2)
Inverts a rectangle.
void setPixel(int X, int Y)
Fills a single pixel with the pen color.
void setPenWidth(int value)
Sets pen width for lines, rectangles and paths.
void fillPath(Point const *points, int pointsCount)
Fills the polygon enclosed in a sequence of lines.
void setOrigin(int X, int Y)
Sets the axes origin.
void moveTo(int X, int Y)
Moves current pen position to the spcified coordinates.
void resetPaintOptions()
Resets paint options.
FontInfo const * getFontInfo()
Gets info about currently selected font.
Specifies general paint options.
void copyRect(int sourceX, int sourceY, int destX, int destY, int width, int height)
Copies a screen rectangle to the specified position.
void drawRectangle(int X1, int Y1, int X2, int Y2)
Draws a rectangle using the current pen color.
void lineTo(int X, int Y)
Draws a line starting from current pen position.
void drawBitmap(int X, int Y, Bitmap const *bitmap)
Draws a bitmap at specified position.