Hello together,
I produced a rectangle and this rectangle rotates itself by 45 degrees after the rotation, if I increase this rectangle or reduce
Code:
GoView myView = new GoView();
if(myView.DragsRealtime == false)
{
myView.DragsRealtime = true;
}
myView.Dock = DockStyle.Fill;
this.Controls.Add(myView);
RectTest rect = new RectTest();
PointF f = rect.Location;
if((rect.Angle == 0) || (rect.Angle == 0) )
{
rect.Rotate(f,45);
}
rect.Brush = Brushes.Black;
myView.Document.Add(rect);
the Paint Function:
public override void Paint(Graphics g, GoView view)
{
if (Math.Abs(this.Angle) > float.Epsilon)
{
using (new GraphicsStateController(g))
{
PointF c = this.Location;
g.TranslateTransform(c.X, c.Y);
g.RotateTransform(this.Angle);
g.TranslateTransform(-c.X, -c.Y);
base.Paint(g, view);
xb += 2;
}
}
else
{
base.Paint(g, view);
}
}
slide yourself upward or downward
therefore I don’t know, where the problem is, I therefore rotate this rectangle on its Location, however, if I then increase from upper side therefore alters the Location points for itself a possibility gives where one can define a point, it doesn’t sight alters.
best thanks