Jump to content

Selection area off by 1 pixel


Recommended Posts

Greetings! I noticed this some time ago, but never got around to reporting it. I just ran into it again in a significant way while I was in the middle of creating the new Sketchpad skin.

The bug (inconsistency) can be found by following these steps:

1) Open PDN. (No, I'm not insulting your intelligence. Simply being thorough.)

2) Switch to the Rectangle Select tool if it's not your default tool.

3) Place your cursor so the coordinate position in the lower right reads 50, 50.(Working in Pixels here)

4) Click and drag down and to the right until the coordinate position reads 150, 150.

Now, look in the lower left box at the Bounding Rectangle Size readout. Note how it says 101 x 101. 50, 50 to 150, 150 should be 100 x 100, but the readout is off by 1. I did some testing, and the Bounding Rectangle Size readout is correct.

For a more easily seen example, zoom in on the canvas. Pick a recognizable coordinate pair (I went with 100, 100) and drag until the coordinate pair is 5 pixels from where you started (in the 100, 100 example, 105, 105 or 95, 95). The Bounding Rectangle Size readout will say 6 x 6. With the selection still active, take the Pencil and draw straight across the top or straight down and count each step (or turn on the grid and count the squares). There will be 6 pixels across and 6 pixels down.

Now, this isn't too important for most photo manipulations, but for creating things from scratch, especially web layouts, one pixel can be the difference between it showing up properly or improperly.

Just thought you should know. :D

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Now that you mention it, it does make mathematical sense that way.

It's possible that I'm just used to other programs. In programs such as PhotoShop and The GIMP, it measures between the pixels at which you start and end. So dragging from 100 to 105 would only include through 104. The hotspots marking your pixel position are the steps between pixels.

In PDN, however, when I watch the selection being drawn while zoomed in, once you reach pixel 105, the selection is bumped out 1 pixel to include pixel 105. The hotspots are the pixels themselves.

I'll just have to remember that for next time. Sorry about that.

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...