Commit 6069b9e7 authored by twanvl's avatar twanvl

Simpler implementation of stretch-overflow with rotation and alignment.

parent 8ff4df04
......@@ -82,12 +82,7 @@ class TextStyle : public Style {
/// The rotation to use when drawing
inline Rotation getRotation() const {
double stretch = getStretch();
if (sideways(angle)) {
return Rotation(angle, getRect(), stretch, 1/stretch);
} else {
return Rotation(angle, getRect(), 1.0, stretch);
}
return Rotation(angle, getRect(), 1.0, getStretch());
}
/// The rotation to use when determining content layout, does not include the stretch factor
inline Rotation getRotationNoStretch() const {
......
......@@ -22,8 +22,8 @@ Rotation::Rotation(int angle, const RealRect& rect, double zoom, double strectch
: angle(constrain_angle(angle))
, size(rect.size())
, origin(rect.position())
, zoomX(zoom * strectch)
, zoomY(zoom)
, zoomX(::sideways(angle) ? zoom : zoom * strectch)
, zoomY(!::sideways(angle) ? zoom : zoom * strectch)
{
if (is_internal) {
size = trNoNeg(size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment