graphics: placeholder tiles stretch the image instead of fitting it with its aspect ratio #83

Closed
opened 2026-10-09 21:51:17 +09:00 by natsukium · 0 comments
Owner

placeholder_tile_quad (crates/felis-render-wgpu/src/lib.rs) cuts the image into c×r slices and stretches each slice onto its cell. When the virtual placement's cell box has a different aspect ratio from the image, the image is distorted.

kitty: grman_put_cell_image scales the image uniformly to fit the c×r box and centers it, as the spec says: the image is fit "with its aspect ratio preserved".

Repro: a 200×100 image placed with a=p,U=1,i=1,c=10,r=10 and its placeholder cells printed. kitty draws it at 2:1 inside the box; felis stretches it to the box's full height.

Related: #42 covers the same question for direct placements with only c= or r=.

`placeholder_tile_quad` (`crates/felis-render-wgpu/src/lib.rs`) cuts the image into `c`×`r` slices and stretches each slice onto its cell. When the virtual placement's cell box has a different aspect ratio from the image, the image is distorted. **kitty:** `grman_put_cell_image` scales the image uniformly to fit the `c`×`r` box and centers it, as the spec says: the image is fit "with its aspect ratio preserved". **Repro:** a 200×100 image placed with `a=p,U=1,i=1,c=10,r=10` and its placeholder cells printed. kitty draws it at 2:1 inside the box; felis stretches it to the box's full height. Related: #42 covers the same question for direct placements with only `c=` or `r=`.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis#83
No description provided.