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);
|
||||
|
|
|
@ -86,7 +86,9 @@ namespace Xwt.Backends
|
|||
void DrawImage (object backend, object img, double x, double y, double alpha);
|
||||
|
||||
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);
|
||||
|
|
|
@ -245,6 +245,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
|
||||
|
|
Загрузка…
Ссылка в новой задаче