jueves, 5 de diciembre de 2013

0
19 Mas sentencias



SENTENCIAS

strokeJoin(BEVEL); strokeJoin(MITER); strokeJoin(ROUND);

Para efectos de esquinas.


smooth();
size(300,300);
strokeWeight(12);
strokeJoin(BEVEL);
rect(15, 10, 45, 35);
strokeJoin(MITER);
rect(15, 80, 45, 180);
strokeJoin(ROUND);
rect(100, 100, 145, 150);


SENTECIA PFont 

Para establecer la fuente.
PFont font; // Declarar
font = loadFont("tipo de fuente.vlw"); // carga el tipo de font
textFont(font); // El texto lo pone con el tipo de fuente escogido
textSize(tamaño); // para el tamaño

.
Ziggurat-32.vlw es un tipo de fuente, 
El tipo de fuente se lo puede crear

 ejemplos
                       
PFont font;  
font = loadFont("Ziggurat-32.vlw");  
textFont(font);  
fill(0);
text("UTE", 0, 40);  
text("JAVA", 0, 70);  
text("PROG", 0, 100);  

PFont font;
font = loadFont("Ziggurat-32.vlw");
textFont(font);
fill(255);  
text("UTE", 0, 40);
fill(0);  
text("JAVA", 0, 70);
fill(102);  
text("PROG", 0, 100);




rotate(parámetro); scale(parámetro);

La función  rotate() sus  parámetros están en unidades de radianes.
Una forma puede rotar 360 grados


Los valores de mouseX pueden ser convertidos a valores de 0.0 to 2π,
 

La función  map( ) es usada para hacer esta conversión y el resultado de ese valor es usado por la función rotate(). Así  map(value, start1, stop1, start2, stop2)

rotate(PI/8);
smooth();
rect(55, 0, 30, 45);
rotate(PI/8);
rect(55, 0, 30, 45);


CUADRO DE ROTACIONES, Según el ángulo PI




REALIZAR LA SIGUIENTE ACTIVIDAD





0 comentarios: