Arduino GLCD Library Version 3 |

Static Public Attributes | Static Protected Attributes

# glcd Class Reference

Functions for GLCD. More...

Inheritance diagram for glcd:

List of all members.

## Public Member Functions
CONTROL FUNCTIONS
The following control functions are available
int | Init (uint8_t invert=NON_INVERTED)
void | SetDisplayMode (uint8_t mode)
DRAWING FUNCTIONS
The following graphic functions are available
void | ClearScreen (uint8_t color=WHITE)
void | DrawVLine (uint8_t x, uint8_t y, uint8_t height, uint8_t color=BLACK)
void | DrawHLine (uint8_t x, uint8_t y, uint8_t width, uint8_t color=BLACK)
void | DrawLine (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t color=BLACK)
void | DrawRect (uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color=BLACK)
void | DrawRoundRect (uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t radius, uint8_t color=BLACK)
void | FillRect (uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color=BLACK)
void | InvertRect (uint8_t x, uint8_t y, uint8_t width, uint8_t height)
void | DrawCircle (uint8_t xCenter, uint8_t yCenter, uint8_t radius, uint8_t color=BLACK)
void | FillCircle (uint8_t xCenter, uint8_t yCenter, uint8_t radius, uint8_t color=BLACK)
void | DrawBitmap (Image_t bitmap, uint8_t x, uint8_t y, uint8_t color=BLACK)
void | SetDot (uint8_t x, uint8_t y, uint8_t color)
void | SetPixels (uint8_t x, uint8_t y, uint8_t x1, uint8_t y1, uint8_t color)
uint8_t | ReadData (void)
void | WriteData (uint8_t data)
void | GotoXY (uint8_t x, uint8_t y)
TEXT FUNCTIONS
The following text functions are available
uint8_t | DefineArea (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, textMode mode=DEFAULT_SCROLLDIR)
uint8_t | DefineArea (uint8_t x1, uint8_t y1, uint8_t columns, uint8_t rows, Font_t font, textMode mode=DEFAULT_SCROLLDIR)
uint8_t | DefineArea (predefinedArea selection, textMode mode=DEFAULT_SCROLLDIR)
void | SetTextMode (textMode mode)
void | ClearArea (void)
void | SelectFont (Font_t font, uint8_t color=BLACK, FontCallback callback=ReadPgmData)
void | SetFontColor (uint8_t color)
int | PutChar (uint8_t c)
void | Puts (char *str)
void | Puts (const String &str)
void | Puts_P (PGM_P str)
void | DrawString (char *str, uint8_t x, uint8_t y)
void | DrawString (String &str, uint8_t x, uint8_t y)
void | DrawString_P (PGM_P str, uint8_t x, uint8_t y)
void | write (uint8_t c)
void | CursorTo (uint8_t column, uint8_t row)
void | CursorTo (int8_t column)
void | CursorToXY (uint8_t x, uint8_t y)
uint8_t | CharWidth (uint8_t c)
uint16_t | StringWidth (const char *str)
uint16_t | StringWidth_P (PGM_P str)
uint16_t | StringWidth_P (String &str)
void | EraseTextLine (eraseLine_t type=eraseTO_EOL)
void | EraseTextLine (uint8_t row)
void | PrintNumber (long n)
void | printFlash (FLASHSTRING str)
void | printFlashln (FLASHSTRING str)
void | Printf (const char *format,...)
void | Printf_P (const char *format,...)
## Static Public Attributes
static const uint8_t | Bottom
static const uint8_t | CenterX
static const uint8_t | CenterY
static const uint8_t | Height
static const uint8_t | Right
static const uint8_t | Width
## Static Protected Attributes
static lcdCoord | Coord
static uint8_t | Inverted

## Detailed Description

Functions for GLCD.

## Member Function Documentation

uint8_t CharWidth | ( | uint8_t | c | ) | `[inherited]`

Returns the pixel width of a character

Parameters:

  c | character to be sized

