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:
parent
b08f6fd2bc
commit
14d604ddfa
@ -162,28 +162,29 @@ ChannelTransform::RotateBy(double degrees)
|
||||
}
|
||||
|
||||
|
||||
//// 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;
|
||||
// ScaleBy
|
||||
//
|
||||
// fXScale *= xScale;
|
||||
// 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();
|
||||
//}
|
||||
// converts a scalation in world coordinates into
|
||||
// a combined local scalation and a translation
|
||||
void
|
||||
ChannelTransform::ScaleBy(BPoint origin, double xScale, double yScale)
|
||||
{
|
||||
// TODO: Untested?
|
||||
if (xScale == 1.0 && yScale == 1.0)
|
||||
return;
|
||||
|
||||
fXScale *= xScale;
|
||||
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
|
||||
void
|
||||
|
@ -32,10 +32,12 @@ class ChannelTransform : public Transformable {
|
||||
|
||||
virtual void TranslateBy(BPoint offset);
|
||||
virtual void RotateBy(BPoint origin, double degrees);
|
||||
|
||||
void ScaleBy(double xScale, double yScale);
|
||||
void RotateBy(double degrees);
|
||||
|
||||
virtual void ScaleBy(BPoint origin, double xScale,
|
||||
double yScale);
|
||||
void ScaleBy(double xScale, double yScale);
|
||||
|
||||
void SetTranslationAndScale(BPoint offset,
|
||||
double xScale,
|
||||
double yScale);
|
||||
|
Loading…
Reference in New Issue
Block a user