I need to be able to flip an image / active layer either vertically or horizontally.
Looking throughout the Adobe Photoshop CC Javascript Reference there doesn't appear to be a flip method for the activelayer/object.
doc.flipCanvas(Direction.VERTICAL)
Does work but that obviously flips the entire document vertically where as I want to do it on just the active layer
I can see in the invert()
method it does mention:
inverts the selection (deselects the selection and selects the rest of the layer or document). Tip. To flip the selection shape, see rotate
And that says the following:
rotate (angle [, anchor]) -
Rotates the selection by the specified amount around the specified anchor
I'm already using the rotate method like so elsewhere and cannot see how I can flip the image through this?
obj.rotate( rotation, AnchorPosition.TOPLEFT );