Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can we draw polygons?

ANSWERED

I use GPaths a lot on Pebble watchface development, creating a variety of shapes - it is rare for rectangles, circles and arcs to be sufficient.  Some of these can be complex shapes.  I can then easily change the colour, move & rotate these.

 

I know you don't yet have a Drawing API, so wondering the best way to achieve this until you do.  Is the only way to create the shapes as images (externally) and use those?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi Nev,

 

It's true that we don't currently have a drawing/canvas API, hopefully that will be resolved in the future.

 

You can define each shape as an image, in 8-bit grayscale PNG format. See "Grayscale Magic" for full details.

 

Once you have the shape, you can use either property animations or transformation animations. See "Animations" for further information.

 

I hope this helps.

View best answer in original post

Best Answer
0 Votes
5 REPLIES 5

Hi Nev,

 

It's true that we don't currently have a drawing/canvas API, hopefully that will be resolved in the future.

 

You can define each shape as an image, in 8-bit grayscale PNG format. See "Grayscale Magic" for full details.

 

Once you have the shape, you can use either property animations or transformation animations. See "Animations" for further information.

 

I hope this helps.

Best Answer
0 Votes

Thanks Jon. It's what I thought, but good to have it confirmed.

Best Answer
0 Votes

@nevraw I think what you're asking for is essentially SVG path support. The possibilities would be endless!

Best Answer

@kenjamin  Yeah. That would be great. Looks more flexible than what I am used to in Pebble development. 🙂

Best Answer
0 Votes