Canvas is upside down!

Category: Website

Last updated 1 year ago

Tim Churchward

Tim Churchward Asked 1 year ago

Hi Jeff, amazing work you've done here with PyAngelo. 

The canvas seems to be either rendering everything upside down, or it is using a different coordinate system where 0,0 is the bottom left instead of top left. When you load the smiley face tutorial it appears upside down. This is the same in Safari, Firefox and Brave. 


Jeff Plumb

Jeff Plumb Answered 1 year ago

Hey Tim,

Originally the coordintate system for PyAngelo was designed to have (0, 0) at the top left. However, we thought it would be easier for people to learn if the coordinate (0, 0) was at the bottom left so it matched how coordinates were taught in mathematics. So we actually changed the setCanvasSize() function to accept a third optional parameter that lets you specify which coordinate system you would like to use. If you don't pass a third parameter it defaults to having (0, 0) in the bottom left. You can read more about this in our blog post "Coordintate System Updated".

As you noticed, the tutorials were filmed before this change. I am hoping to redo these at some point in the near future!

Good luck working with PyAngelo. Let me know how it goes.

Notify me of updates
Add to Favourites
Back to Questions

Thoughts on this question

Jimmy Lin

Jimmy Lin Posted 1 year ago

it's working

Ayaan a47

Ayaan a47 Posted 1 year ago

very pog

Become a free member to post a comment about this question.