PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Display
libsimplegfx
drawRect.c
1
/*
2
* @file drawRect.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
// Draw a rectangle
29
void
drawRect(
screen_t
*dev,
int
x
,
int
y,
int
w,
int
h,
int
color) {
30
drawFastHLine(dev,
x
+ 1, y, w - 2, color);
31
drawFastHLine(dev,
x
+ 1, y + h - 1, w - 2, color);
32
drawFastVLine(dev,
x
, y, h, color);
33
drawFastVLine(dev,
x
+ h - 1, y, h, color);
34
}
35
36
x
int x
Definition:
07 Box and Lines.c:13
screen_st
Definition:
simplegfx.h:111
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17