Search found 24 matches

by delt
Thu Feb 23, 2017 11:48 pm
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2072

Re: wxBitmap: premultiply alpha?

the problem is probably in render_base_image() which you didn't show. No, because as i mentioned, if i draw the base image instead of the overlay image (at the end of my redraw function) i see what the base image is supposed to look like. /* EDIT */ After a bit more debugging, it seems the base ima...
by delt
Thu Feb 23, 2017 12:18 am
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2072

Re: wxBitmap: premultiply alpha?

Ok, i corrected a few problems i was having with the windows version, but i have a few types of widgets where i render a base image that changes only on resize, or when the data changes etc. and then an overlay image that is updated at each mouse movement, paint event and so on. So i do something li...
by delt
Tue Feb 21, 2017 10:44 pm
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2072

Re: wxBitmap: premultiply alpha?

Which wxWidgets version? There were several fixes regarding bitmaps with alpha under Windows over the last few months. Unless you're already using the latest version from GIT, try that one. Oh, that's great news! I'm using 3.1.0 now, i will build and test the latest git tonight. Thanks again! Drawi...
by delt
Tue Feb 21, 2017 9:06 pm
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2072

Re: wxBitmap: premultiply alpha?

Thanks for the quick reply Doublemax. I got it to work correctly in linux/gtk and osx by premultiplying the color values by alpha, windows is still giving me several problems. My image is drawn incorrectly (alpha on wxBrush/wxPen seems to be ignored when drawing lines/rectangles), and a straight wxB...
by delt
Mon Feb 20, 2017 4:51 am
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2072

wxBitmap: premultiply alpha?

Hello everyone, I'm having trouble with this, and can't find *any* documentation on it, other than web pages/archives from like 12 years ago. I barely remember the concept of alpha premultiply from working on a QT project a few years ago, but i guess the way wxWidgets handles it is different anyway....
by delt
Fri Jan 13, 2017 4:47 pm
Forum: C++ Development
Topic: wxAlphaPixelData::Iterator::Alpha () on OSX: garbled pixel data..
Replies: 5
Views: 1157

Re: wxAlphaPixelData::Iterator::Alpha () on OSX: garbled pixel data..

I specifically meant the raw bitmap test. Did you check that? Yep, seems to work perfectly. It pops up an extra window with some gradients and text, and those seem to render correctly. Is there a compile-time option i can use when compiling wxWidgets, that would eliminate the need to premultiply co...
by delt
Fri Jan 13, 2017 4:01 pm
Forum: C++ Development
Topic: wxAlphaPixelData::Iterator::Alpha () on OSX: garbled pixel data..
Replies: 5
Views: 1157

Re: wxAlphaPixelData::Iterator::Alpha () on OSX: garbled pixel data..

Hello, thanks very much for your assitance. I built and installed wxWidgets-3.1.0 by doing: export CXXFLAGS="-stdlib=libc++ -std=c++11" ../configure --disable-debug --with-macosx-version-min=10.9 --disable-shared --enable-unicode --without-python make sudo make install The image sample seems to work...
by delt
Fri Jan 13, 2017 2:53 am
Forum: C++ Development
Topic: wxAlphaPixelData::Iterator::Alpha () on OSX: garbled pixel data..
Replies: 5
Views: 1157

wxAlphaPixelData::Iterator::Alpha () on OSX: garbled pixel data..

Hello everyone, I'm porting a project to OSX, and i'm having some major graphical glitches where i do some pixel manipulation on wxImage objects using wxAlphaPixelData::Iterator::Alpha () - setting this value to 0 or 255 works as expected, ie. full transparency/opacity.... but setting to anything el...
by delt
Mon Dec 26, 2016 11:22 pm
Forum: C++ Development
Topic: Rendering a control to offscreen buffer
Replies: 1
Views: 466

Rendering a control to offscreen buffer

Hello everyone, new user here from Montréal, Canada :D I'm just wondering if there is a way to create a window or control, and have it update/draw to, let's say a wxImage or wxBitmap instead of on the screen. For example, if i want to have the window/control's original appearance, but then modify it...