Method AddText
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
AddText(string, double, object, int, int, double, bool, object)
Adds the given string object as vdText in the document. The vdText is defined by the height, the insertionPt wich is a 3 sized array, the horizontal and vertical justifications. Also defined by the rotation.
public object AddText(string textvalue, double height, object insertionPt, int horjust, int verjust, double rotation, bool drawit, object entities)
Parameters
textvaluestringThe string to be displayed in the vdText object.
heightdoubleThe vdText's height.
insertionPtobjectThe vdText's insertion point.
horjustintThe vdText's horizontal justification. You can set values between the VdConstHorJust_VdTextHorLeft, VdConstHorJust_VdTextHorRight, VdConstHorJust_VdTextHorAligned, VdConstHorJust_VdTextHorCenter and
VdConstHorJust_VdTextHorFit.verjustintThe vdText's vertical justification. You can set values between the VdConstVerJust_VdTextVerBaseLine, VdConstVerJust_VdTextVerBottom, VdConstVerJust_VdTextVerCen and VdConstVerJust_VdTextVerTop.
rotationdoubleThe vdText's rotation in radians.
drawitboolDefines if the vdText will be drawn.
entitiesobjectThe entities collection where the text will be added. This can be the entities of layout or a block.
Returns
- object
The created vdText object.
Remarks
You can create new points by using the newpoint(double, double, double) 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 );