diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-05-07 08:12:56 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-05-07 08:12:56 +0200 |
| commit | 6b02331dfe7c6d8290c136ce20b4a7c655b47aae (patch) | |
| tree | da414ee19018edaf1d37b8fd7a6e4fe1f86edecd /src/Cairo/CairoHelpers.cs | |
| parent | f3344a78e511213d235e4c91bf507264fd41ac0d (diff) | |
first tests with vkvg as backendvkvg
Diffstat (limited to 'src/Cairo/CairoHelpers.cs')
| -rw-r--r-- | src/Cairo/CairoHelpers.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Cairo/CairoHelpers.cs b/src/Cairo/CairoHelpers.cs index 44060259..2290e319 100644 --- a/src/Cairo/CairoHelpers.cs +++ b/src/Cairo/CairoHelpers.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using vkvg; namespace Crow { @@ -57,18 +58,18 @@ namespace Crow return arr[minp]; } - public static void CairoRectangle(Cairo.Context gr, Rectangle r, double radius, double stroke = 0.0) + public static void CairoRectangle(Context gr, Rectangle r, double radius, double stroke = 0.0) { if (radius > 0) CairoHelpers.DrawRoundedRectangle (gr, r, radius, stroke); else gr.Rectangle (r, stroke); } - public static void CairoCircle(Cairo.Context gr, Rectangle r) + public static void CairoCircle(Context gr, Rectangle r) { gr.Arc(r.X + r.Width/2, r.Y + r.Height/2, Math.Min(r.Width,r.Height)/2, 0, 2*Math.PI); } - public static void DrawRoundedRectangle(Cairo.Context gr, Rectangle r, double radius, double stroke = 0.0) + public static void DrawRoundedRectangle(Context gr, Rectangle r, double radius, double stroke = 0.0) { if (stroke>0.0) { gr.LineWidth = stroke; @@ -78,7 +79,7 @@ namespace Crow }else DrawRoundedRectangle(gr, r.X, r.Y, r.Width, r.Height, radius); } - public static void DrawRoundedRectangle(Cairo.Context gr, double x, double y, double width, double height, double radius) + public static void DrawRoundedRectangle(Context gr, double x, double y, double width, double height, double radius) { gr.Save(); @@ -96,7 +97,7 @@ namespace Crow gr.ClosePath(); gr.Restore(); } - public static void StrokeRaisedRectangle(Cairo.Context gr, Rectangle r, double width = 1) + public static void StrokeRaisedRectangle(Context gr, Rectangle r, double width = 1) { gr.Save(); r.Inflate((int)-width / 2, (int)-width / 2); @@ -115,7 +116,7 @@ namespace Crow gr.Restore(); } - public static void StrokeLoweredRectangle(Cairo.Context gr, Rectangle r, double width = 1) + public static void StrokeLoweredRectangle(Context gr, Rectangle r, double width = 1) { gr.Save(); r.Inflate((int)-width / 2, (int)-width / 2); |