GPC Developer Guides
...
Functions
Internal Functions
OLED Display Functions
the functions below allow you to control the output display on the zen these are specific only to the cronus zen function description pixel oled draws a pixel on the oled display line oled draws a line on the oled display rect oled draws a rectangle on the oled display circle oled draws a circle on the oled display putc oled puts a character into the string buffer for puts oled puts oled draws the characters supplied using putc oled on the oled display cls oled sets the entire oled display to a single color print draws a string on the oled display pixel oled pixel oled draws a pixel on the oled display gpc pixel oled(x, y, color); 🔴 syntax pixel oled( , , ); ⚪ parameters the x coordinate of the pixel the y coordinate of the pixel the color flag to set the pixel to 0 means black and 1 means white 🔵 returns nothing line oled line oled draws a line of pixels gpc line oled(x, y, tox, toy, thickness, color); 🔴 syntax line oled( \<x> , \<y> , \<tox> , \<toy> , \<thickness> , \<color> ); ⚪ parameters \<x> the starting x coordinate \<y> the starting y coordinate \<tox> the ending x coordinate \<toy> the ending y coordinate \<thickness> the thickness of the line \<color> the color flag to set the pixels to 0 means black and 1 means white 🔵 returns nothing rect oled rect oled draws a rectangle on the oled screen of the cronus zen gpc rect oled(x, y, width, height, fill, color); 🔴 syntax rect oled( \<x> , \<y>, \<width>, \<height>, \<fill>, \<color> ); ⚪ 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> the width of the rectangle to draw \<height> the height of the rectangle to draw \<fill> a flag saying if the rectangle should be filled or just outlined (1 means fill it, 0 means only draw the outline) \<color> the color flag to set the pixels to 0 means black and 1 means white 🔵 returns nothing circle oled circle oled draws a circle on the cronus zen oled screen gpc circle oled(x, y, radius, fill, color); 🔴 syntax circle oled( \<x> , \<y>, \<radius>, \<fill>, \<color> ); ⚪ parameters \<x> the x coordinate of the center of the circle? \<y> the y coordinate of the center of the circle? \<radius> the radius of the circle to draw (the distance from the center point to the outer edge) \<fill> a flag saying if the rectangle should be filled or just outlined (1 means fill it, 0 means only draw the outline) \<color> the color flag to set the pixels to 0 means black and 1 means white 🔵 returns nothing putc oled putc oled puts a character into the string buffer for puts oled gpc putc oled(position, ascii); 🔴 syntax putc oled( \<position> , \<ascii> ); ⚪ parameters \<position> the 1 based index where to put the character in the buffer \<ascii> the ascii code value to put into the buffer, see table of supported characters/constants here 🔵 returns nothing puts oled puts oled draws the characters supplied using putc oled on the oled display gpc puts oled(x, y, font, length, color); 🔴 syntax puts oled( \<x> , \<y> , \<font> , \<length> , \<color> ); ⚪ parameters \<x> the x coordinate of the upper left corner of where the text will be drawn \<y> the y coordinate of the upper left corner of where the text will be drawn \<font> the font constant to use when drawing the text see table of supported fonts \<length> \<color> the color flag to set the pixels to 0 means black and 1 means white 🔵 returns nothing cls oled cls oled sets the entire oled display to a single color gpc cls oled(color); 🔴 syntax cls oled( \<color> ); ⚪ parameters \<color> any defined variable 🔵 returns nothing print print draws a string on the oled display gpc print(x, y, font, color, stringaddr); 🔴 syntax print( \<x> , \<y> , \<font> , \<color> , \<stringaddr> ); ⚪ parameters \<x> the x coordinate of the upper left corner of where the text will be drawn \<y> the y coordinate of the upper left corner of where the text will be drawn \<font> the font constant to use when drawing the text see table of supported fonts here \<color> the color flag to set the pixels to 0 means black and 1 means white \<stringaddr> the offset in the data section where the 0 terminated string is located, usually used with the string constant type 🔵 returns nothing