C++ Builder XE4.
Tee Build.201.10.140220
OS Windows 7, 32 bit
I use TBitmap object with Transparent=true; TransparentColor=clBlack; for custom drawing in Chart's BeforeDrawSeries.
TTeeGDIPlus object is attached to the chart. If the former has Active = true, bitmap is drawn with black fields. Setting GDI+ Active=false fixes this behavior, bitmap is rendered transparently.
Is there any special trick required to paint this image transparently on GDI+ canvas as well?
Transparent TBItmap becomes non-transparent in GDI+ mode
Re: Transparent TBItmap becomes non-transparent in GDI+ mode
Hello,
This sounds similar to this:
http://www.teechart.net/support/viewtop ... =3&t=14630
I also see you've added a ticket to the tracker: http://bugs.teechart.net/show_bug.cgi?id=613
As you'll see we couldn't reproduce the problem here.
This sounds similar to this:
http://www.teechart.net/support/viewtop ... =3&t=14630
I also see you've added a ticket to the tracker: http://bugs.teechart.net/show_bug.cgi?id=613
As you'll see we couldn't reproduce the problem here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 8
- Joined: Mon Apr 29, 2013 12:00 am
- Location: Moscow, Russian Federation
- Contact:
Re: Transparent TBItmap becomes non-transparent in GDI+ mode
I've attached test project for case study.
It (tries to) generate CIE 1931 xyz chart with colour 'horse foot' behind it.
The 'horse foot' is dynamically generated dib, which uses black as transparent key colour. It's being drawn OK in GDI mode,
but becomes opaque in GDI+ mode. This code is from the earlier stage of the project, later, I tried all kind of Alpha modes, like defined and premultiplied, but the best result was opaque neverthless, if alpha channel is used for
thransparent areas fill, like in 0xff000000 colour, the transparent area remained opaque, but was drawn in light gray colour, no black.
It (tries to) generate CIE 1931 xyz chart with colour 'horse foot' behind it.
The 'horse foot' is dynamically generated dib, which uses black as transparent key colour. It's being drawn OK in GDI mode,
but becomes opaque in GDI+ mode. This code is from the earlier stage of the project, later, I tried all kind of Alpha modes, like defined and premultiplied, but the best result was opaque neverthless, if alpha channel is used for
thransparent areas fill, like in 0xff000000 colour, the transparent area remained opaque, but was drawn in light gray colour, no black.
- Attachments
-
- ColorTest.zip
- TestProject
- (13.19 KiB) Downloaded 679 times
Re: Transparent TBItmap becomes non-transparent in GDI+ mode
Hello,
Thanks for the project but it's more than 500 lines of C++ code, making it difficult for us to debug it.
We'd need a simple example project we can run as-is to reproduce the problem here, not the big project.
Thanks for the project but it's more than 500 lines of C++ code, making it difficult for us to debug it.
We'd need a simple example project we can run as-is to reproduce the problem here, not the big project.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 8
- Joined: Mon Apr 29, 2013 12:00 am
- Location: Moscow, Russian Federation
- Contact:
Re: Transparent TBItmap becomes non-transparent in GDI+ mode
Sorry for bloated example, guys Ripped it from the working project.
I will try to make simple project, but it'll take time. Let me explain.
For some reason, when I install both VCL and FMX Tee packages, my C++ Builder refuses to "see" FMX TChart in palette and form designer (I mentioned this in either this forum or bug tracker, do not remember clearly).
So, for me switching between VCL and FMX frameworks, takes quite a lot of PITA of carefully removing VCL packages from IDE, and installing FMX ones, in certain order Kind of dark ritual.
So, as soon my main development framework is FMX, and the transparency stuff I ran into, was in VCL, I need to postpone further efforts, until the end of the working week.
I will try to make simple project, but it'll take time. Let me explain.
For some reason, when I install both VCL and FMX Tee packages, my C++ Builder refuses to "see" FMX TChart in palette and form designer (I mentioned this in either this forum or bug tracker, do not remember clearly).
So, for me switching between VCL and FMX frameworks, takes quite a lot of PITA of carefully removing VCL packages from IDE, and installing FMX ones, in certain order Kind of dark ritual.
So, as soon my main development framework is FMX, and the transparency stuff I ran into, was in VCL, I need to postpone further efforts, until the end of the working week.
Re: Transparent TBItmap becomes non-transparent in GDI+ mode
Hi
Regarding the problem in this thread, if you are in FMX, I'm not asking you to move to VCL to prepare the simple example. You can do it in FMX or VCL, where you prefer, but simple.
I'm sorry to hear you are suffering such inconvenient. I see you reported it here but we weren't able to reproduce the problem here. If you have any extra clue that may help us to investigate where the problem may come from, don't hesitate to post it in that thead.vgromov wrote:Sorry for bloated example, guys Ripped it from the working project.
I will try to make simple project, but it'll take time. Let me explain.
For some reason, when I install both VCL and FMX Tee packages, my C++ Builder refuses to "see" FMX TChart in palette and form designer (I mentioned this in either this forum or bug tracker, do not remember clearly).
So, for me switching between VCL and FMX frameworks, takes quite a lot of PITA of carefully removing VCL packages from IDE, and installing FMX ones, in certain order Kind of dark ritual.
So, as soon my main development framework is FMX, and the transparency stuff I ran into, was in VCL, I need to postpone further efforts, until the end of the working week.
Regarding the problem in this thread, if you are in FMX, I'm not asking you to move to VCL to prepare the simple example. You can do it in FMX or VCL, where you prefer, but simple.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |