Return integer width of this shape's path in local units.
543725
def _dx(self):
        """"""
        min_x = max_x = self._start_x
        for drawing_operation in self:
            if hasattr(drawing_operation, 'x'):
                min_x = min(min_x, drawing_operation.x)
                max_x = max(max_x, drawing_operation.x)
        return max_x - min_x
195224
def shape(self, i=0):
        """"""
        shp = self.__getFileObj(self.shp)
        i = self.__restrictIndex(i)
        offset = self.__shapeIndex(i)
        if not offset:
            # Shx index not available so use the full list.
            shapes = self.shapes()
            return shapes[i]
        shp.seek(offset)
        return self.__shape()
795124
def width(self, level):
        
        return self.x_at_y(level, reverse=True) - self.x_at_y(level)
770272
def shape(self):
        ""
        keys = self.keys()
        if self.ndims == 1:
            return (len(keys), 1)
        return len(set(k[0] for k in keys)), len(set(k[1] for k in keys))
511034
def hint_width(self):
        """"""
        return sum((len(self.style.delimiter),
                    self.wide,
                    len(self.style.delimiter),
                    len(u' '),
                    UCS_PRINTLEN + 2,
                    len(u' '),
                    self.style.name_len,))
348907
def shape(self) -> Tuple[int, ...]:
        
        return tuple(bins.bin_count for bins in self._binnings)
389658
def nbytes(self):
        """"""
        try:
            N, L, I = get_shape([self])
        except AllEmptyProbabilityMaps:
            return 0
        return BYTES_PER_FLOAT * N * L * I
192719
def get_size(self):
        
        rec = self.get_rectangle()
        return (int(rec[2]-rec[0]), int(rec[3]-rec[1]))
971664
function size(path,mod,rad,ang) {
    if (!mod) var mod = 0
    if (typeof rad != "number") var rad = undefined
    if (typeof ang != "number") var ang = undefined
    path.attrTween("d", function(d){
      if (rad == undefined) var r = d.d3plus.r ? d.d3plus.r : d3.max([d.d3plus.width,d.d3plus.height])
      else var r = rad
      if (ang == undefined) var a = d.d3plus.segments[d.d3plus.shape]
      else var a = ang
      if (!vars.arcs[d.d3plus.shape][d.d3plus.id]) {
        vars.arcs[d.d3plus.shape][d.d3plus.id] = {"r": 0}
        vars.arcs[d.d3plus.shape][d.d3plus.id].a = Math.PI * 2
      }
      var radius = d3.interpolate(vars.arcs[d.d3plus.shape][d.d3plus.id].r,r+mod),
          angle = d3.interpolate(vars.arcs[d.d3plus.shape][d.d3plus.id].a,a)
      return function(t) {
        vars.arcs[d.d3plus.shape][d.d3plus.id].r = radius(t)
        vars.arcs[d.d3plus.shape][d.d3plus.id].a = angle(t)
        return arc(d)
      }
    })
  }
367863
def get_width(self):
        
        areas = self._get_areas()
        widths = numpy.array([surf.get_width() for surf in self.surfaces])

        return numpy.sum(areas * widths) / numpy.sum(areas)
1144727
private static int typeFromWidthNative(final int width) {
        switch (width) {
            case 16:
                return ICNS.is32;
            case 32:
                return ICNS.il32;
            case 48:
                return ICNS.ih32;
            case 128:
                return ICNS.it32;
            default:
                throw new IllegalArgumentException(String.format("Unsupported dimensions for ICNS, only 16, 32, 48 and 128 supported: %dx%d", width, width));
        }
    }
1102877
def path_size(p: tcod.path.AStar) -> int:
    
    return int(lib.TCOD_path_size(p._path_c))
101245
def w(self):
        """"""
        w = ffi.new('int *')
        check_int_err(lib.SDL_QueryTexture(self._ptr, ffi.NULL, ffi.NULL, w, ffi.NULL))
        return w[0]
1313711
def lineWidth(self, lw=None):
        """"""
        if lw is not None:
            if lw == 0:
                self.GetProperty().EdgeVisibilityOff()
                return
            self.GetProperty().EdgeVisibilityOn()
            self.GetProperty().SetLineWidth(lw)
        else:
            return self.GetProperty().GetLineWidth()
        return self
827185
def OnMeasureItemWidth(self, item):
        """"""

        item_name = self.GetItems()[item]
        return icons[item_name].GetWidth()
1315052
def size_as_drawn(lines, screen_width):
    """"""
    y = 0
    x = 0
    for line in lines:
        wrapped = list(wc_wrap(line, screen_width))
        if len(wrapped) > 0:
            for wrapped_line in wrapped:
                x = len(wrapped_line)
                y += 1
        else:
            x = 0
            y += 1
    return y - 1, x - 1 if x != 0 else 0
420880
def get_help_width():
  """"""
  if not sys.stdout.isatty() or termios is None or fcntl is None:
    return _DEFAULT_HELP_WIDTH
  try:
    data = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, '1234')
    columns = struct.unpack('hh', data)[1]
    # Emacs mode returns 0.
    # Here we assume that any value below 40 is unreasonable.
    if columns >= _MIN_HELP_WIDTH:
      return columns
    # Returning an int as default is fine, int(int) just return the int.
    return int(os.getenv('COLUMNS', _DEFAULT_HELP_WIDTH))

  except (TypeError, IOError, struct.error):
    return _DEFAULT_HELP_WIDTH