コード例 #1
0
 public PathText(PathTextBuilder pathTextBuilder)
 {
     this.fill     = pathTextBuilder.fill;
     this.fontSize = pathTextBuilder.fontSize;
     this.stroke   = pathTextBuilder.stroke;
     this.textKey  = pathTextBuilder.textKey;
 }
コード例 #2
0
ファイル: Caption.cs プロジェクト: warny/MapForge.Net
 public Caption(CaptionBuilder captionBuilder)
 {
     this.dy       = captionBuilder.dy;
     this.fill     = captionBuilder.fill;
     this.fontSize = captionBuilder.fontSize;
     this.stroke   = captionBuilder.stroke;
     this.textKey  = captionBuilder.textKey;
 }
コード例 #3
0
ファイル: PathTextBuilder.cs プロジェクト: warny/MapForge.Net
        private void extractValues(string elementName, IEnumerable <XAttribute> attributes)
        {
            //RenderTheme.Graphics.FontFamily fontFamily = RenderTheme.Graphics.FontFamily.DEFAULT;
            //FontStyle fontStyle = FontStyle.NORMAL;

            foreach (XAttribute attribute in attributes)
            {
                string name  = attribute.Name.LocalName;
                string value = attribute.Value;

                if (K.Equals(name))
                {
                    this.textKey = TextKey.getInstance(value);
                }
                else if (FONT_FAMILY.Equals(name))
                {
                    //fontFamily = RenderTheme.Graphics.FontFamily.Parse(value);
                }
                else if (FONT_STYLE.Equals(name))
                {
                    //fontStyle = (FontStyle)Enum.Parse(typeof(FontStyle), value, true);
                }
                else if (FONT_SIZE.Equals(name))
                {
                    this.fontSize = XmlUtils.parseNonNegativeFloat(name, value);
                }
                else if (FILL.Equals(name))
                {
                    this.fill = new SolidColorBrush(Utils.ParseColor(value));
                }
                else if (STROKE.Equals(name))
                {
                    this.stroke.Brush = new SolidColorBrush(Utils.ParseColor(value));
                }
                else if (STROKE_WIDTH.Equals(name))
                {
                    this.stroke.Thickness = XmlUtils.parseNonNegativeFloat(name, value);
                }
                else
                {
                    throw XmlUtils.createSAXException(elementName, name, value);
                }
            }

            //this.fill.FontFamily = fontFamily;
            //this.fill.FontStyle = fontStyle;
            //this.stroke.FontFamily = fontFamily;
            //this.stroke.FontStyle = fontStyle;

            XmlUtils.checkMandatoryAttribute(elementName, K, this.textKey);
        }