display image using a ptlabel

Hello,

I set the image resource of a ptlabel widget to a PhImage_t variable, which is the result of a
PxLoadImage call.

After setting the image resource with PtSetResources, can I use the PhImage_t variable for other
purposes or does Photon/ptlabel use it ?

In other words : Does PtSetResources copy all needed data (including the bitmap data in
PhImage_t->image) or only set a widget internal pointer to the provided data ?

\

Gerd

Gerd Hedtke <Gerd.Hedtke@t-online.de> wrote:
: Hello,

: I set the image resource of a ptlabel widget to a PhImage_t variable, which is the result of a
: PxLoadImage call.

: After setting the image resource with PtSetResources, can I use the PhImage_t variable for other
: purposes or does Photon/ptlabel use it ?

: In other words : Does PtSetResources copy all needed data (including the bitmap data in
: PhImage_t->image) or only set a widget internal pointer to the provided data ?

Did you read the docs? Here’s what they say:

When you set this resource, the widget copies the PhImage_t structure
but not the data pointed to by the members of the structure. After
setting this resource, you can free() the PhImage_t if you don’t need
it, but don’t free() the members of it.

Isn’t that clear enough?


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Thank you,
you helped me a lot !


Gerd