2 #include "creativity/data/graph/Target.hpp" 3 #include <cairomm/surface.h> 5 namespace creativity {
namespace data {
namespace graph {
11 PDF(std::string filename,
double width_inches,
double height_inches);
14 virtual Cairo::RefPtr<Cairo::Surface>
surface()
override;
17 virtual const double&
width()
const override;
20 virtual const double&
height()
const override;
23 virtual void newPage()
override;
26 Cairo::RefPtr<Cairo::PdfSurface> pdf_;
27 double width_, height_;
virtual const double & width() const override
Returns the surface width.
Primary namespace for all Creativity library code.
Definition: config.hpp:4
PDF(std::string filename, double width_inches, double height_inches)
Constructs a new PDF target with the given filename and size.
Abstract base class for graph destinations.
Definition: Target.hpp:13
virtual const double & height() const override
Returns the surface height.
virtual void newPage() override
Writes the current surface to disk and starts a new page.
virtual Cairo::RefPtr< Cairo::Surface > surface() override
Creates and returns a Cairo::Context that writes to the current page.
Graph target that writes to pages of a PDF file.
Definition: PDF.hpp:8