*/
class Painter {
public:
- Painter() : drawing_enabled_(true) {}
+ Painter(double pixel_ratio) : drawing_enabled_(true), pixel_ratio_(pixel_ratio) {}
static const float thin_line;
/// Indicate wether real screen drawing shall be done or not.
bool isDrawingEnabled() const { return drawing_enabled_; }
+ double pixelRatio() const { return pixel_ratio_; }
+
/// draw a char at position x, y (y is the baseline)
/**
* \return the width of the drawn text.
private:
///
bool drawing_enabled_;
+ /// Ratio between physical pixels and device-independent pixels
+ double pixel_ratio_;
};
} // namespace frontend