【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.24.1 Layer::CreateGraphObject
Contents
Description
create a specified type graph object.
Syntax
GraphObject CreateGraphObject( int nType, LPCSTR lpcszName = NULL, DWORD dwCntrl = 0 )
Parameters
- nType
- [input] the type of graph object to create. It can be one of the following:
- GROT_TEXT
- GROT_LINE
- GROT_RECT
- See more GROT_* in oc_const.h file.
- lpcszName
- [input] the name of graph object
- dwCntrl
- [input] just used as internal, can keep it as 0
Return
returns the newly created graph object
Examples
EX1
//Create a rectangle object in the active graph. void Layer_CreateGraphObject_ex1() { GraphLayer gl = Project.ActiveLayer(); if(gl) { GraphObject goRect = gl.CreateGraphObject(GROT_RECT, "RectObj"); GraphObject goTest = gl.GraphObjects("RectObj"); if(goTest) out_str("Create success."); gl.GetPage().Refresh(); } }
Remark
See Also
Layer::GraphObjects Layer::RemoveGraphObject Layer::CreateShapeGraphObjects
Header to Include
origin.h