^^ix Html canvas. To draw rectangles.

fillRect(x, y, b, h) | colored | choose color To draw a filled rectangle. Colored filled rectangle.
Iniziare da Canvas skeleton template.
onclick draw random x position rectangle | Err * e' il segno della moltiplicazione.

Ri-Ved: Random numbers. Find the error

Color if (x > 100) |Err1|Err2|Err3  
onclick draw random position rectangle. |  2 Esternamente uguali, internamente diversi.
onclick draw random pos&dim | & perimetro k | & erease  
Center: Drawn | Err | random dim | & color | To draw in the center (a filled rectangle).

Rem: > Random color

1 center point, others around.

Put together: Draw in the center & random position

strokeRect(x, y, b, h) | 2 | lineWidth To draw a rectangular line
clearRect(x, y, b, h)  
Riquadrare | ≠ ampiezza.  
Ground line. Trick: line made of a rectangle of zero height.
Vertical line. Casbarra: "Come si puņ disegnare una 'ground line' verticale? i: meglio dire "parete, muro, linea verticale".
Vertical & horizonthal. Mettiamoceli entrambi: ground & wall.
Da un punto al riquadro.  
erc: Disegnare i 3 rimanenti, 1 per programma. In ogni programma deve apparire solo 1, quindi 3 programmi.
bottom-left angle Disegnare un angolo retto coi lati verticale-orizzontale
erc: Disegnare i 3 rimanenti.  
Transparent color.  

2° Level

ecz: Draw 10 rectangles, same color, variable intensity from 150 to 240 step 10.

R: Draw rectangles changing color

onclick draw random color.

Esercizi di verifica

  1. onclick draw random rectangle, erease. Like onclick draw random segment, erease, but for rectangle, not segment.
    Ulteriori specifiche: dimensioni quadrato 40x40px; dim canvas 9*40x7*40.