Wednesday, November 22nd 2017, 7:22pm UTC+1

You are not logged in.

  • Login
  • Register

mgrabau

Beginner

Date of registration: Jul 5th 2017

Posts: 2

1

Friday, October 20th 2017, 10:11pm

ICONVIEW Widget and External Memory

Good Afternoon,

I am attempting to use the ICONVIEW_AddStreamedBitmapItem API to add a bitmap from external memory (a SPI-Flash). I am just wondering if there is a way to accomplish this in a way that will just call to a GUI_GET_DATA_FUNC callback. Is this capability available? I'm assuming that it would be something that GUI_BMP_DrawScaledEx?

Is this possible/a valid usage of the function?

Thank you,
Mathew

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 414

2

Monday, October 23rd 2017, 4:02pm

Hi,

Unfortunately, this is not directly possible when using the ICONVIEW API.

But you can set a custom owner draw function and react on WIDGET_ITEM_DRAW_BITMAP. When reacting on this command you can simply draw a streamed bitmap.

I have attached an example on how this could be done. It uses the windows API for opening a file handle. Simply adapt the paths in _GetImageById() to point to your dta-files.

Regards
Sven

mgrabau

Beginner

Date of registration: Jul 5th 2017

Posts: 2

3

Monday, October 23rd 2017, 5:52pm

Thank you Sven! I will review the code that you have attached.

Edit: I cannot see the attachment, am I missing something?

Cheers,
Mathew

This post has been edited 1 times, last edit by "mgrabau" (Oct 23rd 2017, 5:54pm)


SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 414

4

Tuesday, October 24th 2017, 7:59am

Hi,

of course, I forgot to attach the example.

Here you go.

Regards
Sven
SEGGER - Schoenen has attached the following file:

Similar threads