#[non_exhaustive]pub struct PlanTarget {
pub center_px: [f64; 2],
pub pixels_per_point: f32,
pub viewport_px: [f32; 4],
}Expand description
Where a frame is drawn, in physical pixels of the render target.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.center_px: [f64; 2]Canvas center, in physical pixels (y down). Chunk offsets are added to it in f64.
pixels_per_point: f32Physical pixels per logical pixel; stroke widths are logical.
viewport_px: [f32; 4]Viewport of the draw: left, top, width and height in physical pixels.
Implementations§
Source§impl PlanTarget
impl PlanTarget
Sourcepub fn new(viewport_px: [f32; 4], pixels_per_point: f32) -> Self
pub fn new(viewport_px: [f32; 4], pixels_per_point: f32) -> Self
A target whose canvas fills viewport_px (left, top, width, height).
Sourcepub fn with_center_px(self, center_px: [f64; 2]) -> Self
pub fn with_center_px(self, center_px: [f64; 2]) -> Self
Sets Self::center_px.
Trait Implementations§
Source§impl Clone for PlanTarget
impl Clone for PlanTarget
impl Copy for PlanTarget
Source§impl Debug for PlanTarget
impl Debug for PlanTarget
Source§impl PartialEq for PlanTarget
impl PartialEq for PlanTarget
impl StructuralPartialEq for PlanTarget
Auto Trait Implementations§
impl Forget for PlanTarget
impl Freeze for PlanTarget
impl Move for PlanTarget
impl RefUnwindSafe for PlanTarget
impl Send for PlanTarget
impl Sync for PlanTarget
impl Unpin for PlanTarget
impl UnsafeUnpin for PlanTarget
impl UnwindSafe for PlanTarget
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