pub struct CanvasGeometryFacts<'a, R = CanvasDefaultEdgeRouter> { /* private fields */ }Implementations§
Source§impl<'a> CanvasGeometryFacts<'a>
impl<'a> CanvasGeometryFacts<'a>
pub fn new(document: &'a CanvasDocument) -> Self
pub fn with_kind_registry( document: &'a CanvasDocument, kind_registry: &'a CanvasKindRegistry, ) -> Self
Source§impl<'a, R> CanvasGeometryFacts<'a, R>where
R: CanvasEdgeRouter,
impl<'a, R> CanvasGeometryFacts<'a, R>where
R: CanvasEdgeRouter,
pub fn with_router(document: &'a CanvasDocument, router: R) -> Self
pub fn with_router_and_kind_registry( document: &'a CanvasDocument, router: R, kind_registry: Option<&'a CanvasKindRegistry>, ) -> Self
pub fn document(&self) -> &'a CanvasDocument
pub fn kind_registry(&self) -> Option<&'a CanvasKindRegistry>
pub fn node_bounds(&self, node: &CanvasNode) -> Bounds<Pixels>
pub fn shape_bounds(&self, shape: &CanvasShape) -> Bounds<Pixels>
pub fn handle_bounds( &self, node: &CanvasNode, handle: &CanvasHandle, ) -> Bounds<Pixels>
pub fn endpoint_position( &self, endpoint: &CanvasEndpoint, ) -> Result<Point<Pixels>, DocumentError>
pub fn edge_route_path( &self, edge: &CanvasEdge, ) -> Result<CanvasRoutePath, DocumentError>
pub fn edge_geometry( &self, edge: &CanvasEdge, ) -> Result<CanvasResolvedEdgeGeometry, DocumentError>
pub fn edge_bounds( &self, edge: &CanvasEdge, ) -> Result<Bounds<Pixels>, DocumentError>
pub fn record_geometry( &self, record_id: &CanvasRecordId, ) -> Option<CanvasRecordGeometry>
pub fn record_geometries(&self) -> Vec<CanvasRecordGeometry>
pub fn selected_record_geometries( &self, selection: &CanvasSelection, ) -> Vec<CanvasRecordGeometry>
pub fn selected_bounds( &self, selection: &CanvasSelection, ) -> Option<Bounds<Pixels>>
pub fn node_shape_bounds_for_records<'b>( &self, record_ids: impl IntoIterator<Item = &'b CanvasRecordId>, ) -> Option<Bounds<Pixels>>
pub fn record_contains_point( &self, record: &HitRecord, point: Point<Pixels>, options: HitOptions, ) -> bool
pub fn record_intersects_bounds( &self, record: &HitRecord, bounds: Bounds<Pixels>, options: HitOptions, ) -> bool
pub fn connection_endpoint_at<'h>( &self, records: impl IntoIterator<Item = &'h HitRecord>, role: CanvasConnectionEndpointRole, ) -> Option<CanvasEndpoint>
pub fn connection_preview_target<'h>( &self, records: impl IntoIterator<Item = &'h HitRecord>, source: Point<Pixels>, _current: Point<Pixels>, ) -> Option<Point<Pixels>>
Trait Implementations§
Source§impl<'a, R: Clone> Clone for CanvasGeometryFacts<'a, R>
impl<'a, R: Clone> Clone for CanvasGeometryFacts<'a, R>
Source§fn clone(&self) -> CanvasGeometryFacts<'a, R>
fn clone(&self) -> CanvasGeometryFacts<'a, R>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a, R: Copy> Copy for CanvasGeometryFacts<'a, R>
Auto Trait Implementations§
impl<'a, R = CanvasDefaultEdgeRouter> !RefUnwindSafe for CanvasGeometryFacts<'a, R>
impl<'a, R = CanvasDefaultEdgeRouter> !UnwindSafe for CanvasGeometryFacts<'a, R>
impl<'a, R> Freeze for CanvasGeometryFacts<'a, R>where
R: Freeze,
impl<'a, R> Send for CanvasGeometryFacts<'a, R>where
R: Send,
impl<'a, R> Sync for CanvasGeometryFacts<'a, R>where
R: Sync,
impl<'a, R> Unpin for CanvasGeometryFacts<'a, R>where
R: Unpin,
impl<'a, R> UnsafeUnpin for CanvasGeometryFacts<'a, R>where
R: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more