|
Logic_library
Library for Logic board by RoboticsBrno.
|
#include <Display.hpp>
Public Member Functions | |
| Display (Display &)=delete | |
| Display (Display &&)=delete | |
| Display & | operator= (Display &)=delete |
| Display & | operator= (Display &&)=delete |
| ~Display ()=default | |
| int | width () const |
| Returns width of the display in pixels. More... | |
| int | height () const |
| Returns height of the display in pixels. More... | |
| int | sirka () const |
| Vrací šířku displeje v pixelech. More... | |
| int | vyska () const |
| Vrací výšku displeje v pixelech. More... | |
| int | fontWidth () const |
| Returns width of each character in the font used by drawCharacter and drawString. More... | |
| int | fontHeight () const |
| Returns height of each character in the font used by drawCharacter and drawString. More... | |
| int | sirkaPisma () const |
| Vrátí šířku jednoho znaku z písma použitého v metodách nakresliZnak a nakresliText. More... | |
| int | vyskaPisma () const |
| Vrátí výšku jednoho znaku z písma použitého v metodách nakresliZnak a nakresliText. More... | |
| Rgb & | at (int x, int y) |
| Returns reference to pixel on that position. More... | |
| Rgb & | pozice (int x, int y) |
| Vrátí pixel na dané pozici. More... | |
| void | setColor (int x, int y, Rgb color) |
| Set the color of pixel at specified position. More... | |
| void | nastavBarvu (int x, int y, Rgb color) |
| Nastaví barvu pixelu na dané pozici. More... | |
| void | clear () |
| Clear the display. More... | |
| void | vycisti () |
| Vyčistí celý displej. More... | |
| void | fill (Rgb color) |
| Fill the display with color. More... | |
| void | vypln (Rgb barva) |
| Vyplň celý displej barvou. More... | |
| void | drawRectangle (int x, int y, int width, int height, Rgb color, int strokeWidth=1) |
| Draw rectangle with specified parameters. More... | |
| void | drawRectangle (const Rectangle &rect, Rgb color, int strokeWidth=1) |
| Draw rectangle with specified parameters. More... | |
| void | drawRectangleFilled (int x, int y, int width, int height, Rgb color) |
| Draw filled rectangle with specified parameters. More... | |
| void | drawRectangleFilled (const Rectangle &rect, Rgb color) |
| Draw filled rectangle with specified parameters. More... | |
| void | nakresliObdelnik (int x, int y, int sirka, int vyska, Rgb barva, int tloustkaCary=1) |
| Nakreslí obdélník se zadanými parametry. More... | |
| void | nakresliObdelnik (const Obdelnik &obdelnik, Rgb barva, int tloustkaCary=1) |
| Nakreslí obdélník se zadanými parametry. More... | |
| void | nakresliObdelnikVyplneny (int x, int y, int sirka, int vyska, Rgb barva) |
| Nakreslí vyplněný obdélník se zadanými parametry. More... | |
| void | nakresliObdelnikVyplneny (const Obdelnik &obdelnik, Rgb barva) |
| Nakreslí vyplněný obdélník se zadanými parametry. More... | |
| void | drawSquare (int x, int y, int size, Rgb color, int strokeWidth=1) |
| Draw square with specified parameters. More... | |
| void | drawSquareFilled (int x, int y, int size, Rgb color) |
| Draw filled square with specified parameters. More... | |
| void | nakresliCtverec (int x, int y, int strana, Rgb barva, int tlouskaCary=1) |
| Nakreslí čtverec se zadanými parametry. More... | |
| void | nakresliCtverecVyplneny (int x, int y, int strana, Rgb barva) |
| Nakreslí čtverec se zadanými parametry. More... | |
| void | drawCircle (int centerX, int centerY, int radius, Rgb color) |
| Draw circle with specified parameters. More... | |
| void | drawCircleFilled (int centerX, int centerY, int radius, Rgb color) |
| Draw filled circle with specified parameters. More... | |
| void | nakresliKruznici (int stredX, int stredY, int polomer, Rgb barva) |
| Nakreslí kružnici s danými parametry. More... | |
| void | nakresliKruzniciVyplnenou (int stredX, int stredY, int polomer, Rgb barva) |
| Nakreslí vyplněnou kružnici (kruh) s danými parametry. More... | |
| void | drawLine (int x1, int y1, int x2, int y2, Rgb color, int strokeWidth=1) |
| Draw line. More... | |
| void | nakresliCaru (int x1, int y1, int x2, int y2, Rgb barva, int tloustkaCary=1) |
| Nakreslí čáru. More... | |
| void | drawCharacter (char c, Rgb color, int offsetX=2, int offsetY=0) |
| Draw a single character to the display. The dimensions of the characters can be obtained by calling fontWidth() and fontHeight(). More... | |
| void | nakresliZnak (char znak, Rgb barva, int posunX=2, int posunY=0) |
| Nakreslí jeden znak na displej. Velikost znaků dostanete z metod sirkaPisma() a vyskaPisma(). More... | |
| int | drawString (const char *utf8Czech, Rgb color, int offsetX=2, int offsetY=0) |
| Draws whole string to the display, handling Czech UTF-8 sequences correctly. More... | |
| int | drawString (const std::string &utf8Czech, Rgb color, int offsetX=2, int offsetY=0) |
| int | nakresliText (const char *utf8CeskyText, Rgb barva, int posunX=2, int posunY=0) |
| Nakreslí na displej textový řetězec, včetně český znaků v UTF-8. More... | |
| int | nakresliText (const std::string &utf8CeskyText, Rgb barva, int posunX=2, int posunY=0) |
| void | show (int intensity=255) |
| Show prepared frame on display. More... | |
| void | ukaz (int intenzita=255) |
| Vykresli připravený snímek na displeji. More... | |
| Rgb & | operator() (int x, int y) |
| Rgb & | operator[] (int index) |
Friends | |
| class | Logic |
|
delete |
|
delete |
|
default |
| Rgb & Display::at | ( | int | x, |
| int | y | ||
| ) |
Returns reference to pixel on that position.
| x | X coordinate |
| y | Y coordinate |
|
inline |
Clear the display.
| void Display::drawCharacter | ( | char | c, |
| Rgb | color, | ||
| int | offsetX = 2, |
||
| int | offsetY = 0 |
||
| ) |
Draw a single character to the display. The dimensions of the characters can be obtained by calling fontWidth() and fontHeight().
| c | which character to draw, from ASCII + ISO-8859-1 codepage. |
| color | which color to use |
| offsetX | X offset where to start the drawing. |
| offsetY | Y offset where to start the drawing. |
| void Display::drawCircle | ( | int | centerX, |
| int | centerY, | ||
| int | radius, | ||
| Rgb | color | ||
| ) |
Draw circle with specified parameters.
| centerX | X coordinate of the center |
| centerY | Y coordinate of the center |
| radius | |
| color |
| void Display::drawCircleFilled | ( | int | centerX, |
| int | centerY, | ||
| int | radius, | ||
| Rgb | color | ||
| ) |
Draw filled circle with specified parameters.
| centerX | X coordinate of the center |
| centerY | Y coordinate of the center |
| radius | |
| color |
| void Display::drawLine | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| Rgb | color, | ||
| int | strokeWidth = 1 |
||
| ) |
Draw line.
| x1 | X coordinate of the beginning |
| y1 | Y coordinate of the beginning |
| x2 | X coordinate of the end |
| y2 | Y coordinate of the end |
| color | |
| strokeWidth |
|
inline |
Draw rectangle with specified parameters.
| rect | Struct used to define parameters |
| color | |
| strokeWidth |
| void Display::drawRectangle | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height, | ||
| Rgb | color, | ||
| int | strokeWidth = 1 |
||
| ) |
Draw rectangle with specified parameters.
| x | X coordinate of top-left corner |
| y | Y coordinate of top-left corner |
| width | |
| height | |
| color | |
| strokeWidth |
|
inline |
Draw filled rectangle with specified parameters.
| rect | Struct used to define parameters |
| color |
|
inline |
Draw filled rectangle with specified parameters.
| x | X coordinate of top-left corner |
| y | Y coordinate of top-left corner |
| width | |
| height | |
| color |
|
inline |
Draw square with specified parameters.
| x | X coordinate of top-left corner |
| y | Y coordinate of top-left corner |
| size | Length of side |
| color | |
| strokeWidth |
|
inline |
Draw filled square with specified parameters.
| x | X coordinate of top-left corner |
| y | Y coordinate of top-left corner |
| size | Length of side |
| color |
| int Display::drawString | ( | const char * | utf8Czech, |
| Rgb | color, | ||
| int | offsetX = 2, |
||
| int | offsetY = 0 |
||
| ) |
Draws whole string to the display, handling Czech UTF-8 sequences correctly.
| utf8Czech | String to draw on the display |
| color | which color to use |
| offsetX | X offset where to start the drawing. This offsets the whole string, which means you can use negative offset to scroll and show the whole string. |
| offsetY | Y offset where to start the drawing. |
|
inline |
| void Display::fill | ( | Rgb | color | ) |
Fill the display with color.
| color | Color |
| int Display::fontHeight | ( | ) | const |
Returns height of each character in the font used by drawCharacter and drawString.
| int Display::fontWidth | ( | ) | const |
Returns width of each character in the font used by drawCharacter and drawString.
|
inline |
Returns height of the display in pixels.
|
inline |
Nakreslí čáru.
| x1 | X-ová souřadnice počátku |
| y1 | Y-ová souřadnice počátku |
| x2 | X-ová souřadnice konce |
| y2 | Y-ová souřadnice konce |
| barva | |
| tloustkaCary |
|
inline |
Nakreslí čtverec se zadanými parametry.
| x | X-ová souřadnice levého horního rohu obdélníku |
| y | Y-ová souřadnice levého horního rohu obdélníku |
| strana | Délka strany |
| barva | |
| tlouskaCary |
|
inline |
Nakreslí čtverec se zadanými parametry.
| x | X-ová souřadnice levého horního rohu obdélníku |
| y | Y-ová souřadnice levého horního rohu obdélníku |
| strana | Délka strany |
| barva |
|
inline |
Nakreslí kružnici s danými parametry.
| stredX | X-ová souřadnice středu |
| stredY | Y-ová souřadnice středu |
| polomer | |
| barva |
|
inline |
Nakreslí vyplněnou kružnici (kruh) s danými parametry.
| stredX | X-ová souřadnice středu |
| stredY | Y-ová souřadnice středu |
| polomer | |
| barva |
|
inline |
Nakreslí obdélník se zadanými parametry.
| obdelnik | Struktura pro zadání parametrů |
| barva | |
| tloustkaCary |
|
inline |
Nakreslí obdélník se zadanými parametry.
| x | X-ová souřadnice levého horního rohu obdélníku |
| y | Y-ová souřadnice levého horního rohu obdélníku |
| sirka | |
| vyska | |
| barva | |
| tloustkaCary |
|
inline |
Nakreslí vyplněný obdélník se zadanými parametry.
| obdelnik | Struktura pro zadání parametrů |
| barva |
|
inline |
Nakreslí vyplněný obdélník se zadanými parametry.
| x | X-ová souřadnice levého horního rohu obdélníku |
| y | Y-ová souřadnice levého horního rohu obdélníku |
| sirka | |
| vyska | |
| barva |
|
inline |
Nakreslí na displej textový řetězec, včetně český znaků v UTF-8.
| utf8CeskyText | řetězec na vykreslení |
| barva | barva textu |
| posunX | na které X pozici začít kreslit text. Může být záporný, tedy lze využít na implementaci posuvu textu a vykreslení celého textu. |
| posunY | na které Y pozici kreslit text. |
|
inline |
|
inline |
Nakreslí jeden znak na displej. Velikost znaků dostanete z metod sirkaPisma() a vyskaPisma().
| znak | který znak vykreslit, z ASCII + ISO-8859-1 kódové stránky. |
| barva | barva znaku |
| posunX | o kolik pixelů v X souřadnicích posunout znak doprava. |
| posunY | o kolik pixelů v Y souřadnicích posunout znak dolů. |
|
inline |
Nastaví barvu pixelu na dané pozici.
| x | X-ová souřadnice |
| y | Y-ová souřadnice |
| color | Barva |
| Rgb & Display::operator() | ( | int | x, |
| int | y | ||
| ) |
| Rgb & Display::operator[] | ( | int | index | ) |
|
inline |
Vrátí pixel na dané pozici.
| x | X-ová souřadnice |
| y | Y-ová souřadnice |
|
inline |
Set the color of pixel at specified position.
| x | X coordinate |
| y | Y coordinate |
| color | Color |
| void Display::show | ( | int | intensity = 255 | ) |
Show prepared frame on display.
| intensity | [0-255] maximal intenzity |
|
inline |
Vrací šířku displeje v pixelech.
|
inline |
Vrátí šířku jednoho znaku z písma použitého v metodách nakresliZnak a nakresliText.
|
inline |
Vykresli připravený snímek na displeji.
| intenzita | [0-255] maximální intenzita na jejíž hodnotu se barvy upraví |
|
inline |
Vyčistí celý displej.
|
inline |
Vyplň celý displej barvou.
| barva | barva |
|
inline |
Vrací výšku displeje v pixelech.
|
inline |
Vrátí výšku jednoho znaku z písma použitého v metodách nakresliZnak a nakresliText.
|
inline |
Returns width of the display in pixels.
|
friend |