New Page 1

How To Do - Example Projects

Click on the title to open the example project
Click on the How to projects above to see the basic sample code to help you create your projects quickly and efficiently.
Each "How To" has a overall description as well as a basic line by line detail of code.
You can download the project or copy the menu file to clipboard
 
Basic Entities     Basic animation     Basic functions  
Add Image   Create button   Basic math operations
Draw colour boxes   Show page - multiple pages   Math functions
Draw colour lines   Flashing text message   Create random number
Draw colour vectors   Animation with pointers   Plus and Minus
Draw colour circles   Scroll text message   Show and format Time and Date
Draw colour ellipses   Move images (TouchX, TouchY)   Save Timestamp to text file  
Draw arcs (ellipses with angle)   Move images with buttons   Password Entry Lock  
Add multiple rows text     Move images (press button)     Menu Selection  
Use pointers   Create slider      
Text Hello World   Show and hide entities   Graphs
Create Dynamic Entities     Dial needle   Create X-Bar Graph
      PNG Transparency     Create Y-Bar Graph  
Interfaces and Hardware             Trace graph from array  
Create IO Counter           Draw sinusoid graph   
External Key             Draw graph - DNA style
Use A to D converters           Draw line graph  
Send and receive data - RS232          
Keyboard Control            
           
 

How to draw arcs (ellipses with angle)

Create a library with the background image

Create a style for page with the image as background
Create a style for the ellipse1 - colour yellow, border orange with 5px width, alignment to bottom-left.
Create a style for the ellipse2 - colour springgreen, border saddlebrown - colours written with hex values
Create a style for the ellipse3 - without background colour - we get only the arc instead of piece of a circle, border red - width=7px, alignment to top-right.
Create a style for the ellipse4 - colour black,  without border - width=0px, alignment to center.

Define a page named "pageName" with style "pageStyle"
Set current position to X=10px, Y=260px
Draw the piece of circle we have to use here to two parameters for circle height and width equal to 150px (diameter), we use start angle=110 and arc angle=300
Set current position to X=240px, Y=236px
Draw the piece of ellipse width=200px, height=300px, start angle=330, arc angle=100
Draw arc named "ellipse3" - only border without background colour
Draw small black circle without border (Pacman eye)

After loading show the page named "pageName"

LIB(background,"SDHC/bground.png");

STYLE(pageStyle, Page) { image = background; }
STYLE(drawStyle1, Draw) { type = Ellipse; back = yellow; col = orange; width = 5; currel=BL; }
STYLE(drawStyle2, Draw) { type = Ellipse; back = \\00FF7F; col = \\8B4513; width = 3; currel=CC; }
STYLE(drawStyle3, Draw) { type = Ellipse; col = red; width = 7; currel=TR; }
STYLE(drawStyle4, Draw) { type = Ellipse; back = black; col = white; width = 0;currel=CC; }

PAGE(pageName, pageStyle)
{
POSN(10, 260);
DRAW(ellipse1, 150, 150, 110, 300, drawStyle1);
POSN(240, 236);
DRAW(ellipse2, 200, 300, 330, 100, drawStyle2);
DRAW(ellipse3, 100, 150, 200, 240, drawStyle3, 460, 100);
POSN(90, 150);
DRAW(ellipse4, 15, drawStyle4);
}
SHOW(pageName);