Returns:
  The width in pixels of the given character including any inter-character gap pixels following the character when the character is rendered on the display.

Note:
  The font for the character is the most recently selected font.

See also:
  StringWidth()
  StringWidth_P()

void ClearArea | ( | void |  | ) | `[inherited]`

Clear text area with the current font background color and home the cursor to upper left corner of the text area.

See also:
  DefineArea()

void ClearScreen | ( | uint8_t | color = `WHITE` | ) |

Clear the lcd display

Parameters:

  color | BLACK or WHITE

Sets all the pixels on the display from 0,0 to GLCD.Width-1,GLCD.Height-1 to the specified color.

Color is optional and defaults to WHITE.

Note:
  If the display is in INVERTED mode, then the color WHITE will paint the screen BLACK and the color BLACK will paint the screen WHITE.

void CursorTo | ( | int8_t | column | ) | `[inherited]`

Positions cursor to a character based column on the current row.

Parameters:

  column | specifies the horizontal position

Column is a 0 based character position based on the size of the currently selected font.

If column is negative then the column position is relative to the current cursor position.

Warning:
  While intended only for fixed width fonts, cursor repositioning will be done for variable width fonts. When variable width fonts are used, the column is based on assuming a width of the widest character in the font. Because the widest character is used for the amount of cursor movement, the amount of cursor movement when using relative positioning will often not be consistent with the number characters previously rendered. For example, if a letter "l" was written and the cursor was reposisitioned with a -1, the amount backed up will be much larger than the width of the "l".

See also:
  CursorToXY()

void CursorTo | ( | uint8_t | column,
|  | uint8_t | row
| ) |  | `[inherited]`

Positions cursor to a character based column and row.

Parameters:

  column | specifies the horizontal position
  row | specifies the vertical position

Column and Row are zero based character positions and are relative the the upper left corner of the text area base on the size of the currently selected font.

While intended for fixed width fonts, positioning will work for variable width fonts.

When variable width fonts are used, the column is based on assuming a width of the widest character.

See also:
  CursorToXY()

void CursorToXY | ( | uint8_t | x,
|  | uint8_t | y
| ) |  | `[inherited]`

Positions cursor to a X,Y position

Parameters:

  x | specifies the horizontal location
  y | specifies the vertical location

X & Y are zero based pixel coordinates and are relative to the upper left corner of the text area.

See also:
  CursorTo()

uint8_t DefineArea | ( | uint8_t | x1,
|  | uint8_t | y1,
|  | uint8_t | x2,
|  | uint8_t | y2,
|  | textMode | mode = `DEFAULT_SCROLLDIR`
| ) |  | `[inherited]`

Define a text area by absolute coordinates

Parameters:

  x1 | X coordinate of upper left corner
  y1 | Y coordinate of upper left corner
  x2 | X coordinate of lower right corner
  y2 | Y coordinate of lower right corner
  mode | constants SCROLL_DOWN and SCROLL_UP control scroll direction

Defines a text area based on absolute coordinates. The pixel coordinates for the text area are inclusive so x2,y2 is the lower right pixel of the text area.

x1,y1 and x2,y2 are an absolute coordinates and are relateive to the 0,0 origin of the display.

The area within the newly defined text area is intentionally not cleared.

mode is an optional parameter and defaults to normal/up scrolling

Returns:
  true with the given area selected if all the coordinates are valid, otherwise returns returns false with the area set to the full display

Note:
  Upon creation of the text area, the cursor position for the text area will be set to x1, y1

See also:
  ClearArea()

uint8_t DefineArea | ( | predefinedArea | selection,
|  | textMode | mode = `DEFAULT_SCROLLDIR`
| ) |  | `[inherited]`

Define a predefined generic text area

Parameters:

  selection | a value from predefinedArea
  mode | constants SCROLL_DOWN and SCROLL_UP control scroll direction

Defines a text area using a selection form a set of predefined areas.

The area within the newly defined text area is intentionally not cleared.

