pub struct SheetText {
pub text: String,
pub anchor: [f64; 2],
pub height: f64,
pub angle: f64,
pub right: [f64; 2],
pub up: [f64; 2],
}Expand description
A placed text run, centred on anchor.
The run is drawn in its OWN basis: SheetText::right and
SheetText::up are the paper images of ONE CAP HEIGHT along the run’s
reading and up directions, in the drawing’s millimetres (y DOWN, SVG’s
frame). A run laid flat on the sheet has right = [h, 0] and
up = [0, -h]; a run projected out of an oblique annotation plane has a
pair that is neither perpendicular nor equal in length, because the
projection foreshortens and shears it, and the SVG and PDF writers carry
the pair as a text matrix.
height and angle are that basis SUMMARISED — the cap height the run
draws at (|up|) and the angle its baseline reads along, degrees
CLOCKWISE (SVG’s positive direction). They describe a flat or merely
rotated run completely; the sheet viewport draws every run from them
because egui cannot shear a text shape, so an oblique run previews as its
rotation and its foreshortened height while the two files carry it exactly.
Fields§
§text: String§anchor: [f64; 2]§height: f64§angle: f64§right: [f64; 2]§up: [f64; 2]Implementations§
Trait Implementations§
impl StructuralPartialEq for SheetText
Auto Trait Implementations§
impl Freeze for SheetText
impl RefUnwindSafe for SheetText
impl Send for SheetText
impl Sync for SheetText
impl Unpin for SheetText
impl UnsafeUnpin for SheetText
impl UnwindSafe for SheetText
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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