[f-spot: 21/41] new CheckPattern struct



commit d1cc6fdc7a88b074e818ec51ffbf912de59e2335
Author: Stephane Delcroix <stephane delcroix org>
Date:   Wed Jun 10 09:39:29 2009 +0200

    new CheckPattern struct

 src/Makefile.am             |    1 +
 src/Widgets/CheckPattern.cs |   46 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index acb1395..7f08e71 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -76,6 +76,7 @@ WIDGETS_CSDISTFILES =				\
 	$(srcdir)/Bling/EasingMode.cs		\
 	$(srcdir)/Bling/EasedAnimation.cs	\
 	$(srcdir)/Bling/QuinticEase.cs		\
+	$(srcdir)/Widgets/CheckPattern.cs	\
 	$(srcdir)/Widgets/ComplexMenuItem.cs	\
 	$(srcdir)/Widgets/CustomPrintWidget.cs	\
 	$(srcdir)/Widgets/DateEdit.cs		\
diff --git a/src/Widgets/CheckPattern.cs b/src/Widgets/CheckPattern.cs
new file mode 100644
index 0000000..40b3dc7
--- /dev/null
+++ b/src/Widgets/CheckPattern.cs
@@ -0,0 +1,46 @@
+//
+// FSpot.Widgets.CheckPattern.cs
+//
+// Author(s):
+//	Stephane Delcroix  <stephane delcroix org>
+//
+// This is free software. See COPYING for details.
+//
+
+namespace FSpot.Widgets
+{
+	public struct CheckPattern
+	{
+		uint color1, color2;
+		int check_size;
+
+		public CheckPattern (uint color1, uint color2, int check_size)
+		{
+			this.color1 = color1;
+			this.color2 = color2;
+			this.check_size = check_size;
+		}
+
+		public uint Color1
+		{
+			get { return color1; }
+		}
+
+		public uint Color2
+		{
+			get { return color2; }
+		}
+
+		public int CheckSize
+		{
+			get { return check_size; }
+		}
+
+		public static CheckPattern Dark = new CheckPattern (0x00000000, 0x00555555, 8);
+		public static CheckPattern Midtone = new CheckPattern (0x00555555, 0x00aaaaaa, 8);
+		public static CheckPattern Light = new CheckPattern (0x00aaaaaa, 0x00ffffff, 8);
+		public static CheckPattern Black = new CheckPattern (0x00000000, 0x00000000, 8);
+		public static CheckPattern Gray = new CheckPattern (0x00808080, 0x00808080, 8);
+		public static CheckPattern White = new CheckPattern (0x00ffffff, 0x00ffffff, 8);
+	}
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]