mode is an optional parameter and defaults to normal/up scrolling

Returns:
  returns true if successful.

Note:
  Upon defining the text area, the cursor position for the text area will be set to the upper left coordinate of the given predefined area

See also:
  ClearArea()
  predefinedArea

uint8_t DefineArea | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | columns,
|  | uint8_t | rows,
|  | Font_t | font,
|  | textMode | mode = `DEFAULT_SCROLLDIR`
| ) |  | `[inherited]`

Define a Text area by columns and rows

Parameters:

  x | X coordinate of upper left corner
  y | Y coordinate of upper left corner
  columns | number of text columns
  rows | number of text rows
  font | a font definition
  mode | constants SCROLL_DOWN and SCROLL_UP control scroll direction

Defines a text area sized to hold columns characters across and rows characters tall. It is properly sized for the specified font.

The area within the newly defined text area is intentionally not cleared.

While intended for fixed width fonts, sizing will work for variable width fonts.

When variable width fonts are used, the column is based on assuming a width of the widest character.

x,y is an absolute coordinate and is relateive to the 0,0 origin of the display.

mode is an optional parameter and defaults to normal/up scrolling

Note:
  Upon defining the text area, the cursor position for the text area will be set to x,y

See also:
  ClearArea()

void DrawBitmap | ( | Image_t | bitmap,
|  | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a glcd bitmap image

Parameters:

  bitmap | a ponter to the bitmap data
  x | the x coordinate of the upper left corner of the bitmap
  y | the y coordinate of the upper left corner of the bitmap
  color | BLACK or WHITE

Draws a bitmap image with the upper left corner at location x,y The bitmap data is assumed to be in program memory.

Color is optional and defaults to BLACK.

#ifdef NOTYET

See also:
  DrawBitmapXBM() #endif

void DrawCircle | ( | uint8_t | xCenter,
|  | uint8_t | yCenter,
|  | uint8_t | radius,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a Circle

Parameters:

  xCenter | X coordinate of the center of the circle
  yCenter | Y coordinate of the center of the circle
  radius | radius of circle
  color | BLACK or WHITE

Draws a circle of the given radius extending out from the center pixel. The circle will fit inside a rectanglular area bounded by x-radius,y-radius and x+radius,y+radius

Because the circle is drawn from the center pixel out, the diameter will be 2 * radius +1 pixels.

Color is optional and defaults to BLACK.

See also:
  FillCircle()

void DrawHLine | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | width,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a Horizontal Line

Parameters:

  x | a value from 0 to GLCD.Width-1
  y | a value from 0 to GLCD.Height-1
  width | a value from 1 to GLCD.Width-x-1
  color | BLACK or WHITE

The line drawn will be width+1 pixels.

color is an optional parameter indicating pixel color and defaults to BLACK

Note:
  This function was previously named DrawHoriLine() in the ks0108 library

See also:
  DrawLine()
  DrawVLine()

void DrawLine | ( | uint8_t | x1,
|  | uint8_t | y1,
|  | uint8_t | x2,
|  | uint8_t | y2,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a line

Parameters:

  x1 | a value from 0 to GLCD.Width-1 indicating start x coordinate
  y1 | a value fron 0 to GLCD.Height-1 indicating start y coordinate
  x2 | a value from 0 to GLCD.Width-1 indicating end x coordinate
  y2 | a value fron 0 to GLCD.Height-1 indicating end y coordinate
  color | BLACK or WHITE

Draws a line starting at x1,y2 and ending at x2,y2.

Color is optional and defaults to BLACK.

See also:
  DrawHLine()
  DrawVLine()

void DrawRect | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | width,
|  | uint8_t | height,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a rectangle of given width and height

Parameters:

  x | the x coordinate of the upper left corner of the rectangle
  y | the y coordinate of the upper left corner of the rectangle
  width | width of the rectangle
  height | height of the rectangle
  color | BLACK or WHITE

Draws a rectangle with the specified width and height. The upper left corner at x,y and the lower right corner at x+width,y+width.

The length of the horizontal sides will be width+1 pixels The length of the vertical sides will be height+1 pixels

Color is optional and defaults to BLACK.

Note:
  The width and height parameters work differently than FillRect()

See also:
  FillRect()
  InvertRect()
  DrawRoundRect()

void DrawRoundRect | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | width,
|  | uint8_t | height,
|  | uint8_t | radius,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a rectangle with rounder corners

Parameters:

  x | the x coordinate of the upper left corner of the rectangle
  y | the y coordinate of the upper left corner of the rectangle
  width | width of the rectangle
  height | height of the rectangle
  radius | ????
  color | BLACK or WHITE

Draws a rectangle the same as DrawRect() but with rounded corners. Radius is a value from 1 to half the height or width of the rectangle. (what does that really mean?????) Which is it, or is it a the smaller of the two? FIXME FIXME need more description here.

See also:
  DrawRect()

void DrawString | ( | char * | str,
|  | uint8_t | x,
|  | uint8_t | y
| ) |  | `[inherited]`

output a character string at x,y coordinate

Parameters:

  str | String class string
  x | specifies the horizontal location
  y | specifies the vertical location

Outputs all the characters in the string to the text area. X & Y are zero based pixel coordinates and are relative to the upper left corner of the text area.

See PutChar() for a full description of how characters are written to the text area.

See also:
  PutChar()
  Puts()
  Puts_P()
  DrawString_P()
  write()

void DrawString | ( | String & | str,
|  | uint8_t | x,
|  | uint8_t | y
| ) |  | `[inherited]`

output a String class string at x,y coordinate

Parameters:

  str | pointer to a null terminated character string
  x | specifies the horizontal location
  y | specifies the vertical location

Outputs all the characters in the string to the text area. X & Y are zero based pixel coordinates and are relative to the upper left corner of the text area.

See PutChar() for a full description of how characters are written to the text area.

See also:
  PutChar()
  Puts()
  Puts_P()
  DrawString_P()
  write()

void DrawString_P | ( | PGM_P | str,
|  | uint8_t | x,
|  | uint8_t | y
| ) |  | `[inherited]`

output a program memory character string at x,y coordinate

Parameters:

  str | pointer to a null terminated character string stored in program memory
  x | specifies the horizontal location
  y | specifies the vertical location

Outputs all the characters in the string to the text area. X & Y are zero based pixel coordinates and are relative to the upper left corner of the text area.

See PutChar() for a full description of how characters are written to the text area.

See also:
  PutChar()
  Puts()
  Puts_P()
  DrawString()
  write()

void DrawVLine | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | height,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a Vertical Line

Parameters:

  x | a value from 0 to GLCD.Width-1
  y | a value from 0 to GLCD.Height-1
  height | a value from 1 to GLCD.Height-y-1
  color | color of line

color of BLACK or WHITE is an optional parameter indicating pixel color, default is BLACK

The line drawn will be height+1 pixels.

Note:
  This function was previously named DrawVertLine() in the ks0108 library

See also:
  DrawLine()
  DrawHLine()

void EraseTextLine | ( | eraseLine_t | type = `eraseTO_EOL` | ) | `[inherited]`

Erase in Line

Parameters:

  type | type of line erase

- eraseTO_EOL Erase from cursor to end of line
- eraseFROM_BOL Erase from beginning of line to cursor
- eraseFULL_LINE Erase entire line

Erases all or part of a line of text depending on the type of erase specified.

If type is not specified it is assumed to be eraseTO_EOL

The cursor position does not change.

See also:
  ClearArea()
  eraseLine_t

void EraseTextLine | ( | uint8_t | row | ) | `[inherited]`

Erase Text Line

Parameters:

  row | row # of text to earase

Erases a line of text and moves the cursor to the begining of the line. Rows are zero based so the top line/row of a text area is 0.

See also:
  ClearArea()

void FillCircle | ( | uint8_t | xCenter,
|  | uint8_t | yCenter,
|  | uint8_t | radius,
|  | uint8_t | color = `BLACK`
| ) |  |

Draw a Filled in a Circle

Parameters:

  xCenter | X coordinate of the center of the circle
  yCenter | Y coordinate of the center of the circle
  radius | radius of circle
  color | WHITE or BLACK

Draws a filled in circle of the given radius extending out from the center pixel.

See DrawCircle() for the full details on sizing.

Color is optional and defaults to BLACK.

See also:
  DrawCircle()

void FillRect | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | width,
|  | uint8_t | height,
|  | uint8_t | color = `BLACK`
| ) |  |

Fill a Rectangle

Parameters:

  x | the x coordinate of the upper left corner of the rectangle
  y | the y coordinate of the upper left corner of the rectangle
  width | width of the rectangle
  height | height of the rectangle
  color | BLACK or WHITE

Fills a rectanglular area of the specified width and height.

The resulting rectangle covers an area width pixels wide by height pixels tall starting from the pixel at x,y.

The upper left corner at x,y and the lower right corner at x+width-1,y+width-1.

The length of the horizontal sides will be width pixels The length of the vertical sides will be height pixels

Color is optional and defaults to BLACK.

Note:
  The width and height parameters work differently than DrawRect()

Warning:
  FillRect() behavior has changed from the previous versions of the ks0108 library. The filled rectangle will be one pixel smaller in width and height than the old version. This change was to make the functionality consistent with the way Java and C# create filled rectangles

See also:
  DrawRect()
  InvertRect()

void GotoXY | ( | uint8_t | x,
|  | uint8_t | y
| ) |  |

set current x,y coordinate on display device

Parameters:

  x | X coordinate
  y | Y coordinate

Sets the current pixel location to x,y. x and y are relative to the 0,0 origin of the display which is the upper left most pixel on the display.

Reimplemented from glcd_Device.

int Init | ( | uint8_t | invert = `NON_INVERTED` | ) |

Initilize the GLCD library and hardware

Parameters:

  invert | specifices whether display is in normal mode or inverted mode.

This should be called prior to any other graphic library function. It does all the needed initializations including taking care of the low level hardware initalization of the display device.

The optional invert parameter specifies if the display should be run in a normal mode, dark pixels on light background or inverted, light pixels on a dark background.

To specify dark pixels use the define NON-INVERTED and to use light pixels use the define INVERTED

Upon completion of the initialization, then entire display will be cleared.

Note:
  This function can also be called to re-initliaze the display hardware.

Reimplemented from glcd_Device.

void InvertRect | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | width,
|  | uint8_t | height
| ) |  |

Invert a Rectangular area

Parameters:

  x | the x coordinate of the upper left corner of the rectangle
  y | the y coordinate of the upper left corner of the rectangle
  width | width of the rectangle
  height | height of the rectangle

Inverts the pixels in the rectanglular area of the specified width and height. BLACK pixels becom WHITE and WHITE pixels become BLACK.

See FillRect() for full the full details of the rectangular area.

Note:
  The width and height parameters work differently than DrawRect()

Warning:
  InvertRect() behavior has changed from the previous versions of the ks0108 library. The inverted rectangle will be one pixel smaller in width and height than the old version.

See also:
  DrawRect()
  FillRect()

void Printf | ( | const char * | format,
|  |  | ...
| ) |  | `[inherited]`

print formatted data

Parameters:

  format | string that contains text or optional embedded format tags
  ... | Depending on the format string, the function may expect a sequence of additional arguments.

Writes a sequence of data formatted as the format argument specifies. After the format parameter, the function expects at least as many additional arguments as specified in format. The format string supports all standard printf() formating % tags.

Note:
  By default printf() has no floating support in AVR enviornments. In order to enable this, a linker option must be changed. Currenly, the Arduino IDE does not support modifying the linker options.

See also:
  Printf_P()

void Printf_P | ( | const char * | format,
|  |  | ...
| ) |  | `[inherited]`

print formatted data

Parameters:

  format | string in AVR progmem that contains text or optional embedded format tags
  ... | Depending on the format string, the function may expect a sequence of additional arguments.

See gText::Printf() for full details.

See also:
  Printf()

void printFlash | ( | FLASHSTRING | str | ) | `[inherited]`

print a flash based string

Parameters:

  str | pointer to a null terminated character string stored in program memory

See also:
  Puts_P()

void printFlashln | ( | FLASHSTRING | str | ) | `[inherited]`

print a flash based string

Parameters:

  str | pointer to a null terminated character string stored in program memory

The string is output followed by a newline.

See also:
  Puts_P()

void PrintNumber | ( | long | n | ) | `[inherited]`

Legacy function to print a number

Parameters:

  n | is the number to print

See also:
  print(n)

int PutChar | ( | uint8_t | c | ) | `[inherited]`

output a character

Parameters:

  c | the character to output

If the character will not fit on the current text line inside the text area, the text position is wrapped to the next line. This might be the next lower or the next higher line depending on the scroll direction.

If there is not enough room to fit a full line of new text after wrapping, the entire text area will be scrolled to make room for a new line of text. The scroll direction will be up or down depending on the scroll direction for the text area.

See also:
  Puts()
  Puts_P()
  write()

void Puts | ( | char * | str | ) | `[inherited]`

output a character string

Parameters:

  str | pointer to a null terminated character string.

Outputs all the characters in the string to the text area. See PutChar() for a full description of how characters are written to the text area.

See also:
  PutChar()
  Puts_P()
  DrawString()
  DrawString_P()
  write()

void Puts | ( | const String & | str | ) | `[inherited]`

output a String class string

Parameters:

  str | String class string

Outputs all the characters in the string to the text area. See PutChar() for a full description of how characters are written to the text area.

See also:
  PutChar()
  Puts_P()
  DrawString()
  DrawString_P()
  write()

void Puts_P | ( | PGM_P | str | ) | `[inherited]`

output a program memory character string

Parameters:

  str | pointer to a null terminated character string stored in program memory

Outputs all the characters in the string to the text area. See PutChar() for a full description of how characters are written to the text area.

See also:
  PutChar()
  Puts()
  DrawString()
  DrawString_P()
  write()

uint8_t ReadData | ( | void |  | ) |

read a data byte from display device memory

Returns:
  the data byte at the current x,y position

Note:
  the current x,y location is not modified by the routine. This allows a read/modify/write operation. Code can call ReadData() modify the data then call WriteData() and update the same location.

See also:
  WriteData()

Reimplemented from glcd_Device.

void SelectFont | ( | Font_t | font,
|  | uint8_t | color = `BLACK`,
|  | FontCallback | callback = `ReadPgmData`
| ) |  | `[inherited]`

Select a Font and font color

Parameters:

  font | a font definition
  color | can be WHITE or BLACK and defaults to black
  callback | optional font read routine

Selects the font definition as the current font for the text area.

All subsequent printing functions will use this font.

Font definitions from included font definition files are stored in program memory You can have as many fonts defines as will fit in program memory up to 64k and can switch between them with this function.

If the optional callback argument is ommitted, a default routine is selected that assumes that the font is in program memory (flash).

Note:
  When the display is initilized in normal mode, BLACK renders dark pixels on a white background and WHITE renders white pixels on black background; however, if the display is set to INVERTED mode all colors are inverted.

See also:
  SetFontColor()
  SetTextMode()

void SetDisplayMode | ( | uint8_t | invert | ) |

Set LCD Display mode

Parameters:

  invert | Inverted mode

Sets the graphical state mode for the entire LCD display to NON_INVERTED (BLACK colorerd pixeld are dark) or INVERTED (WHITE colored pixels are dark)

void SetDot | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | color
| ) |  |

