GraphiteEditor / GraphiteEditor/Graphite

Show selection bounding box width/height in the X/Y rulers

Abierto
#1,969 3 comentarios 2 reacciones 1 asignado Reclamado por @Keavon Ver en GitHub
Good First Issue Web
Lenguaje dominante
Rust
Estrellas
27.2k
Forks
1.3k
Merge medio
20 h 5 min
PR fusionados (30 d)
57

Descripción

See the picture below with the lines running within the X and Y rulers, connected by a 5x5 px blue hollow square on either end. In the middle (in this particular example image) is the 5x5 px yellow hollow circle for the current position of the origin point.

![capture](https://github.com/user-attachments/assets/aaff557d-55a7-4800-993b-12bb5877b842)

There are two modes, and the picture above shows projected mode. To switch between modes, the user can click the icon in the top left where both rulers meet. This will eventually open a ruler options popover menu, but if that's not built yet, the icon can be used to just directly toggle the two modes.

## Projected mode

The bounding box and the origin point are both projected onto the rulers from the bounding box of the transform cage. The endpoints are draggable to resize the selection, equivalent to resizing the corresponding edge of the bounding box. The line itself is draggable, which slides the selection as if the user was dragging both endpoints simultaneously, thus sliding along the local transform (keeping the selection bounding box endpoints/line unchanged on the opposite axis's ruler), equivalent to dragging the transform cage's center "compass" dial (red) X axis arrow or (green) Y axis arrow. Dragging the yellow origin point circle moves along the local axis of the layer, keeping its position on the opposite axis's ruler unchanged.

## Axis-aligned mode
Instead of the transform cage and origin point projecting along the local coordinates of the layer, they instead project the axis-aligned bounding box of the transform cage. If it's tilted, dragging the line endpoints will cause it to skew, as if the user used the S key to scale it along the canvas space coordinates. If the viewport is tilted (Alt-middle click drag), the projection of the selection transform cage's AABB no longer reaches the rulers at a perpendicular angle anymore. This situation would relate to #1482. (Viewport tilting also similarly affects projected mode.) The goal would be to ensure that the actual coordinates are correctly represented by the line endpoints and origin point when they reach the ruler, even if the whole view of the canvas is tilted.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.