SSD1306 OLED display driver  1.6.1
This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
Public Member Functions | Public Attributes | List of all members
_NanoRect Struct Reference

#include <canvas.h>

Public Member Functions

void move (lcdint_t dx, lcdint_t dy)
 
void addH (lcdint_t dx)
 
void addV (lcdint_t dy)
 
void setRect (lcdint_t l, lcdint_t t, lcdint_t r, lcdint_t b)
 
bool collisionX (lcdint_t x) const
 
bool collisionY (lcdint_t y) const
 
bool collision (const NanoPoint &p) const
 
bool above (const NanoPoint &p) const
 
bool below (const NanoPoint &p) const
 
_NanoRect operator- (const _NanoPoint &p)
 
_NanoRect operator+ (const _NanoPoint &p)
 
_NanoRectoperator+= (const _NanoPoint &p)
 

Public Attributes

NanoPoint p1
 
NanoPoint p2
 

Detailed Description

NanoRect structure describes rectangle area.

Definition at line 148 of file canvas.h.

Member Function Documentation

◆ above()

bool _NanoRect::above ( const NanoPoint p) const
inline

Returns true if specified point is above rectangle area.

Parameters
p- point to check.

Definition at line 221 of file canvas.h.

◆ addH()

void _NanoRect::addH ( lcdint_t  dx)
inline

Shifts rectangle area by dx pixels.

Parameters
dx- delta on x-axis

Definition at line 171 of file canvas.h.

◆ addV()

void _NanoRect::addV ( lcdint_t  dy)
inline

Shifts rectangle area by dy pixels.

Parameters
dy- delta on y-axis

Definition at line 180 of file canvas.h.

◆ below()

bool _NanoRect::below ( const NanoPoint p) const
inline

Returns true if specified point is below rectangle area.

Parameters
p- point to check.

Definition at line 227 of file canvas.h.

◆ collision()

bool _NanoRect::collision ( const NanoPoint p) const
inline

Returns true if specified point is inside rectangle area.

Parameters
p- point to check.

Definition at line 215 of file canvas.h.

◆ collisionX()

bool _NanoRect::collisionX ( lcdint_t  x) const
inline

Returns true if specified x position is between left and right borders.

Parameters
x- position to check

Definition at line 203 of file canvas.h.

◆ collisionY()

bool _NanoRect::collisionY ( lcdint_t  y) const
inline

Returns true if specified y position is between left and right borders.

Parameters
y- position to check

Definition at line 209 of file canvas.h.

◆ move()

void _NanoRect::move ( lcdint_t  dx,
lcdint_t  dy 
)
inline

Shifts rectangle area by dx;dy pixels.

Parameters
dx- delta on x-axis
dy- delta on y-axis

Definition at line 161 of file canvas.h.

◆ operator+()

_NanoRect _NanoRect::operator+ ( const _NanoPoint p)
inline

Add point to all points of rectangle.

Parameters
p- point to add.

Definition at line 243 of file canvas.h.

◆ operator+=()

_NanoRect& _NanoRect::operator+= ( const _NanoPoint p)
inline

Subtracts point to all points of rectangle.

Parameters
p- point to subtract.

Definition at line 253 of file canvas.h.

◆ operator-()

_NanoRect _NanoRect::operator- ( const _NanoPoint p)
inline

Returns true if specified point is above rectangle area.

Parameters
p- point to check.

Definition at line 233 of file canvas.h.

◆ setRect()

void _NanoRect::setRect ( lcdint_t  l,
lcdint_t  t,
lcdint_t  r,
lcdint_t  b 
)
inline

Initializes NanoRect with specified values

Parameters
l- left position
t- top position
r- right position
b- bottom position

Definition at line 193 of file canvas.h.

Member Data Documentation

◆ p1

NanoPoint _NanoRect::p1

top-left point of the rectangle area

Definition at line 151 of file canvas.h.

◆ p2

NanoPoint _NanoRect::p2

right-bottom point of the rectangle area

Definition at line 154 of file canvas.h.


The documentation for this struct was generated from the following file: