vurtun / nuklear

A single-header ANSI C gui library
13.69k stars 1.11k forks source link

Implementing missing x11_rawfb features colored text and multi-color-rect #847

Closed 0x0203 closed 5 years ago

0x0203 commented 5 years ago

This implements rendering of colored text for the x11_rawfb demo and an implementation of rendering multi-colored rectangles. The latter is used by the color picker widget which currently doesn't display properly.

Both of these changes make use of the nk_image_blendpixel() routine which I modified to swap the r and b bytes of the nk_color. I'm still not sure where these are getting swizzled in the first place, but this change makes it so everything renders in the requested color. If anyone has any insight into where the 'real' fix for this is, I can make the appropriate change.

0x0203 commented 5 years ago

Okay, I think I've got this properly fixed now. As part of fixing this, I made some other changes that made things more consistent, clear, and correct.

0x0203 commented 5 years ago

Thanks for the feedback; should now all be addressed.

dumblob commented 5 years ago

Closing as per authors request - see https://github.com/vurtun/nuklear/pull/847#discussion_r290946425 . There shall be another extended pull soon from the author.