protected void AddAttr(SVGAttribute._SvgAttribute type, object objValue) { SVGAttribute attrToAdd = new SVGAttribute(type); attrToAdd.Value = objValue; m_attributes.Add(attrToAdd); }
internal string GetAttributeStringValue(SVGAttribute._SvgAttribute type) { object objValue = GetAttributeValue(type); if (objValue != null) { return(objValue.ToString()); } else { return(""); } }
internal object GetAttributeValue(SVGAttribute._SvgAttribute type) { object objValue; if (GetAttributeValue(type, out objValue)) { return(objValue); } else { return(null); } }
internal SVGAttribute GetAttribute(SVGAttribute._SvgAttribute type) { for (int i = 0; i < m_attributes.Count; i++) { SVGAttribute attr = (SVGAttribute)m_attributes[i]; if (attr.AttributeType == type) { return(attr); } } return(null); }
internal bool SetAttributeValue(SVGAttribute._SvgAttribute type, object objValue) { bool bReturn = false; for (int i = 0; i < m_attributes.Count; i++) { SVGAttribute attr = (SVGAttribute)m_attributes[i]; if (attr.AttributeType == type) { bReturn = true; attr.Value = objValue; break; } } return(bReturn); }
internal Color GetAttributeColorValue(SVGAttribute._SvgAttribute type) { object objValue = GetAttributeValue(type); if (objValue != null) { Color cValue = Color.Black; try { cValue = (Color)(objValue); } catch { } return(cValue); } else { return(Color.Black); } }
internal int GetAttributeIntValue(SVGAttribute._SvgAttribute type) { object objValue = GetAttributeValue(type); if (objValue != null) { int nValue = 0; try { nValue = Convert.ToInt32(objValue.ToString()); } catch { } return(nValue); } else { return(0); } }