2
// IContextBackendHandler.cs
5
// Lluis Sanchez <lluis@xamarin.com>
6
// Hywel Thomas <hywel.w.thomas@gmail.com>
8
// Copyright (c) 2011 Xamarin Inc
10
// Permission is hereby granted, free of charge, to any person obtaining a copy
11
// of this software and associated documentation files (the "Software"), to deal
12
// in the Software without restriction, including without limitation the rights
13
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
// copies of the Software, and to permit persons to whom the Software is
15
// furnished to do so, subject to the following conditions:
17
// The above copyright notice and this permission notice shall be included in
18
// all copies or substantial portions of the Software.
20
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31
namespace Xwt.Backends
33
public interface IContextBackendHandler: IBackendHandler
35
void Save (object backend);
37
void Restore (object backend);
39
void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2);
41
void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2);
43
void Clip (object backend);
45
void ClipPreserve(object backend);
47
void ClosePath(object backend);
49
void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3);
51
void Fill (object backend);
53
void FillPreserve (object backend);
55
void LineTo (object backend, double x, double y);
57
void MoveTo (object backend, double x, double y);
59
void NewPath (object backend);
61
void Rectangle (object backend, double x, double y, double width, double height);
63
void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
65
void RelLineTo (object backend, double dx, double dy);
67
void RelMoveTo (object backend, double dx, double dy);
69
void Stroke (object backend);
71
void StrokePreserve (object backend);
73
void SetColor (object backend, Xwt.Drawing.Color color);
75
void SetLineWidth (object backend, double width);
77
void SetLineDash (object backend, double offset, params double[] pattern);
79
void SetPattern (object backend, object p);
81
void SetFont (object backend, Font font);
83
void DrawTextLayout (object backend, TextLayout layout, double x, double y);
85
void DrawImage (object backend, object img, double x, double y, double alpha);
87
void DrawImage (object backend, object img, double x, double y, double width, double height, double alpha);
89
void DrawImage (object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha);
91
void Rotate (object backend, double angle);
93
void Scale (object backend, double scaleX, double scaleY);
95
void Translate (object backend, double tx, double ty);
97
void TransformPoint (object backend, ref double x, ref double y);
99
void TransformDistance (object backend, ref double dx, ref double dy);
101
void TransformPoints (object backend, Point[] points);
103
void TransformDistances (object backend, Distance[] vectors);
106
/// Sets a global alpha to be applied to all drawing operations.
107
/// It doesn't affect colors that have already been set.
109
void SetGlobalAlpha (object backend, double globalAlpha);
111
void Dispose (object backend);