コード例 #1
0
 /// <summary>
 /// Applies vertical and horizontal alignment to words in lineboxes
 /// </summary>
 /// <param name="g"></param>
 /// <param name="lineBox"></param> 
 static void ApplyAlignment(CssLineBox lineBox, CssTextAlign textAlign, LayoutVisitor lay)
 {
     switch (textAlign)
     {
         case CssTextAlign.Right:
             ApplyRightAlignment(lineBox);
             break;
         case CssTextAlign.Center:
             ApplyCenterAlignment(lineBox);
             break;
         case CssTextAlign.Justify:
             ApplyJustifyAlignment(lineBox);
             break;
         default:
             break;
     }
     //--------------------------------------------- 
     // Applies vertical alignment to the linebox 
     return;
     //TODO: review here
     lineBox.ApplyBaseline(lineBox.CalculateTotalBoxBaseLine(lay));
     //---------------------------------------------  
 }
コード例 #2
0
ファイル: UserMapUtil.cs プロジェクト: luislasonbra/PixelFarm
 public static string ToCssStringValue(this CssTextAlign value)
 {
     return(_cssTextAlignMap.GetStringFromValue(value));
 }
コード例 #3
0
 public static string GetCssValue(this CssTextAlign value)
 {
     return(value.ToString().ToLower());
 }