Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/sfml/graphics/graphics.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,14 @@ cdef public class TransformableDrawable(Drawable)[type PyTransformableDrawableTy
cdef sf.Transformable *p_transformable

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

if self.__class__ == TransformableDrawable:
raise NotImplementedError('TransformableDrawable is not meant to be used')

if self.p_transformable is NULL:
self.p_transformable = new sf.Transformable()

def __repr__(self):
return "TransformableDrawable(position={0}, rotation={1}, ratio={2}, origin={3})".format(self.position, self.rotation, self.ratio, self.origin)

Expand Down