Update border line to match new shape
976442
def _update_line(self):
        
        w = self._border_width
        m = self.margin
        # border is drawn within the boundaries of the widget:
        #
        #  size = (8, 7)  margin=2
        #  internal rect = (3, 3, 2, 1)
        #  ........
        #  ........
        #  ..BBBB..
        #  ..B  B..
        #  ..BBBB..
        #  ........
        #  ........
        #
        l = b = m
        r = self.size[0] - m
        t = self.size[1] - m
        pos = np.array([
            [l, b], [l+w, b+w],
            [r, b], [r-w, b+w],
            [r, t], [r-w, t-w],
            [l, t], [l+w, t-w],
        ], dtype=np.float32)
        faces = np.array([
            [0, 2, 1],
            [1, 2, 3],
            [2, 4, 3],
            [3, 5, 4],
            [4, 5, 6],
            [5, 7, 6],
            [6, 0, 7],
            [7, 0, 1],
            [5, 3, 1],
            [1, 5, 7],
        ], dtype=np.int32)
        start = 8 if self._border_color.is_blank else 0
        stop = 8 if self._bgcolor.is_blank else 10
        face_colors = None
        if self._face_colors is not None:
            face_colors = self._face_colors[start:stop]
        self._mesh.set_data(vertices=pos, faces=faces[start:stop],
                            face_colors=face_colors)

        # picking mesh covers the entire area
        self._picking_mesh.set_data(vertices=pos[::2])
1103498
private void fillInternalShadowRounded(Graphics2D g, Shape s) {
        g.setPaint(getRoundedShadowGradient(s));
        g.fill(s);
    }
248126
function(border) { 
        if (border != undefined) {
            this.border = border;
        }
        
        if (this.div != null) {
            this.div.style.border = this.border;
        }
    }
50665
function drawHorizontalExtendedLine() {
            baseLine = svg.select('.grid-lines-group')
                .selectAll('line.extended-x-line')
                .data([0])
                .enter()
                  .append('line')
                    .attr('class', 'extended-x-line')
                    .attr('x1', xAxisPadding.left)
                    .attr('x2', chartWidth)
                    .attr('y1', chartHeight)
                    .attr('y2', chartHeight);
        }
663040
def compatible_shape(self, shape):
        """"""
        if len(shape) != len(self.shape):
            return False
        for x, y in zip(self.shape, shape):
            if x is not None and x != y:
                return False
        return True
1177237
def OnCellBorderColor(self, event):
        """"""

        with undo.group(_("Border color")):
            self.grid.actions.set_border_attr("bordercolor",
                                              event.color, event.borders)

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()

        event.Skip()
628655
function updateGrid(gx, gy, gw, gh, info, item) {
      var occupied = info.occupied;
      var drawMask = settings.drawMask;
      var ctx;
      if (drawMask) {
        ctx = elements[0].getContext('2d');
        ctx.save();
        ctx.fillStyle = settings.maskColor;
      }

      var dimension;
      if (interactive) {
        var bounds = info.bounds;
        dimension = {
          x: (gx + bounds[3]) * g,
          y: (gy + bounds[0]) * g,
          w: (bounds[1] - bounds[3] + 1) * g,
          h: (bounds[2] - bounds[0] + 1) * g
        };
      }

      var i = occupied.length;
      while (i--) {
        var px = gx + occupied[i][0];
        var py = gy + occupied[i][1];

        if (px >= ngx || py >= ngy || px < 0 || py < 0) {
          continue;
        }

        fillGridAt(px, py, drawMask, dimension, item);
      }

      if (drawMask) {
        ctx.restore();
      }
    }
1334447
def update_vertices(self, mask):
        
        if self.uv is not None:
            self.uv = self.uv[mask]
263201
def _update_mask(self, mask: np.ndarray, polygons: Iterable, separate_instances: bool = False) -> None:
        
        for i, p in enumerate(polygons):
            if isinstance(p, geometry.MultiPolygon):
                self._update_mask(mask=mask, polygons=p.geoms, separate_instances=True)
                continue
            elif not isinstance(p, geometry.Polygon):
                continue
            poly_area = Image.fromarray(np.zeros(mask.shape, dtype=np.uint8))
            holes = Image.fromarray(np.zeros(mask.shape, dtype=np.uint8))
            outline_color = 0 if separate_instances else 255
            ImageDraw.Draw(poly_area).polygon(p.exterior.coords, fill=255, outline=outline_color)
            for h in p.interiors:
                ImageDraw.Draw(holes).polygon(h.coords, fill=255, outline=255)
            mask[np.nonzero(np.array(poly_area, dtype=np.uint8))] = 255
            mask[np.nonzero(np.array(holes, dtype=np.uint8))] = 0
