Struct script::dom::textmetrics::TextMetrics
source · #[repr(C)]pub struct TextMetrics {Show 13 fields
reflector_: Reflector,
width: Finite<f64>,
actualBoundingBoxLeft: Finite<f64>,
actualBoundingBoxRight: Finite<f64>,
fontBoundingBoxAscent: Finite<f64>,
fontBoundingBoxDescent: Finite<f64>,
actualBoundingBoxAscent: Finite<f64>,
actualBoundingBoxDescent: Finite<f64>,
emHeightAscent: Finite<f64>,
emHeightDescent: Finite<f64>,
hangingBaseline: Finite<f64>,
alphabeticBaseline: Finite<f64>,
ideographicBaseline: Finite<f64>,
}
Fields§
§reflector_: Reflector
§width: Finite<f64>
§actualBoundingBoxLeft: Finite<f64>
§actualBoundingBoxRight: Finite<f64>
§fontBoundingBoxAscent: Finite<f64>
§fontBoundingBoxDescent: Finite<f64>
§actualBoundingBoxAscent: Finite<f64>
§actualBoundingBoxDescent: Finite<f64>
§emHeightAscent: Finite<f64>
§emHeightDescent: Finite<f64>
§hangingBaseline: Finite<f64>
§alphabeticBaseline: Finite<f64>
§ideographicBaseline: Finite<f64>
Implementations§
source§impl TextMetrics
impl TextMetrics
fn __assert_parent_type(&self)
source§impl TextMetrics
impl TextMetrics
fn new_inherited( width: f64, actualBoundingBoxLeft: f64, actualBoundingBoxRight: f64, fontBoundingBoxAscent: f64, fontBoundingBoxDescent: f64, actualBoundingBoxAscent: f64, actualBoundingBoxDescent: f64, emHeightAscent: f64, emHeightDescent: f64, hangingBaseline: f64, alphabeticBaseline: f64, ideographicBaseline: f64, ) -> TextMetrics
pub fn new( global: &GlobalScope, width: f64, actualBoundingBoxLeft: f64, actualBoundingBoxRight: f64, fontBoundingBoxAscent: f64, fontBoundingBoxDescent: f64, actualBoundingBoxAscent: f64, actualBoundingBoxDescent: f64, emHeightAscent: f64, emHeightDescent: f64, hangingBaseline: f64, alphabeticBaseline: f64, ideographicBaseline: f64, ) -> Root<Dom<TextMetrics>>
Trait Implementations§
source§impl DomObject for TextMetrics
impl DomObject for TextMetrics
source§impl DomObjectWrap for TextMetrics
impl DomObjectWrap for TextMetrics
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::TextMetricsBinding::TextMetrics_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::textmetrics::TextMetrics>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::textmetrics::TextMetrics>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::TextMetricsBinding::TextMetrics_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::textmetrics::TextMetrics>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::textmetrics::TextMetrics>>}
Function pointer to the general wrap function type
source§impl HasParent for TextMetrics
impl HasParent for TextMetrics
source§impl IDLInterface for TextMetrics
impl IDLInterface for TextMetrics
source§impl MallocSizeOf for TextMetrics
impl MallocSizeOf for TextMetrics
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for TextMetrics
impl MutDomObject for TextMetrics
source§impl PartialEq for TextMetrics
impl PartialEq for TextMetrics
source§impl TextMetricsMethods for TextMetrics
impl TextMetricsMethods for TextMetrics
source§fn ActualBoundingBoxLeft(&self) -> Finite<f64>
fn ActualBoundingBoxLeft(&self) -> Finite<f64>
source§fn ActualBoundingBoxRight(&self) -> Finite<f64>
fn ActualBoundingBoxRight(&self) -> Finite<f64>
source§fn FontBoundingBoxAscent(&self) -> Finite<f64>
fn FontBoundingBoxAscent(&self) -> Finite<f64>
source§fn FontBoundingBoxDescent(&self) -> Finite<f64>
fn FontBoundingBoxDescent(&self) -> Finite<f64>
source§fn ActualBoundingBoxAscent(&self) -> Finite<f64>
fn ActualBoundingBoxAscent(&self) -> Finite<f64>
source§fn ActualBoundingBoxDescent(&self) -> Finite<f64>
fn ActualBoundingBoxDescent(&self) -> Finite<f64>
source§fn EmHeightAscent(&self) -> Finite<f64>
fn EmHeightAscent(&self) -> Finite<f64>
source§fn EmHeightDescent(&self) -> Finite<f64>
fn EmHeightDescent(&self) -> Finite<f64>
source§fn HangingBaseline(&self) -> Finite<f64>
fn HangingBaseline(&self) -> Finite<f64>
source§fn AlphabeticBaseline(&self) -> Finite<f64>
fn AlphabeticBaseline(&self) -> Finite<f64>
source§impl ToJSValConvertible for TextMetrics
impl ToJSValConvertible for TextMetrics
source§impl Traceable for TextMetrics
impl Traceable for TextMetrics
impl Eq for TextMetrics
Auto Trait Implementations§
impl !Freeze for TextMetrics
impl !RefUnwindSafe for TextMetrics
impl !Send for TextMetrics
impl !Sync for TextMetrics
impl Unpin for TextMetrics
impl UnwindSafe for TextMetrics
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert