码迷,mamicode.com
首页 > 其他好文 > 详细

创建文本TIP

时间:2014-08-14 16:10:38      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:color   for   new   size   rgb   on   text   return   

public ITextElement CreateTextElement(double x, double y, string text)
{
IBalloonCallout bc = CreateBallonCallout(x, y);
IRgbColor rgb = new RgbColorClass();
{
rgb.Green = 255;
}
ITextSymbol ts = new TextSymbolClass();
{
ts.Color = rgb;
}
IFormattedTextSymbol fts = ts as IFormattedTextSymbol;
{
fts.Background = bc as ITextBackground;
}
ts.Size = 18;
IPoint point = new PointClass();
{
double width = axmap.Extent.Width / 13;
double height = axmap.Extent.Height / 20;
point.PutCoords(x + width, y + height);
}
ITextElement te = new TextElementClass();
{
te.Symbol = ts;
te.Text = text;
}
IElement e = te as IElement;
{
e.Geometry = point;
}
return te;
}

创建文本TIP,布布扣,bubuko.com

创建文本TIP

标签:color   for   new   size   rgb   on   text   return   

原文地址:http://www.cnblogs.com/3Sblogs/p/3912422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!