get_resources();
set_resources(value);
Object.defineProperty('resources');
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.
This example will show how to create and use a AnnResources object with AnnPointObject object.
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 lt.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 lt.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 lt.Annotations.Core.AnnPointObject(); pointObj.get_points().set_item(0, lt.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); },