R.Davis
R.Davis

Reputation: 39

Resizing image generated by PaintCode app

I have imported a vector image to PaintCode app and then export its Swift to code. I want to use this vector image in a small View (30x30) but since I want it to work on different devices, I need it to be size-independent. The original size of the vector image is 512x512. When I add its class to a UIView, only a very small part of the vector image can be seen:

screenshot of the UIView the image inside it

I need to somehow resize the image that can be fit in any size of a frame. I read somewhere, that I have to draw a frame in PaintCode app around the image, I did it but nothing changed.

Upvotes: -1

Views: 173

Answers (1)

MadProgrammer
MadProgrammer

Reputation: 347324

Start by selecting the "Frame" option from the toolbar

Select Frame

Apply the frame to you canvas...

Apply Frame

nb: If you mess up the frame DELETE IT and start again, modifying the frame can change the underlying vector, which is annoying

Apply the desired resize options. This can be confusing the first time.

I group all the elements into a single group. Select the group and on the "box" next to the coordinates of the group, change all the lines to "wiggly" lines. This allows paint code the greatest amount of flexibility when resizing the image...

Resize options

Finally, change the export options. I tend to use both "Drawing" and "Image" as it provides me the greatest amount of flexibility during development

Export options

You should also look at Resizing Constraints, Resizing Drawing Methods and PaintCode Power User: Frames for more details

Upvotes: 1

Related Questions