







JsPropertiesExtractor | Send comments on this topic. |
AddText Method | |
See Also |
![]() |
vdWebLibrary Namespace > vdrawObj Class : AddText Method |
- textvalue
- The string to be displayed in the vdText object.
- height
- The vdText's height.
- insertionPt
- The vdText's insertion point.
- horjust
- The vdText's horizontal justification. You can set values between the VdConstHorJust_VdTextHorLeft, VdConstHorJust_VdTextHorRight, VdConstHorJust_VdTextHorAligned, VdConstHorJust_VdTextHorCenter and VdConstHorJust_VdTextHorFit.
- verjust
- The vdText's vertical justification. You can set values between the VdConstVerJust_VdTextVerBaseLine, VdConstVerJust_VdTextVerBottom, VdConstVerJust_VdTextVerCen and VdConstVerJust_VdTextVerTop.
- rotation
- The vdText's rotation in radians.
- drawit
- Defines if the vdText will be drawn.
- entities
- The entities collection where the text will be added. This can be the entities of layout or a block.
JScript | |
---|---|
public function AddText( textvalue : String, height : double, insertionPt : Object, horjust : int, verjust : int, rotation : double, drawit : boolean, entities : Object ) : Object; |
Parameters
- textvalue
- The string to be displayed in the vdText object.
- height
- The vdText's height.
- insertionPt
- The vdText's insertion point.
- horjust
- The vdText's horizontal justification. You can set values between the VdConstHorJust_VdTextHorLeft, VdConstHorJust_VdTextHorRight, VdConstHorJust_VdTextHorAligned, VdConstHorJust_VdTextHorCenter and VdConstHorJust_VdTextHorFit.
- verjust
- The vdText's vertical justification. You can set values between the VdConstVerJust_VdTextVerBaseLine, VdConstVerJust_VdTextVerBottom, VdConstVerJust_VdTextVerCen and VdConstVerJust_VdTextVerTop.
- rotation
- The vdText's rotation in radians.
- drawit
- Defines if the vdText will be drawn.
- entities
- The entities collection where the text will be added. This can be the entities of layout or a block.
Return Value
The created vdText object.You can create new points by using the newpoint method. Attention, the source .vds file is not modified.
NOTE: When adding a new text, the characters must be already defined in the vds file that you already select to vdcanvas. By default all characters from 0 to 255 for all textstyles and additionally all characters that are used by vdText,vdMtext objects in the drawing, are exported . If you want to use additional characters or to ensure that some characters always exist in the webControl, you must add them during the vddocument.ExportScript call from VectorDraw FrameWork It can be done by using the 3rd parameter in the parameters argument of the ExportScript For Example string ensureCharacters = "Coffee - Filter and Ground"; object [] paramenters = new object[]{null,6,ensureCharacters .ToCharArray()}; document.ExportScript("myfilename.vds",null,paramenters );