public ISymbolFont newSymbolFont(SymbolFontDef symbolFontDef)
        {
            IS3SymbolFont font = new IS3SymbolFont();

            font.FontFamily     = symbolFontDef.FontFamily;
            font.FontSize       = symbolFontDef.FontSize;
            font.FontStyle      = symbolFontDef.FontStyle;
            font.FontWeight     = symbolFontDef.FontWeight;
            font.TextDecoration = symbolFontDef.TextDecoration;
            return(font);
        }
        public IGraphic newText(string text, IMapPoint p, Color color,
                                string fontName, double fontSize)
        {
            IS3TextSymbol textSymbol = new IS3TextSymbol();

            textSymbol.Text  = text;
            textSymbol.Color = color;

            IS3SymbolFont font = new IS3SymbolFont(fontName, fontSize);

            textSymbol.Font = font;

            IS3Graphic g = new IS3Graphic();

            g.Symbol   = textSymbol;
            g.Geometry = p;

            return(g);
        }
예제 #3
0
        public IGraphic newText(string text, IMapPoint p, Color color,
            string fontName, double fontSize)
        {
            IS3TextSymbol textSymbol = new IS3TextSymbol();
            textSymbol.Text = text;
            textSymbol.Color = color;

            IS3SymbolFont font = new IS3SymbolFont(fontName, fontSize);
            textSymbol.Font = font;

            IS3Graphic g = new IS3Graphic();
            
            g.Symbol = textSymbol;
            g.Geometry = p;

            return g;
        }
예제 #4
0
 public ISymbolFont newSymbolFont(SymbolFontDef symbolFontDef)
 {
     IS3SymbolFont font = new IS3SymbolFont();
     font.FontFamily = symbolFontDef.FontFamily;
     font.FontSize = symbolFontDef.FontSize;
     font.FontStyle = symbolFontDef.FontStyle;
     font.FontWeight = symbolFontDef.FontWeight;
     font.TextDecoration = symbolFontDef.TextDecoration;
     return font;
 }
예제 #5
0
파일: IS3View.cs 프로젝트: iS3-Project/iS3
        // Summary:
        //     Generate a label attributes according to the definition
        //     which is specified in the LayerDef
        //
        AttributeLabelClass generateLayerAttributeLable(LayerDef layerDef,
            Core.Geometry.GeometryType geometryType)
        {
            if (layerDef == null)
                return generateDefaultLayerAttributeLable(geometryType);

            IS3SymbolFont font = new IS3SymbolFont(
                layerDef.LabelFontFamily, layerDef.LabelFontSize);
            font.FontStyle = layerDef.LabelFontStyle;
            font.FontWeight = layerDef.LabelFontWeight;
            font.TextDecoration = layerDef.LabelTextDecoration;

            IS3TextSymbol textSymbol = new IS3TextSymbol();
            textSymbol.Color = layerDef.LabelColor;
            textSymbol.Font = font;
            textSymbol.BorderLineColor = layerDef.LabelBorderLineColor;
            textSymbol.BorderLineSize = layerDef.LabelBorderLineWidth;
            textSymbol.BackgroundColor = layerDef.LabelBackgroundColor;

            AttributeLabelClass labelClass = new AttributeLabelClass();
            labelClass.IsVisible = true;
            labelClass.TextExpression = layerDef.LabelTextExpression;
            labelClass.WhereClause = layerDef.LabelWhereClause;
            labelClass.Symbol = textSymbol;

            if (geometryType == Core.Geometry.GeometryType.Polygon)
                labelClass.LabelPlacement = LabelPlacement.PolygonAlwaysHorizontal;

            return labelClass;
        }