|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using PointTransformations;
namespace PolygonImageLib
{
internal class OverallTransformation
{
private bool mIsRotated;
private bool mIsAspected;
private double mRotation;
private double mAspect;
public Double Rotation
{
get { return mRotation; }
set { mRotation = value;
}
}
public bool IsRotated
{
get { return mIsRotated; }
set
{
mIsRotated = value;
}
}
public bool IsAspected
{
get { return mIsAspected; }
set
{
mIsAspected = value;
}
}
public double Aspect
{
get { return mAspect; }
set { mAspect = value;
}
}
public void Transform(Matrix mat)
{
PointTransformations.RotationalTransformation rot = new PointTransformations.RotationalTransformation();
rot.Matrix = mat;
rot.RotateDegreesAroundOrigin(mRotation);
LinearTransformation lt = new LinearTransformation();
lt.Matrix = mat;
if (mAspect < 0)
{
lt.StretchX =1 + mAspect ;
lt.Transform();
}
if (mAspect > 0)
{
lt.StretchY = 1 - + mAspect;
lt.Transform();
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Written software for what seems like forever. I'm currenly infatuated with WPF. Hopefully my affections are returned.