Copy link to clipboard
Copied
Hi all,
are there any way to transform > reflect Vertical axis in illustrator but via JavaScript not apple and i mean reflect not scale H or V
thanks in advance.
Hi Muhammad.eloc,
you can try something like this:
var totalMatrix = app.getScaleMatrix(-100,100);
app.activeDocument.activeLayer.pathItems[0].transform(totalMatrix);
e.g. for the first path item in the active layer
Have fun
Copy link to clipboard
Copied
Hi Muhammad.eloc,
you can try something like this:
var totalMatrix = app.getScaleMatrix(-100,100);
app.activeDocument.activeLayer.pathItems[0].transform(totalMatrix);
e.g. for the first path item in the active layer
Have fun
Copy link to clipboard
Copied
Pixxxel Schubser's answer should be marked as the correct answer
Copy link to clipboard
Copied
var totalMatrix = app.getScaleMatrix(-100, 100); // Create the scale matrix
var layer = app.activeDocument.activeLayer; // Get the active layer
for (var i = 0; i < layer.pageItems.length; i++) {
// Iterate through all items in the layer
var currentItem = layer.pageItems[i];
// Check if the item's name is "verso" before applying the scale matrix
if (currentItem.name === "verso") {
currentItem.transform(totalMatrix);
}
}
But u got change the name of the object to "verso" and the layers to "Camada 1"