ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  3D Bubbles Transparency
Posted by Sinan on Apr-15-2013 17:10
Hi Peter,

today I am trying to make the 3D bubbles transparent ( because some are hidden behind others )

I suppose it is somewhere in the call:
$layer = $c->addScatterLayer($x, $y, "$title", $perlchartdir::GlassSphere2Shape, 15, $c);
but all my tries failed so far.

Maybe it is not possible in the current version?
Can you please give an advice.

Thank you in advance
Sinan

  Re: 3D Bubbles Transparency
Posted by Peter Kwan on Apr-16-2013 01:46
Hi Sinan,

Your code seems to have some error.

In addScatterLayer, the 6th parameter should be the fill color. If you would like the bubbles to be semi-transparent, you may use a semi-transparent color. However, in your code, you use $c as the 6th parameter, and $c is the chart object. This means you are using the chart object as the color of the bubble, which is not meaningful.

May be you can try:

$layer = $c->addScatterLayer($x, $y, "$title", $perlchartdir::GlassSphere2Shape, 15, 0x80ff3333);

You should see the bubbles become semi-transparent.

Hope this can help.

Regards
Peter Kwan

  Re: 3D Bubbles Transparency
Posted by sinan on Apr-16-2013 03:45
Hi Peter,

I've shortened the arguments in the request to make the line shorter. The original code in fact has correct color codes but only 3 bytes (for example 0xabcdef) - In the same moment when I red your response, I remebered - the fourth byte makes the transparency. Great, incredible, Thank you

Sinan

  Re: 3D Bubbles Transparency
Posted by sinan on Apr-16-2013 03:53
oops, for the readers of this question: it is the first byte in a 4byte colorcode that defines the transparency.