Desktop: Add support for UI scaling (#3310)

* desktop support ui scaling

* fix some warnings

* use browser zoom if needed

* fix infinite footprint size

* fix web canvas scale

* always set zoom

* use only zoom for scaling

* prevent user zoom

* remove mouse position scaling
This commit is contained in:
Timon
2025-11-08 11:32:04 +00:00
committed by GitHub
parent 7254c470ef
commit f02f834097
25 changed files with 286 additions and 162 deletions

View File

@@ -168,11 +168,14 @@ pub enum RenderOutputType {
pub struct RenderParams {
pub render_mode: RenderMode,
pub footprint: Footprint,
/// Ratio of physical pixels to logical pixels. `scale := physical_pixels / logical_pixels`
/// Ignored when rendering to SVG.
pub scale: f64,
pub render_output_type: RenderOutputType,
pub thumbnail: bool,
/// Don't render the rectangle for an artboard to allow exporting with a transparent background.
pub hide_artboards: bool,
/// Are we exporting as a standalone SVG?
/// Are we exporting
pub for_export: bool,
/// Are we generating a mask in this render pass? Used to see if fill should be multiplied with alpha.
pub for_mask: bool,