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

Message ListMessage List     Post MessagePost Message

  Minor Thick Frame/Rounded Corner Rendering Issue
Posted by Steve Valliere on May-16-2018 22:30
Attachments:
I noticed some extra bright pixels on the OUTSIDE of a dark thickFrame around my linear meters.  The attached file is a screen capture of the test meters that shows two meter background colored pixels being drawn outside the rounded thick frame.  These were generated using the example code in the ChartDirector help and altering a few of the scale, value and color values and then drawn on a black background.

If there is something I need to add to my code to correct these pixels, I'd be happy to do it, but I'm guessing they may have gone unnoticed if the outer background is typically a light color.
cdbug.png

  Re: Minor Thick Frame/Rounded Corner Rendering Issue
Posted by Steve Valliere on May-16-2018 22:34
I forgot to add that I use your example code for using StretchDIBits to get the chart image on the screen in my Windows 10 x64 program.  Also, the file properties for the ChartDirector60.dll file I am using shows file version 6.0.5.0.

  Re: Minor Thick Frame/Rounded Corner Rendering Issue
Posted by Steve Valliere on May-17-2018 00:09
I changed the extColor on the thickFrame from Chart::Transparent to the color I am using (black in this case) and the extra pixels went away and the meter looks GREAT.

Don't know why the extra pixels are present when I use the Chart::Transparent, but at least I have a way to make it look good.

  Re: Minor Thick Frame/Rounded Corner Rendering Issue
Posted by Peter Kwan on May-17-2018 00:24
Attachments:
Hi Steve,

I suspect you are using the transparent color outside the rounded border, such as:

m->setRoundedFrame(Chart::Transparent);

It is OK to use the transparent color provided the output format and display method can support alpha transparency. The ChartDirector CChartViewer can support transparency properly.

In your case, if you are using StretchDIBits, I suspect it cannot handle transparency. To verify if this is the cause of the problem, please use the black color as color outside the rounded frame, like:

m->setRoundedFrame(0x000000);

If the above can solve the problem, it is likely you current code cannot handle transparency properly. (From our experience, it is not easy to handle transparency in MFC. You can examine the CChartViewer.cpp to see how we handle it.)

I have also tested myself by modifying the background color of the original mfcdemo sample code to black. I have attached a screenshot for your reference. In my case, the color outside the rounded border is transparent, and it is using CChartViewer for display, there is no bright pixels.

Hope this can help.

Regards
Peter Kwan
scrshot.png