Uso de archivo svg . en Proccesing
PShape figura;
PShape Fondo;
boolean click = false;
void setup() {
size(800, 800);
figura = loadShape("3.svg");
Fondo = figura.getChild("Back");
}
void draw() {
shape(figura, 0, 0);
click=!click;
if ( mousePressed){
Fondo.disableStyle();
fill(255, 0, 0);
stroke(255, 255, 0);
shape(Fondo, 0, 0);
strokeWeight(4);
} else {
Fondo.disableStyle();
fill(255, 89, 130);
shape(Fondo, 0, 0);
}
}
_________________
PShape figura;
PShape Fondo;
boolean click = false;
void setup() {
size(800, 800);
figura = loadShape("3.svg");
Fondo = figura.getChild("Back");
}
void draw() {
shape(figura, 0, 0);
click=!click;
if ( mousePressed) {
Fondo.disableStyle();
fill(#2779B9);
stroke(#27B9B6);
shape(Fondo, 0, 0);
strokeWeight(4);
} else {
fill (#34A1F7);
shape(figura, 0, 0);
}
}
No hay comentarios:
Publicar un comentario