-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* draw order for images and points * python api for draw order on lines & rects. improved api demo * py formatting & linting
- Loading branch information
Showing
11 changed files
with
168 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from __future__ import annotations | ||
|
||
import pyarrow as pa | ||
|
||
from rerun.components import REGISTERED_COMPONENT_NAMES, ComponentTypeFactory | ||
|
||
__all__ = [ | ||
"DrawOrderArray", | ||
"DrawOrder", | ||
] | ||
|
||
|
||
class DrawOrderArray(pa.ExtensionArray): # type: ignore[misc] | ||
def splat(draw_order: float) -> DrawOrderArray: # type: ignore[misc] | ||
storage = pa.array([draw_order], type=DrawOrder.storage_type) | ||
return storage # type: ignore[no-any-return] | ||
|
||
|
||
DrawOrder = ComponentTypeFactory("DrawOrder", DrawOrderArray, REGISTERED_COMPONENT_NAMES["rerun.draw_order"]) | ||
|
||
pa.register_extension_type(DrawOrder()) |
This file contains 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
This file contains 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
Oops, something went wrong.