mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-27 03:06:57 -06:00
A Drop Shadow, Gaussian Blur, Feather or Photoshop-style filter raster too large to keep whole is cropped to the view. It was drawn again only while a later frame's rect, panned back, lay inside the frame it was made in, so every pan that showed new pixels made it again. For a Drop Shadow on a 6000 x 4000 pt image in a 2560 x 1440 view at 100% to 400%, a pan took 60 to 84 ms; with Gaussian Blur or Feather, a pan took 158 to 217 ms. When such a raster is made again at the zoom and rotation of the one kept for the object, it now also covers a margin around the view: up to half the view's longer side, while the raster stays within the 8.4 million pixel budget at full size (441 pixels on each side of a 2560 x 1440 view for a 20 pt blur at 100%). Later pans that keep the view inside the margin draw that raster. The first frame at a zoom, a zoom step and the frames of a drag make the raster without the margin, as before. A shadow made over an earlier cropped shadow covers only the rect the earlier one was made for. A kept raster is drawn again only after a pan by whole device pixels, but the wheel, a trackpad and the scroll bars scrolled the view by amounts that are not whole pixels. The canvas now moves the view by whole device pixels when it scrolls or is dragged. A scroll by the wheel, a trackpad, a touch screen or a scroll bar is rounded, and the part of a pixel left over is added to the next scroll of the same view; it is dropped after a zoom, a turn, Fit or a document switch. A Hand tool, Space or middle-button drag and a scroll bar thumb drag round the distance from where the drag began. The silhouette of a shadow or glow raster is now drawn with art culled against the raster's own area instead of the view, as filtered content already is. Before, a group member outside the view cast no shadow into a raster kept whole, so a pan that showed the member drew it without its shadow. A cropped raster kept across the margin would have done the same. The moved silhouette that a drag compares is drawn the same way. Docs: docs/target-app-parity.md.