set pixel at x,y to the given color

Parameters:

  x | X coordinate, a value from 0 to GLCD.Width-1
  y | Y coordinate, a value from 0 to GLCD.Heigh-1
  color | WHITE or BLACK

Sets the pixel at location x,y to the specified color. x and y are relative to the 0,0 origin of the display which is the upper left corner. Requests to set pixels outside the range of the display will be ignored.

Note:
  If the display has been set to INVERTED mode then the colors will be automically reversed.

Reimplemented from glcd_Device.

void SetFontColor | ( | uint8_t | color | ) | `[inherited]`

Select a font color

Parameters:

  color | can be WHITE or BLACK

See also:
  SelectFont()
  SetTextMode()

void SetPixels | ( | uint8_t | x,
|  | uint8_t | y,
|  | uint8_t | x2,
|  | uint8_t | y2,
|  | uint8_t | color
| ) |  |

set an area of pixels

Parameters:

  x | X coordinate of upper left corner
  y | Y coordinate of upper left corner
  x2 | X coordinate of lower right corner
  y2 | Y coordinate of lower right corner
  color | sets the pixels an area bounded by x,y to x2,y2 inclusive to the specified color.

The width of the area is x2-x + 1. The height of the area is y2-y+1

Reimplemented from glcd_Device.

