[−][src]Enum svgbob::Fragment
ⓘThis example is not tested
0 1 2 3 4 B C D
0┌─┬─┬─┬─┐ A┌─┬─┬─┬─┐E
1├─┼─┼─┼─┤ │ │ │ │ │
2├─┼─┼─┼─┤ F├─G─H─I─┤J
3├─┼─┼─┼─┤ │ │ │ │ │
4├─┼─┼─┼─┤ K├─L─M─N─┤O
5├─┼─┼─┼─┤ │ │ │ │ │
6├─┼─┼─┼─┤ P├─Q─R─S─┤T
7├─┼─┼─┼─┤ │ │ │ │ │
8└─┴─┴─┴─┘ U└─┴─┴─┴─┘Y
``` V W X
Variants
Line(Line)
MarkerLine(MarkerLine)
Circle(Circle)
Arc(Arc)
Polygon(Polygon)
Rect(Rect)
CellText(CellText)
Text(Text)
Methods
impl Fragment
[src]
pub fn match_unicode(fragments: &Vec<Self>) -> Option<char>
[src]
get the character that matches the shape present on this cell
pub fn can_merge(&self, other: &Self) -> bool
[src]
check if 2 fragments can merge into one FIXME: This is only merging lines and text right now
pub fn merge(&self, other: &Self) -> Option<Self>
[src]
FIXME: This is only merging lines and text right now
pub fn absolute_position(&self, cell: Cell) -> Self
[src]
recompute the end points of this fragment offset by the cell location
pub fn scale(&self, scale: f32) -> Self
[src]
enlarge or shrink this fragment at scale
pub fn align(&self) -> Self
[src]
pub fn as_line(&self) -> Option<&Line>
[src]
pub fn as_polygon(&self) -> Option<&Polygon>
[src]
pub fn as_arc(&self) -> Option<&Arc>
[src]
pub fn as_cell_text(&self) -> Option<&CellText>
[src]
pub fn as_text(&self) -> Option<&Text>
[src]
pub fn as_css_tag(&self) -> Vec<String>
[src]
if this is a cell text and is wrapped in braces then it is a css tag for the container
pub fn as_circle(&self) -> Option<&Circle>
[src]
pub fn is_circle(&self) -> bool
[src]
pub fn is_rect(&self) -> bool
[src]
pub fn is_text(&self) -> bool
[src]
pub fn is_cell_text(&self) -> bool
[src]
pub fn is_broken(&self) -> bool
[src]
Trait Implementations
impl Bounds for Fragment
[src]
impl Clone for Fragment
[src]
impl Debug for Fragment
[src]
impl Display for Fragment
[src]
impl Eq for Fragment
[src]
impl From<Arc> for Fragment
[src]
impl From<Circle> for Fragment
[src]
impl From<Line> for Fragment
[src]
impl From<Rect> for Fragment
[src]
impl From<Text> for Fragment
[src]
impl Into<Fragment> for CellText
[src]
impl<MSG> Into<Node<&'static str, &'static str, (), MSG>> for Fragment
[src]
impl Ord for Fragment
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Fragment> for Fragment
[src]
impl PartialOrd<Fragment> for Fragment
[src]
Auto Trait Implementations
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnwindSafe for Fragment
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,