- Library code update

- project update (added Eigen)

git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@94 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-12-20 20:59:48 +00:00
parent 1b4d8e9f54
commit dc5560392f
312 changed files with 6349 additions and 4195 deletions
@@ -83,8 +83,8 @@ public:
void transformPoint (ValueType& x, ValueType& y) const noexcept
{
const ValueType oldX = x;
x = static_cast <ValueType> (mat00 * oldX + mat01 * y + mat02);
y = static_cast <ValueType> (mat10 * oldX + mat11 * y + mat12);
x = static_cast<ValueType> (mat00 * oldX + mat01 * y + mat02);
y = static_cast<ValueType> (mat10 * oldX + mat11 * y + mat12);
}
/** Transforms two 2D coordinates using this matrix.
@@ -97,10 +97,10 @@ public:
ValueType& x2, ValueType& y2) const noexcept
{
const ValueType oldX1 = x1, oldX2 = x2;
x1 = static_cast <ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
y1 = static_cast <ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
x2 = static_cast <ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
y2 = static_cast <ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
x1 = static_cast<ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
y1 = static_cast<ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
x2 = static_cast<ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
y2 = static_cast<ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
}
/** Transforms three 2D coordinates using this matrix.
@@ -114,12 +114,12 @@ public:
ValueType& x3, ValueType& y3) const noexcept
{
const ValueType oldX1 = x1, oldX2 = x2, oldX3 = x3;
x1 = static_cast <ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
y1 = static_cast <ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
x2 = static_cast <ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
y2 = static_cast <ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
x3 = static_cast <ValueType> (mat00 * oldX3 + mat01 * y3 + mat02);
y3 = static_cast <ValueType> (mat10 * oldX3 + mat11 * y3 + mat12);
x1 = static_cast<ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
y1 = static_cast<ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
x2 = static_cast<ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
y2 = static_cast<ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
x3 = static_cast<ValueType> (mat00 * oldX3 + mat01 * y3 + mat02);
y3 = static_cast<ValueType> (mat10 * oldX3 + mat11 * y3 + mat12);
}
//==============================================================================
@@ -231,8 +231,7 @@ public:
float x10, float y10,
float x01, float y01) noexcept;
/** Returns the transform that will map three specified points onto three target points.
*/
/** Returns the transform that will map three specified points onto three target points. */
static AffineTransform fromTargetPoints (float sourceX1, float sourceY1, float targetX1, float targetY1,
float sourceX2, float sourceY2, float targetX2, float targetY2,
float sourceX3, float sourceY3, float targetX3, float targetY3) noexcept;
@@ -436,9 +436,7 @@ void Path::addRectangle (const float x, const float y,
data.elements [numElements++] = closeSubPathMarker;
}
void Path::addRoundedRectangle (const float x, const float y,
const float w, const float h,
float csx, float csy)
void Path::addRoundedRectangle (float x, float y, float w, float h, float csx, float csy)
{
addRoundedRectangle (x, y, w, h, csx, csy, true, true, true, true);
}
@@ -498,9 +496,7 @@ void Path::addRoundedRectangle (const float x, const float y, const float w, con
closeSubPath();
}
void Path::addRoundedRectangle (const float x, const float y,
const float w, const float h,
float cs)
void Path::addRoundedRectangle (float x, float y, float w, float h, float cs)
{
addRoundedRectangle (x, y, w, h, cs, cs);
}
@@ -527,15 +523,19 @@ void Path::addQuadrilateral (const float x1, const float y1,
closeSubPath();
}
void Path::addEllipse (const float x, const float y,
const float w, const float h)
void Path::addEllipse (float x, float y, float w, float h)
{
const float hw = w * 0.5f;
addEllipse (Rectangle<float> (x, y, w, h));
}
void Path::addEllipse (Rectangle<float> area)
{
const float hw = area.getWidth() * 0.5f;
const float hw55 = hw * 0.55f;
const float hh = h * 0.5f;
const float hh = area.getHeight() * 0.5f;
const float hh55 = hh * 0.55f;
const float cx = x + hw;
const float cy = y + hh;
const float cx = area.getX() + hw;
const float cy = area.getY() + hh;
startNewSubPath (cx, cy - hh);
cubicTo (cx + hw55, cy - hh, cx + hw, cy - hh55, cx + hw, cy);
@@ -391,13 +391,17 @@ public:
float x4, float y4);
/** Adds an ellipse to the path.
The shape is added as a new sub-path. (Any currently open paths will be left open).
@see addArc
*/
void addEllipse (float x, float y, float width, float height);
/** Adds an ellipse to the path.
The shape is added as a new sub-path. (Any currently open paths will be left open).
@see addArc
*/
void addEllipse (Rectangle<float> area);
/** Adds an elliptical arc to the current path.
Note that when specifying the start and end angles, the curve will be drawn either clockwise
@@ -213,6 +213,9 @@ public:
/** Casts this point to a Point<double> object. */
Point<double> toDouble() const noexcept { return Point<double> (static_cast<double> (x), static_cast<double> (y)); }
/** Casts this point to a Point<int> object using roundToInt() to convert the values. */
Point<int> roundToInt() const noexcept { return Point<int> (juce::roundToInt (x), juce::roundToInt (y)); }
/** Returns the point as a string in the form "x, y". */
String toString() const { return String (x) + ", " + String (y); }
@@ -628,6 +628,17 @@ public:
/** Standard method for iterating the rectangles in the list. */
const RectangleType* end() const noexcept { return rects.end(); }
/** Increases the internal storage to hold a minimum number of rectangles.
Calling this before adding a large number of rectangles means that
the array won't have to keep dynamically resizing itself as the elements
are added, and it'll therefore be more efficient.
@see Array::ensureStorageAllocated
*/
void ensureStorageAllocated (int minNumRectangles)
{
rects.ensureStorageAllocated (minNumRectangles);
}
private:
//==============================================================================
Array<RectangleType> rects;