Class TextUtils
Namespace: Aurigma.DesignAtoms.Canvas.ItemHandlers
Assembly: Aurigma.DesignAtoms.dll
Syntax
public static class TextUtils
Inheritance: System.Object -> TextUtils
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Methods
IsEmpty
public static bool IsEmpty(string text)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | text |
Returns
System.Boolean
IsEmptyXmlText
public static bool IsEmptyXmlText(string text)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | text |
Returns
System.Boolean
IsValidXml
public static bool IsValidXml(string text)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | text |
Returns
System.Boolean
ConvertXmlToPlain
public static string ConvertXmlToPlain(string xml)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | xml |
Returns
System.String
ProcessXmlTexts
public static string ProcessXmlTexts(string gmXml, Action<XText> processTextNode)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | gmXml | |
System.Action<System.Xml.Linq.XText> | processTextNode |
Returns
System.String
ScaleTextFontSize
public static string ScaleTextFontSize(string gmXml, float scale, float? minFontSize, float? maxFontSize)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | gmXml | |
System.Single | scale | |
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
| Type | Name | Description |
|---|---|---|
System.String | gmXml | |
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
| Type | Name | Description |
|---|---|---|
System.String | gmXml | |
System.String | attributeName |
Returns
System.String
GetMaxFontSize
public static float GetMaxFontSize(BaseTextItemHandler textItemHandler, bool isFormatted)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Canvas.ItemHandlers.BaseTextItemHandler | textItemHandler | |
System.Boolean | isFormatted |
Returns
System.Single
GetGmXmlFonts
public static IEnumerable<string> GetGmXmlFonts(string xml, IFontService fontService)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | xml | |
| Aurigma.DesignAtoms.Services.IFontService | fontService |
Returns
System.Collections.Generic.IEnumerable<System.String>
GetItemFonts
public static IEnumerable<string> GetItemFonts(BaseTextItem item, IFontService fontService)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.BaseTextItem | item | |
| Aurigma.DesignAtoms.Services.IFontService | fontService |
Returns
System.Collections.Generic.IEnumerable<System.String>
GetItemFontsExtended
public static IEnumerable<FontInfo> GetItemFontsExtended(BaseTextItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.BaseTextItem | item |
Returns
System.Collections.Generic.IEnumerable<Aurigma.GraphicsMill.AdvancedDrawing.FontInfo>
ContainsRtlChars
public static bool ContainsRtlChars(string itemText)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | itemText |
Returns
System.Boolean
IsSingleLineText
public static bool IsSingleLineText(string text)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | text |
Returns
System.Boolean