cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin - ALPHA_Bargraph - Draw alpha effect not working

M0NKA
Senior
Posted on May 07, 2015 at 17:54

Hello,

I have managed to compile and run the stm32cubef4 libs, together with STemWin V5.26. I use the STM324x9I-Eval board with MB1046B display board. I can run all the included examples, plus the sample available on the Segger site.

The one i try to use in my project is ALPHA_Bargraph. It seems to run fine, with the

exception of the 'Draw alpha effect':

Rect.x0 = xPos;

  Rect.x1 = xPos + 3;

  Rect.y0 = yPos;

  Rect.y1 = yPos + 122;

  GUI_SetClipRect(&Rect);

  GUI_SetColor(0xd99100);

  GUI_SetAlpha(168);

  GUI_FillRoundedRect(xPos, yPos, xPos + 172, yPos + 122, 4);

  GUI_SetClipRect(NULL);

  GUI_FillRect(xPos + 4, yPos + 1, xPos + xBlend, yPos + 122 - 1);

  GUI_SetAlpha(0);

Commenting out the above code seems to speed up the displaying of the bar elements, but when enabled i don't see the blue rectangle that moves in the foreground when i run the Windows executable for this sample.

I have tried to check the configuration values, increase the available RAM for the library, etc, with no luck.

Here some of those settings:

#define GUI_NUMBYTES  (1024) *  1024

unsigned long *mem = (unsigned long *)0xC0000000;

....

GUI_ALLOC_AssignMemory(mem, GUI_NUMBYTES);

....

#define GUI_NUM_LAYERS            2

#define GUI_OS                                (0)

#define GUI_SUPPORT_TOUCH       (0)

#define GUI_SUPPORT_MOUSE             (0)

#define GUI_WINSUPPORT                (1)

#define GUI_SUPPORT_MEMDEV            (1)

#define GUI_SUPPORT_DEVICES           (1)

....

define XSIZE_PHYS 480

#define YSIZE_PHYS 272

#define NUM_BUFFERS  2 /* Number of multiple buffers to be used */

#define NUM_VSCREENS 1 /* Number of virtual screens to be used */

#define GUI_NUM_LAYERS 2

#define LCD_LAYER0_FRAME_BUFFER  ((int)0xC0200000)

#define LCD_LAYER1_FRAME_BUFFER  ((int)0xC0400000)

Maybe there is an extra configuration somewhere i have missed ? Thank you.

Regards, Chris

1 REPLY 1
M0NKA
Senior
Posted on May 09, 2015 at 15:24

Ignore that, seems the LCD driver in the stm32cubef4.zip package is a work in progress(read not working). Alpha blending not implemented.