1 Reply Latest reply on May 13, 2014 11:50 PM by c.pfaffenbichler

    Script to Get/Set viewing area

    alleyGato373

      I'm just now looking into javascript for Photoshop CS5, so I'll try to make the functionality I need as clear as possible.

       

      I'm working on a script that functions like Paint Tool SAI's Flip Canvas, which retains your relative viewing area after the flip. Say you're working on a 5000 wide x 1000 tall document with a black to white gradient that flows from left to right. If you're viewing the left (black) edge of the document in Photoshop then Flip Canvas, you're now viewing the mirrored right (white) portion of the picture. In SAI, you'd still be viewing the black area (mirrored left) area, and this is the functionality I want. Very handy for checking proportions while painting, as opposed to flipping individual layers/groups.

       

      I need to store and edit the current viewing area of an open PS document, as in the portion of the document you can see/draw on using the Navigator window. None of the Navigator window or Hand tool operations seem to be logged with the Script Listener, and so far I haven't found any documentation on manipulating them with javascript.

       

      Does anyone know how to get/set the values for the viewing area in Photoshop?

       

      Thanks!