I am a Photoshop novice, but an experienced C++ programmer.
In the process of attempting to resize a rectangle (created with the Rectangle tool) using the Direct Select tool, I ran into some non-trivial behavior that I do not understand and that I am having a difficult time reproducing.
I have taken the following steps:
(1) Choose Direct Select tool
(2) Click once inside image, but outside the rectangle (to deselect any current Direct Select selections made to the rectangle)
(3) Click and drag the Direct Selection rectangle to completely surround the top two corners (and neither bottom corner) of the rectangle
(4) Zoom in to 3000% magnification by clicking the Zoom In button on the Navigator
(5) Scroll the visible area to the middle of the top edge of the rectangle by dragging the red rectangle in the Navigator pane
(6) Press the Shift key and then click/hold the mouse with the cursor directly over the top row of pixels of the rectangle
(7) Still holding the mouse button, drag the mouse upwards to resize the rectangle by moving the top edge up.
This seems "simple enough". The problem is that it does not always work. It sometimes works - just not always.
The strange behavior I sometimes observe is the following:
(1) Sometimes there is a 1-px grey line on some, or all, edges of the rectangle. Sometimes these lines disappear completely. As noted, sometimes these lines appear on some edges, but not all edges. I cannot figure out what steps to take make them appear, and what steps to take to make them disappear. As far as I currently understand, it's random. (Obviously it is not random, but I cannot currently understand it.)
(2) Sometimes, when holding the Shift key, the rectangle, as it resizes, is constrained to vertical resizing. Other times when holding the Shift key, the rectangle is not constrained to vertical resizing, but instead the rectangle changes to a parallelogram or (perhaps, I'm not sure) another non-rectangular shape.
(3) When the ruler is displayed, and shows a pixel-based grid, I find that there is a horizontal grid line within the top row of the rectangle that is NOT aligned with the pixel marking on the ruler. As the rectangle is resized, the non-aligned grid line always remains inside the top row (all other grid lines appear exactly at the pixel indicators on the ruler).
(4) Most importantly - SOMETIMES when I shift-click and drag the mouse to raise the top edge of the rectangle (having already selected the top two corners of the rectangle with the Direct Selection tool before zooming in), the rectangle does NOT resize. Instead, a "selection rectangle" of some sort follows the mouse. Nonetheless, the Direct Selection of the corners of the rectangle still seems to be present - I do not de-select the Direct Selection settings, it's just that an additional "selection rectangle" of some sort seems to appear when I attempt to resize the rectangle - rather than the rectangle actually resizing.
Can someone please explain this non-trivial behavior of the Direct Select tool while I attempt to resize a rectangle in Photoshop?