User Tools

Site Tools


plugins:microbit_getimage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

plugins:microbit_getimage [2016/10/24 18:57]
madlyr created
plugins:microbit_getimage [2016/10/25 17:48]
Line 1: Line 1:
-====== GetImage ====== 
- 
-The **GetImage** function Returns full path to micro:bit board top view image micro-bit.png. 
- 
-Return is string: "/data/user/0/com.smartphoneremote.androidscriptfree/app_Plugins/microbit/micro-bit.png" 
-It could be used as visualization of board. It is used by MicroBitCtrl. 
- 
-<code javascript> 
-// Load the MicroBit plugin. 
-app.LoadPlugin( "MicroBit" ); 
- 
-// Called when application is started. 
-function OnStart() 
-{ 
-  // Lock screen orientation to Portrait. 
-  app.SetOrientation( "Portrait" ); 
- 
-  // Create our main layout. 
-  lay = app.CreateLayout( "Linear", "VCenter,FillXY" ); 
-  lay.SetBackColor( "#222222" ); 
- 
-  // Create the Microbit plugin. 
-  microbit = app.CreateMicroBit(); 
- 
-  // Creates micro:bit board image with 90% of layout width 
-  img = app.CreateImage( microbit.GetImage(), 0.9, -1 ); 
-  lay.AddChild( img );   
- 
-  //Add main layout to the app. 
-  app.AddLayout( lay ); 
-} 
-</code> 
  
plugins/microbit_getimage.txt ยท Last modified: 2016/10/25 17:48 (external edit)