On Thu, Apr 29, 2010 at 3:29 AM, Greg Ewing <[email protected]> wrote:
> Joe Wreschnig wrote:
>>
>> On Wed, Apr 28, 2010 at 11:24 PM, Florian Bösch <[email protected]> wrote:
>>>
>>> I like it if I can write:
>>>
>>> somesprite.scale = 2.0, 0.5
>>>
>>> instead of:
>>>
>>> somesprite.scale_x = 2.0
>>> somesprite.scale_y = 0.5
>>
>> I like this, but I'm not sure how it could be implemented efficiently.
>
>  def get_scale(self):
>    return self.scale_x, self.scale_y
>
>  def set_scale(self, seq):
>    self.scale_x = seq[0]
>    self.scale_y = seq[1]
>
>  scale = property(get_scale, set_scale)

I am also trying to maintain compatibility with existing pyglet code.

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to