> @ Nikita Egorov: What were your special workarounds?
>
> I want to use Pixmap and Bitmap (32bit)... It seems that somewhere the 4
> bytes (alpha-chanel included) are changed. Both pixmap and bitmap are
> shown in the wrong colors. But if i want to show white, it is yellow...
> For me that is a hint, that alphachanel is also exchanged with the
> color-bytes.
>
> Does anyone of you have an idea, where i have to make the change? I'm no
> very familiar with this "deep inside code" (but i hope one day i will be
1) Sorry, I don't remember what exactly things were changed :-( I'll try to
explain. I was faced with the problem when I was making port FLTK to DirectFB
and I made a lot changes to expose correctly the colors . Alas, all these
changes worked unstable. Then I've removed all these fixes and I've made my
own version of DirectFB which supports twisted bytes. Though some features
remain in FLTK-DirectFB port. Thus, all these changes were removed from
original sources of FLTK.
2) I would recommend you try to change the xxx_converter() functions in
src/fl_draw_image.cxx. These functions are used to convert the image data
before the image will be put via XPutImage() (lines 522, 535 ). I suppose it
might be rgbx_coverter() or xbgr_converter() (line 314). Try to change bytes
order (ABGR=>GRBA) here or write your own simple function(s).
I hope experienced FLTK developers will correct me if it need. Or they'll give
you other wise council.
PS To reverse bytes within word/dword as fast as possible you can use PowerPC's
commands stwbrx/lwbrx. I've wrapped they into functions like that (GCC):
static inline void store_le32( u32 *addr, u32 val) {
__asm__ __volatile__("stwbrx %1,0,%2;n" : "=m" (*addr) :
"r" (val), "r" (addr));
}
See lines about 890 in
http://git.directfb.org/?p=ports/FLTK_1.x-DirectFB.git;a=blob;f=FL/xutils.h
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk