pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Idea: start adding a small number of properties to Surface

Open Starbuck5 opened this issue 1 year ago • 0 comments
trafficstars

The Surface class has many getters and setters. Some of them are very commonly used and I feel that their verbosity can be cumbersome.

I'm thinking of

.get_size()
.get_width()
.get_height()

I think it would quite elegant to be able to do

.size
.width
.height

These would be read-only properties, I don't think it makes sense to try implement scaling when these are changed.

Why am I thinking of these and not other getters/setters? These are the good starting ones in my opinion, because they're common and seem pretty unambiguous.

What do other people think?

Starbuck5 avatar Mar 19 '24 08:03 Starbuck5