Ejemplo n.º 1
0
        public Style Parse(string s)
        {
            if (s == null || s.Length == 0)
            {
                return(null);
            }
            styleStr = s.ToLower();
            Clear();
            try
            {
                AddParams();
                Style style = new Style();
                style.pen        = sbPen.GetPen();
                style.pen2       = sbPen2.GetPen();
                style.brush      = sbBrush.GetBrush();
                style.imageStyle = sbImage.GetImageStyle();
                style.textStyle  = sbText.GetTextStyle();
                style.extStyle   = sbExt.GetExtStyle();
                return(style.IsNull() ? null : style);
            }
            catch (Exception ex)
            {
//!!!				Log.Exception(ex);
            }
            return(null);
        }
Ejemplo n.º 2
0
 public Brush GetBrush()
 {
     if (sbImage.Count > 0)
     {
         ImageStyle imageStyle = sbImage.GetImageStyle();
         if (imageStyle != null)
         {
             return(GetTextureBrush(imageStyle));
         }
     }
     if (Count == 0)
     {
         return(null);
     }
     if (HasKey("hs"))
     {
         return(GetHatchBrush());
     }
     return(GetSolidBrush());
 }