|
changes between 5.01 and 5.1 |
Posted by Daniel on Oct-22-2012 23:05 |
|
I tried to port some graphics from 5.01 to 5.1 (COM version) and learned to appreciate the new "crispier" small font support. However I have found two "hiccups" that I was unable to tackle!
The calls are:
- addline (red with a signficant level of alpha transparency activated for color),
- addScatterLayer (very light grey with a significant level of alpha transparency activated for color),
- AddMark then setting color with setBackground (with a background color set to transparent and a red edgeColor.
I have joined samples of the 5.01 and 5.1 to display what happens. Am I missing something simple concerning alpha transparency or a general setting to review.
Daniel
|
Re: changes between 5.01 and 5.1 |
Posted by Peter Kwan on Oct-23-2012 04:16 |
|
Hi Daniel,
Are you using Javascript on 64-bit Windows?
We are aware of an issue of using hex numbers larger than 0x7fffffff in Javascript on 64-bit Windows, which is not related to ChartDirector version. If you use a color like 0x80ff0000 in Javascript in 64-bit Windows, when it reaches ChartDirector (which is a COM component), it will become 0x80000000 (semi-transparent black). In other words, the lower 24 bits will all be set to 0. However, if you use 0x80ff0000 | 0, it will work normally. So it seems in Javascript in 64-bit Windows, hex numbers greater than 0x7fffffff must be bitwise OR with 0 (which seems should have no effect, but it does have effect) to become a bitwise correct 32-bit integer.
Hope this can help.
Regards
Peter Kwan |
Re: changes between 5.01 and 5.1 |
Posted by Daniel on Oct-23-2012 04:21 |
|
On first issue:
"addline (red with a signficant level of alpha transparency activated for color)"
reducing the alpha transparency setting to 0x89 does fix it. Of course, we lose the transparency level we initially wanted to achieve (0xAA). Still do not understand why!
Concerning the third issue ie:
"AddMark then setting color with setBackground (with a background color set to transparent and a red edgeColor)"
I temporary solved the problem changing the background color of the text label attached to the Xaxis mark object to full white (with no transparency).
We are still stuck with the addscatter problem :
"addScatterLayer (very light grey with a significant level of alpha transparency activated for color)"
This is additionnal point layer added to the box graph in order to provide some additionnal density information.
Worked well on the previous version. On 5.1 it looks like both the fillColor and edgeColor parameters are not set. And the transparency layer seems to be ignored.
Feedback is welcome. Since this is quite an unusual behaviour. |
Re: changes between 5.01 and 5.1 |
Posted by Daniel on Oct-23-2012 04:23 |
|
No javascript. We are using chartdir via 32bits COM |
Re: changes between 5.01 and 5.1 |
Posted by Daniel on Oct-23-2012 05:12 |
|
Casting the color parameters as INTEGER(s) seems to make the trick.
Do not ask me why! |
Re: changes between 5.01 and 5.1 |
Posted by Peter Kwan on Oct-23-2012 21:11 |
|
Hi Daniel,
Would you mind to clarify which programming language you are using? Also, are you using ChartDirector on 64-bit Windows? Does the same problem happen with ChartDirector 5.0.1 if you use it on 64-bit Windows?
Regards
Peter Kwan |
Re: changes between 5.01 and 5.1 |
Posted by Daniel on Oct-23-2012 22:45 |
|
Hi Peter,
Language is the legacy VFP9 (32bits compiled only). Everything works like a charm with Chartdirector COM version.
We are on our way to python 3.x but, sure, still need the fox to-day. What happened is curious. I had to specifically CAST the color parameters when moved to the Chartdirector lib.
Not a problem apart from one thing. I'd be glad to catch WHY this happens. And whether this might happen with other legacy dev tools ? la VB6.
Thanks for your great product and splendid support
Daniel |
Re: changes between 5.01 and 5.1 |
Posted by Daniel on Oct-23-2012 22:47 |
|
Does the same problem happen with ChartDirector 5.0.1? No it did not. It did not on 4.x as far as memory can serve me on this:)
Daniel |
Re: changes between 5.01 and 5.1 |
Posted by Peter Kwan on Oct-24-2012 01:01 |
|
Hi Daniel,
We apologize for this problem. After more detail testing, we found that it is in fact a bug in ChartDirector for ASP/COM/VB. This bug does not affect VB/VBA/VB6, but can affect certain programmng languages in certain types of Windows.
ChartDirector uses 32-bit integers as colors. The issue is whether 80FF0000 or AABBCCDD is a 32-bit integer. It depends on the programming language. If it is a 32-bit integer, the color is always as expected. That's why in VFP, casting to INTEGER works. That is also why it always work in VB/VB6/VBA, as AABBCCDD is a 32-bit integer in these programming languages.
We are aware that in certain programming languages, AABBCCDD is not a 32-bit integer. In ChartDirector for ASP/COM/VB, there is special code to convert numbers like this to 32-bit integers. It happens our code is written in a way that is compiler dependent. In ChartDirector 5.1, we have upgraded to a newer compiler version to compile the code, and the conversion code fails on some Windows OS, but not on all Windows OS. So this error slips through our automated test scripts. We did catch this error on a 64-bit Windows, but we wrongly think it is related to Javascript on 64-bit Windows (actually it can happen on 32-bit Windows too).
The actual error occurs in aspapi.dll. I have already uploaded an updated aspapi.dll to our web site, which should solve the problem:
http://www.advsofteng.com/aspapi51p1.zip
The issue only occurs in ChartDirector for ASP/COM/VB for certain non-VB programming languages. It does not affect other editions of ChartDirector.
Please kindly let me know if the updated aspapi.dll can solve the problem.
Regards
Peter Kwan |
Re: changes between 5.01 and 5.1 |
Posted by Daniel on Oct-24-2012 15:39 |
|
>The actual error occurs in aspapi.dll.
>The issue only occurs in ChartDirector for ASP/COM/VB for certain non-VB programming >languages. It does not affect other editions of ChartDirector.
I assumed as well that the problem did lie in the core engine but in the dll in charge of the transmission since it was undocumented...
>I have already uploaded an updated aspapi.dll to our web site, which should solve the problem:
http://www.advsofteng.com/aspapi51p1.zip
Thanks for the speedy work:)
>Please kindly let me know if the updated aspapi.dll can solve the problem
I just dropped the corrected dll and dropped the corrections - ie a whole set of CAST(hexa colors settings AS INTEGER). It did perfectly well.
The scripting code now works unchanged between the two versions:) The only (very) slight visible discrepancy is in font display (and can be disabled, should one wish for).
Great support and superb engineering) |
|