drawing arc and background color
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 4 Jan 2004 20:05:45 +0000 (20:05 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 4 Jan 2004 20:05:45 +0000 (20:05 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@351 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c
ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c

index 4f6ce62a4f90732ca421f10c5d89e5e04af9b934..0aa74529b905e4829a1f429b1ac073a67614973c 100644 (file)
@@ -6,6 +6,11 @@
 
 #include <lttv/processTrace.h>
 
+
+#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+
+
 /*****************************************************************************
  *                              Drawing functions                            *
  *****************************************************************************/
@@ -288,6 +293,7 @@ void drawing_refresh (      Drawing_t *Drawing,
                        guint x, guint y,
                        guint width, guint height)
 {
+       g_info("Drawing.c : drawing_refresh %u, %u, %u, %u", x, y, width, height);
        GdkRectangle update_rect;
 
        gdk_draw_drawable(
index 9dc103a80330c23033f6d373dadfe641fbdbb87e..785c73e42f36b84f2c48c4b67445574433a089a6 100644 (file)
@@ -46,6 +46,9 @@ void send_test_drawing(ProcessList *Process_List,
        GdkPixmap *icon_pixmap = g_new(GdkPixmap, 1);
        GdkGC * gc = gdk_gc_new(Pixmap);
        
+       // rectangle
+       GdkColor color = { 0, 0xffff, 0x0000, 0x0000 };
+       
        /* Sent text data */
        layout = gtk_widget_create_pango_layout(Drawing->Drawing_Area_V,
                        NULL);
@@ -106,10 +109,11 @@ void send_test_drawing(ProcessList *Process_List,
        
        g_free(icon_pixmap);
        g_free(mask);
-       g_free(gc);
 
        g_info("y : %u, height : %u", y, height);
 
+       
+
        birth.tv_sec = 12000;
        birth.tv_nsec = 55700;
 
@@ -118,13 +122,24 @@ void send_test_drawing(ProcessList *Process_List,
                                        &birth,
                                        &y,
                                        &height);
-       
+
+       /* Draw rectangle (background color) */
+       gdk_gc_copy(gc, Drawing->Drawing_Area_V->style->black_gc);
+       gdk_gc_set_rgb_fg_color(gc, &color);
+       gdk_draw_rectangle(Pixmap, gc,
+                                       TRUE,
+                                       x, y, width, height);
 
        drawing_draw_line(
                Drawing, Pixmap, x,
                y+(height/2), x + width, y+(height/2),
                Drawing->Drawing_Area_V->style->black_gc);
 
+       
+       /* Draw arc */
+       gdk_draw_arc(Pixmap, Drawing->Drawing_Area_V->style->black_gc,
+                                                       TRUE, 100, y, 5, 5, 0, 360*64);
+
        g_info("y : %u, height : %u", y, height);
 
        for(i=0; i<10; i++)
@@ -167,6 +182,7 @@ void send_test_drawing(ProcessList *Process_List,
 
 
        pango_font_description_set_size(FontDesc, Font_Size);
+       g_free(gc);
        g_free(layout);
        //g_free(context);
 }
@@ -434,7 +450,7 @@ void update_time_window_hook(void *hook_data, void *call_data)
                        Time_Window->time_width.tv_sec,
                        Time_Window->time_width.tv_nsec);
 
-       drawing_data_request(Control_Flow_Data->Drawing,
+  drawing_data_request(Control_Flow_Data->Drawing,
                        &Control_Flow_Data->Drawing->Pixmap,
                        0, 0,
                        Control_Flow_Data->Drawing->width,
This page took 0.025884 seconds and 4 git commands to generate.