User Tools

Site Tools


pt:stamp

Differences

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

Link to this comparison view

pt:stamp [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== Stamp =====
 +==== Formato ====
 +**stamp** //x//, //y//, //array//\\
 +**stamp** //x//, //y//, {x1, y1, x2, y2, x3, y3 ...}\\
 +**stamp** //x//, //y//, //scale//, //array//\\
 +**stamp** //x//, //y//, //scale//, {x1, y1, x2, y2, x3, y3 ...}\\
 +**stamp** //x//, //y//, //scale//, //rotation//, //array//\\
 +**stamp** //x//, //y//, //scale//, //rotation//, {x1, y1, x2, y2, x3, y3 ...}
  
 +==== Descrição ====
 +
 +Desenha um polígono com a sua coordenada 0,0 (origem) posicionada em x, y. Opcionalmente amplia ou reduz o polígono no factor definido (1 = tamanho normal). Também, opcionalmente, faz girar o polígono um ângulo especificado em torno da origem (no sentido horário em radianos). Os vertices do polígono são definidos pelos valores de uma matriz, que devem ser armazenados como pares x, y, sequencialmente. O comprimento da matriz / 2 vai definir o número de pontos. Os polígonos definidos com STAMP também podem ser especificados usando uma lista de pares x, y entre chavetas {}.
 +
 +==== Ver também ====
 +[[poly|Poly]]
 +==== Exemplo ====
 +Both of the code blocks below will draw a pair of green triangles on the graphics window:
 +<code>
 +clg
 +color blue
 +rect 0,0,300,300
 +color green
 +dim tri(6)
 +tri = {0, 0, 100, 100, 0, 100}
 +# stamp the triangle at 0,0 (full size)
 +stamp 100, 100, tri
 +# stamp the triangle at 200,100 (half size)
 +stamp 200, 100, .5, tri
 +</code>
 +<code>
 +clg
 +color blue
 +rect 0,0,300,300
 +color green
 +# stamp the triangle at 0,0 (full size)
 +stamp 100, 100, {0, 0, 100, 100, 0, 100}
 +# stamp the triangle at 200,100 (half size)
 +stamp 200, 100, .5, {0, 0, 100, 100, 0, 100}
 +</code>
 +Ambos os programas desenham:\\
 +{{:en:stamp.png|}}
 +==== Introduzido ==== 
 +0.9.4
pt/stamp.txt · Last modified: 2020/02/28 10:46 (external edit)