Repository navigation
add ruler extents - #1095
Open
FlynnOConnell wants to merge 3 commits into
Open
add ruler extents#1095FlynnOConnell wants to merge 3 commits into
FlynnOConnell wants to merge 3 commits into
Conversation
|
📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/fo/subclass-ruler |
kushalkolar
reviewed
Sep 27, 2026
Comment on lines
+760
to
+772
| # clamp to the extent, an extent outside the bbox collapses the ruler to the nearer end | ||
| lo, hi = self.x.extent | ||
| world_xmin = min(max(world_xmin, lo + self.offset[0]), world_xmax) | ||
| world_xmax = max(min(world_xmax, hi + self.offset[0]), world_xmin) | ||
|
|
||
| lo, hi = self.y.extent | ||
| world_ymin = min(max(world_ymin, lo + self.offset[1]), world_ymax) | ||
| world_ymax = max(min(world_ymax, hi + self.offset[1]), world_ymin) | ||
|
|
||
| lo, hi = self.z.extent | ||
| world_zmin = min(max(world_zmin, lo + self.offset[2]), world_zmax) | ||
| world_zmax = max(min(world_zmax, hi + self.offset[2]), world_zmin) | ||
|
|
Member
There was a problem hiding this comment.
This is one of the hottest paths in fastplotlib so benchmarks will be necessary (imgui fps monitor with some examples is fine)
Also see this, I had some ideas on doing faster calculations here: #1053
Member
|
This looks like a good start! But for review I will need:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adding extents to ruler subclass