def __resize_surface_extents(self):
        """Handles surface cleanup once a scale or rotation operation has been performed."""
        #Set the new location of the origin, as the surface size may increase with rotation
        self.__origin.X = self.image.get_width() * self.__untransformed_nor_origin.X
        self.__origin.Y = self.image.get_height() * self.__untransformed_nor_origin.Y

##        #Update the size of the rectangle
##        self.rect = self.image.get_rect()
##
##        #Reset the coordinates of the rectangle to the user defined value
##        self.set_coords(self.w_coords)

        #We must now resize the source rectangle to prevent clipping
        self.source.width = self.image.get_width()
        self.source.height = self.image.get_height()
Handles surface cleanup once a scale or rotation operation has been performed.