2#ifndef TCLIBRARYDEV_DEVICEDRAWABLE_H
3#define TCLIBRARYDEV_DEVICEDRAWABLE_H
5#include <PlatformDetermination.h>
6#include "GfxMenuConfig.h"
9class UnicodeFontHandler;
37 NO_SUB_DEVICE, SUB_DEVICE_4BPP, SUB_DEVICE_2BPP
41 color_t backgroundColor = 0, drawColor = 0;
42 SubDeviceType subDeviceType = NO_SUB_DEVICE;
74 virtual void internalDrawText(
const Coord &where,
const void *
font,
int mag,
const char *text) = 0;
263 void setTcFontAccordingToMag(UnicodeFontHandler* handler,
const void* font,
int mag);
contains a series of core components needed by all graphical renderers
Definition DeviceDrawable.h:34
Coord textExtents(const void *font, int mag, const char *text, int *baseline)
Definition DeviceDrawable.cpp:31
virtual void drawPixel(uint16_t x, uint16_t y)=0
virtual void transaction(bool isStarting, bool redrawNeeded)=0
virtual Coord getDisplayDimensions()=0
bool isTcUnicodeEnabled()
Definition DeviceDrawable.h:225
virtual DeviceDrawable * getSubDeviceFor(const Coord &where, const Coord &size, const color_t *palette, int paletteSize)=0
void endDraw(bool needsDrawing=true)
Definition DeviceDrawable.h:194
virtual Coord internalTextExtents(const void *font, int mag, const char *text, int *baseline)=0
Coord textExtents(const void *font, int mag, const char *text)
Definition DeviceDrawable.h:177
virtual void drawBox(const Coord &where, const Coord &size, bool filled)=0
void setSubDeviceType(SubDeviceType s)
Definition DeviceDrawable.h:260
UnicodeFontHandler * getUnicodeHandler(bool enableIfNeeded=true)
Definition DeviceDrawable.cpp:20
virtual UnicodeFontHandler * createFontHandler()
Definition DeviceDrawable.cpp:27
virtual void drawCircle(const Coord &where, int radius, bool filled)=0
void setDrawColor(color_t fg)
Definition DeviceDrawable.h:212
void drawText(const Coord &where, const void *font, int mag, const char *text)
Definition DeviceDrawable.cpp:8
virtual color_t getUnderlyingColor(color_t col)
Definition DeviceDrawable.h:130
virtual void drawXBitmap(const Coord &where, const Coord &size, const uint8_t *data)=0
virtual void drawBitmap(const Coord &where, const DrawableIcon *icon, bool selected)=0
void setColors(color_t fg, color_t bg)
Definition DeviceDrawable.h:203
void startDraw()
Definition DeviceDrawable.h:185
void setFontHandler(UnicodeFontHandler *handler)
Definition DeviceDrawable.h:240
virtual void drawPolygon(const Coord points[], int numPoints, bool filled)=0
void enableTcUnicode()
Definition DeviceDrawable.h:219
SubDeviceType getSubDeviceType()
Definition DeviceDrawable.h:245
Definition DrawingPrimitives.h:152
Definition DrawingPrimitives.h:123