I've been struggling with a problem in a GUI I'm making for a simple game(basically, a learning experience for me)
I'm trying to make windows of varied sizes using a default .png skin file(this is a crappy one quickly done just to demonstrate):
It has a 16 pixels(square) sized corner, two 32x16 borders(one vertical and one horizontal) and a 32x32 sized walpaper.
To draw a window, I simply strech the walpaper to the desired size, and then add the borders and corners to it, using the flags ALLEGRO_FLIP_HORIZONTAL and ALLEGRO_FLIP_VERTICAL when necessary.
This is an example of the type of window this method produces(Not actually done ingame, but in GIMP. Did only a single corner to demonstrate the issue). A 100x100 window:
A close look at the corner of the window will reveal the problem. I need the alpha channel of the outer part of the border to ovewrite the color of the walpaper completely, no to blend with it, but I need the inner part of the border to still blend with the walpaper.
thanks in advance.