internal bool GetAttributeValue(SvgAttribute.SvgAttributes type, out object objValue) { bool bReturn = false; objValue = null; for (int i = 0; i < attributes.Count; i++) { SvgAttribute attr = (SvgAttribute)attributes[i]; if (attr.AttributeType == type) { bReturn = true; objValue = attr.Value; break; } } return(bReturn); }
internal Color GetAttributeColorValue(SvgAttribute.SvgAttributes 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.SvgAttributes type) { object objValue = GetAttributeValue(type); if (objValue != null) { int nValue = 0; try { nValue = Convert.ToInt32(objValue.ToString()); } catch { } return(nValue); } else { return(0); } }
internal SvgAttribute GetAttribute(SvgAttribute.SvgAttributes type) { return(attributes.Cast <SvgAttribute>().FirstOrDefault(attr => attr.AttributeType == type)); }