raygeo.sketch.snap.engine
SnapEngine
enabled
enabled: bool
threshold
threshold: float
clear_producers()
clear_producers() -> None
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
get_visible_snap_lines()
get_visible_snap_lines(
registry: Any,
position: tuple[float, float],
drag_context: Optional[Any] = None,
) -> list[types.SnapLine]
| Parameter | Type | Description |
|---|---|---|
registry | Any | |
position | tuple[float, float] | |
drag_context | Optional[Any] = None | |
| Returns | list[types.SnapLine] |
invalidate_index()
invalidate_index() -> None
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
is_snap_result_current()
is_snap_result_current(registry: Any) -> bool
| Parameter | Type | Description |
|---|---|---|
registry | Any | |
| Returns | bool |
query()
query(
registry: Any,
position: tuple[float, float],
drag_context: Optional[Any] = None,
) -> types.SnapResult
| Parameter | Type | Description |
|---|---|---|
registry | Any | |
position | tuple[float, float] | |
drag_context | Optional[Any] = None | |
| Returns | types.SnapResult |
rebuild_index()
rebuild_index(
registry: Any,
drag_position: tuple[float, float],
drag_context: Any,
) -> None
| Parameter | Type | Description |
|---|---|---|
registry | Any | |
drag_position | tuple[float, float] | |
drag_context | Any | |
| Returns | None |
register_producer()
register_producer(producer: Any) -> None
| Parameter | Type | Description |
|---|---|---|
producer | Any | |
| Returns | None |
unregister_producer()
unregister_producer(producer: Any) -> None
| Parameter | Type | Description |
|---|---|---|
producer | Any | |
| Returns | None |
SnapLineProducer
produce()
produce(
_registry: Any,
_drag_position: tuple[float, float],
_drag_context: Any,
_threshold: float,
) -> list[types.SnapLine]
| Parameter | Type | Description |
|---|---|---|
_registry | Any | |
_drag_position | tuple[float, float] | |
_drag_context | Any | |
_threshold | float | |
| Returns | list[types.SnapLine] |
produce_points()
produce_points(
_registry: Any,
_drag_position: tuple[float, float],
_drag_context: Any,
_threshold: float,
) -> list[types.SnapPoint]
| Parameter | Type | Description |
|---|---|---|
_registry | Any | |
_drag_position | tuple[float, float] | |
_drag_context | Any | |
_threshold | float | |
| Returns | list[types.SnapPoint] |
Functions
geometry_key()
geometry_key(
registry: Any,
drag_context: Optional[Any] = None,
include_construction: bool = True,
include_points: bool = True,
) -> Any
Stable identity of the geometry a snap index depends on.
| Parameter | Type | Description |
|---|---|---|
registry | Any | |
drag_context | Optional[Any] = None | |
include_construction | bool = True | |
include_points | bool = True | |
| Returns | Any |