Assigns a resource ID to a memory block to allow it to be referenced using a resource path.
Many ChartDirector features, such as
BaseChart.setBgImage and the <*img*> tag in
CDML, expect a
file or resource path for loading an image. If the image happens to be in memory, such as if the image is retrieved from a database, setResource can be used to assign a resource ID to the memory. It can then be referenced using "@/
res_id", in which
res_id is the resource ID.
The assigned resource ID is only valid for the
BaseChart object of which this method is called. Use
Chart.setResource to assign a resource ID that is valid for all ChartDirector objects.
This method only saves a to the memory. It does not copy the memory. You must ensure the memory contains valid content for as long as the resource is being used.
© 2021 Advanced Software Engineering Limited. All rights reserved.