コード例 #1
0
 def rotate(self, rotationPoint, angle):
     """
         this method must be defined for rotation
     """
     from kernel.geoutil.geolib import Vector
     from kernel.geoentity.point import Point
     v=Vector(rotationPoint,self)
     v.rotate(angle)
     p=rotationPoint+v.point
     self.__x=p.x
     self.__y=p.y
コード例 #2
0
    def rotate(self, rotationPoint, angle):
        """
            this method must be defined for rotation
        """
        from kernel.geoutil.geolib import Vector
        from kernel.geoentity.point import Point

        for key in self:
            if isinstance(self[key] , Point):
                v=Vector(rotationPoint,self[key] )
                v.rotate(angle)
                self[key]=rotationPoint+v.point