Exemple #1
0
        protected void AddAttr(SVGAttribute._SvgAttribute type, object objValue)
        {
            SVGAttribute attrToAdd = new SVGAttribute(type);

            attrToAdd.Value = objValue;

            m_attributes.Add(attrToAdd);
        }
Exemple #2
0
        internal string GetAttributeStringValue(SVGAttribute._SvgAttribute type)
        {
            object objValue = GetAttributeValue(type);

            if (objValue != null)
            {
                return(objValue.ToString());
            }
            else
            {
                return("");
            }
        }
Exemple #3
0
        internal object GetAttributeValue(SVGAttribute._SvgAttribute type)
        {
            object objValue;

            if (GetAttributeValue(type, out objValue))
            {
                return(objValue);
            }
            else
            {
                return(null);
            }
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
            }
        }
Exemple #7
0
        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);
            }
        }