a PaintCode - Canvas Settings

Canvas Settings

Canvas Settings

To access the canvas settings, click on the title of your canvas in the workspace. Alternatively, you can also click on the canvas in the Shapes & Groups browser.

The canvas settings will appear in the Inspector:

Canvas Settings

Naming Canvas

Using the top textfield, you can change the name of the canvas. This name is used as the name of the generated drawing method. It may also be used when exporting your canvas as an image.

Changing Canvas Size

To change the size of the canvas, simply enter the desired dimensions in the appropriate text fields. Alternatively, you can change the size of the canvas by dragging the edges of the canvas in your workspace. Note that this only works when you have no shapes selected in the canvas.

Changing StyleKit Settings

Using the StyleKit popup button, you can change the StyleKit code generation settings of this canvas. Most importantly, you can choose whether the canvas should generate:

Canvas StyleKit Settings Popup Button

When you choose that the canvas should generate a method that returns an image, more settings will appear when you target iOS. These settings allow you to define cap insets of the generated image (if desired) as well as the image rendering mode.

You can also set which selector should be called on object that you add to the IBOutletCollection generated by this image method.

Canvas StyleKit Settings

PaintCode also generates resizing drawing methods that allow you to draw canvas into target rectangle of different size while preserving aspect ratio.

Changing canvas background color

To change the underlay color of the canvas, simply click on the color well. Note that the underlay color does not have any effect on the generated source code.

Also note that this color is used when you export your drawing as a TIFF, PDF or PNG file with background. To export your drawing with a transparent background, set the underlay color to a clear color or turn off the "Export background" checkbox when exporting your drawing.

Changing canvas background image

First, make sure that the checkbox beside the image well is checked. Then, drag & drop the desired image on the image well. You can also offset the background using the controls below.

Showing/hiding the grid and changing its color

To show or hide the canvas grid, use the “Grid” checkbox in Canvas settings. Alternatively, press OPTION + G.

PaintCode adapts the color of the grid to the underlay color of the canvas. You can, however, set your own grid color. Simply click on the color well.

Canvas Guides

The last canvas setting allows you to turn on one of our built-in drawing guides:

The icon grid is useful for drawing harmonious-looking app icons for iOS.

Icon Guide

The column and row layout guides let you specify gutter and column/row sizes, and are very convenient for drawing more complex drawings according to a layout grid. For example, this website was designed in PaintCode using the layout grids.