#include "KoClipPath.h"
#include "KoPathShape.h"
#include "KoShapeGroup.h"
#include <QTransform>
#include <QPainterPath>
#include <QPainter>
#include <QVarLengthArray>
#include <QSharedData>
#include <kis_algebra_2d.h>
Go to the source code of this file.
◆ scaleFromPercent()
| QTransform scaleFromPercent |
( |
const QSizeF & | size | ) |
|
Definition at line 27 of file KoClipPath.cpp.
28{
29 const qreal
w = qMax(
static_cast<qreal
>(1e-5),
size.width());
30 const qreal
h = qMax(
static_cast<qreal
>(1e-5),
size.height());
31 return QTransform().scale(w/1.0, h/1.0);
32}
int size(const Forest< T > &forest)
◆ scaleToPercent()
| QTransform scaleToPercent |
( |
const QSizeF & | size | ) |
|
Definition at line 20 of file KoClipPath.cpp.
21{
22 const qreal
w = qMax(
static_cast<qreal
>(1e-5),
size.width());
23 const qreal
h = qMax(
static_cast<qreal
>(1e-5),
size.height());
24 return QTransform().scale(1.0/w, 1.0/h);
25}