html2canvas icon indicating copy to clipboard operation
html2canvas copied to clipboard

fix: the rendering order of transform and clip effects

Open Zeahan opened this issue 4 years ago • 3 comments

Rendering clip effects before rendering transform effects would lead to a wrong clip area.

Test plan (required)

reftest-diff

Closing issues

Fixes #2825

Zeahan avatar Feb 11 '22 10:02 Zeahan

Can you elaborate? I don't understand the issue clearly.

Sharcoux avatar Aug 31 '23 02:08 Sharcoux

Can you elaborate? I don't understand the issue clearly.

Please refer the demo(https://codepen.io/zeahan/pen/Vwrpdwm) in https://github.com/niklasvh/html2canvas/issues/2825. This demo shows the difference between the original HTML and the canvas rendered, whitch is a problem caused by the incorrect order of applying transform effect and clip effect. This diagram shows the detailed reason: result-caused-by-different-render-order

Zeahan avatar Aug 31 '23 03:08 Zeahan

Ok. I merged. Can be tested in @cantoo/html2canvas

Sharcoux avatar Aug 31 '23 03:08 Sharcoux