I am new to pygame. I was searching on the internet and the pygame documentation for the functions which can translate, rotate, scale the entire graphics Context, but I couldn't find them. I know that I can apply transformations on individual surfaces using functions that are present in pygame.transform module, but I couldn't find the functions that will apply transformations to the graphics context itself. Are these functions in a different module or they don't exist?
-
2\$\begingroup\$ What are you trying to do? Some graphics APIs (Java for instance) are context based, but pygame is surface based. Knowing what you're trying to accomplish might be more helpful than answering the question as is. \$\endgroup\$– PikalekMar 8, 2018 at 2:17
-
\$\begingroup\$ @Pikalek "Some graphics APIs (Java for instance) are context based, but pygame is surface based" - that's all I needed to know. Thanks! \$\endgroup\$– anonymousMar 8, 2018 at 8:27
-
\$\begingroup\$ Ok, glad to help. To avoid the 'answered in comments' problem, I've posted the info as a proper answer. \$\endgroup\$– PikalekMar 8, 2018 at 14:46
1 Answer
The short answer is: they don't exist.
Some graphics APIs (Java's Graphics2D for instance) are context oriented, but as you've discovered, Pygame orients its drawing functionality on Surfaces. All the functions for drawing & transforms target a Surface
passed as an arguement.