Hello Everyone,
I've recently discovered Scriptographer, and I must say it is brilliant. I've not done any programming for 25 plus years, and it does take me back. Being an Illustrator user for nearly 20 years, it's like a breath of fresh air for Illy.
Anyway, to my question:
I'm writing a script to draw user-defined grids (see below). I can set the transparency of each rectangle to 'darken', but what I'd really like to do is group all the rectangles together, and darken the whole group rather than each individual rectangle. I've tried a few things, but this has got me a little stuck, so I thought I'd ask for a little help :)
Thanks in advance,
Ray
Part of my script to draw the grid.
y = 0
for(var j = 1; j < 11; j++)
{
x = 0; // reset x
for(var i = 1; i < 11; i++)
{
var bottomLeft = new Point(x, y);
var rectSize = new Size(columnWidth[i], rowDepth[j]);
var myRect = new Path.Rectangle(bottomLeft, rectSize);
myRect.blendMode = 'darken'; // set Transparency to Darken
myRect.strokeColor = gridColor;
if (rowDepth[j] == 0)
{
myRect.remove();
}
if (columnWidth[i] == 0)
{
myRect.remove();
}
x = x + columnWidth[i];
}
y = y + rowDepth[j];
overallWidth = overallWidth + columnWidth[j];
overallDepth = overallDepth + rowDepth[j];
}
x = 0
y = 0