- [Instructor] In this movie I'll show you how to
align objects to the pixel grid as you draw
or transform them,
and as you may recall a transformation
includes movement, scaling and so forth.
Now, I've gone ahead and saved
an updated version of this file,
and so notice if I go to the View menu
that Pixel Preview is turned on,
and that's because this function
is a saved attribute of the file,
and so, if I were to go ahead
and zoom in, once again, by control space bar
or command space bar clicking
and then I were to grab my Line Segment Tool
and now crank the line weight value up
to let's say eight points,
just so that it's all together unambiguous,
and I'll draw with the line tool
while pressing the shift key
in order to constrain the angle
of my line to exactly horizontal.
Notice, that I'll once again end up
with that unnecessary anti-aliasing.
Now, of course I can get rid of it
by clicking on this align selected
art to pixel grid icon on the far left
side of the control panel,
but let's say what I really want to do is ensure
that all future objects align to the pixel grid.
In that case, I would click on this next icon over,
align art to pixel grid on creation and transformation,
and so, notice when I click on that icon,
it's sticky.
So, it turns the function on.
It does not affect the selected line.
It rather affects all future lines,
and so now if I draw another line with the line tool
while pressing and holding the shift key,
this time it is aligned perfectly into place.
Also, notice if I were to press the v key
to switch to my black arrow tool up here
at the top of the toolbox,
and I were to drag this guy to a different position,
it will remain aligned to the pixel grid,
but if it was created off the pixel grid in the first place
and you drag it to a different position,
it will remain unnecessarily anti-aliased
until you click on this first icon over here
in order to align it like so.
Also, notice where the line weight is concerned,
you need to move and hold pixel increments,
and so if I changed this line weight to 8.5 points instead,
then I will end up with anti-aliasing.
Even if I click that icon to align
that object to the pixel grid.
So, notice at this point, most of the line is black,
but we do have a little bit of grayness up here at the top
and the bottom.
That goes double if you go with a very low line weight
such as a quarter point.
Notice now we end up with this light gray line.
If that's not what you want,
just go ahead and select the line once again,
increase the line weight to let's say one point
and then click on that alignment icon
on the far right side of the control panel.
Now, this alignment is going to work
with any perpendicular line,
whether you draw it with a line tool.
You can draw it with a pen or curvature tool.
You could even use something like
the rectangle tool if you want to,
and so notice if I select the rectangle tool,
and once again, crank that line weight
value up to eight points,
when I draw the rectangle it is going
to appear perfectly aligned.
You have to draw these shapes
however using the Shape tools.
If you try to work with the Shaper tool instead,
you're not going to get pixel perfect alignment,
and so notice if I just go ahead
and draw this terrible rectangle,
Illustrator correctly interprets it
in this case as a square,
but the the square is out of alignment,
and so if you want to align it,
then you need to select it,
and I'm going to do that by going to the view menu
and turning on the Bounding Box
by choosing the Show Bounding Box command.
Then I'll click on that shape in order to select it
and I'll go up to this icon on the far right side
of the control panel
and click on it and everything works out swell.
Now, I want you to notice that there's this down pointing
arrowhead next to this icon.
If you click on it, you'll actually bring up
a kind of dialogue box that's going to tell you
the various snapping options that are available to you
and you can see this snapping demonstrated when you hover
over a certain area.
So, notice the animation changes
when I hover over this middle area
and when I hover over this bottom area as well,
and so you can check those out as much as you like.
What I want you to notice is these moving options.
Notice Illustrator's going to try to snap your objects
into the proper alignment when moving whole path outlines,
when moving individual perpendicular segments incidentally,
as well as anchor points.
Now, this anchor points option here
also affects control handles,
and so, if you want more freedom
when positioning your control handles,
you need to turn this anchor points option off.
I'm going to leave it on however, and I'm going to point out
this last option.
Snap to pixel while scaling.
Notice that it's turned on.
The thing is it doesn't necessarily work the way
you might anticipate,
and so, I'll just go ahead and click okay
and I'll switch over to this document right here
which features this enormous command key symbol.
Now, I'm going to go ahead and zoom in on it,
once again, to 400%,
and then I'll go up to the View menu
and choose Pixel Preview because after all,
this document was saved without this command turned on,
and now notice that we do have some of that unnecessary
anti-aliasing along our vertical and horizontal edges.
To clear that up, I'll go ahead and press the v key
to switch back to my Move tool
and I'll click on that object to select it
and then I'll click on that alignment icon
on the far right side of the control panel
and once again, that bad anti-aliasing goes away,
and to make it clear what I'm talking about,
I'll click off the object for a moment.
Notice that the horizontal and the vertical edges
are no longer anti-aliased,
but the curved segments of course, are.
So, I'll press control zero
or command zero on the Mac to zoom out,
and then I'll go ahead and click on the second icon
in order to ensure all future objects
align to the pixel grid
and then I'll click on the symbol to select it
and now because the Bounding Box is turned on,
I have access to my scaling handles,
and now just go ahead and make this guy much smaller
and I'll even press the shift key in order to constrain
the proportions of the shape,
and then I'll release to make the command key much smaller.
Now, I'll press control plus
or command plus on the Mac in order
to zoom in on that object
and notice if I deselect it,
I once again have anti-aliasing.
So what in the world gives?
Well, notice if I click this down pointing arrowhead
to bring up the dialogue box that we have
a very interesting description of this option.
The edges of the bounding box will snap
to the pixel grid I'm scaling.
Well, that's great if you're scaling a rectangle,
but it's not good for much more,
and so because there's really nothing that needs to snap
at the edges of the bounding box,
we don't get the proper behavior,
and so if you run into that,
then just remember that you can align
any selected object you like,
just by right clicking inside the document window
and choosing Make Pixel Perfect at which point
your horizontal and vertical segments will look great.
Finally, let's look at what happens
when you create a new document.
So, I'll go to the file menu and choose the New command
or of course you can control n or command n on a Mac.
Now, in previous versions of Illustrator,
if you twirled open the Advanced setting
here inside the old style dialogue box,
you would see a checkbox labeled align to pixel grid.
That's no longer here,
but the function still exists,
and so the trick is to start
with one of the mobile documents
or a web document,
and so, let's say I go ahead and switch to mobile
and select iPad Pro
and then click on the create button,
notice the alignment icon is turned on in the top
right corner of the screen.
Whereas, if I were to return to the New command
and select Art and Illustration instead,
and then select let's say Poster
and click Create, that icon is turned off.
Now, obviously you can change that setting anytime you like,
but I just want you to be aware that it's there,
and that's how you align objects
to the pixel grid as you draw
or transform them here inside Illustrator CC.