Files
stgsharp/源代码/StgSharp/Geometries/Rectangle.cs
T

69 lines
1.5 KiB
C#

using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Geometries
{
public class Rectangle : IGeometry
{
internal Point _basePoint;
internal Point _center;
internal Point _centerToCorner1;
internal Point _centerToCorner2;
internal GetLocationHandler _centerMov;
internal GetLocationHandler _CTC1Handler;
internal GetLocationHandler _CTC2Handler;
Point IGeometry.BasePoint
{
get { return _basePoint; }
}
Point IGeometry.RefPoint
{
get { return _center; }
}
Point IGeometry.RefVec01
{
get { return _centerToCorner1; }
}
Point IGeometry.RefVec02
{
get { return _centerToCorner2; }
}
void IGeometry.OnRender()
{
this._CTC2Handler.Invoke(_centerToCorner2._position, Control.TimeLine.tickCounter);
}
float IGeometry.SetArrayX()
{
throw new NotImplementedException();
}
float IGeometry.SetArrayY()
{
throw new NotImplementedException();
}
void INode<IGeometry>.setID<T>(ContainerNode<T> id)
{
if (_id != default(ContainerNode<IGeometry>))
{
throw new ArgumentException();
}
else
{
_id = id as ContainerNode<IGeometry>;
}
}
}
}