public static bool TryGetTextAlign(this PropertyList p, out TextAlign textAlign) { Property prop = p.GetProperty("text-align"); if (prop == null) { textAlign = TextAlign.None; return(false); } // textAlign = (TextAlign)prop.GetEnum(); return(true); }
public Property GetInheritedProperty(string propertyName) { if (builder != null) { if (parentPropertyList != null && IsInherited(propertyName)) { return(parentPropertyList.GetProperty(propertyName)); } else { try { return(builder.MakeProperty(this, propertyName)); } catch (FonetException e) { FonetDriver.ActiveDriver.FireFonetError( "Exception in getInherited(): property=" + propertyName + " : " + e); } } } return(null); }
public override Property GetProperty(string name) { return(properties.GetProperty(name)); }
public static WrapOption GetWrapOption(this PropertyList p) { return((WrapOption)p.GetProperty("wrap-option").GetEnum()); }
public static ColorType GetColorType(this PropertyList p) { return(p.GetProperty("color").GetColorType()); }
public static int GetWhiteSpaceCollapse(this PropertyList p) { return(p.GetProperty("white-space-collapse").GetEnum()); }
public static string GetId(this PropertyList p) { return(p.GetProperty("id").GetString()); }
public static char GetChar(this PropertyList p) { return(p.GetProperty("character").GetCharacter()); }
public static BlankOrNotBlank GetBlankOrNotBlank(this PropertyList p) { return((BlankOrNotBlank)p.GetProperty("blank-or-not-blank").GetEnum()); }
public static TextDecoration GetTextDecoration(this PropertyList p) { return((TextDecoration)p.GetProperty("text-decoration").GetEnum()); }
public static VerticalAlign GetVerticalAlign(this PropertyList p) { return((VerticalAlign)p.GetProperty("vertical-align").GetEnum()); }
public static Overflow GetOverflow(this PropertyList p) { return((Overflow)p.GetProperty("overflow").GetEnum()); }
public static TextAlign GetTextAlignLast(this PropertyList p) { return((TextAlign)p.GetProperty("text-align-last").GetEnum()); }
public static SpanKind GetSpanKind(this PropertyList p) { return((SpanKind)p.GetProperty("span").GetEnum()); }
public FontState GetFontState(FontInfo fontInfo) { if (fontState == null) { string fontFamily = properties.GetProperty("font-family").GetString(); string fontStyle = properties.GetProperty("font-style").GetString(); string fontWeight = properties.GetProperty("font-weight").GetString(); int fontSize = properties.GetProperty("font-size").GetLength().MValue(); int fontVariant = properties.GetProperty("font-variant").GetEnum(); fontState = new FontState(fontInfo, fontFamily, fontStyle, fontWeight, fontSize, fontVariant); } return(fontState); }