creativity  v1.3.0
Agent-based model of creativity and piracy
Public Member Functions | List of all members
creativity::data::graph::Target Class Referenceabstract

Abstract base class for graph destinations. More...

#include <creativity/data/graph/Target.hpp>

Public Member Functions

virtual Cairo::RefPtr< Cairo::Surface > surface ()=0
 Creates and returns the Cairo::Surface on which to draw the graph.
 
virtual Cairo::Matrix unitTransformation () const
 Returns a Cairo::Matrix that translates [0,1]x[0,1] coordinates into the drawable image surface. More...
 
virtual const double & width () const =0
 Returns the surface width, in device units.
 
virtual const double & height () const =0
 Returns the surface height, in device units.
 
virtual void newPage ()=0
 Called to indicate that the current page/surface is finished and should be saved and a new, blank surface/page created. More...
 

Detailed Description

Abstract base class for graph destinations.

See also
PDF
PNG
SVG

Member Function Documentation

§ newPage()

virtual void creativity::data::graph::Target::newPage ( )
pure virtual

Called to indicate that the current page/surface is finished and should be saved and a new, blank surface/page created.

Typically this means the surface is written as a new page (PDF) or file (PNG).

Implemented in creativity::data::graph::PDF.

§ unitTransformation()

virtual Cairo::Matrix creativity::data::graph::Target::unitTransformation ( ) const
inlinevirtual

Returns a Cairo::Matrix that translates [0,1]x[0,1] coordinates into the drawable image surface.

Coordinate (0,0) should map to the top-left corner, (1,1) should map to the bottom-right corner.

The default simply returns Cairo::scaling_matrix(width(), height()), but subclasses could override.

Inheritance diagram for creativity::data::graph::Target:
[legend]
Collaboration diagram for creativity::data::graph::Target:
[legend]

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