Beispiel #1
0
    def size(self, value):
        if isinstance(value, tuple):
            if not isinstance(value, Size):
                value = Size(value[0], value[1])
            self._obj.SetSize(value.native_obj)

        else:  # value is a single number/integer
            self._obj.SetSize(Size(value, value).native_obj)
Beispiel #2
0
    def drill(self, value):
        """Sets the drill size. If value is a single float or int, pad drill
        shape is set to circle, if input is a tuple of (x, y) drill
        shape is set to oval."""
        if isinstance(value, tuple):
            self.drillShape = DrillShape.Oval
            if not isinstance(value, Size):
                value = Size(value[0], value[1])

            self._obj.SetDrillSize(value.native_obj)

        else:  # value is a single number/integer
            drillShape = DrillShape.Circle
            self._obj.SetDrillSize(Size(value, value).native_obj())
Beispiel #3
0
 def drill(self):
     """Drill size. Returns `Size`."""
     return Size.wrap(self._obj.GetDrillSize())
Beispiel #4
0
 def size(self):
     return Size.wrap(self._obj.GetSize())
Beispiel #5
0
 def size(self):
     return Size.wrap(self._obj.GetSize())
Beispiel #6
0
 def drill(self):
     """Drill size. Returns `Size`."""
     return Size.wrap(self._obj.GetDrillSize())