私は2つのレイヤー(背面、前面)を持つSVGを持っています。
背面を色で塗りつぶす必要があります (色はランダムになります)。
でもフロントはそのままでいい。
前面に影響を与えずに背面を埋めるにはどうすればよいですか?
PShape elem;
PShape back;
PShape front;
void setup()
{
size(900,600);
background(255);
fill(100);
elem = loadShape("resources/images/elem.svg");
back = elem.getChild("back");
front = elem.getChild("front");
smooth();
noLoop();
}
void draw(){
elem.disableStyle();
fill(0, 51, 102);
noStroke();
shape(back, 50, 50, 250, 250);
shape(front, 50, 50, 250, 250);
}
ご協力ありがとうございました。