168817
def _render_border_line(self, t, settings):
        
        s = self._es(settings, self.SETTING_WIDTH, self.SETTING_MARGIN, self.SETTING_MARGIN_LEFT, self.SETTING_MARGIN_RIGHT)
        w = self.calculate_width_widget(**s)
        s = self._es(settings, self.SETTING_BORDER_STYLE, self.SETTING_BORDER_FORMATING)
        border_line = self.fmt_border(w, t, **s)
        s = self._es(settings, self.SETTING_MARGIN, self.SETTING_MARGIN_LEFT, self.SETTING_MARGIN_RIGHT, self.SETTING_MARGIN_CHAR)
        border_line = self.fmt_margin(border_line, **s)
        return border_line
1285329
function adjustLines() {
            let lineWidth = svg.select('.legend-line').node().getBoundingClientRect().width + markerSize;
            let lineWidthSpace = chartWidth - lineWidth;

            if (lineWidthSpace <= 0) {
                splitInLines();
            }

            centerInlineLegendOnSVG();
        }
1151690
protected void updateOutgoingEdgesStateDL(
			int currS, int currL,
			int prevS, int prevL,
			Emissions emission
	){
		updateOutgoingEdges(currS, currL, States.DL, prevS, prevL, States.DL, Transitions.t_DL_in, emission);
		updateOutgoingEdges(currS, currL, States.DL, prevS, prevL, States.S, Transitions.t_S_to_DL, emission);
	}
551839
def round_rectangle(self, style, fill, x1, y1, x2, y2, radius, shadow=None):
        """"""

        if invisible_p(x2, y2):
            return
        self.setbb(x1, y1)
        self.setbb(x2, y2)

        if fill:
            if shadow:
                x_off, y_off, shadow_fill = shadow
                self.gsave()
                self.newpath()
                self._path_round_rectangle(x1 + x_off, y1 + y_off, x2 + x_off, y2 + y_off,
                                           radius)
                self.closepath()
                self.clip_sub()
                self.fill_with_pattern(shadow_fill, x1 + x_off, y1 + y_off,
                                       x2 + x_off, y2 + y_off)
                self.grestore()

            self.gsave()
            self.newpath()
            self._path_round_rectangle(x1, y1, x2, y2, radius)
            self.closepath()
            self.clip_sub()
            self.fill_with_pattern(fill, x1, y1, x2, y2)
            self.grestore()
        if style:
            self.set_line_style(style)
            self.newpath()
            self._path_round_rectangle(x1, y1, x2, y2, radius)
            self.closepath()
            self.stroke()
556610
def fix_shapes(self):
        
        for i in xrange(self.n_chunks):
            for side in ['left', 'right', 'top', 'bottom']:
                edge = getattr(self, side).ravel()[i]
                if side in ['left', 'right']:
                    shp = [edge.todo.size, 1]
                else:
                    shp = [1, edge.todo.size]
                edge.done = edge.done.reshape(shp)
                edge.data = edge.data.reshape(shp)
                edge.todo = edge.todo.reshape(shp)
140666
function (shapetype, shapeargs) {
            var id = shapeCount++;
            shapeargs.unshift(id);
            return new VShape(this, id, shapetype, shapeargs);
        }
1291812
private ClickableMarkerShape translateMarker(ClickableMarkerShape shape, int amountOfMarkers) {
		if (amountOfMarkers % imagePerRow != 0) {
			int size = choiceListImageSize + 6;
			shape.setTranslation(size * (amountOfMarkers % imagePerRow), size * (amountOfMarkers / imagePerRow));
		}
		return shape;
	}
830573
def fmt_border(self, dimensions, t = 'm', border_style = 'utf8.a', border_formating = {}):
        
        cells = []
        for column in dimensions:
            cells.append(self.bchar('h', t, border_style) * (dimensions[column] + 2))

        border = '{}{}{}'.format(self.bchar('l', t, border_style), self.bchar('m', t, border_style).join(cells), self.bchar('r', t, border_style))
        return self.fmt_text(border, **border_formating)