Elmer Martens
unread,Jan 6, 2016, 1:54:07 PM1/6/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DroidScript
//Called when application is started.
function OnStart()
{
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "Linear", "FillXY" );
//Create a blank image.
img = app.CreateImage( null, 0.8, 0.8 );
lay.AddChild( img );
//Add layout to app.
app.AddLayout( lay );
//Draw our picture.
DrawRoundedRect();
}
function DrawRoundedRect()
{
img.SetColor( "#FFFFFF" );
img.SetPaintStyle( "Line" );
img.SetLineWidth( 2.5 );
img.SetPaintColor( "#ff0000ee" );
img.DrawLine( 0.75, 0.3, 0.75, 0.5 );
img.DrawLine( 0.35, 0.3, 0.35, 0.5 );
img.DrawLine( 0.4, 0.27, 0.7, 0.27 );
img.DrawLine( 0.4, 0.53, 0.7, 0.53 );
img.DrawArc( 0.65, .27, 0.75, 0.33, 0, -90 );
img.DrawArc( 0.65, 0.47, 0.75, 0.53, 0, 90 );
img.DrawArc( 0.35, 0.47, 0.45, 0.53, 90, 90 );
img.DrawArc( 0.35, 0.27, 0.45, 0.33, -90, -90 );
}