![]() |
µGFX
2.9
version 2.9
|
GDISP Graphic Driver subsystem header file.
Definition in file gdisp.h.
Go to the source code of this file.
Data Structures | |
| struct | gPoint |
| Type for a 2D point on the screen. More... | |
Functions | |
| gColor | gdispBlendColor (gColor fg, gColor bg, gU8 alpha) |
| Blend 2 colors according to the alpha. More... | |
| gColor | gdispContrastColor (gColor color) |
| Find a contrasting color. More... | |
| GDisplay * | gdispGetDisplay (unsigned display) |
| Get the specified display. More... | |
| void | gdispSetDisplay (GDisplay *g) |
| Set the current default display to the specified display. More... | |
| unsigned | gdispGetDisplayCount (void) |
| Get the count of currently active displays. More... | |
| gCoord | gdispGGetWidth (GDisplay *g) |
| Get the display width in pixels. More... | |
| gCoord | gdispGGetHeight (GDisplay *g) |
| Get the display height in pixels. More... | |
| gPowermode | gdispGGetPowerMode (GDisplay *g) |
| Get the current display power mode. More... | |
| gOrientation | gdispGGetOrientation (GDisplay *g) |
| Get the current display orientation. More... | |
| gU8 | gdispGGetBacklight (GDisplay *g) |
| Get the current display backlight brightness. More... | |
| gU8 | gdispGGetContrast (GDisplay *g) |
| Get the current display contrast. More... | |
| void | gdispGFlush (GDisplay *g) |
| Flush current drawing operations to the display. More... | |
| void | gdispGClear (GDisplay *g, gColor color) |
| Clear the display to the specified color. More... | |
| void | gdispGDrawPixel (GDisplay *g, gCoord x, gCoord y, gColor color) |
| Set a pixel in the specified color. More... | |
| void | gdispGDrawLine (GDisplay *g, gCoord x0, gCoord y0, gCoord x1, gCoord y1, gColor color) |
| Draw a line. More... | |
| void | gdispGFillArea (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gColor color) |
| Fill an area with a color. More... | |
| void | gdispGBlitArea (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const gPixel *buffer) |
| Fill an area using the supplied bitmap. More... | |
| void | gdispGDrawBox (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gColor color) |
| Draw a rectangular box. More... | |
| void | gdispGStreamStart (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy) |
| Start a streaming operation. More... | |
| void | gdispGStreamColor (GDisplay *g, gColor color) |
| Send pixel data to the stream. More... | |
| void | gdispGStreamStop (GDisplay *g) |
| Finish the current streaming operation. More... | |
| void | gdispGSetClip (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy) |
| Clip all drawing to the defined area. More... | |
| void | gdispGDrawCircle (GDisplay *g, gCoord x, gCoord y, gCoord radius, gColor color) |
| Draw a circle. More... | |
| void | gdispGFillCircle (GDisplay *g, gCoord x, gCoord y, gCoord radius, gColor color) |
| Draw a filled circle. More... | |
| void | gdispGFillDualCircle (GDisplay *g, gCoord x, gCoord y, gCoord radius1, gColor color1, gCoord radius2, gColor color2) |
| Draw two filled circles with the same centre. More... | |
| void | gdispGDrawEllipse (GDisplay *g, gCoord x, gCoord y, gCoord a, gCoord b, gColor color) |
| Draw an ellipse. More... | |
| void | gdispGFillEllipse (GDisplay *g, gCoord x, gCoord y, gCoord a, gCoord b, gColor color) |
| Draw a filled ellipse. More... | |
| void | gdispGDrawArcSectors (GDisplay *g, gCoord x, gCoord y, gCoord radius, gU8 sectors, gColor color) |
| Draw a selection of 45 degree arcs of a circle. More... | |
| void | gdispGFillArcSectors (GDisplay *g, gCoord x, gCoord y, gCoord radius, gU8 sectors, gColor color) |
| Fill a selection of 45 degree arcs of a circle. More... | |
| void | gdispGDrawArc (GDisplay *g, gCoord x, gCoord y, gCoord radius, gCoord startangle, gCoord endangle, gColor color) |
| Draw an arc. More... | |
| void | gdispGDrawThickArc (GDisplay *g, gCoord xc, gCoord yc, gCoord startradius, gCoord endradius, gCoord startangle, gCoord endangle, gColor color) |
| Draw a thick arc. More... | |
| void | gdispGFillArc (GDisplay *g, gCoord x, gCoord y, gCoord radius, gCoord startangle, gCoord endangle, gColor color) |
| Draw a filled arc. More... | |
| gColor | gdispGGetPixelColor (GDisplay *g, gCoord x, gCoord y) |
| Get the color of a pixel. More... | |
| void | gdispGVerticalScroll (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, int lines, gColor bgcolor) |
| Scroll vertically a section of the screen. More... | |
| void | gdispGControl (GDisplay *g, unsigned what, void *value) |
| Control hardware specific parts of the display. eg powermodes, backlight etc. More... | |
| void * | gdispGQuery (GDisplay *g, unsigned what) |
| Query a property of the display. More... | |
| void | gdispGDrawPoly (GDisplay *g, gCoord tx, gCoord ty, const gPoint *pntarray, unsigned cnt, gColor color) |
| Draw an enclosed polygon (convex, non-convex or complex). More... | |
| void | gdispGFillConvexPoly (GDisplay *g, gCoord tx, gCoord ty, const gPoint *pntarray, unsigned cnt, gColor color) |
| Fill a convex polygon. More... | |
| void | gdispGDrawThickLine (GDisplay *g, gCoord x0, gCoord y0, gCoord x1, gCoord y1, gColor color, gCoord width, gBool round) |
| Draw a line with a specified thickness. More... | |
| void | gdispGDrawChar (GDisplay *g, gCoord x, gCoord y, gU16 c, gFont font, gColor color) |
| Draw a text character. More... | |
| void | gdispGFillChar (GDisplay *g, gCoord x, gCoord y, gU16 c, gFont font, gColor color, gColor bgcolor) |
| Draw a text character with a filled background. More... | |
| void | gdispGDrawString (GDisplay *g, gCoord x, gCoord y, const char *str, gFont font, gColor color) |
| Draw a text string. More... | |
| void | gdispGFillString (GDisplay *g, gCoord x, gCoord y, const char *str, gFont font, gColor color, gColor bgcolor) |
| Draw a text string. More... | |
| void | gdispGDrawStringBox (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, const char *str, gFont font, gColor color, gJustify justify) |
| Draw a text string vertically centered within the specified box. More... | |
| void | gdispGFillStringBox (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, const char *str, gFont font, gColor color, gColor bgColor, gJustify justify) |
| Draw a text string vertically centered within the specified box. The box background is filled with the specified background color. More... | |
| gCoord | gdispGetFontMetric (gFont font, gFontmetric metric) |
| Get a metric of a font. More... | |
| gCoord | gdispGetCharWidth (char c, gFont font) |
| Get the pixel width of a character. More... | |
| gCoord | gdispGetStringWidthCount (const char *str, gFont font, gU16 count) |
| Get the pixel width of a string of a given character length. More... | |
| gCoord | gdispGetStringWidth (const char *str, gFont font) |
| Get the pixel width of an entire string. More... | |
| gFont | gdispOpenFont (const char *name) |
| Find a font and return it. More... | |
| void | gdispCloseFont (gFont font) |
| Release a font after use. More... | |
| gFont | gdispScaleFont (gFont font, gU8 scale_x, gU8 scale_y) |
| Make a scaled copy of an existing font. More... | |
| const char * | gdispGetFontName (gFont font) |
| Get the name of the specified font. More... | |
| gBool | gdispAddFont (gFont font) |
| Add a font permanently to the font list. More... | |
| void | gdispGDrawRoundedBox (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord radius, gColor color) |
| Draw a rectangular box with rounded corners. More... | |
| void | gdispGFillRoundedBox (GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord radius, gColor color) |
| Draw a filled rectangular box with rounded corners. More... | |
Variables | |
| GDisplay * | GDISP |
| The default screen to use for the gdispXXXX calls. More... | |
Macros | |
| #define | GDISP_CONTROL_POWER 0 |
| Driver Control Constants. More... | |
| #define | gdispGSetPowerMode(g, powerMode) gdispGControl((g), GDISP_CONTROL_POWER, (void *)(gPowermode)(powerMode)) |
| Set the display power mode. More... | |
| #define | gdispGSetOrientation(g, newOrientation) gdispGControl((g), GDISP_CONTROL_ORIENTATION, (void *)(unsigned)(newOrientation)) |
| Set the display orientation. More... | |
| #define | gdispGSetBacklight(g, percent) gdispGControl((g), GDISP_CONTROL_BACKLIGHT, (void *)(unsigned)(percent)) |
| Set the display backlight. More... | |
| #define | gdispGSetContrast(g, percent) gdispGControl((g), GDISP_CONTROL_CONTRAST, (void *)(unsigned)(percent)) |
| Set the display contrast. More... | |
| #define | gdispGUnsetClip(g) gdispGSetClip((g),0,0,gdispGGetWidth(g),gdispGGetHeight(g)) |
| Reset the clip area to the full screen. More... | |
Typedefs | |
| typedef gI16 | gCoord |
| The type for a coordinate or length on the screen. More... | |
| typedef const struct mf_font_s * | gFont |
| The type of a font. More... | |
| typedef gColor | gPixel |
| The pixel format. More... | |
Enumerations | |
| enum | gJustify { gJustifyLeft = 0x00 , gJustifyCenter = 0x01 , gJustifyRight = 0x02 , gJustifyTop = 0x10 , gJustifyMiddle = 0x00 , gJustifyBottom = 0x20 , gJustifyWordWrap = 0x00 , gJustifyNoWordWrap = 0x40 , gJustifyPad = 0x00 , gJustifyNoPad = 0x04 } |
| Type for the text justification. More... | |
| enum | gFontmetric { gFontHeight , gFontDescendersHeight , gFontLineSpacing , gFontCharPadding , gFontMinWidth , gFontMaxWidth , gFontBaselineX , gFontBaselineY } |
| Type for the font metric. More... | |
| enum | gOrientation { gOrientation0 = 0 , gOrientation90 = 90 , gOrientation180 = 180 , gOrientation270 = 270 , gOrientationPortrait = 1000 , gOrientationLandscape = 1001 } |
| Type for the screen orientation. More... | |
| enum | gPowermode { gPowerOff , gPowerSleep , gPowerDeepSleep , gPowerOn } |
| Type for the available power modes for the screen. More... | |