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
sourceimpl TextMetrics
impl TextMetrics
fn __assert_parent_type(&self)
sourceimpl 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
sourceimpl DomObject for TextMetrics
impl DomObject for TextMetrics
sourceimpl DomObjectWrap for TextMetrics
impl DomObjectWrap for TextMetrics
sourceconst WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::TextMetricsBinding::TextMetricsBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::textmetrics::TextMetrics>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::textmetrics::TextMetrics>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::TextMetricsBinding::TextMetricsBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::textmetrics::TextMetrics>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::textmetrics::TextMetrics>>}
sourceimpl HasParent for TextMetrics
impl HasParent for TextMetrics
sourceimpl IDLInterface for TextMetrics
impl IDLInterface for TextMetrics
sourceimpl JSTraceable for TextMetrics
impl JSTraceable for TextMetrics
sourceimpl MallocSizeOf for TextMetrics
impl MallocSizeOf for TextMetrics
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
sourceimpl MutDomObject for TextMetrics
impl MutDomObject for TextMetrics
sourceunsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
sourceimpl PartialEq<TextMetrics> for TextMetrics
impl PartialEq<TextMetrics> for TextMetrics
sourcefn eq(&self, other: &TextMetrics) -> bool
fn eq(&self, other: &TextMetrics) -> bool
sourceimpl TextMetricsMethods for TextMetrics
impl TextMetricsMethods for TextMetrics
sourcefn ActualBoundingBoxLeft(&self) -> Finite<f64>
fn ActualBoundingBoxLeft(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxleft
sourcefn ActualBoundingBoxRight(&self) -> Finite<f64>
fn ActualBoundingBoxRight(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxright
sourcefn FontBoundingBoxAscent(&self) -> Finite<f64>
fn FontBoundingBoxAscent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-fontboundingboxascent
sourcefn FontBoundingBoxDescent(&self) -> Finite<f64>
fn FontBoundingBoxDescent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-fontboundingboxascent
sourcefn ActualBoundingBoxAscent(&self) -> Finite<f64>
fn ActualBoundingBoxAscent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxascent
sourcefn ActualBoundingBoxDescent(&self) -> Finite<f64>
fn ActualBoundingBoxDescent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxdescent
sourcefn EmHeightAscent(&self) -> Finite<f64>
fn EmHeightAscent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-emheightascent
sourcefn EmHeightDescent(&self) -> Finite<f64>
fn EmHeightDescent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-emheightdescent
sourcefn HangingBaseline(&self) -> Finite<f64>
fn HangingBaseline(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-hangingbaseline
sourcefn AlphabeticBaseline(&self) -> Finite<f64>
fn AlphabeticBaseline(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-alphabeticbaseline
sourcefn IdeographicBaseline(&self) -> Finite<f64>
fn IdeographicBaseline(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-ideographicbaseline
sourceimpl ToJSValConvertible for TextMetrics
impl ToJSValConvertible for TextMetrics
sourceunsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
self
to a JSVal
. JSAPI failure causes a panic.