public static HorizontalRule Get(float Height, float Width, float Shift) { var box = ObjPool <HorizontalRule> .Get(); box.width = Width; box.height = Height; box.shift = Shift; return(box); }
public override void Flush() { if (BaseAtom != null) { BaseAtom.Flush(); BaseAtom = null; } ObjPool <AttrStyleAtom> .Release(this); }
public static AttrStyleAtom Get(Atom baseAtom, string styleStr) { var atom = ObjPool <AttrStyleAtom> .Get(); atom.BaseAtom = baseAtom; atom.Style = ParseFontStyle(styleStr); atom.Type = baseAtom.Type; return(atom); }
public override void Flush() { for (int i = 0; i < Elements.Count; i++) { Elements[i].Flush(); } Elements.Clear(); ObjPool <RowAtom> .Release(this); }
public static AttrBgAtom Get(Atom baseAtom, string color, bool margin) { var atom = ObjPool <AttrBgAtom> .Get(); atom.baseAtom = baseAtom; atom.margin = margin; atom.color = color == null ? Color.clear : AttrColorAtom.ParseColor(color); return(atom); }
public override void Flush() { if (baseBox != null) { baseBox.Flush(); baseBox = null; } ObjPool <AttrLinkBox> .Release(this); }
public static AttrTransformationBox Get(AttrTransformationAtom atom, AttrTransformationBox endBox) { var box = ObjPool <AttrTransformationBox> .Get(); box.pivotMode = atom.pivotMode; box.endBox = endBox; box.attachedAtom = atom; return(box); }
public static AttrColorBox Get(int mixMode, Color color, AttrColorBox endBox) { var box = ObjPool <AttrColorBox> .Get(); box.renderColor = color; box.mixMode = mixMode; box.endBox = endBox; return(box); }
public static Radical Get(Atom baseAtom, Atom degreeAtom) { var atom = ObjPool <Radical> .Get(); atom.Type = CharTypeInternal.Inner; atom.BaseAtom = baseAtom; atom.DegreeAtom = degreeAtom; return(atom); }
public static AttrColorBox Get(int mixMode, Color color) { var box = ObjPool <AttrColorBox> .Get(); box.color = color; box.mixmode = mixMode; // leave the size zero return(box); }
public static StrikeBox Get(float Height, float Width, float Depth) { var box = ObjPool <StrikeBox> .Get(); box.width = Width; box.height = Height; box.depth = Depth; return(box); }
/// extract the content and flush this formula public Atom ExtractRoot() { Atom root = RootAtom; RootAtom = null; ObjPool <TexFormula> .Release(this); return(root); }
public static AttrBorderAtom Get(Atom baseAtom, string param, bool margin) { var atom = ObjPool <AttrBorderAtom> .Get(); atom.baseAtom = baseAtom; atom.margin = margin; Parse(param, out atom.thickness, out atom.radius, out atom.color); return(atom); }
public override void Flush() { base.Flush(); endBox = null; endLimit = 0; attachedAtom.generatedBox = null; attachedAtom = null; ObjPool <AttrTransformationBox> .Release(this); }
public static ScriptsAtom Get(Atom baseAtom, Atom subscriptAtom, Atom superscriptAtom) { var atom = ObjPool <ScriptsAtom> .Get(); atom.BaseAtom = baseAtom; atom.SubscriptAtom = subscriptAtom; atom.SuperscriptAtom = superscriptAtom; atom.Type = CharTypeInternal.Inner; return(atom); }
public static MatrixAtom Get() { var atom = ObjPool <MatrixAtom> .Get(); atom.horizontalAlign = 1 + 8 + 64; atom.verticalAlign = 1 + 8 + 64; atom.horizontalLine = 0; atom.verticalLine = 0; return(atom); }
public static HorizontalBox Get() { var Box = ObjPool <HorizontalBox> .Get(); if (Box.children == null) { Box.children = new List <Box>(8); } return(Box); }
public static HolderAtom Get(Atom baseAtom, Vector2 size, TexAlignment Alignment) { var atom = ObjPool <HolderAtom> .Get(); atom.BaseAtom = baseAtom; atom.size = size; atom.align = Alignment; atom.Type = CharTypeInternal.Inner; return(atom); }
public static AttrColorBox Get(AttrColorAtom atom, AttrColorBox endBox) { var box = ObjPool <AttrColorBox> .Get(); box.renderColor = atom.color; box.mixMode = atom.mix; box.endBox = endBox; box.attachedAtom = atom; return(box); }
public static VerticalBox Get() { var box = ObjPool <VerticalBox> .Get(); if (box.children == null) { box.children = new List <Box>(); } return(box); }
public override void Flush() { base.Flush(); if (character != null) { character.Flush(); character = null; } ObjPool <RotatedCharBox> .Release(this); }
public static AttrLinkBox Get(Box BaseBox, string MetaKey) { var box = ObjPool <AttrLinkBox> .Get(); box.metaKey = MetaKey; box.baseBox = BaseBox; box.Set(BaseBox.width, BaseBox.height, BaseBox.depth, 0); return(box); }
public static BigOperatorAtom Get(Atom baseAtom, Atom lowerLimitAtom, Atom upperLimitAtom, bool makeSuperScript) { var atom = ObjPool <BigOperatorAtom> .Get(); atom.Type = baseAtom.Type; atom.BaseAtom = baseAtom; atom.LowerLimitAtom = lowerLimitAtom; atom.UpperLimitAtom = upperLimitAtom; atom.MakeSuperScripts = makeSuperScript; return(atom); }
public static HorizontalRule Get(float Height, float Width, float Shift, float Depth, bool UseXDepth) { var box = ObjPool <HorizontalRule> .Get(); box.width = Width; box.height = Height; box.depth = Depth; box.shift = Shift; box.useXDepth = UseXDepth; return(box); }
public override void Flush() { base.Flush(); color = Color.clear; if (baseAtom != null) { baseAtom.Flush(); baseAtom = null; } ObjPool <AttrBgAtom> .Release(this); }
public static HolderAtom Get(Atom baseAtom, float Width, float Height, TexAlignment Alignment) { var atom = ObjPool <HolderAtom> .Get(); atom.BaseAtom = baseAtom; atom.size = new Vector2(Width, Height); atom.align = Alignment; atom.Type = CharTypeInternal.Inner; return(atom); }
public static HorizontalBox Get(Box[] box) { var Box = ObjPool <HorizontalBox> .Get(); Box.children.EnsureCapacity(box.Length); for (int i = 0; i < box.Length; i++) { Box.Add(box[i]); } return(Box); }
public static AccentedAtom Get(Atom baseAtom, string accentName) { var atom = ObjPool <AccentedAtom> .Get(); atom.BaseAtom = baseAtom; if (atom.BaseAtom == null) { atom.BaseAtom = SpaceAtom.Get(0, 0, 0); } atom.AccentAtom = SymbolAtom.GetAtom(accentName); return(atom); }
public override void Flush() { base.Flush(); endBox = null; renderColor = Color.clear; if (attachedAtom != null) { attachedAtom.generatedBox = null; attachedAtom = null; } ObjPool <AttrColorBox> .Release(this); }
public override void Flush() { if (Elements != null) { for (int i = 0; i < Elements.Count; i++) { ListPool <Atom> .Release(Elements[i]); } Elements.Clear(); } ObjPool <MatrixAtom> .Release(this); }