|
| TalMap SDK Libary Reference |
| XLayerFont::AddPen |
| Pen을 설정합니다. |
|
|
|
|
Parameters
| |
| PenColor |
| 색깔 |
| Pen Width |
| 두께 |
| Style |
스타일
XUtility.GetConstToValue(String Value)에 적용되는 값.
| PS_SOLID | 0 |
| PS_DASH | 1 /* ------- */ |
| PS_DOT | 2 /* ....... */ |
| PS_DASHDOT | 3 /* _._._._ */ |
| PS_DASHDOTDOT | 4 /* _.._.._ */ |
| PS_NULL | 5 |
|
|
|
|
|
Return Value
|
|
Remarks
| |
AddPen 는 XLayerFont 의 Method로 제공됩니다.
사용자는 이 메소드를 이용하여 Pen을 설정할 수 있습니다.
|
|
|
|
Example
| |
|
|
var ctrlman = m_Map.GetCtrlMan();
var layerman = ctrlman.GetLayerMan();
var util = m_Map.GetUtility();
// step1. 스타일을 생성 합니다.
var style = layerman.NewStyle(2);
style.SetPen(util.RGBColor(0, 0, 255), 2, util.GetConstToValue("PS_SOLID"));
style.SetBrush(util.RGBAColor(0, 0, 255, 100), util.GetConstToValue("BS_SOLID"));
// step2. LayerFont를 생성 합니다.
var font = layerman.NewFont(-1);
font.AddPen(util.RGBColor(0, 0, 255), 2, util.GetConstToValue("PS_SOLID"));
font.AddBrush(util.RGBAColor(0, 0, 255, 100), util.GetConstToValue("BS_SOLID"));
font.AddCircle(util.GetConstToValue("TM_LAYERFONT_CIRCLE") | util.GetConstToValue("TM_LAYERFONT_FILL_POLYGON"), 100);
// step3. 폴리곤을 생성 합니다.
var obj = layerman.NewPolygon(-1);
obj.SetStyle(style);
obj.SetClosed(0);
obj.SetStartFont(font);
obj.SetStartFontScale(100);
obj.SetEndFont(font);
obj.SetEndFontScale(100);
obj.SetStateModeNew()
|
|
|
|
#include "CXLayerMan.h"
#include "CXUtility.h"
#include "CXLayerStyle.h"
#include "CXLayerFont.h"
#include "CXLayerPolygon.h"
CXLayerMan layerman = ctrlman.GetLayerMan();
CXUtility util = m_Map.GetUtility();
// Make Layer Style
CXLayerStyle style = layerman.NewStyle(2);
style.SetPen(util.RGBColor(255, 0, 0), 2, util.GetConstToValue(_T("PS_SOLID")));
style.SetBrush(util.RGBAColor(0, 0, 255, 100), util.GetConstToValue(_T("BS_SOLID")));
CXLayer layer = layerman.NewLayer(1);
CXLayerFont font = layerman.NewFont(-1);
font.AddPen(RGB(255, 0, 0), 10, util.GetConstToValue(_T("PS_SOLID")));
font.AddBrush(RGB(0, 0, 255), util.GetConstToValue(_T("BS_SOLID")));
font.AddCircle(util.GetConstToValue(_T("TM_LAYERFONT_CIRCLE")) | util.GetConstToValue(_T("TM_LAYERFONT_FILL_POLYGON")), 10);
CXLayerPolygon polygon = layerman.NewPolygon(100, -1);
polygon.SetStyle(style);
polygon.SetClosed(0); // 0: PolyLine, 1: Polygone
polygon.SetStartFont(font);
polygon.SetStartFontScale(100);
polygon.SetEndFont(font);
polygon.SetEndFontScale(100);
polygon.SetStateModeNew();
|
|
|
|
See Also
|
|