* Author : Mathieu Desnoyers, October 2003
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <lttv/tracecontext.h>
#include <lttv/state.h>
+#include <lttv/lttv.h>
+#include "drawing.h"
#include "drawitem.h"
PangoContext *context;
PangoLayout *layout;
- PangoAttribute *attribute;
PangoFontDescription *font_desc;// = pango_font_description_new();
- gint font_size;
PangoRectangle ink_rect;
layout = draw_context->pango_layout;
break;
}
/* verify if there is enough space to draw */
- if(x + width <= draw_context->drawinfo.end.x) {
+ if(unlikely(x + width <= draw_context->drawinfo.end.x)) {
enough_space = TRUE;
*offset += width;
}
break;
}
/* verify if there is enough space to draw */
- if(x - width >= draw_context->drawinfo.start.x) {
+ if(unlikely(x - width >= draw_context->drawinfo.start.x)) {
enough_space = TRUE;
*offset -= width;
}
break;
}
- if(enough_space)
+ if(unlikely(enough_space))
gdk_draw_layout_with_colors(draw_context->drawable,
draw_context->gc,
x,
g_assert(lttv_iattribute_find_by_path(attributes, icon_name,
LTTV_POINTER, &value));
- if(*(value.v_pointer) == NULL)
+ if(unlikely(*(value.v_pointer) == NULL))
{
*(value.v_pointer) = icon_info = g_new(IconStruct,1);
break;
}
/* verify if there is enough space to draw */
- if(x + width <= draw_context->drawinfo.end.x) {
+ if(unlikely(x + width <= draw_context->drawinfo.end.x)) {
enough_space = TRUE;
*offset += width;
}
break;
}
/* verify if there is enough space to draw */
- if(x - width >= draw_context->drawinfo.start.x) {
+ if(unlikely(x - width >= draw_context->drawinfo.start.x)) {
enough_space = TRUE;
*offset -= width;
}
break;
}
- if(enough_space) {
+ if(unlikely(enough_space)) {
gdk_gc_set_clip_mask(draw_context->gc, icon_info->mask);
gdk_gc_set_clip_origin(
PropertiesLine *properties = (PropertiesLine*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
- //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_foreground(draw_context->gc, &properties->color);
+ //gdk_gc_set_rgb_fg_color(draw_context->gc, &properties->color);
gdk_gc_set_line_attributes( draw_context->gc,
properties->line_width,
properties->style,
PropertiesArc *properties = (PropertiesArc*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
- //gdk_gc_set_foreground(draw_context->gc, properties->color);
- gdk_gc_set_rgb_fg_color(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);
gint x=0, y=0;
gint *offset=NULL;
break;
}
/* verify if there is enough space to draw */
- if(x + width <= draw_context->drawinfo.end.x) {
+ if(unlikely(x + width <= draw_context->drawinfo.end.x)) {
enough_space = TRUE;
*offset += width;
}
break;
}
/* verify if there is enough space to draw */
- if(x - width >= draw_context->drawinfo.start.x) {
+ if(unlikely(x - width >= draw_context->drawinfo.start.x)) {
enough_space = TRUE;
*offset -= width;
}
break;
}
- if(enough_space)
+ if(unlikely(enough_space))
gdk_draw_arc(draw_context->drawable, draw_context->gc,
properties->filled,
x,
PropertiesBG *properties = (PropertiesBG*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
- //gdk_gc_set_foreground(draw_context->gc, properties->color);
- gdk_gc_set_rgb_fg_color(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);
//g_critical("DRAWING RECT : x: %i, y: %i, w:%i, h:%i, val1 :%i, val2:%i ",
// draw_context->previous->over->x,