Paula Nicole Castillo: 4to Proyecto - Pizarra de dibujo
De Casiopea
Título | Pizarra de dibujo |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 4 |
Período | 2012- |
Asignatura | Taller Inicial Común 1ª y 2ª Etapa, |
Del Curso | Imagen Escrita 2012, |
Carreras | Diseño Gráfico"Diseño Gráfico" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property., Diseño Industrial"Diseño Industrial" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property. |
Alumno(s) | Paula Nicole Castillo |
Profesor | Herbert Spencer |
//*Con ejemplo de pizarra en clase, se crea una pizarra de dibujo del tamaño de la pantalla con funcion de:
botón izquierto(mouse): dibuja botón derecho(mouse): borra tecla 3: se resetea tecla d: cambia de color aleatoriamente *//
void setup() { size(screen.width, screen.height); // Tamano pizarra ` background(255); smooth(); // Suavizado anti-aliasing stroke(3); strokeWeight(2); colorMode(HSB); //Establezco el formato de color } void draw() { if (mousePressed) { if (mouseButton == LEFT) { // Dibuja line(mouseX, mouseY, pmouseX, pmouseY); } } if (mousePressed) { if (mouseButton == RIGHT) { //Borra line(mouseX, mouseY, pmouseX, pmouseY); stroke(255); strokeWeight (10); } } if (keyPressed) if (key == 'd'){ // Cambia el color al azar stroke (random(255), 255, 255); } if (keyPressed) { if (key == '3') { background(255); // resetea } } }