9 Replies Latest reply: Apr 26, 2013 11:32 AM by taurinr RSS

    Illustrator snaps to pixel & alters path??

    thesergie Community Member

      The paths i'm working with are for some odd and annoying reason snapping to the pixel grid. I even have the "Snap to Pixel" turned off and the vector paths are being altered by illustrator so they visuall fit in the pixel grid. I've never experienced this before where illustrator actuall moves the anchor points where it wants. Here's an example of what's going on (this happens in pixel preview and normal preview):

       

      Here's a vector path on a grid created to show where the pixels are:

      preview_02469.png

      I select the object, swap the FILL to the STROKE and right away you can see that illustrator altered the location of the paths:

      preview_02470.png

      I swap the STROKE back to the FILL and it alters the paths even more!

      preview_02471.png

       

      Here's another example:

      The paths clearly are not aligned with the pixel grid, but illustrator is trying everything it can to make the pixels line up. (This graphic has "Align stroke to inside" and is in pixel preview).

      preview_02467.png

      Same thing but not in pixel preview. Super weird behavior:

      preview_02466.png

       

      Is there some kind of setting in the master preferences that's causing this behavior? I made sure snap to grid and snap to pixel is turned off and still to no avail. Has anyone else run into this?

       

      Thanks!

        • 1. Re: Illustrator snaps to pixel & alters path??
          [scott] Community Member

          I'm assuming CS5 since you mention align to pixel grid. Is that correct?

           

          Possible bug but....

           

          I can easily reproduce the issue with a small graphic and align to pixel grid ON. If I turn off Align to Pixel grid (in the Transform panel) the issue goes away.

           

          Note it has to be a very small graphic for the issue to present itself.

           

          Are you certain you have Align to Pixel grid off?

           

          If so.. you might try trashing your prefs file.

          • 2. Re: Illustrator snaps to pixel & alters path??
            thesergie Community Member

            Yeah it's CS5.

             

            Oh you know what? It is that Align to Pixel Grid setting. It was turned ON. I didn't realize this before but when you create a new document you can have this setting on. It only seems to make sense to have this on for completely square elements or else illustrator goes all out to align to pixel.

             

            What i'm confused about is why it behaves like this? If i take a rounded rectangle with this setting on and try to scale it half a pixel to the right it will snap back to the original pixel but screw up all the anchor point locations. That seems like unintended behavior (bug). It's a bummer because web design requires working with really small graphics.

             

            Side note: how do i trash prefs file and what would that do exactly?

            • 3. Re: Illustrator snaps to pixel & alters path??
              [scott] Community Member

              Yeah it may be a bug in the respect you mention. But.. possibly not. Ai uses the preview bounds to align to the pixel grid. So the stroke would align differently than the fill. You should see no change if the object had both a stroke and a fill and you were swapping them. You only see the behavior on objects without a fill or without a stroke and you swap the stroke/fill. The preview bounds change so the snapping changes. Honestly, I'm not certain if it's a bug or expected behavior.

               

              To trash prefs you can hold down Command-Option-Shift on launch. You will not see any dialog box or any confirmation whatsoever. But prefs will be trashed. What this does is set Illustrator back to it's default settings (except workspaces). This will often sort out a tool or feature that is not acting as it should. But you'll need to go in and reset your scratch disks and other preferences if you've altered them.

              • 4. Re: Illustrator snaps to pixel & alters path??
                thesergie Community Member

                Yeah for my purposes at least it seems like a bug. The Align to Pixel Grid seems like a very awesome feature because it helps get really crisp pixel perfect designs (a must for web design which I am trying to use it for), but its a big step backwards since it destroys the original path. If i have a graphic element and decide to put a stroke on it to see what it looks like, it will put a stroke on it and screw up all the perfect paths to make the stroke look aligned to pixels - and by default new strokes are created in the center of the path which will alter the preview VS inside or outside of the path which wouldn't screw up the paths.

                 

                I just realized that some elements inside my document have "align to pixel grid" enabled for them and others don't. I want to deselect this for the whole document and just rely on Snap to Pixel because it's more predictable. I tried selecting ALL, but i can only enable THEN disable the option. Is there a way to turn it off for all objects without having to go through each one? Will trashing prefs shortcut do this?

                • 5. Re: Illustrator snaps to pixel & alters path??
                  thesergie Community Member

                  Oh and as a side note the path IS actually altered even if a graphic has both fill and stroke. Check it out:

                   

                  This has the RED STROKE aligned to the inside of the object:

                  preview_02474.png

                   

                  After i change the stroke alignment from INSIDE to CENTER this happens just as my first post suggested.

                  preview_02475.png

                  • 6. Re: Illustrator snaps to pixel & alters path??
                    [scott] Community Member

                    That would fall under the same issue. Since you move the stroke from center to inside, the preview bounds of the object change. Just like they would for the fill. Basically, same thing just a different way to see it.

                     

                     

                    As for changing all objects to "Off" for the pixel grid, I don't belive there's a mechanism for that if you already have mixed objects. The only thing I'd suggest is Select All, toggle it on, then toggle it off. Then check the indiviual objects. That may change them all. And no, trashing prefs won't solve that becuase the settings are object based, not Application based.

                    • 7. Re: Illustrator snaps to pixel & alters path??
                      Monika Gause MVP

                      You can do a Select > Object > Not aligned to pixel grid. Then invert the selection. Then uncheck the setting "Align to pixel grid". That way you don't need to first turn it on. Because when turning it on, paths will get distorted.

                      • 8. Re: Illustrator snaps to pixel & alters path??
                        thesergie Community Member

                        Thanks Monika! That's very good to know.

                        • 9. Re: Illustrator snaps to pixel & alters path??
                          taurinr

                          It's actually an issue with having snap to point turned on. Once you turn that off the problem goes away.