draw  0.0.0
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
draw.h File Reference
#include <stdint.h>
#include <memory>
#include <cassert>

Go to the source code of this file.

Classes

struct  draw::Point
 A point in pixel space. More...
 
struct  draw::Size
 A size in pixel space. More...
 
struct  draw::Rect
 A rect in pixel space. More...
 
struct  draw::Vector2
 Floating-point 2D-vector. More...
 
struct  draw::Color
 RGBA floating-point color. More...
 
struct  draw::Span< T >
 Contiguous sequence of elements. More...
 
class  draw::Geometry
 Set of indexed 2D-primitives. More...
 
struct  draw::Geometry::Vertex
 2D-vertex. More...
 
class  draw::Image
 2D-array of pixels specified format. More...
 
class  draw::Visual
 Base interface class of any visual object. More...
 
class  draw::Shape
 A visual shape. More...
 
class  draw::Font
 Set of characters of the same style and size. More...
 
class  draw::Text
 A text object. More...
 
class  draw::Renderer
 Factory and context owner. More...
 
class  draw::Context
 OpenGL rendering context base interface class. More...
 

Namespaces

 draw
 

Macros

#define ASSERT(e)   assert(e)
 
#define DRAW_NO_EXCEPTIONS
 
#define SHARED_PTR   std::shared_ptr
 
#define MAKE_SHARED_PTR   std::make_shared
 

Typedefs

using draw::GeometryPtr = SHARED_PTR< Geometry >
 
using draw::ImagePtr = SHARED_PTR< Image >
 
using draw::VisualPtr = SHARED_PTR< Visual >
 
using draw::ShapePtr = SHARED_PTR< Shape >
 
using draw::FontPtr = SHARED_PTR< Font >
 
using draw::TextPtr = SHARED_PTR< Text >
 
using draw::RendererPtr = SHARED_PTR< Renderer >
 
using draw::ContextPtr = std::unique_ptr< Context >
 

Enumerations

enum  draw::ErrorCode {
  draw::NoError = 0, draw::InvalidArgument, draw::OpenGLAbsentFeature, draw::OpenGLOutOfMemory,
  draw::InvalidFontFile, draw::IncompleteFontFile
}
 An error code which library can generate. More...
 

Functions

ErrorCode draw::getLastError ()
 return last error and set the value to draw::NoError More...
 
bool draw::operator== (const Point &left, const Point &right)
 checks if two points are equal More...
 
bool draw::operator!= (const Point &left, const Point &right)
 checks if two points are not equal More...
 
bool draw::operator== (const Size &left, const Size &right)
 checks if two sizes are equal More...
 
bool draw::operator!= (const Size &left, const Size &right)
 checks if two sizes are not equal More...
 
bool draw::operator== (const Rect &left, const Rect &right)
 checks if two rects are equal More...
 
bool draw::operator!= (const Rect &left, const Rect &right)
 checks if two rects are not equal More...
 
RendererPtr draw::makeRenderer (ContextPtr context)
 make Renderer object More...
 

Macro Definition Documentation

#define ASSERT (   e)    assert(e)
#define DRAW_NO_EXCEPTIONS
#define MAKE_SHARED_PTR   std::make_shared
#define SHARED_PTR   std::shared_ptr