First of all I want to thank the author of BGRABitmap for this really powerful component.
Unfortunately I have really strange issue preventing me from actually using the component. I have integrated the component into a sub class that I create dynamically. When I use it there it behaves like any “dumb” standard canvas. I can call the AntiAlias version of the drawing functions and use colors with alpha channels. However it will not perform any of these features, but draw plain non-anti-aliased elements without alpha-blending.
Since I thought this was a general installation issue I copied the relevant code to main-form and tried it there. Strangely it fully works there (with anti-aliasing and alpha-blending). The code is 1:1 the same, to only difference is that it works when called from the main form, but not (properly) when executed within a sub-class created dynamically by the main form.
Having 20+ years of coding experience I find that behavior quite strange. The only thing I can think of are some “environmental” / global variables of the class, which might somehow cause this different outcome of the same code. However I could not identify what that could be.
One code is executed in a TForm class, the other in a Tobject class. However it even works when I create the TBGRABitmap in the Tobject class and draw on it in the TForm class – which is even weirder. (I thought that maybe the TBGRABitmap would get different attributes when created in the Tobject class).
Any help or hint on that is appreciated.
Thank you.