Customer Operation - RealWorld forums

Log-in or register.

Customer Operation

mb
on August 5th 2008

The custom operation in the Effect menu has stopped working. The syntax checks OK, but clicking OK does nothing!
The exact contents of the box is below. This (I believe) is the default operation to paint every other pixel with Transparent.

Any ideas?
Thanks

var sizeX = RasterImage.sizeX;
var sizeY = RasterImage.sizeY;
var color = 0x00000000;
for(x=0; x<sizeX; x  )
  for(y=0; y<sizeY; y  )
    if ((x y)&1)
      RasterImage.SetPixel(x, y, 0, 0, 0);
Vlasta
on August 5th 2008

What application and what version are you using? The script interface differs a bit in latest icon editor. If that is the case, it should look like this:

var image = Document.RasterImage;
var sizeX = image.sizeX;
var sizeY = image.sizeY;
for (x=0; x<sizeX; x  )
	for (y=0; y<sizeY; y  )
		if ((x y)&1)
			image.SetPixel(x, y, 0, 0, 0);

Here is documentation for scripting in latest version: Scripting

Page views: 1445       Posts: 2      
Select background
What about ICL files?
Vista & Win 7 icons