Geometrize  1.0
C++ library for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Public Attributes | List of all members
geometrize::Shape Class Reference

#include <shape.h>

Inheritance diagram for geometrize::Shape:
Inheritance graph
[legend]

Public Member Functions

 Shape ()=default
 
virtual ~Shape ()=default
 
Shapeoperator= (const geometrize::Shape &other)=default
 
 Shape (const geometrize::Shape &other)=default
 
virtual std::shared_ptr
< geometrize::Shape
clone () const
 clone Clones the shape, a virtual copy constructor. More...
 
virtual geometrize::ShapeTypes getType () const
 getType Gets the ShapeType of the shape. More...
 

Public Attributes

std::function< void(geometrize::Shape &)> setup
 
std::function< void(geometrize::Shape &)> mutate
 
std::function< std::vector
< geometrize::Scanline >const
geometrize::Shape &)> 
rasterize
 

Detailed Description

Base class for shape rasterization and manipulation.

Author
Sam Twidale (https://samcodes.co.uk/)

Constructor & Destructor Documentation

geometrize::Shape::Shape ( )
default
virtual geometrize::Shape::~Shape ( )
virtualdefault
geometrize::Shape::Shape ( const geometrize::Shape other)
default

Member Function Documentation

virtual std::shared_ptr<geometrize::Shape> geometrize::Shape::clone ( ) const
inlinevirtual

clone Clones the shape, a virtual copy constructor.

Returns
A clone of the shape.

Reimplemented in geometrize::Polyline, geometrize::Circle, geometrize::Ellipse, geometrize::Line, geometrize::QuadraticBezier, geometrize::Rectangle, geometrize::RotatedEllipse, geometrize::RotatedRectangle, and geometrize::Triangle.

34  {
35  throw "Unimplemented"; // NOTE not pure virtual because it breaks simple upcast in Chaiscript (and can't see how else to do it)
36  }
virtual geometrize::ShapeTypes geometrize::Shape::getType ( ) const
inlinevirtual

getType Gets the ShapeType of the shape.

Returns
The ShapeType of the shape.

Reimplemented in geometrize::Polyline, geometrize::Circle, geometrize::Ellipse, geometrize::Line, geometrize::QuadraticBezier, geometrize::Rectangle, geometrize::RotatedEllipse, geometrize::RotatedRectangle, and geometrize::Triangle.

43  {
44  throw "Unimplemented";
45  }

Here is the caller graph for this function:

Shape& geometrize::Shape::operator= ( const geometrize::Shape other)
default

Member Data Documentation

std::function<void(geometrize::Shape&)> geometrize::Shape::mutate
std::function<std::vector<geometrize::Scanline>const geometrize::Shape&)> geometrize::Shape::rasterize
std::function<void(geometrize::Shape&)> geometrize::Shape::setup

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