void SetTextMode | ( | textMode | mode | ) | `[inherited]`

Set TextArea mode

Parameters:

  mode | text area mode

Currently mode is a scroll direction

- SCROLL_UP
- SCROLL_DOWN

See also:
  SelectFont()
  SetFontColor()
  DefineArea()

uint16_t StringWidth | ( | const char * | str | ) | `[inherited]`

Returns the pixel width of a string

Parameters:

  str | pointer to string stored in RAM

Returns:
  the width in pixels of the sum of all the characters in the the string pointed to by str.

See also:
  CharWidth()
  StringWidth_P()

uint16_t StringWidth_P | ( | String & | str | ) | `[inherited]`

Returns the pixel width of a character

Parameters:

  str | String class string

Returns:
  the width in pixels of the sum of all the characters in the the string pointed to by str.

See also:
  CharWidth()
  StringWidth()

uint16_t StringWidth_P | ( | PGM_P | str | ) | `[inherited]`

Returns the pixel width of a character

Parameters:

  str | pointer to string stored in program memory

Returns:
  the width in pixels of the sum of all the characters in the the string pointed to by str.

See also:
  CharWidth()
  StringWidth()

void write | ( | uint8_t | c | ) | `[inherited]`

output a character to the text area

Parameters:

  c | the character to output

