public static AttributedString <TFont, TGlyph> Combine <TFont, TGlyph>(AttributedString <TFont, TGlyph> attr1, AttributedString <TFont, TGlyph> attr2) where TFont : MathFont <TGlyph> { if (attr1 == null) { return(attr2); } if (attr2 == null) { return(attr1); } attr1.AppendAttributedString(attr2); return(attr1); }
public static AttributedString <TFont, TGlyph> Combine <TFont, TGlyph>(AttributedString <TFont, TGlyph> aStr, AttributedGlyphRun <TFont, TGlyph> run) where TFont : MathFont <TGlyph> { if (aStr == null) { return(AttributedStrings.FromGlyphRuns(run)); } else { if (run != null) { aStr.AppendGlyphRun(run); } return(aStr); } }
public void AppendAttributedString(AttributedString <TFont, TGlyph> other) { _Runs.AddRange(other.Runs); FuseMatchingRuns(); }