diff options
| author | j-p <jp.bruyere@live.be> | 2016-08-15 20:55:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-15 20:55:55 +0200 |
| commit | ea5ba40d536aa80b56db118c3e8e077790c24359 (patch) | |
| tree | 194329bce587f3f7035f9d4d6258728ac45f3d2b /src/ExtensionsMethods.cs | |
| parent | ed815a31113235890cf6c902c754fb3dc7536708 (diff) | |
| parent | 6c5120d8108af9ed53e7205d221cf96a281a28a4 (diff) | |
Merge pull request #19 from jpbruyere/TemplatesPathes
Default Templates searched among resources finishing with .template
Textbox and label debug
Keyboard repeat
Double click
Wrapper
Diffstat (limited to 'src/ExtensionsMethods.cs')
| -rw-r--r-- | src/ExtensionsMethods.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ExtensionsMethods.cs b/src/ExtensionsMethods.cs index 8985c929..d1b951b9 100644 --- a/src/ExtensionsMethods.cs +++ b/src/ExtensionsMethods.cs @@ -26,9 +26,15 @@ namespace Crow public static class ExtensionsMethods { #region Cairo extensions - public static void Rectangle(this Cairo.Context ctx, Rectangle r) + public static void Rectangle(this Cairo.Context ctx, Rectangle r, double stroke = 0.0) { - ctx.Rectangle (r.X, r.Y, r.Width, r.Height); + if (stroke > 0.0) { + ctx.LineWidth = stroke; + double shw = stroke / 2.0; + ctx.Rectangle (r.X + shw, r.Y + shw, r.Width - stroke, r.Height - stroke); + ctx.Stroke (); + }else + ctx.Rectangle (r.X, r.Y, r.Width, r.Height); } public static void SetSourceColor(this Cairo.Context ctx, Color c) { |