ImageGear Professional v18.2 > User Guide > Using ImageGear > Using ImageGear ART Component > Creating, Saving, Loading, Modifying and Deleting ART Marks > Creating a Mark via Function Calls |
Some applications won't use the ART ToolBar, or will provide the ToolBar and other options, for creating marks. In that case, some function in your application will need to create the marks directly: to do that, your application will call MarkCreate Method. The way that MarkCreate Method works is that you specify the type of the desired mark in the parameter on the subroutine call. All of the characteristics of the mark (size, position, text contained within it, etc.) are specified via a set of properties named GlobalAttrxxx. Your application must set these properties before calling MarkCreate Method. For example, to add a Typed Text annotation programmatically:
Copy Code
|
|
---|---|
Dim lMark As Long artPage.GlobalAttrBounds.Left = 10 'set the bounding rectangle artPage.GlobalAttrBounds.Top = 10 artPage.GlobalAttrBounds.Right = 100 artPage.GlobalAttrBounds.Bottom = 20 artPage.GlobalAttrText = "my text mark" 'set the text lMark = artPage.MarkCreate(markTypedText) 'create it artPage.MarkPaint lMark 'paint (draw) the mark |