Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BindRectangle Class Reference

Represents a Rectangle Object for BindCanvas. More...

`#include <BindRectangle.hpp>`

Inheritance diagram for BindRectangle:

## Public Member Functions
uint16_t | getBytes (uint8_t *out) override
| Get the serialized bytes of the `BindRectangle` object.

## Public Attributes
int16_t | x = 0
| X-coordinate position of the rectangle.
int16_t | y = 0
| Y-coordinate position of the rectangle.
uint8_t | cmdId = 0
| Command identifier for the rectangle. See the notes for possible cmdId values.
int16_t | width = 200
| Width of the rectangle.
int16_t | height = 100
| Height of the rectangle.
int32_t | fillColor = WHITE
| Fill color of the rectangle.
int32_t | borderColor = DKGRAY
| Border (Stroke) color of the rectangle.
int16_t | borderWidth = 2
| Border (Stroke) width of the rectangle.
int16_t | cornersRadius = 5
| Radius of the rectangle's rounded corners.
Public Attributes inherited from BindView
int16_t | tag

## Detailed Description

Represents a Rectangle Object for BindCanvas.

BindRectangle

The `BindRectangle` class defines a rectangular object that can be displayed and manipulated on a BindCanvas screen. This object can be used for various purposes, such as drawing shapes, creating backgrounds, or framing other elements. It allows you to control its dimensions, position, fill color, border color, border width, and corner radius.

Note
  Possible cmdId values for a BindView and corresponding effects:
  - BIND_ADD_OR_REFRESH_CMD: Adds the object to the canvas (screen) or refreshes the existing one.
  - BIND_DATA_ONLY_CMD: Refreshes the existing object without moving or resizing; updates data, such as text.
  - BIND_REMOVE_CMD: Removes the object from the canvas (screen).
  - BIND_DISABLE_CMD: Disables the object.
  - BIND_ENABLE_CMD: Enables the object.
  - BIND_HIDE_CMD: Hides the object.
  - BIND_VISIBLE_CMD: Restores the object's visibility.

To use a `BindRectangle` object, you can create an instance and configure its properties, then add it to the BindCanvas using the sync functions.

Note
  This class is typically used to group objects in a zone.

## Member Function Documentation

## ◆ getBytes()

uint16_t BindRectangle::getBytes | ( | uint8_t * | out | ) |
| inline override virtual

Get the serialized bytes of the `BindRectangle` object.

This function serializes the `BindRectangle` object into a byte array, which can be sent to BindCanvas for rendering and interaction.

Parameters

  out | Pointer to the output buffer where the serialized data will be stored.

Returns
  The number of bytes written to the output buffer.

Reimplemented from BindView.

The documentation for this class was generated from the following files:

- BindRectangle.hpp
- Bind.cpp
- BindRectangle.cpp