- updated

git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@117 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2015-01-05 13:35:46 +00:00
parent 3b38c6a587
commit 6e5aa7a991
156 changed files with 2332 additions and 1370 deletions
@@ -193,9 +193,9 @@ AffineTransform AffineTransform::sheared (const float shearX, const float shearY
return AffineTransform (mat00 + shearX * mat10,
mat01 + shearX * mat11,
mat02 + shearX * mat12,
shearY * mat00 + mat10,
shearY * mat01 + mat11,
shearY * mat02 + mat12);
mat10 + shearY * mat00,
mat11 + shearY * mat01,
mat12 + shearY * mat02);
}
AffineTransform AffineTransform::verticalFlip (const float height) noexcept
@@ -211,10 +211,10 @@ AffineTransform AffineTransform::inverted() const noexcept
{
determinant = 1.0 / determinant;
const float dst00 = (float) (mat11 * determinant);
const float dst00 = (float) ( mat11 * determinant);
const float dst10 = (float) (-mat10 * determinant);
const float dst01 = (float) (-mat01 * determinant);
const float dst11 = (float) (mat00 * determinant);
const float dst11 = (float) ( mat00 * determinant);
return AffineTransform (dst00, dst01, -mat02 * dst00 - mat12 * dst01,
dst10, dst11, -mat02 * dst10 - mat12 * dst11);
@@ -258,5 +258,5 @@ bool AffineTransform::isOnlyTranslation() const noexcept
float AffineTransform::getScaleFactor() const noexcept
{
return (mat00 + mat11) / 2.0f;
return (std::abs (mat00) + std::abs (mat11)) / 2.0f;
}
@@ -501,13 +501,20 @@ void Path::addRoundedRectangle (float x, float y, float w, float h, float cs)
addRoundedRectangle (x, y, w, h, cs, cs);
}
void Path::addTriangle (const float x1, const float y1,
const float x2, const float y2,
const float x3, const float y3)
void Path::addTriangle (float x1, float y1,
float x2, float y2,
float x3, float y3)
{
startNewSubPath (x1, y1);
lineTo (x2, y2);
lineTo (x3, y3);
addTriangle (Point<float> (x1, y1),
Point<float> (x2, y2),
Point<float> (x3, y3));
}
void Path::addTriangle (Point<float> p1, Point<float> p2, Point<float> p3)
{
startNewSubPath (p1);
lineTo (p2);
lineTo (p3);
closeSubPath();
}
@@ -377,6 +377,18 @@ public:
float x2, float y2,
float x3, float y3);
/** Adds a triangle to the path.
The triangle is added as a new closed sub-path. (Any currently open paths will be left open).
Note that whether the vertices are specified in clockwise or anticlockwise
order will affect how the triangle is filled when it overlaps other
shapes (the winding order setting will affect this of course).
*/
void addTriangle (Point<float> point1,
Point<float> point2,
Point<float> point3);
/** Adds a quadrilateral to the path.
The quad is added as a new closed sub-path. (Any currently open paths will be left open).