Skip to content

Drawing: Rotation of a shape around an origin #1436

Answered by hoffstadt
CodeCox asked this question in Support
Discussion options

You must be logged in to vote

Hi, we probably should have documented this better.

The transforms are acting on the points you input. For rectangle, the transforms are applying to pmin and pmax. Which is what you are seeing.

For what I believe you are trying to do, you should be using dpg.draw_quad(...). Quads require you to input all 4 points, which when transformed, will give the effect you are looking for.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by CodeCox
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants