Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE PinDetect mbed
Rectangle.cpp
00001 #include "Rectangle.h" 00002 00003 Rectangle::Rectangle() { 00004 00005 } 00006 00007 void Rectangle::init(int x, int y, uLCD_4DGL *uLCD) { 00008 initSprite(x, y, uLCD); 00009 setDimensions(4,4); 00010 } 00011 00012 void Rectangle::setDimensions(int height, int width) { 00013 _height = height; 00014 _width = width; 00015 } 00016 00017 void Rectangle::drawRect(int baseX, int baseY, int color) { 00018 int newX = baseX + _x; 00019 int newY = baseY + _y; 00020 _uLCDptr->filled_rectangle(newX, newY, newX + _width, newY + _height, color); 00021 }
Generated on Sun Jul 17 2022 07:39:56 by
1.7.2