Oct 27, 2014 Replies: 3 A Canvas object allows you to draw over a view. Canvas.Initialize expects a single parameter which is the target view. You can then use the different drawing methods to draw over the view. The drawings will only be applied when you call Canvas.Refresh. If the target view changes its size then you need to initialize the Canvas object again. This usually happens in Page_Resize event. In this example we use two different canvas objects. cvsBackground is used to fill the root panel with a gradient. Canvas1 draws over Panel1 which is a transparent panel. The smiley is drawn with Canvas1. This video also demonstrates the hot code swapping feature. Make sure to watch in HD mode (click on the small gear button). Note that you should call Canvas.Release if it is no longer required. You can create a Bitmap from the canvas layer with Canvas.CreateBitmap. Attachments Smiley.zip Smiley.zip 4.7 KB · Views: 1,648 Click to expand...
A Canvas object allows you to draw over a view. Canvas.Initialize expects a single parameter which is the target view. You can then use the different drawing methods to draw over the view. The drawings will only be applied when you call Canvas.Refresh. If the target view changes its size then you need to initialize the Canvas object again. This usually happens in Page_Resize event. In this example we use two different canvas objects. cvsBackground is used to fill the root panel with a gradient. Canvas1 draws over Panel1 which is a transparent panel. The smiley is drawn with Canvas1. This video also demonstrates the hot code swapping feature. Make sure to watch in HD mode (click on the small gear button). Note that you should call Canvas.Release if it is no longer required. You can create a Bitmap from the canvas layer with Canvas.CreateBitmap.
Ariel New Member Licensed User Longtime User Nov 12, 2014 #2 Congratulations on the contribution to the community basic4, you're a genius, I admire you. Can I compile the same project made basic4android? Regards Ariel
Congratulations on the contribution to the community basic4, you're a genius, I admire you. Can I compile the same project made basic4android? Regards Ariel
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2014 #3 Ariel said: Can I compile the same project made basic4android? Click to expand... It should be simple to convert the code to B4A though it is not exactly the same.
Ariel said: Can I compile the same project made basic4android? Click to expand... It should be simple to convert the code to B4A though it is not exactly the same.
Tayfur Well-Known Member Licensed User Longtime User Nov 13, 2014 #4 Erel, We waiting your B4i <>B4a convert program thanks for your suprize