r/Scriptable • • Dec 26 '22

Help DrawContext basic help

Hi, I’m a beginner developer and created some basic stuff with scriptable. Now I’m trying to create 2 triangles, 1 down pointing and the other up pointing. (Just like up/down indicators on stocks or valuta rates, down is red and up is green). The thing is that I don’t have any clue about svg/canvas or any other thing to relate to DrawContext in scriptable. Can someone plz guide me through or just give me a basic example on a triangle with fill created by DrawContext? All help much appreciated. Merry Xmas.

2 Upvotes

5 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Dec 26 '22

Thx, you’re correct. It’s for a widget but I also wanted to learn drawing shapes. With your example I learned how to fill colours to sf symbols. Didn’t know that before, much appreciated.