diff options
Diffstat (limited to 'mcs/class')
-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) |