Exemplo n.º 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 = (min([x1, x2]), min([y1, y2]))
        w = abs(x1 - x2)
        h = abs(y1 - y2)
        if self.getp('isotropic'):
            if w < h: h = w
            else: w = h

        a = Rectangle(xy,
                      w,
                      h,
                      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'))
        a._is_frameart = self.getp('frameart')
        return a
Exemplo n.º 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 = (min([x1, x2]), min([y1,y2]))
        w = abs(x1-x2)
        h = abs(y1-y2)
        if self.getp('isotropic'):
           if w<h: h=w
           else:   w=h

        a = Rectangle(xy, w, h, 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'))     
        a._is_frameart = self.getp('frameart')
        return a