[gimp] app: add styles for tool drawing (still unused)



commit 11aecbd090178a2362c111f7aa7d28060e15e977
Author: Michael Natterer <mitch gimp org>
Date:   Sun Sep 19 19:19:24 2010 +0200

    app: add styles for tool drawing (still unused)

 app/display/gimpdisplayshell-style.c |   25 +++++++++++++++++++++++++
 app/display/gimpdisplayshell-style.h |    4 ++++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-style.c b/app/display/gimpdisplayshell-style.c
index 592a3cd..86b3028 100644
--- a/app/display/gimpdisplayshell-style.c
+++ b/app/display/gimpdisplayshell-style.c
@@ -69,6 +69,9 @@ static const GimpRGB vectors_normal_fg   = { 0.0, 0.0, 1.0, 0.8 };
 static const GimpRGB vectors_active_bg   = { 1.0, 1.0, 1.0, 0.6 };
 static const GimpRGB vectors_active_fg   = { 1.0, 0.0, 0.0, 0.8 };
 
+static const GimpRGB tool_bg             = { 1.0, 1.0, 1.0, 0.6 };
+static const GimpRGB tool_fg             = { 0.0, 0.0, 0.0, 0.8 };
+
 
 /*  public functions  */
 
@@ -315,3 +318,25 @@ gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
   else
     gimp_cairo_set_source_rgba (cr, &vectors_normal_fg);
 }
+
+void
+gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
+                                      cairo_t          *cr)
+{
+  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (cr != NULL);
+
+  cairo_set_line_width (cr, 3.0);
+  gimp_cairo_set_source_rgba (cr, &tool_bg);
+}
+
+void
+gimp_display_shell_set_tool_fg_style (GimpDisplayShell *shell,
+                                      cairo_t          *cr)
+{
+  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (cr != NULL);
+
+  cairo_set_line_width (cr, 1.0);
+  gimp_cairo_set_source_rgba (cr, &tool_fg);
+}
diff --git a/app/display/gimpdisplayshell-style.h b/app/display/gimpdisplayshell-style.h
index 8fad2af..592c150 100644
--- a/app/display/gimpdisplayshell-style.h
+++ b/app/display/gimpdisplayshell-style.h
@@ -54,6 +54,10 @@ void   gimp_display_shell_set_vectors_fg_style    (GimpDisplayShell *shell,
                                                    cairo_t          *cr,
                                                    gdouble           width,
                                                    gboolean          active);
+void   gimp_display_shell_set_tool_bg_style       (GimpDisplayShell *shell,
+                                                   cairo_t          *cr);
+void   gimp_display_shell_set_tool_fg_style       (GimpDisplayShell *shell,
+                                                   cairo_t          *cr);
 
 
 #endif /* __GIMP_DISPLAY_SHELL_STYLE_H__ */



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