LibreOffice Module svx (master) 1
GeoStat Class Reference

The transformation of a rectangle into a polygon, by using angle parameters from GeoStat. More...

`#include <svdtrans.hxx>`

Collaboration diagram for GeoStat:
[legend]

## Public Member Functions

GeoStat ()

void RecalcSinCos ()

void RecalcTan ()

## Public Attributes

Degree100 m_nRotationAngle

Degree100 m_nShearAngle

double mfTanShearAngle

double mfSinRotationAngle

double mfCosRotationAngle

## Detailed Description

The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.

---------— The point of reference is always the Point 0, meaning /1 2/ the upper left corner of the initial rectangle. / / When calculating the polygon, the order is first / / shear and then the rotation. / / / / \ / / | A) Initial rectangle aRect B) After applying Shear /0 3/ Rot| +---------------—+ -----------------— ---------------— |0 1| \0 1\ C) After applying Rotate | | \ \ | | | \ \ |3 2| | \3 2\ +---------------—+ | -----------------— |Shr

When converting the polygon back into a rect, the order is necessarily the other way around:

• Calculating the rotation angle: angle of the line 0-1 in figure C) to the horizontal
• Turning the sheared rect back (we get figure B)
• Determining the width of the rect = length of the line 0-1 in figure B)
• Determining the height of the rect = vertical distance between the points 0 and 3 of figure B)
• Determining the shear angle from the line 0-3 to the perpendicular line.

We need to keep in mind that the polygon can be mirrored when it was transformed in the meantime (e.g. mirror or resize with negative factor). In that case, we first need to normalize, by swapping points (0 with 3 and 1 with 2), so that it has the right orientation.

Note: a positive shear angle means a shear with a positive visible curvature on the screen. Mathematically, that would be a negative curvature, as the Y axis runs from top to bottom on the screen. Rotation angle: positive means a visible left rotation.

Definition at line 201 of file svdtrans.hxx.

## ◆ GeoStat()

 GeoStat::GeoStat ( )
inline

Definition at line 209 of file svdtrans.hxx.

## ◆ RecalcSinCos()

 void GeoStat::RecalcSinCos ( )

## ◆ RecalcTan()

 void GeoStat::RecalcTan ( )

Definition at line 456 of file svdtrans.cxx.

References a, m_nShearAngle, mfTanShearAngle, and toRadians().

## ◆ mfTanShearAngle

The documentation for this class was generated from the following files: