pub struct TextRunPrimitive {
    pub used_font: FontInstance,
    pub glyph_keys_range: Range<GlyphKey>,
    pub reference_frame_relative_offset: LayoutVector2D,
    pub snapped_reference_frame_relative_offset: LayoutVector2D,
    pub shadow: bool,
    pub raster_scale: f32,
    pub requested_raster_space: RasterSpace,
}Fields§
§used_font: FontInstance§glyph_keys_range: Range<GlyphKey>§reference_frame_relative_offset: LayoutVector2D§snapped_reference_frame_relative_offset: LayoutVector2D§shadow: bool§raster_scale: f32§requested_raster_space: RasterSpaceImplementations§
Source§impl TextRunPrimitive
 
impl TextRunPrimitive
pub fn update_font_instance( &mut self, specified_font: &FontInstance, surface: &SurfaceInfo, spatial_node_index: SpatialNodeIndex, transform: &LayoutToWorldTransform, allow_subpixel: bool, raster_space: RasterSpace, spatial_tree: &SpatialTree, ) -> bool
Sourcefn get_raster_space_for_prim(
    &self,
    prim_spatial_node_index: SpatialNodeIndex,
    low_quality_pinch_zoom: bool,
    device_pixel_scale: DevicePixelScale,
    spatial_tree: &SpatialTree,
) -> RasterSpace
 
fn get_raster_space_for_prim( &self, prim_spatial_node_index: SpatialNodeIndex, low_quality_pinch_zoom: bool, device_pixel_scale: DevicePixelScale, spatial_tree: &SpatialTree, ) -> RasterSpace
Gets the raster space to use when rendering this primitive. Usually this would be the requested raster space. However, if the primitive’s spatial node or one of its ancestors is being pinch zoomed then we round it. This prevents us rasterizing glyphs for every minor change in zoom level, as that would be too expensive.
pub fn request_resources( &mut self, prim_offset: LayoutVector2D, specified_font: &FontInstance, glyphs: &[GlyphInstance], transform: &LayoutToWorldTransform, surface: &SurfaceInfo, spatial_node_index: SpatialNodeIndex, allow_subpixel: bool, low_quality_pinch_zoom: bool, resource_cache: &mut ResourceCache, gpu_cache: &mut GpuCache, spatial_tree: &SpatialTree, scratch: &mut PrimitiveScratchBuffer, )
Trait Implementations§
Source§impl Debug for TextRunPrimitive
 
impl Debug for TextRunPrimitive
Auto Trait Implementations§
impl Freeze for TextRunPrimitive
impl RefUnwindSafe for TextRunPrimitive
impl Send for TextRunPrimitive
impl Sync for TextRunPrimitive
impl Unpin for TextRunPrimitive
impl UnwindSafe for TextRunPrimitive
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<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