Fix compiler warning about hiding Transformable::ScaleBy() by enabled the
ChannelTransform version of ScaleBy() which was commented out in the code. I have no idea if this code was tested or not, I've added a comment to the effect. It certainly isn't used in Icon-O-Matic at the moment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -162,28 +162,29 @@ ChannelTransform::RotateBy(double degrees)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//// ScaleBy
|
// ScaleBy
|
||||||
////
|
|
||||||
//// converts a scalation in world coordinates into
|
|
||||||
//// a combined local scalation and a translation
|
|
||||||
//void
|
|
||||||
//ChannelTransform::ScaleBy(BPoint origin, double xScale, double yScale)
|
|
||||||
//{
|
|
||||||
// if (xScale == 1.0 && yScale == 1.0)
|
|
||||||
// return;
|
|
||||||
//
|
//
|
||||||
// fXScale *= xScale;
|
// converts a scalation in world coordinates into
|
||||||
// fYScale *= yScale;
|
// a combined local scalation and a translation
|
||||||
//
|
void
|
||||||
// // scale fTranslation
|
ChannelTransform::ScaleBy(BPoint origin, double xScale, double yScale)
|
||||||
// double xOffset = fTranslation.x - origin.x;
|
{
|
||||||
// double yOffset = fTranslation.y - origin.y;
|
// TODO: Untested?
|
||||||
//
|
if (xScale == 1.0 && yScale == 1.0)
|
||||||
// fTranslation.x = origin.x + (xOffset * xScale);
|
return;
|
||||||
// fTranslation.y = origin.y + (yOffset * yScale);
|
|
||||||
//
|
fXScale *= xScale;
|
||||||
// _UpdateMatrix();
|
fYScale *= yScale;
|
||||||
//}
|
|
||||||
|
// scale fTranslation
|
||||||
|
double xOffset = fTranslation.x - origin.x;
|
||||||
|
double yOffset = fTranslation.y - origin.y;
|
||||||
|
|
||||||
|
fTranslation.x = origin.x + (xOffset * xScale);
|
||||||
|
fTranslation.y = origin.y + (yOffset * yScale);
|
||||||
|
|
||||||
|
_UpdateMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
// ScaleBy
|
// ScaleBy
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -32,10 +32,12 @@ class ChannelTransform : public Transformable {
|
|||||||
|
|
||||||
virtual void TranslateBy(BPoint offset);
|
virtual void TranslateBy(BPoint offset);
|
||||||
virtual void RotateBy(BPoint origin, double degrees);
|
virtual void RotateBy(BPoint origin, double degrees);
|
||||||
|
|
||||||
void ScaleBy(double xScale, double yScale);
|
|
||||||
void RotateBy(double degrees);
|
void RotateBy(double degrees);
|
||||||
|
|
||||||
|
virtual void ScaleBy(BPoint origin, double xScale,
|
||||||
|
double yScale);
|
||||||
|
void ScaleBy(double xScale, double yScale);
|
||||||
|
|
||||||
void SetTranslationAndScale(BPoint offset,
|
void SetTranslationAndScale(BPoint offset,
|
||||||
double xScale,
|
double xScale,
|
||||||
double yScale);
|
double yScale);
|
||||||
|
|||||||
Reference in New Issue
Block a user