sexytopo icon indicating copy to clipboard operation
sexytopo copied to clipboard

Create a cache of the graph view bitmap for use when panning

Open danielworkman opened this issue 3 years ago • 2 comments

At present a full redraw of the graph is always performed when panning the view. It should be possible via the following technique to simply move the already calculated image around the view rather than recalculating the full layout: https://stackoverflow.com/a/13550808

danielworkman avatar May 16 '21 17:05 danielworkman

The way it works at the moment isn't very efficient but I'm not sure if drawing the entire survey to a bitmap is the best approach.

Presumably you'd redraw on changing zoom level or major editing changes. It could be a ginormous bitmap if you zoom in to max detail on a big survey. At the moment there is some calculation done so only things that are potentially onscreen get drawn.

Caching the survey image might be the way forward but needs some thought.

richsmith avatar May 16 '21 20:05 richsmith

Yes this approach would work for panning and panning only. Depends whether that specific area of the app has been sluggish enough to warrant such a targeted fix - I haven't used it enough to know yet

danielworkman avatar May 16 '21 20:05 danielworkman