Joining Annotation geometry objects, vector and raster image data into a single output file
There are multiple ways to join Annotation geometry with additional imagedata in THBImage.
If your requirement is to label imagefiles with text and simple geometry you can use the THBImageEdit.Draw functions on the one side for direct pixel access and for drawing simple colored lines or rectangles. You will not get great visual effects for linestyles or rectangle fills here, instead it’s a simple fast one color geometry.
To draw text use the THBBitmapFont object, it renders text directly on the THBImageEdit object.
The textstyle can be really complex, colorful, gradient filled, transparent. You will get great fast textoutput directly rendered on the THBImageEdit object.
The resulting THBImageEdit object can be saved to file.
For better vector drawing you need the THBVector object. You fill your THBVector object with the annotation geometry. Each geometry can get its own style object.
This gives you the chance to create the visual appearance that you need.
To render both THBVector and rasterdata into a single rasterfile you can use the THBViewUtils object.
THBViewUtils.DrawArrayToTHBImageEdit will render all THBViewLayer capable objects that you pass as an array into a single THBImageEdit object.
The resulting THBImageEdit object can be saved to file.
A similar approach is to use the
THBView.DrawToTHBImageEdit
function. It will render all layers that you plugged into THBView into a single THBImageEdit object.
The resulting THBImageEdit object can be saved to file.
In this way you can flatten down all your data into a single raster file that you could for example publish as a PDF on the web.



RSS News Feed