Skip to main content

Class TextUtils

Namespace: Aurigma.DesignAtoms.Canvas.ItemHandlers
Assembly: Aurigma.DesignAtoms.dll
Syntax
public static class TextUtils

Inheritance: System.Object -> TextUtils

Inherited Members

  • System.Object.ToString
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone

Methods

IsEmpty

public static bool IsEmpty(string text)
Parameters
TypeNameDescription
System.Stringtext
Returns

System.Boolean

IsEmptyXmlText

public static bool IsEmptyXmlText(string text)
Parameters
TypeNameDescription
System.Stringtext
Returns

System.Boolean

IsValidXml

public static bool IsValidXml(string text)
Parameters
TypeNameDescription
System.Stringtext
Returns

System.Boolean

ConvertXmlToPlain

public static string ConvertXmlToPlain(string xml)
Parameters
TypeNameDescription
System.Stringxml
Returns

System.String

ProcessXmlTexts

public static string ProcessXmlTexts(string gmXml, Action<XText> processTextNode)
Parameters
TypeNameDescription
System.StringgmXml
System.Action<System.Xml.Linq.XText>processTextNode
Returns

System.String

ScaleTextFontSize

public static string ScaleTextFontSize(string gmXml, float scale, float? minFontSize, float? maxFontSize)
Parameters
TypeNameDescription
System.StringgmXml
System.Singlescale
System.Nullable<System.Single>minFontSize
System.Nullable<System.Single>maxFontSize
Returns

System.String

ProcessSpanStyles

public static string ProcessSpanStyles(string gmXml, Func<Dictionary<string, string[]>, bool> processStyle = null, Func<Dictionary<string, string[]>, Tuple<string, string>> createExtraAttribute = null)
Parameters
TypeNameDescription
System.StringgmXml
System.Func<System.Collections.Generic.Dictionary<System.String,System.String[]>,System.Boolean>processStyle
System.Func<System.Collections.Generic.Dictionary<System.String,System.String[]>,System.Tuple<System.String,System.String>>createExtraAttribute
Returns

System.String

RemoveSpanAttribute

public static string RemoveSpanAttribute(string gmXml, string attributeName)
Parameters
TypeNameDescription
System.StringgmXml
System.StringattributeName
Returns

System.String

GetMaxFontSize

public static float GetMaxFontSize(BaseTextItemHandler textItemHandler, bool isFormatted)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseTextItemHandlertextItemHandler
System.BooleanisFormatted
Returns

System.Single

GetGmXmlFonts

public static IEnumerable<string> GetGmXmlFonts(string xml, IFontService fontService)
Parameters
TypeNameDescription
System.Stringxml
Aurigma.DesignAtoms.Services.IFontServicefontService
Returns

System.Collections.Generic.IEnumerable<System.String>

GetItemFonts

public static IEnumerable<string> GetItemFonts(BaseTextItem item, IFontService fontService)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.BaseTextItemitem
Aurigma.DesignAtoms.Services.IFontServicefontService
Returns

System.Collections.Generic.IEnumerable<System.String>

GetItemFontsExtended

public static IEnumerable<FontInfo> GetItemFontsExtended(BaseTextItem item)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.BaseTextItemitem
Returns

System.Collections.Generic.IEnumerable<Aurigma.GraphicsMill.AdvancedDrawing.FontInfo>

ContainsRtlChars

public static bool ContainsRtlChars(string itemText)
Parameters
TypeNameDescription
System.StringitemText
Returns

System.Boolean

IsSingleLineText

public static bool IsSingleLineText(string text)
Parameters
TypeNameDescription
System.Stringtext
Returns

System.Boolean

Was this page helpful?