Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem with opacity in an icon (Read 2204 times)
Brad.Reynolds
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Jan 30th, 2007
Problem with opacity in an icon
Jan 30th, 2007 at 9:45pm
Print Post  
I am evaluating the FlowChart.NET v4.2.2 control.

We are using the control with images on the boxes.  We use icon files that have both transparency and opacity properties. When an icon only uses transparency, the control works fine. However, when opacity is used, it seems that the default color of the FlowChart control is bleeding through, despite the BackColor property being set to White. I've created a simple sample project that shows this problem, which I'd be happy to provide upon request.

I hope this issue can be addressed quickly, as we really like the control; however, this bug is a deal-breaker for us.

Thanks for your time and effort on this matter!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with opacity in an icon
Reply #1 - Jan 31st, 2007 at 6:16am
Print Post  
The alpha channel values are lost when you put the icons into a .NET ImageList. Image.FromFile doesn't seem to work too. I have managed to load the icons with their alpha values preserved using the Icon class.

[code]
void m_CurrentDiagram_BoxCreated(object sender, BoxEventArgs e)
{
     if (m_CurrentDiagram.Boxes.Count % 2 == 0)
           e.Box.Image = new Icon(@"D:\FlowChartNET_ImageProblem\FlowChartNET_ImageProblem\script_opaque_48x48_XP.ico").ToBitmap();
     else
           e.Box.Image = new Icon(@"D:\FlowChartNET_ImageProblem\FlowChartNET_ImageProblem\script_48x48_XP.ico").ToBitmap();

     e.Box.Transparent = true;
}
[/code]

I guess loading the icons from a resource stream instead from files will work too.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint