pub struct SymbolicText { /* private fields */ }Expand description
A 2D text annotation (IfcTextLiteral / IfcTextLiteralWithExtent).
Position is in the same 2D coordinate space as SymbolicPolyline (i.e. the
floor-plan / annotation overlay’s local frame after applying placement +
RTC). The text-orientation pair (cos, sin) rotates the baseline from the
+x axis. Height is the IFC font height in model units, scaled by the
project’s length-unit factor so the renderer can convert directly to world
units. Alignment is the IFC BoxAlignment string verbatim
(top-left, center, bottom-right, …) — the renderer can interpret it.
Implementations§
Source§impl SymbolicText
impl SymbolicText
pub fn express_id(&self) -> u32
pub fn ifc_type(&self) -> String
pub fn x(&self) -> f32
pub fn y(&self) -> f32
pub fn dir_x(&self) -> f32
pub fn dir_y(&self) -> f32
pub fn height(&self) -> f32
pub fn content(&self) -> String
pub fn alignment(&self) -> String
pub fn world_y(&self) -> f32
pub fn color_r(&self) -> f32
pub fn color_g(&self) -> f32
pub fn color_b(&self) -> f32
pub fn color_a(&self) -> f32
pub fn target_px(&self) -> f32
pub fn rep_identifier(&self) -> String
Source§impl SymbolicText
impl SymbolicText
pub fn new( express_id: u32, ifc_type: String, x: f32, y: f32, dir_x: f32, dir_y: f32, height: f32, content: String, alignment: String, world_y: f32, rep_identifier: String, ) -> Self
Sourcepub fn new_styled(
express_id: u32,
ifc_type: String,
x: f32,
y: f32,
dir_x: f32,
dir_y: f32,
height: f32,
content: String,
alignment: String,
world_y: f32,
rgba: [f32; 4],
target_px: f32,
rep_identifier: String,
) -> Self
pub fn new_styled( express_id: u32, ifc_type: String, x: f32, y: f32, dir_x: f32, dir_y: f32, height: f32, content: String, alignment: String, world_y: f32, rgba: [f32; 4], target_px: f32, rep_identifier: String, ) -> Self
Full constructor with per-instance colour + screen-pixel target. Used by the grid bubble emission (white fill / black outline) and by future IfcTextStyle resolution.
Trait Implementations§
Source§impl From<SymbolicText> for JsValue
impl From<SymbolicText> for JsValue
Source§fn from(value: SymbolicText) -> Self
fn from(value: SymbolicText) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for SymbolicText
impl FromWasmAbi for SymbolicText
Source§impl IntoWasmAbi for SymbolicText
impl IntoWasmAbi for SymbolicText
Source§impl LongRefFromWasmAbi for SymbolicText
impl LongRefFromWasmAbi for SymbolicText
Source§type Abi = WasmPtr<WasmRefCell<SymbolicText>>
type Abi = WasmPtr<WasmRefCell<SymbolicText>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<SymbolicText>
type Anchor = RcRef<SymbolicText>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for SymbolicText
impl OptionFromWasmAbi for SymbolicText
Source§impl OptionIntoWasmAbi for SymbolicText
impl OptionIntoWasmAbi for SymbolicText
Source§impl RefFromWasmAbi for SymbolicText
impl RefFromWasmAbi for SymbolicText
Source§type Abi = WasmPtr<WasmRefCell<SymbolicText>>
type Abi = WasmPtr<WasmRefCell<SymbolicText>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<SymbolicText>
type Anchor = RcRef<SymbolicText>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for SymbolicText
impl RefMutFromWasmAbi for SymbolicText
Source§type Abi = WasmPtr<WasmRefCell<SymbolicText>>
type Abi = WasmPtr<WasmRefCell<SymbolicText>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<SymbolicText>
type Anchor = RcRefMut<SymbolicText>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for SymbolicText
impl TryFromJsValue for SymbolicText
Source§impl VectorFromWasmAbi for SymbolicText
impl VectorFromWasmAbi for SymbolicText
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[SymbolicText]>
Source§impl VectorIntoWasmAbi for SymbolicText
impl VectorIntoWasmAbi for SymbolicText
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[SymbolicText]>) -> Self::Abi
Source§impl WasmDescribeVector for SymbolicText
impl WasmDescribeVector for SymbolicText
impl SupportsConstructor for SymbolicText
impl SupportsInstanceProperty for SymbolicText
impl SupportsStaticProperty for SymbolicText
Auto Trait Implementations§
impl Freeze for SymbolicText
impl RefUnwindSafe for SymbolicText
impl Send for SymbolicText
impl Sync for SymbolicText
impl Unpin for SymbolicText
impl UnwindSafe for SymbolicText
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.