summaryrefslogtreecommitdiff
path: root/liborcus
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-11-27 17:56:33 +0000
committerNoel Power <noel.power@suse.com>2012-11-28 14:50:25 +0000
commitc4e649f0cd013e86adbd794859bcc3cb9ee3aa61 (patch)
tree41038de6c78c01a15e730d218ea5a61a28de8fdd /liborcus
parent24c0e7ed9971663dfcaf9c4c1182dd6da9df005f (diff)
Sync draw object to calc grid for better alignment when zooming
There can be some serious rounding errors involved when calculating where to draw the grid lines for the various row heights in a document. This can be especially true for a document that has many different row heights. This results in draw objects appearing to move relative to the grid line at different zoom levels. This patch attempts to fix this problem adjusting the position of the shapes as they are drawn to ensure their position relative to grid appears to be stable. We do this by translating the position of the shape to the corrosponding position of it's cell anchor. Of course not all shapes are cell anchored and in this case we position the shape relative a temporary synthesized cell anchor. The patch essentially does the following a) calculates the offset to be applied for each shape at the current zoom level to ensure that the shape will be drawn relative to the correct cell grid see drwlayer.cxx, drawview.cxx & gridwin3.cxx, svdobj.[ch]xx b) apply the offset in the drawing layer for each of the different drawing primitives see svx/source/sdr/contact/* c) making sure the position and size of the newly created shape ( at any zoom level ) are still as expected when zoom level is changed. see. sc/source/ui/drawfunc/fuco*.cxx & d) making sure that overlays and handles are displayed at the correct position see svx/source/svdraw/* it could also be that a full blown transform might be needed to additionally scale the object ( to ensure that the edges of the object stay stable relative to ajacent grid lines ) If necessary we could do that in a later step. Change-Id: I02232f8ba192d58dbf96b80adf66c281cd0f65e8
Diffstat (limited to 'liborcus')
0 files changed, 0 insertions, 0 deletions