diff options
author | Miguel de Icaza <miguel@gnome.org> | 2007-07-07 21:24:37 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2007-07-07 21:24:37 +0400 |
commit | a9d3bce08f3b78c7a1dfe92bb93284a6e942ed3f (patch) | |
tree | a6a2e5da7e9c85631c789e1fd54bbbbfe5aec3e1 /mcs | |
parent | fa7c04a2224f911595de4cae29e69efbbd301c46 (diff) |
2007-07-07 Miguel de Icaza <miguel@novell.com>
* Mono.Cairo/SolidPattern.cs: Add helper APIs based on Alp's patch
based on F-Spot code.
svn path=/trunk/mcs/; revision=81565
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Mono.Cairo/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mcs/class/Mono.Cairo/ChangeLog b/mcs/class/Mono.Cairo/ChangeLog index 680eb2d9ea5..20945f6f642 100644 --- a/mcs/class/Mono.Cairo/ChangeLog +++ b/mcs/class/Mono.Cairo/ChangeLog @@ -1,7 +1,12 @@ 2007-07-07 Miguel de Icaza <miguel@novell.com> + * Mono.Cairo/SolidPattern.cs: Add helper APIs based on Alp's patch + based on F-Spot code. + Integrated various patches from Alp Toker: + * Mono.Cairo/FontFace.cs: Add to the build. + * Mono.Cairo/Context.cs: Add a number of methods that are compatible with the public Cairo API, and add commented out Obsoletes for the names that we had. diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs b/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs index c7f93eea413..1057ae11a09 100644 --- a/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs +++ b/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs @@ -37,6 +37,21 @@ namespace Cairo { { } + public SolidPattern (Color color) + { + pattern = NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A); + } + + public SolidPattern (double r, double g, double b) + { + pattern = NativeMethods.cairo_pattern_create_rgb (r, g, b); + } + + public SolidPattern (double r, double g, double b, double a) + { + NativeMethods.cairo_pattern_create_rgba (r, g, b, a); + } + public SolidPattern (Color color, bool solid) { if (solid) |