Пример #1
0
 public void InitializeStyle()
 {
     try
     {
         if (m_strokePen == null)
         {
             svgStyleColor strokeColor = m_style.GetStrokeColor();
             if (strokeColor == null && m_parent != null)
             {
                 strokeColor = m_parent.m_style.GetStrokeColor();
             }
             if (strokeColor != null)
             {
                 int strokeWidth = (int)m_style.m_dStrokeWidth;
                 m_strokePen = new Pen(strokeColor.m_color, strokeWidth);
             }
         }
         if (m_fillBrush == null)
         {
             svgStyleColor fillColor = m_style.GetFillColor();
             if (fillColor == null & m_parent != null)
             {
                 fillColor = m_parent.m_style.GetFillColor();
             }
             if (fillColor != null)
             {
                 m_fillBrush = new SolidBrush(fillColor.m_color);
             }
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
     }
 }
Пример #2
0
 public svgStyleColor GetStrokeColor()
 {
     if (m_strStrokeColor.Length > 5)
     {
         svgStyleColor color = new svgStyleColor(m_strStrokeColor, m_dStrokeOpacity);
         return(color);
     }
     return(null);
 }
Пример #3
0
 public svgStyleColor GetFillColor()
 {
     if (m_strFillColor.Length > 5)
     {
         svgStyleColor color = new svgStyleColor(m_strFillColor, m_fFillOpacity);
         return(color);
     }
     return(null);
 }