cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to display a "waterMark image" on the specific condition and remove the "waterMark Image" on some other condition.

Nikunj Patel
Associate III

Hello Community,

I am using "STM32F746G_Disco" development kit.

I would like to display "WaterMark Image" on specific condition .

On specific condition, i need to display image, so i am using below API.

image.setBitmap(Bitmap(Image_ID));

image.invalidate();

On specific condition, i need to remove image,

So Which API i used to remove image or Is there any way to remove the image with same co-ordinate.

Regards,

Nikunj Patel

3 REPLIES 3
chaaalyy
Senior II

Hi,

just an Idea: Maybe it´s enough, to change the alphavalue of the image and make it "invisible" under specific conditions ? Or to place a "solid filled Box" above the image, like usual. Place all the other stuff (buttons, sliders and so on) on top and then change the alpha to make the Box (formerly blocking the Image) invisible....

The easiest approach would be, to set up a screen, especially just used to display the image and show / delete the whole screen depending on your condition.

/Charly

Romain DIELEMAN
ST Employee

Hi,

as chaaalyy wrote, setting up the alpha of the image to 0 is an easy way to make the image invisible while keeping its coordinates. Just write:

image.setAlpha(0);
image.invalidate();

Set it back to 255 when you wish to have it appear again. You can also use:

image.setVisible(true);                 // or false
image.invalidate();

Hello @Karl Hönemann​  @Romain DIELEMAN​ 

Thanks for quick reply

Now, It is works for me.