コード例 #1
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);
        }
コード例 #2
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);
        }
コード例 #3
0
ファイル: IS3GraphicEngine.cs プロジェクト: iS3-Project/iS3
        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
ファイル: IS3GraphicEngine.cs プロジェクト: iS3-Project/iS3
 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;
        }