|
TalMap SDK Libary Reference |
XPOIStyle::SetBrush |
Brush를 설정합니다. |
|
|
|
Parameters
|
BrushColor |
색깔 (XUtility.RGBColor, XUtility.RGBAColor) |
Style |
스타일 (default : 0)
XUtility.GetConstToValue(string Value)
BS_SOLID | BS_SOLID 에 대한 문자열 |
BS_NULL | BS_NULL 에 대한 문자열 |
|
|
|
|
|
Return Value
|
|
Remarks
|
SetBrush 는 XPOIStyle 의 Method로 제공됩니다.
사용자는 이 메소드를 이용하여 Brush를 설정할 수 있습니다.
|
|
|
|
Example
|
|
var ctrlman = m_Map.GetCtrlMan();
var poiman = ctrlman.GetPOIMan();
var imageman = ctrlman.GetImageMan();
var util = m_Map.GetUtility();
var ctrlstate = ctrlman.GetControlState();
var posLL = ctrlstate.GetLLCenter(); // 지도의 중심 좌표
// step1. POI group 생성
var group = poiman.FindGroup(1);
if (!group)
group = poiman.NewGroup(1);
// step2. Style 생성
var style = poiman.FindStyle(1);
if (!style)
{
style = poiman.NewStyle(1);
style.SetGDIFont("굴림", 0, 8);
style.SetFontColor(util.RGBColor(255, 0, 0));
style.SetBrush(util.RGBColor(100, 0, 255), 0);
style.SetPen(util.RGBColor(0, 0, 0), 1, util.GetConstToValue("PS_SOLID"));
}
// step3. group 에 스타일 적용
group.SetStyle(style);
imageman.SetDefaultPath("http://www.talmap.co.kr/tutorial/");
var poiImage = imageman.LoadImageList("CAR_IMAGE", "image/CAR.png", 64, 64);
// step4. POI Item 생성
var item = group.NewItem(-1); // 아이디 자동 생성
item.SetLonLat(posLL._X+10, posLL._Y+10 );
item.SetImage(poiImage);
item.SetShowImage(1);
item.SetTextStyle(util.GetConstToValue("DRAWTEXT_STYLE_BOARDOUTLINE"));
item.SetStyle(style);
item.SetCaption("POI Test");
item.SetAngle(30);
item.SetImageOffset(0);
item.SetAlpha(100);
item.SetAnimation(200);
|
|
|
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
|
|