|
TalMap SDK Libary Reference |
XPOIStyle::SetGDIFont |
GDI Font ¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
|
|
|
Parameters
|
FontName |
Font Name |
Style |
½ºÅ¸ÀÏ
XUtility.GetConstToValue(String Value)
TM_FONT_STYLE_NORMAL | 0x00 |
TM_FONT_STYLE_BOLD | 0x01 |
TM_FONT_STYLE_ITALIC | 0x02 |
TM_FONT_STYLE_UNDERLINE | 0x04 |
TM_FONT_STYLE_STRIKEOUT | 0x08 |
|
Size |
Å©±â |
|
|
|
|
Return Value
|
|
Remarks
|
SetGDIFont ´Â XPOIStyle ÀÇ Method·Î Á¦°øµË´Ï´Ù.
»ç¿ëÀÚ´Â ÀÌ ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ¿© GDI Font¸¦ ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
|
|
|
|
Example
|
|
var ctrlman = m_Map.GetCtrlMan();
var ctrlstate = ctrlman.GetControlState();
var util = m_Map.GetUtility();
var posLL = ctrlstate.GetLLCenter(); //ÁöµµÀÇ Áß½ÉÁÂÇ¥
var itemCount = 3;
var poiman = ctrlman.GetPOIMan();
var baseman = poiman.CasttoBaseManager();
var group = poiman.FindGroup(10);
if (!group) group = poiman.NewGroup(10);
// Step 2-1. Make POI Style
var gstyle = poiman.FindStyle(1);
if (!gstyle) {
gstyle = poiman.NewStyle(1); // -1: ¾ÆÀ̵ð ÀÚµ¿ »ý¼º
gstyle.SetGDIFont("±¼¸²", 0, 8);
gstyle.SetFontColor(util.RGBColor(255, 0, 0));
gstyle.SetFontOutColor(util.RGBColor(255, 255, 255));
gstyle.SetBrush(util.RGBColor(100, 0, 255), 0);
gstyle.SetPen(util.RGBColor(0, 0, 0), 1, 0);
}
// Group¿¡ StyleÀ» ÁöÁ¤Çϸé ÇÏÀ§ ItemÀº º°µµÀÇ StyleÀ» °¡ÁöÁö ¾Ê´Â ÇÑ GroupÀÇ StyleÀ» µû¸£°Ô µÈ´Ù.
group.SetStyle(gstyle);
var style = poiman.FindStyle(2);
if (!style) {
style = poiman.NewStyle(2);
style.SetGDIFont("±¼¸²", 0, 8);
style.SetFontColor(util.RGBColor(0, 0, 0));
style.SetFontOutColor(util.RGBColor(255, 255, 255));
style.SetBrush(util.RGBColor(100, 0, 255), 0);
style.SetPen(util.RGBColor(0, 0, 0), 1, 0);
}
// Step 3. Make POI Items
var imageman = ctrlman.GetImageMan();
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var image = imageman.LoadImageList("CAR_IMAGE", "image/CAR.png", 64, 64);
if (image.IsValid() != true) alert("Image ÀÌ»ó");
var angle = 0;
for (i = 0; i < itemCount; i++) {
var item = group.NewItem(-1)
item.SetLonLat(posLL._X + i * 250, posLL._Y - i * 250)
item.SetImage(image);
item.SetShowImage(1)
item.SetImageIndex(1)
item.SetImageOffset(4)
item.SetTextStyle(0x12)
if (i % 2) item.SetStyle(style)
item.SetCaption("[" + i + "]Test POI")
item.SetContents("[" + i + "] Contents\nHello")
item.SetAnimation(200) // 1ÃÊ ´ÜÀ§
item.SetSyncAngle(1)
item.SetAngle(angle)
item.SetAlpha(100)
angle = angle + 10;
if(angle > 360) angle = 0;
}
|
|
|
CXPOIMan poiman = ctrlman.GetPOIMan();
CXPOIGroup group = poiman.FindGroup(100);
if (group.m_lpDispatch == NULL)
group = poiman.NewGroup(100);
// Step3. POI Style À» »ý¼º ÇÕ´Ï´Ù.
CXPOIStyle style = poiman.FindStyle(1000);
if (style.m_lpDispatch == NULL) {
style = poiman.NewStyle(1000);
style.SetGDIFont(_T("±¼¸²"), 0, 8);
style.SetFontColor(util.RGBColor(255, 0, 0));
style.SetFontOutColor(util.RGBColor(255, 255, 255));
style.SetBrush(util.RGBColor(100, 0, 255), 0);
style.SetPen(util.RGBColor(0, 0, 0), 1, 0);
style.SetVisibleCtrl(1,1);
}
group.SetStyle(style);
|
|
|
|
See Also
|
|