Draw.Rect with Color.Transparent doesn't work well

klaus

Expert
Licensed User
Longtime User
Hi Erel,

There is a wrong behaviour with DrawRect and Transparent color.
Clicking on Set Im2 should add a red rectangle, but it adds a transparent rectangle.

In the program:
There are two ImageViews.
ImageView1 with a light gray color and
ImageView2 with a dark gray color on top of ImageView1.
The goal is working with layers.
Clicking on Clear Im2 works well
Clicking on Clear Im1 works well
Clicking on Set Im2 adds 3 lines OK, but should also add a red rectangle but doesn't
Clicking on Reset Im2 stes the ImageView2 color to dark gray
Clicking on Set Im2 now adds the red rectangle
Clicking on Clear Im2 should set the red rectangle to Transparent but nothing happens nor is the not filled rectangle.
The other drawing functions I seem to work well.
With Im1 ON/OFF and Im2 ON/OFF the two ImageViews can be set Visible or hidden.

The attached program shows the problem.

Best regards.
 

Attachments

  • TestTransparency.zip
    6.3 KB · Views: 436
Top