[hyena/gtk3] CairoExtensions: Add GdkRGBAToCairoColor utility method
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena/gtk3] CairoExtensions: Add GdkRGBAToCairoColor utility method
- Date: Mon, 4 Jul 2011 19:38:24 +0000 (UTC)
commit 4ffad0a5599c999d9579abfcce83f3143236d49a
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Mon Jul 4 21:27:17 2011 +0200
CairoExtensions: Add GdkRGBAToCairoColor utility method
Hyena.Gui/Hyena.Gui/CairoExtensions.cs | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Gui/CairoExtensions.cs b/Hyena.Gui/Hyena.Gui/CairoExtensions.cs
index 5f0d077..811f129 100644
--- a/Hyena.Gui/Hyena.Gui/CairoExtensions.cs
+++ b/Hyena.Gui/Hyena.Gui/CairoExtensions.cs
@@ -97,6 +97,11 @@ namespace Hyena.Gui
alpha);
}
+ public static Cairo.Color GdkRGBAToCairoColor (Gdk.RGBA rgba)
+ {
+ return new Cairo.Color (rgba.Red, rgba.Green, rgba.Blue, rgba.Alpha);
+ }
+
public static Cairo.Color RgbToColor (uint rgbColor)
{
return RgbaToColor ((rgbColor << 8) | 0x000000ff);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]