26#ifndef BOARD_TRANSFORMS_H
27#define BOARD_TRANSFORMS_H
49 virtual double mapX(
double x)
const;
50 virtual double mapY(
double y)
const = 0;
52 virtual void apply(
double & x,
double & y)
const;
53 virtual double scale(
double x)
const;
55 virtual double rounded(
double x)
const;
56 virtual void setBoundingBox(
const Rect & rect,
const double pageWidth,
const double pageHeight,
const double margin) = 0;
57 static inline double round(
const double & x);
73 double mapY(
double y)
const;
74 void setBoundingBox(
const Rect & rect,
const double pageWidth,
const double pageHeight,
const double margin);
79 Rect _pageBoundingBox;
90 double mapY(
double y)
const;
92 void setBoundingBox(
const Rect & rect,
const double pageWidth,
const double pageHeight,
const double margin);
94 unsigned int mapDepth(
unsigned int depth)
const;
95 void setDepthMap(
const std::map<const Shape *, unsigned int> *,
unsigned int min);
98 unsigned int _maxDepth;
99 unsigned int _minDepth;
100 double _postscriptScale;
101 const std::map<const Shape *, unsigned int> * _depthMap;
110 double rounded(
double x)
const;
111 double mapY(
double y)
const;
112 double mapWidth(
double width)
const;
113 void setBoundingBox(
const Rect & rect,
const double pageWidth,
const double pageHeight,
const double margin);
134#define HAS_MSVC_MAX true
146 return std::floor(x + 0.5);
149#if defined(HAS_MSVC_MAX)
150#define max(A, B) ((A) > (B) ? (A) : (B))
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
Struct representing a 2D point.
Definition Point.h:42
Struct representing a rectangle on the plane.
Definition Rect.h:40
Abstract structure for a 2D shape.
Definition Shape.h:64