<Compile Include="src\GraphicObjects\GroupBox.cs" />\r
<Compile Include="src\GraphicObjects\ScrollBar.cs" />\r
<Compile Include="src\BubblingMouseButtonEventArgs.cs" />\r
+ <Compile Include="src\Cairo\IFill.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<Reference Include="System" />\r
--- /dev/null
+using System;
+using System.Collections.Generic;
+
+namespace Crow
+{
+ public interface ICairoFill
+ {
+ void SetAsSource (Cairo.Context ctx);
+ }
+}
+
\r
namespace Crow\r
{\r
- public struct Color\r
+ public struct Color : ICairoFill\r
{\r
#region CTOR\r
public Color(double _R, double _G, double _B, double _A)\r
return new Color (this.R, this.G, this.B, _A);\r
}\r
\r
+ #region IFill implementation\r
+\r
+ public void SetAsSource (Cairo.Context ctx)\r
+ {\r
+ ctx.SetSourceRGBA (R, G, B, A);\r
+ }\r
+\r
+ #endregion\r
+\r
#region Predefined colors\r
public static readonly Color Transparent = new Color(0, 0, 0, 0, "Transparent");\r
public static readonly Color Clear = new Color(-1, -1, -1, -1, "Clear");\r
{\r
Rectangle rBack = new Rectangle (Slot.Size);\r
\r
- gr.SetSourceColor(Background);\r
+ Background.SetAsSource (gr);\r
CairoHelpers.CairoRectangle(gr,rBack,_cornerRadius);\r
gr.Fill ();\r
}\r
#if DEBUG_CLIP_RECTANGLE\r
redrawClip.stroke (ctx, new Color(1.0,0,0,0.3));\r
#endif\r
- redrawClip.clearAndClip (ctx);//rajouté après, tester si utile \r
+ redrawClip.clearAndClip (ctx); \r
\r
//Link.draw (ctx);\r
foreach (GraphicObject p in invGOList) {\r