Skip to content

Commit

Permalink
redraw the whole image in icicle mode because the text bbox is malformed
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 23, 2022
1 parent 7d4c8c4 commit 345a9a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ProfileView.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ function viewprof_func(fcolor, c, g, fontsize, zoom_buttons, graphtype)
if Graphics.width(lasttextbb[]) > 0
r = zr[]
set_coordinates(ctx, device_bb(ctx), BoundingBox(r.currentview))
rectangle(ctx, lasttextbb[])
# The bbox returned by deform/Cairo.text below is malformed when the y-axis is inverted
# so redraw the whole screen in :icicle mode
# TODO: Fix the bbox for efficient redraw
rectangle(ctx, graphtype == :icicle ? BoundingBox(r.currentview) : lasttextbb[])
set_source(ctx, surf)
p = Cairo.get_source(ctx)
Cairo.pattern_set_filter(p, Cairo.FILTER_NEAREST)
Expand Down

0 comments on commit 345a9a0

Please sign in to comment.