Added ResetTransform method to Context
This commit is contained in:
Родитель
4539755b5b
Коммит
a9e14ddb51
|
@ -254,7 +254,13 @@ namespace Xwt.GtkBackend
|
|||
ctx.Context.Fill ();*/
|
||||
}
|
||||
|
||||
public void Rotate (object backend, double angle)
|
||||
public void ResetTransform (object backend)
|
||||
{
|
||||
GtkContext gc = (GtkContext)backend;
|
||||
gc.Context.IdentityMatrix();
|
||||
}
|
||||
|
||||
public void Rotate (object backend, double angle)
|
||||
{
|
||||
GtkContext gc = (GtkContext)backend;
|
||||
gc.Context.Rotate ((angle * System.Math.PI) / 180);
|
||||
|
|
|
@ -87,6 +87,8 @@ namespace Xwt.Backends
|
|||
|
||||
void DrawImage (object backend, object img, double x, double y, double width, double height, double alpha);
|
||||
|
||||
void ResetTransform (object backend);
|
||||
|
||||
void Rotate (object backend, double angle);
|
||||
|
||||
void Translate (object backend, double tx, double ty);
|
||||
|
|
|
@ -246,6 +246,15 @@ namespace Xwt.Drawing
|
|||
handler.DrawImage (Backend, GetBackend (img), rect.X, rect.Y, rect.Width, rect.Height, alpha);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the Current Trasnformation Matrix (CTM) to the Identity Matrix
|
||||
/// </summary>
|
||||
public void ResetTransform ()
|
||||
{
|
||||
handler.ResetTransform (Backend);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Applies a rotation transformation
|
||||
/// </summary>
|
||||
|
|
Загрузка…
Ссылка в новой задаче