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