PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Display
libsimplegfx
drawPrint.c
1
/*
2
* @file drawPrint.c
3
*
4
* @author Matthew Matz
5
*
6
* @version 0.5
7
*
8
* @copyright Copyright (C) Parallax, Inc. 2019. See end of file for
9
* terms of use (MIT License).
10
*
11
* @brief This is a driver that allows the Propeller Multicore Microcontroller to
12
* draw text, shapes, and bitmap files on various screens and displays.
13
*
14
* @detail This helper-library allows the Propeller Multicore Microcontroller to
15
* draw pixels, lines, circles, recatngles, rounded rectagles, triangles, formatted text
16
* in multiple fonts, bitmap images stored on an SD card on various screens and displays.
17
* At Parallax, we would like to thank Adafruit Industries as parts of this library
18
* were dervied from the Adafruit GFX library for Arduino. Please submit bug reports,
19
* suggestions, and improvements to this code to editor@parallax.com.
20
*
21
* @note If fonts are installed, they occupy EEPROM addresses 40576 to 63359.
22
*/
23
24
25
26
#include "simplegfx.h"
27
28
29
int
drawPrint(
screen_t
*dev,
const
char
*fmt, ...) {
30
char
buf[128];
31
va_list args;
32
int
r;
33
va_start(args, fmt);
34
r = _dosprnt(fmt, args, buf);
35
va_end(args);
36
int
len;
37
len = strlen(buf);
38
for
(
int
sc = 0; sc < len; sc++) {
39
drawChar(dev, buf[sc]);
40
}
41
return
r;
42
}
43
44
screen_st
Definition:
simplegfx.h:111
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17