Merge default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-01-21 12:06:35 -04:00
104 changed files with 16 additions and 7 deletions
+3
View File
@@ -98,6 +98,9 @@ Graphics::Graphics()
{
transformStack.reserve(16);
transformStack.push_back(Matrix4());
pixelScaleStack.reserve(16);
pixelScaleStack.push_back(1);
}
Graphics::~Graphics()
-4
View File
@@ -294,10 +294,6 @@ bool Graphics::setMode(int width, int height, int pixelwidth, int pixelheight, b
// Restore the graphics state.
restoreState(states.back());
pixelScaleStack.clear();
pixelScaleStack.reserve(5);
pixelScaleStack.push_back(1);
int gammacorrect = isGammaCorrect() ? 1 : 0;
// We always need a default shader.
+12
View File
@@ -107,6 +107,9 @@ BezierCurve BezierCurve::getDerivative() const
const Vector &BezierCurve::getControlPoint(int i) const
{
if (controlPoints.size() == 0)
throw Exception("Curve contains no control points.");
while (i < 0)
i += controlPoints.size();
@@ -118,6 +121,9 @@ const Vector &BezierCurve::getControlPoint(int i) const
void BezierCurve::setControlPoint(int i, const Vector &point)
{
if (controlPoints.size() == 0)
throw Exception("Curve contains no control points.");
while (i < 0)
i += controlPoints.size();
@@ -129,6 +135,9 @@ void BezierCurve::setControlPoint(int i, const Vector &point)
void BezierCurve::insertControlPoint(const Vector &point, int i)
{
if (controlPoints.size() == 0)
i = 0;
while (i < 0)
i += controlPoints.size();
@@ -140,6 +149,9 @@ void BezierCurve::insertControlPoint(const Vector &point, int i)
void BezierCurve::removeControlPoint(int i)
{
if (controlPoints.size() == 0)
throw Exception("No control points to remove.");
while (i < 0)
i += controlPoints.size();
Executable → Regular
View File