コード例 #1
0
        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);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 public override Property GetProperty(string name)
 {
     return(properties.GetProperty(name));
 }
コード例 #4
0
 public static WrapOption GetWrapOption(this PropertyList p)
 {
     return((WrapOption)p.GetProperty("wrap-option").GetEnum());
 }
コード例 #5
0
 public static ColorType GetColorType(this PropertyList p)
 {
     return(p.GetProperty("color").GetColorType());
 }
コード例 #6
0
 public static int GetWhiteSpaceCollapse(this PropertyList p)
 {
     return(p.GetProperty("white-space-collapse").GetEnum());
 }
コード例 #7
0
 public static string GetId(this PropertyList p)
 {
     return(p.GetProperty("id").GetString());
 }
コード例 #8
0
 public static char GetChar(this PropertyList p)
 {
     return(p.GetProperty("character").GetCharacter());
 }
コード例 #9
0
 public static BlankOrNotBlank GetBlankOrNotBlank(this PropertyList p)
 {
     return((BlankOrNotBlank)p.GetProperty("blank-or-not-blank").GetEnum());
 }
コード例 #10
0
 public static TextDecoration GetTextDecoration(this PropertyList p)
 {
     return((TextDecoration)p.GetProperty("text-decoration").GetEnum());
 }
コード例 #11
0
 public static VerticalAlign GetVerticalAlign(this PropertyList p)
 {
     return((VerticalAlign)p.GetProperty("vertical-align").GetEnum());
 }
コード例 #12
0
 public static Overflow GetOverflow(this PropertyList p)
 {
     return((Overflow)p.GetProperty("overflow").GetEnum());
 }
コード例 #13
0
 public static TextAlign GetTextAlignLast(this PropertyList p)
 {
     return((TextAlign)p.GetProperty("text-align-last").GetEnum());
 }
コード例 #14
0
 public static SpanKind GetSpanKind(this PropertyList p)
 {
     return((SpanKind)p.GetProperty("span").GetEnum());
 }
コード例 #15
0
 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);
 }