You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix register_positions_projected! not updating when float32convert changes (#5485)
* Fix register_positions_projected! not updating when float32convert changes
When projecting from a non-data space (e.g. :relative, :pixel) to a data
space, the camera matrices give f32c-scaled coordinates because the camera
projection is set up in f32c space. To get actual data coordinates, we
need to apply the inverse of float32convert to the output positions.
This fix:
- Detects when we're projecting from non-data space to data space
- Adds :f32c as a dependency so output updates when float32convert changes
- Applies inv(f32c) to convert f32c-scaled coordinates to data coordinates
Note: This does not yet handle transform_func for these projections.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add complete inverse transformation support to register_projected_positions!
- Add apply_inverse_transform, apply_inverse_transform_func, apply_inverse_float32convert, and apply_inverse_model kwargs
- These enable correct projection from non-data spaces back to data space
- Add early-exit optimization to skip redundant transform/inverse pairs when input_space === output_space
- Add apply_inverse_model_to_positions helper function
- Update docstring with new kwargs
- Add tests for inverse transform_func
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Run runic formatter
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Runic weirdness
* move inverse model to projections, cleanup decisions, simplify inverse transform
* use Mat4d, pick model based on f32c, tweak defaults
* refactor inverse float32convert to apply as matrix, fixing inverse f32c with non identity model matrix
* fix tests
* fix format
* fix CairoMakie
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: ffreyer <frederic481994@hotmail.de>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## Unreleased
4
4
5
+
- Added complete inverse transformation support to `register_projected_positions!` with `apply_inverse_transform`, `apply_inverse_transform_func`, `apply_inverse_float32convert`, and `apply_inverse_model` kwargs. These enable correct projection from non-data spaces back to data space. Includes early-exit optimization to skip redundant transform/inverse pairs when `input_space === output_space`. [#5485](https://github.com/MakieOrg/Makie.jl/pull/5485)
5
6
- Fixed `bracket` not supporting `LaTeXString` text, which would render with dollar signs instead of mathematical notation [#5536](https://github.com/MakieOrg/Makie.jl/pull/5536)
6
7
- Added text glow to CairoMakie [#5542](https://github.com/MakieOrg/Makie.jl/pull/5542)
7
8
- Allow to set low or high bound of the colorrange and let the other side stay adaptive [#5555](https://github.com/MakieOrg/Makie.jl/pull/5555)
@@ -16,13 +16,33 @@ to allow clip space clipping to happen elsewhere.)
16
16
- `output_space = :pixel` sets the output space. Can be `:space` or `:markerspace` to refer to those plot attributes or any static space like `:pixel`.
17
17
- `input_name = :positions` sets the source positions which will be projected.
18
18
- `output_name = Symbol(output_space, :_, input_name)` sets the name of the projected positions.
19
-
- `apply_transform = input_space === :space` controls whether transformations and float32convert are applied.
19
+
- `apply_transform = input_space === :space` controls whether forward transformations and float32convert are applied.
20
20
- `apply_transform_func = apply_transform` controls whether `transform_func` is applied.
21
-
- `apply_float32convert = apply_transform` controls whether `float32convert` is applied.
- `apply_model = apply_transform` controls whether the `model` matrix is applied.
23
23
- `apply_clip_planes = false` controls whether points clipped by `clip_planes` are replaced by NaN. (Does not consider clip space clipping. Only applies if `is_data_space(input_space)`.)
24
+
- `apply_inverse_transform = output_space === :space && !apply_transform` controls whether inverse transformations are applied when projecting to data space.
25
+
- `apply_inverse_transform_func = apply_inverse_transform` controls whether inverse `transform_func` is applied.
26
+
- `apply_inverse_float32convert = apply_inverse_transform` controls whether inverse `float32convert` is applied.
0 commit comments