Mercurial > hg > svgui
diff layer/PaintAssistant.h @ 1373:cca66ce390e0
Scaling tweaks
author | Chris Cannam |
---|---|
date | Mon, 05 Nov 2018 13:30:21 +0000 |
parents | a34a2a25907c |
children | 28075cc658c9 |
line wrap: on
line diff
--- a/layer/PaintAssistant.h Fri Nov 02 15:23:53 2018 +0000 +++ b/layer/PaintAssistant.h Mon Nov 05 13:30:21 2018 +0000 @@ -49,9 +49,18 @@ QString text, TextStyle style); /** + * Scale up a size in pixels for a hi-dpi display without pixel + * doubling. This is like ViewManager::scalePixelSize, but taking + * and returning floating-point values rather than integer + * pixels. It is also a little more conservative - it never + * shrinks the size, it can only increase or leave it unchanged. + */ + static double scaleSize(double size); + + /** * Scale up pen width for a hi-dpi display without pixel doubling. - * Very similar to ViewManager::scalePixelSize, but a bit more - * conservative. + * This is like scaleSize except that it also scales the + * zero-width case. */ static double scalePenWidth(double width);