|
Add Custom Image/Symbol to a 3D ScatterGroup |
Posted by MarkZB on Jun-12-2018 06:28 |
|
How do I specify a custom image (eg "image1.png") to a ScatterGroup?
addScatterGroup(double[] xData, double[] yData, double[] zData, string name, int symbol, int symbolSize);
I'm not sure how to get from string ("image1.png") to int...
Do i preload the images somehow? |
Re: Add Custom Image/Symbol to a 3D ScatterGroup |
Posted by MarkZB on Jun-12-2018 07:11 |
|
Ok I managed to load custom images using g.setDataSymbol2(foo);
Is there a way to specify image size (h, w) or do I need to resize the images beforehand? |
Re: Add Custom Image/Symbol to a 3D ScatterGroup |
Posted by Peter Kwan on Jun-12-2018 17:24 |
|
Hi MarkZB,
You may load the symbol into a DrawArea to resize it, and then use the DrawArea as the symbol in getDataSymbol3.
// Load image and resize it
DrawArea d = new DrawArea();
d.load(foo);
d.resize(width, height);
// Use the DrawArea as the symbol
g.setDataSymbol3(d);
Hope this can help.
Regards
Peter Kwan |
Re: Add Custom Image/Symbol to a 3D ScatterGroup |
Posted by MarkZB on Jun-13-2018 04:40 |
|
Yes. Thank you. Learning every day... |
|