diff options
Diffstat (limited to 'src/gtkext/gtkgraphview.c')
-rw-r--r-- | src/gtkext/gtkgraphview.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c index 6aedf26..aeb66ae 100644 --- a/src/gtkext/gtkgraphview.c +++ b/src/gtkext/gtkgraphview.c @@ -89,7 +89,7 @@ static bool gtk_graph_view_get_address_coordinates(const GtkGraphView *, vmpa_t, static void gtk_graph_view_scroll(GtkGraphView *); /* Place en cache un rendu destiné à l'aperçu graphique rapide. */ -static void gtk_graph_view_cache_glance(GtkGraphView *, cairo_t *); +static void gtk_graph_view_cache_glance(GtkGraphView *, cairo_t *, const GtkAllocation *, double); /* Supprime tout contenu de l'afficheur de code en graphique. */ static void gtk_graph_view_reset(GtkGraphView *); @@ -490,6 +490,8 @@ static void gtk_graph_view_scroll(GtkGraphView *view) * * * Paramètres : view = composant GTK à manipuler. * * cairo = assistant pour la création de rendus. * +* area = taille de la surface réduite à disposition. * +* scale = échelle vis à vis de la taille réelle. * * * * Description : Place en cache un rendu destiné à l'aperçu graphique rapide. * * * @@ -499,25 +501,24 @@ static void gtk_graph_view_scroll(GtkGraphView *view) * * ******************************************************************************/ -static void gtk_graph_view_cache_glance(GtkGraphView *view, cairo_t *cairo) +static void gtk_graph_view_cache_glance(GtkGraphView *view, cairo_t *cairo, const GtkAllocation *area, double scale) { size_t i; /* Boucle de parcours */ - GtkAllocation *alloc; /* Emplacement d'un bloc */ - - cairo_set_line_width(cairo, 2); - cairo_set_source_rgb(cairo, 0, 0, 0); + GtkAllocation sub_area; /* Emplacement réservé */ for (i = 0; i < view->children_count; i++) { - alloc = &view->allocs[i]; - - cairo_rectangle(cairo, alloc->x, alloc->y, - alloc->width, alloc->height); + sub_area.x = view->allocs[i].x * scale; + sub_area.y = view->allocs[i].y * scale; + sub_area.width = view->allocs[i].width * scale + 1; + sub_area.height = view->allocs[i].height * scale + 1; - cairo_stroke(cairo); + gtk_view_panel_cache_glance(view->children[i], cairo, &sub_area, scale); } + cairo_scale(cairo, scale, scale); + for (i = 0; i < view->links_count; i++) _gtk_link_renderer_draw(view->links[i], cairo, false); |