get_resources();
set_resources(value);
!MISSING Scrap '_RTJavaScript_PROPERTY_SYNTAX'!
Type | Description |
---|---|
AnnResources | The annotations resources used by this container. The default value is null. |
The annotations resources are images and rubber stamps used through the toolkit. Typically, you create one global AnnResources object and assign it to each container in your application.
example: function SiteLibrary_DefaultPage$example() { // Assume Resources/Point.png is the picture you want to use with Point objects // Create a new instance of AnnResources if the container does not already have one var resources = this._automation.get_container().get_resources(); if (resources == null) { resources = new Leadtools.Annotations.Core.AnnResources(); this._automation.get_container().set_resources(resources); } // Get the images collection var imagesResources = resources.get_images(); // Add our picture to it imagesResources.add(new Leadtools.Annotations.Core.AnnPicture("Resources/Point.png")); var pictureIndex = imagesResources.length - 1; // Get the container and set the resources into it var container = this._automation.get_container(); container.set_resources(resources); var inch = 720.0; // Add a point object at 1in,1in var pointObj = new Leadtools.Annotations.Core.AnnPointObject(); pointObj.get_points().set_item(0, Leadtools.LeadPointD.create(1 * inch, 1 * inch)); // Set the picture pointObj.set_defaultPicture(pictureIndex); // Add it to the container container.get_children().add(pointObj); // Select it this._automation.selectObject(pointObj); },