]> git.sur5r.net Git - glabels/commitdiff
Fix text and line shadow color from key
authorMarek Černocký <marek@manet.cz>
Sat, 13 Feb 2016 18:57:41 +0000 (19:57 +0100)
committerJim Evins <evins@snaught.com>
Sun, 14 Feb 2016 18:33:10 +0000 (13:33 -0500)
src/color.c
src/color.h
src/label-line.c
src/label-text.c

index 2a87c9e16aa2b3e2651cfd67f401244ded455445..d9e81979868b62958a14bb565b60a92f3f8e5fae 100644 (file)
@@ -40,22 +40,6 @@ gl_color_set_opacity (guint   color,
 }
 
 
-/*****************************************************************************/
-/* Resolve actual shadow color by adjusting opacity.                         */
-/*****************************************************************************/
-guint
-gl_color_shadow (guint   base_color,
-                 gdouble opacity,
-                 guint   object_color)
-{
-        guint color;
-
-        color = gl_color_set_opacity (base_color,
-                                      opacity * GL_COLOR_F_ALPHA (object_color));
-
-        return color;
-}
-
 
 /*****************************************************************************/
 /* Convert gLabels color into a GdkColor                                     */
index 48feed7ec491a72ecb15593a48e70175517d0e0c..78cbe60f97140f0a93a7515f06445033a1fa5186 100644 (file)
@@ -83,11 +83,8 @@ G_BEGIN_DECLS
 
 
 guint     gl_color_set_opacity            (guint            color,
-                                          gdouble          opacity);
+                                           gdouble          opacity);
 
-guint     gl_color_shadow                 (guint            base_color,
-                                          gdouble          opacity,
-                                          guint            object_color);
 
 /*
  * Routines to convert to/from GdkColor.
index c88e2ed352ca4396fe1155f979ca4aea044e5fb9..e6864ab5bac6e0b7d4b4ea60c747625313c3f73d 100644 (file)
@@ -347,12 +347,13 @@ draw_shadow (glLabelObject *object,
         }
 
        shadow_color_node = gl_label_object_get_shadow_color (object);
+       shadow_line_color = gl_color_node_expand (shadow_color_node, record);
        if (shadow_color_node->field_flag)
        {
                shadow_color_node->color = GL_COLOR_SHADOW_MERGE_DEFAULT;
        }
        shadow_opacity = gl_label_object_get_shadow_opacity (object);
-       shadow_line_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, line_color_node->color);
+       shadow_line_color = gl_color_set_opacity (shadow_line_color, shadow_opacity);
 
 
         cairo_move_to (cr, 0.0, 0.0);
index 13e9f943939614c9aebaffc1b092153982aeb214..44dc10bcea96290122ecd51e1ac114f89f365b11 100644 (file)
@@ -1277,12 +1277,13 @@ draw_shadow (glLabelObject *object,
         gl_color_node_free (&color_node);
 
         shadow_color_node = gl_label_object_get_shadow_color (object);
+       shadow_color = gl_color_node_expand (shadow_color_node, record);
         if (shadow_color_node->field_flag)
         {
                 shadow_color_node->color = GL_COLOR_SHADOW_MERGE_DEFAULT;
         }
         shadow_opacity = gl_label_object_get_shadow_opacity (object);
-        shadow_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, color);
+       shadow_color = gl_color_set_opacity (shadow_color, shadow_opacity);
         gl_color_node_free (&shadow_color_node);
 
         draw_text_real (object, cr, screen_flag, record, shadow_color);