Example #1
0
    def make_newartist(self):
        self.check_loaded_gp_data()
        x1, y1 = self.get_gp(0).get_device_point()
        x2, y2 = self.get_gp(1).get_device_point()

        xy = ((x1 + x2) / 2, (y1 + y2) / 2)
        w = abs(x1 - x2)
        h = abs(y1 - y2)
        if self.getp("isotropic"):
            if w > h: w = h
            else: h = w
        a = Ellipse(xy,
                    w,
                    h,
                    angle=self.getp('angle'),
                    facecolor='none',
                    fill=False,
                    edgecolor='black',
                    alpha=1)

        lp = self.getp("loaded_property")
        if lp is not None:
            self.set_artist_property(a, lp[0])
            self.delp("loaded_property")
        a.figobj = self
        a.figobj_hl = []
        a.set_zorder(self.getp('zorder'))
        return a
Example #2
0
    def make_newartist(self):
        self.check_loaded_gp_data()
        x1, y1=self.get_gp(0).get_device_point()
        x2, y2=self.get_gp(1).get_device_point()

        xy = ((x1+x2)/2, (y1+y2)/2)
        w = abs(x1-x2)
        h = abs(y1-y2)
        if self.getp("isotropic"):
           if w>h: w=h
           else: h = w
        a = Ellipse(xy, w, h, angle = self.getp('angle'),
                      facecolor='none', fill=False,
                      edgecolor='black', alpha=1)

        lp=self.getp("loaded_property") 
        if lp is not None:
             self.set_artist_property(a, lp[0])
             self.delp("loaded_property") 
        a.figobj=self
        a.figobj_hl=[]
        a.set_zorder(self.getp('zorder'))
        return a