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>) -> 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>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::textmetrics::TextMetrics>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> 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>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::textmetrics::TextMetrics>>}
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
source§impl MutDomObject for TextMetrics
impl MutDomObject for TextMetrics
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
source§impl PartialEq<TextMetrics> for TextMetrics
impl PartialEq<TextMetrics> for TextMetrics
source§fn eq(&self, other: &TextMetrics) -> bool
fn eq(&self, other: &TextMetrics) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TextMetricsMethods for TextMetrics
impl TextMetricsMethods for TextMetrics
source§fn ActualBoundingBoxLeft(&self) -> Finite<f64>
fn ActualBoundingBoxLeft(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxleft
source§fn ActualBoundingBoxRight(&self) -> Finite<f64>
fn ActualBoundingBoxRight(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxright
source§fn FontBoundingBoxAscent(&self) -> Finite<f64>
fn FontBoundingBoxAscent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-fontboundingboxascent
source§fn FontBoundingBoxDescent(&self) -> Finite<f64>
fn FontBoundingBoxDescent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-fontboundingboxascent
source§fn ActualBoundingBoxAscent(&self) -> Finite<f64>
fn ActualBoundingBoxAscent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxascent
source§fn ActualBoundingBoxDescent(&self) -> Finite<f64>
fn ActualBoundingBoxDescent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-actualboundingboxdescent
source§fn EmHeightAscent(&self) -> Finite<f64>
fn EmHeightAscent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-emheightascent
source§fn EmHeightDescent(&self) -> Finite<f64>
fn EmHeightDescent(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-emheightdescent
source§fn HangingBaseline(&self) -> Finite<f64>
fn HangingBaseline(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-hangingbaseline
source§fn AlphabeticBaseline(&self) -> Finite<f64>
fn AlphabeticBaseline(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-alphabeticbaseline
source§fn IdeographicBaseline(&self) -> Finite<f64>
fn IdeographicBaseline(&self) -> Finite<f64>
https://html.spec.whatwg.org/multipage/#dom-textmetrics-ideographicbaseline