Library for 3.2'' uLcd Picaso Display4D system Picaso Serial Environment Command Set web: http://www.4dsystems.com.au/product/20/67/Processors_Graphics/PICASO/
Diff: Triangle.h
- Revision:
- 1:a74e42cf52b2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Triangle.h Sun Apr 05 13:54:48 2015 +0000 @@ -0,0 +1,49 @@ +#ifndef TRIANGLE_H +#define TRIANGLE_H + +#include "Screen.h" +#include "Sprite.h" + +class Triangle:public Sprite +{ +public: + /** Construct a filled Triangle + * + * @param mScreen the pointer screen + * @params x1 + * @params y1 + * @params x2 + * @params y2 + * @params x3 + * @params y3 + * @param _color the background color + */ + + Triangle(Screen* mScreen,UINT16 x1,UINT16 y1, + UINT16 x2,UINT16 y2, + UINT16 x3,UINT16 y3, + Color _color); + // + virtual void draw(void); + // + virtual ~Triangle(void); + // + void update(float delta); + + +//setter + void setInvisible(bool _state); + // + void setNewPosition(INT16 _xnew,INT16 _ynew); + // + void setNewPosition(INT16 _xnew,INT16 _ynew,bool isScreenLimits); + + +protected: + UINT16 myX1,myY1; + UINT16 myX2,myY2; + UINT16 myX3,myY3; + UINT16 myU,myV; +}; + +#endif \ No newline at end of file