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); } }
public svgStyleColor GetStrokeColor() { if (m_strStrokeColor.Length > 5) { svgStyleColor color = new svgStyleColor(m_strStrokeColor, m_dStrokeOpacity); return(color); } return(null); }
public svgStyleColor GetFillColor() { if (m_strFillColor.Length > 5) { svgStyleColor color = new svgStyleColor(m_strFillColor, m_fFillOpacity); return(color); } return(null); }