Raw positioning of everything. Correct, but unscalable:
House is relative, but the window is wrong:
Now it's all relative, but window remains globally relative:
House relative to image, windows relative to wall of house:
// utility functions
function new(width, height) {
var img = imageNew("", width, height, "rgb", "ffffff");
imageSetDrawingColor(img, "000000");
imageSetAntialiasing(img, "on");
return img;
}
function render(img) {
var fn = getDirectoryFromPath(getCurrentTemplatePath()) & "#createUuid()#.png";
imageWrite(img, fn);
writeOutput('
');
fileDelete(fn);
}