This method is needed for the Print base class

See also:
  PutChar()

Reimplemented from glcd_Device.

void WriteData | ( | uint8_t | data | ) |

Write a byte to display device memory

Parameters:

  data | date byte to write to memory

The data specified is written to glcd memory at the current x,y position. If the y location is not on a byte boundary, the write is fragemented up into multiple writes.

Note:
  the full behavior of this during split byte writes currently varies depending on a compile time define. The code can be configured to either OR in 1 data bits or set all the data bits. TRUE_WRITE controls this behavior.
  the x,y address will not be the same as it was prior to this call. The y address will remain the aame but the x address will advance by one. This allows back to writes to write sequentially through memory without having to do additional x,y positioning.

See also:
  ReadData()

Reimplemented from glcd_Device.

## Member Data Documentation

const uint8_t Bottom`[static]`

Bottom most pixel on Display (equals Height -1)

const uint8_t CenterX`[static]`

Horizontal center pixel on Display (equals Width/2)

const uint8_t CenterY`[static]`

Vertical center pixel on Display (equals Height/2)

const uint8_t Height`[static]`

Display height in pixels

const uint8_t Right`[static]`

Right most pixel on Display (equals Width -1)

const uint8_t Width`[static]`

Display width in pixels

The documentation for this class was generated from the following files:

- glcd.h
- glcd.cpp

All Classes Functions Variables