Libraries/Graphics/src/include/Graphics/Types.h File Reference
#include <WString.h>
#include <Data/CStringArray.h>
#include <Data/BitSet.h>
#include <Data/Range.h>
#include <memory>
#include <cassert>
#include "Colors.h"
Include dependency graph for Libraries/Graphics/src/include/Graphics/Types.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
struct | Graphics::Size |
Size of rectangular area (width x height) More... | |
struct | Graphics::TPoint< T > |
An (x, y) display coordinate. More... | |
struct | Graphics::Rect |
Location and size of rectangular area (x, y, w, h) More... | |
class | Graphics::Region |
Represents the intersection of two rectangles. More... | |
struct | Graphics::Location |
Identifies position within bounding rectangle. More... | |
class | Graphics::ColorRange |
class | Graphics::Scale |
struct | Graphics::GlyphMetrics |
Glyph metrics. More... | |
Namespaces | |
Graphics | |
Macros | |
#define | GRAPHICS_FONT_STYLE(XX) |
#define | XX(name, desc) name, |
Typedefs | |
using | Graphics::AssetID = uint16_t |
Numeric identifiers for re-useable objects. More... | |
using | Graphics::Point = TPoint< int16_t > |
using | Graphics::IntPoint = TPoint< int > |
using | Graphics::PointF = TPoint< float > |
using | Graphics::Range = TRange< uint16_t > |
using | Graphics::FontStyles = BitSet< uint16_t, FontStyle, 10 > |
Enumerations | |
enum class | Graphics::Orientation { Graphics::normal , Graphics::deg0 = normal , Graphics::deg90 , Graphics::deg180 , Graphics::deg270 } |
Defines orientation of display. More... | |
enum class | Graphics::Align { Graphics::Near , Graphics::Centre , Graphics::Far , Graphics::Left = Near , Graphics::Top = Near , Graphics::Center = Centre , Graphics::Right = Far , Graphics::Bottom = Far } |
enum class | Graphics::Origin { Graphics::E , Graphics::NE , Graphics::N , Graphics::NW , Graphics::W , Graphics::SW , Graphics::S , Graphics::SE , Graphics::Centre , Graphics::TopLeft = NW , Graphics::Top = N , Graphics::TopRight = NE , Graphics::Left = W , Graphics::Center = Centre , Graphics::Right = E , Graphics::BottomLeft = SW , Graphics::Bottom = S , Graphics::BottomRight = SE } |
Points on a compass. More... | |
enum class | Graphics::FontStyle { Graphics::XX } |
Functions | |
Origin | Graphics::opposite (Origin o) |
Get the origin for the opposite side of the rectangle. More... | |
constexpr Size | Graphics::rotate (Size size, Orientation orientation) |
template<typename T , typename Q > | |
constexpr TPoint< T > | Graphics::operator+ (TPoint< T > pt, const Q &other) |
template<typename T , typename Q > | |
constexpr TPoint< T > | Graphics::operator- (TPoint< T > pt, const Q &other) |
template<typename T , typename Q > | |
constexpr TPoint< T > | Graphics::operator* (TPoint< T > pt, const Q &other) |
template<typename T > | |
constexpr TPoint< T > | Graphics::operator* (TPoint< T > pt, const Size &other) |
template<typename T , typename Q > | |
constexpr TPoint< T > | Graphics::operator/ (TPoint< T > pt, const Q &other) |
template<typename T > | |
constexpr TPoint< T > | Graphics::operator/ (TPoint< T > pt, const Size &other) |
template<typename T , typename Q > | |
constexpr TPoint< T > | Graphics::operator% (TPoint< T > pt, const Q &other) |
template<typename T > | |
Rect | Graphics::operator+ (const Rect &rect, const T &other) |
Rect | Graphics::operator- (const Rect &rect, const Point &offset) |
Rect | Graphics::intersect (Rect r1, const Rect &r2) |
Region | Graphics::operator- (const Region &rgn, const Rect &r) |
uint16_t | Graphics::originToDegrees (Origin origin) |
Get corresponding angle for given origin. More... | |
Origin | Graphics::degreesToOrigin (uint16_t angle) |
Get origin closest to given angle (expressed in degrees) More... | |
uint16_t | Graphics::normaliseAngle (int angle) |
Make 0 <= angle < 360. More... | |
String | toString (Graphics::Orientation orientation) |
String | toString (Graphics::Align align) |
String | toString (Graphics::Origin origin) |
String | toString (Graphics::FontStyle style) |
template<typename T > | |
String | toString (Graphics::TPoint< T > pt) |
String | toString (const Graphics::Rect &r) |
String | toString (const Graphics::Location &loc) |
String | toString (Graphics::Size sz) |
String | toString (Graphics::Scale scale) |
Variables | |
static constexpr uint8_t | Graphics::PIN_NONE {255} |
Undefined I/O pin value. More... | |
Macro Definition Documentation
◆ GRAPHICS_FONT_STYLE
#define GRAPHICS_FONT_STYLE | ( | XX | ) |
Value:
XX(Bold, "") \
XX(Italic, "") \
XX(Underscore, "") \
XX(Overscore, "") \
XX(Strikeout, "") \
XX(DoubleUnderscore, "") \
XX(DoubleOverscore, "") \
XX(DoubleStrikeout, "") \
XX(DotMatrix, "Draw only top-left dot in scaled glyphs") \
XX(HLine, "Draw only top line in scaled glyphs") \
XX(VLine, "Draw only left line in scaled glyphs")
◆ XX
#define XX | ( | name, | |
desc | |||
) | name, |
Function Documentation
◆ toString() [1/9]
|
inline |
◆ toString() [2/9]
|
inline |
◆ toString() [3/9]
String toString | ( | Graphics::Align | align | ) |
◆ toString() [4/9]
String toString | ( | Graphics::FontStyle | style | ) |
◆ toString() [5/9]
String toString | ( | Graphics::Orientation | orientation | ) |
◆ toString() [6/9]
String toString | ( | Graphics::Origin | origin | ) |
◆ toString() [7/9]
|
inline |
◆ toString() [8/9]
|
inline |
◆ toString() [9/9]
template<typename T >
|
inline |