PangoContext *context;
PangoLayout *layout;
+ PangoAttribute *attribute;
PangoFontDescription *FontDesc;// = pango_font_description_new();
gint Font_Size;
PangoRectangle ink_rect;
- gdk_gc_set_foreground(Draw_Context->gc, Properties->foreground);
- gdk_gc_set_background(Draw_Context->gc, Properties->background);
+ layout = Draw_Context->pango_layout;
- layout = gtk_widget_create_pango_layout(GTK_WIDGET(Draw_Context->drawable), NULL);
context = pango_layout_get_context(layout);
FontDesc = pango_context_get_font_description(context);
- Font_Size = pango_font_description_get_size(FontDesc);
+
pango_font_description_set_size(FontDesc, Properties->size*PANGO_SCALE);
-
-
+ pango_layout_context_changed(layout);
+
pango_layout_set_text(layout, Properties->Text, -1);
pango_layout_get_pixel_extents(layout, &ink_rect, NULL);
switch(Properties->position) {
case OVER:
- gdk_draw_layout(Draw_Context->drawable, Draw_Context->gc,
+ gdk_draw_layout_with_colors(Draw_Context->drawable,
+ Draw_Context->gc,
Draw_Context->Current->modify_over->x,
Draw_Context->Current->modify_over->y,
- layout);
+ layout, Properties->foreground, Properties->background);
Draw_Context->Current->modify_over->x += ink_rect.width;
break;
case MIDDLE:
- gdk_draw_layout(Draw_Context->drawable, Draw_Context->gc,
+ gdk_draw_layout_with_colors(Draw_Context->drawable,
+ Draw_Context->gc,
Draw_Context->Current->modify_middle->x,
Draw_Context->Current->modify_middle->y,
- layout);
+ layout, Properties->foreground, Properties->background);
Draw_Context->Current->modify_middle->x += ink_rect.width;
break;
case UNDER:
- gdk_draw_layout(Draw_Context->drawable, Draw_Context->gc,
+ gdk_draw_layout_with_colors(Draw_Context->drawable,
+ Draw_Context->gc,
Draw_Context->Current->modify_under->x,
Draw_Context->Current->modify_under->y,
- layout);
+ layout, Properties->foreground, Properties->background);
Draw_Context->Current->modify_under->x += ink_rect.width;
break;
}
-
- pango_font_description_set_size(FontDesc, Font_Size);
- g_free(layout);
-
return 0;
}
{
PropertiesLine *Properties = (PropertiesLine*)hook_data;
DrawContext *Draw_Context = (DrawContext*)call_data;
-
- gdk_gc_set_foreground(Draw_Context->gc, Properties->color);
+ //GdkGC *gc = gdk_gc_new(Draw_Context->drawable);
+
+ //gdk_gc_set_foreground(Draw_Context->gc, Properties->color);
+ gdk_gc_set_rgb_fg_color(Draw_Context->gc, Properties->color);
+ //gdk_gc_set_foreground(gc, Properties->color);
gdk_gc_set_line_attributes( Draw_Context->gc,
Properties->line_width,
Properties->style,
break;
}
-
+
+ //gdk_gc_unref(gc);
+
return 0;
}
PropertiesArc *Properties = (PropertiesArc*)hook_data;
DrawContext *Draw_Context = (DrawContext*)call_data;
- gdk_gc_set_foreground(Draw_Context->gc, Properties->color);
+ //gdk_gc_set_foreground(Draw_Context->gc, Properties->color);
+ gdk_gc_set_rgb_fg_color(Draw_Context->gc, Properties->color);
switch(Properties->position) {
case OVER:
Draw_Context->Current->modify_over->y,
Properties->size, Properties->size, 0, 360*64);
Draw_Context->Current->modify_over->x += Properties->size;
-
break;
case MIDDLE:
gdk_draw_arc(Draw_Context->drawable, Draw_Context->gc,
PropertiesBG *Properties = (PropertiesBG*)hook_data;
DrawContext *Draw_Context = (DrawContext*)call_data;
- gdk_gc_set_foreground(Draw_Context->gc, Properties->color);
+ //gdk_gc_set_foreground(Draw_Context->gc, Properties->color);
+ gdk_gc_set_rgb_fg_color(Draw_Context->gc, Properties->color);
gdk_draw_rectangle(Draw_Context->drawable, Draw_Context->gc,