Как получить линейки с галочками каждые 85 пикселей (1 см при 216 DPI) в Illustrator?

852
bastibe

У меня есть файл с разрешением 800x480 пикселей, который будет отображаться на дисплее с разрешением 216 DPI. Мне бы хотелось, чтобы в Illustrator были соответствующие линейки, то есть с отметками каждые ~ 85 пикселей (1 см). В идеале, линейки должны даже говорить см вместо px.

Это возможно? И если да, то как?

2

1 ответ на вопрос

1
User5910

There's no ideal solution but one of the following should work for you. The problem is that Illustrator (at least through CS5) is hard-coded to use 72 pixels per inch for document dimensions. You can see this in the New Document dialog: Change Units to Pixels, type "1 inch" in the Width or Height box and it will change to 72 px.

Here are two ways to get something that may work for you, each with pros and cons:

Method 1
Create your document at 3x scale, ignore the rulers, use the grid.

Pro: Pixel placement accurate in your "native" 800x480 document
Con: Rulers not accurate (but the grid is)

  1. Create a new document as 11.1111 inches x 6.6667 inches (800/72 and 480/72, respectively).
  2. Edit>Preferences>Guides & Grid.
  3. Change "Gridline every" to 3 cm, change Subdivisions to 10. Use 3cm because everything is three times larger than Illustrator expects because 216 dpi is three times 72 dpi.
  4. View>Show Grid to show a grid that is centimeters when your document is 216 dpi. Each square in the grid is about 85 pixels (actually (216 px/in)/(2.54 in/cm) = 85.04 px).

When you choose File>Save for Web and Devices, click the Image Size tab on the right side to see your 800x480 dimensions.

Method 2
Create your document at one-third scale (72 dpi) and scale everything up when rasterizing with Save for Web. Not recommended, see below.

Pro: Rulers accurate
Con: Pixel dimensions and alignment not precise

  1. Create a new document as 3.7073 inches x 2.22222 inches (800/216 and 480/216, respectively) which is how big 800x600 pixels would be at 216 dpi.
  2. Notice the rulers should show about 85 pixels per centimeter.
  3. File>Save for Web & Devices
    • Click the Image Size tab on the right side, notice the pixel dimensions are 267x160.
    • Change the Percent box to 299.8 and the new pixel dimensions will be 800x480.
    • Why 299.8? It's derived from 216 dpi/72 dpi which is equal to 300 but due to rounding issues the width or height will be one pixel off if you use it. This is the same reason that changing the width from 267 to 800 will give you a height of 479. 299.7 works too.

Since everything is tripled you might think you could use a 1/3 pixel stroke width to get a 1 px stroke in the raster file but it doesn't align correctly to the pixel grid. Using whole 1 px strokes to get 3 px strokes in the output fails but not as badly.