Add a boundary line
350234
def add_boundary(self, p1, p2, btype):
        
        index = self.add_line(p1, p2, self.char_lengths['boundary'])
        # self.Boundaries.append((p1_id,p2_id,btype))
        self.BoundaryIndices.append(index)
        self.Boundaries.append((p1, p2, btype))
228614
function addLine(lat,lon,el, color) {
        var poly = new amino.Polygon();
        var pt1 = latlon2xyz(lat,lon,radius);
        var pt2 = latlon2xyz(lat,lon,radius+el);
        var pt3 = latlon2xyz(lat,lon,radius);
        var points = pt1.concat(pt2).concat(pt3);

        poly.fill(color);
        poly.geometry(points);
        poly.dimension(3);
        group.add(poly);
    }
343681
private void boundaryAreaBoundaryLine_(int half_edge, int id_a, int id_b,
			int cluster_index_b) {
		if (m_matrix[MatrixPredicate.BoundaryBoundary] == 0)
			return;

		if (m_topo_graph.getHalfEdgeUserIndex(m_topo_graph
				.getHalfEdgePrev(m_topo_graph.getHalfEdgeTwin(half_edge)),
				m_visited_index) != 1) {
			int cluster = m_topo_graph.getHalfEdgeTo(half_edge);
			int clusterParentage = m_topo_graph.getClusterParentage(cluster);

			if ((clusterParentage & id_a) != 0) {
				int index = m_topo_graph.getClusterUserIndex(cluster,
						cluster_index_b);

				if ((clusterParentage & id_b) != 0 && (index % 2 != 0)) {
					assert (index != -1);
					m_matrix[MatrixPredicate.BoundaryBoundary] = 0;
				}
			}
		}
	}
1088732
def dashed_line(self, x1,y1,x2,y2, dash_length=1, space_length=1):
        """"""
        self._set_dash(dash_length, space_length)
        self.line(x1, y1, x2, y2)
        self._set_dash()
453585
def newline(self):
        """"""
        self.write_str(self.eol)
        self.room = self.maxlinelen
39249
protected void addNeighbor(Queue<ColorPoint> queue, int px, int py, int color, Feature component) {
        if (!inBoundary(px, py, component)) {
            return;
        }

        if (!mask.isTouched(px, py)) {
            queue.add(new ColorPoint(px, py, color));
        }
    }
1011024
function drawLines(node, parent) {
      ctx.save();
      var x = node.offset.x;
      var y = node.offset.y;
      ctx.translate(x, y);

      // branch
      if (parent) {
        drawBranch(node, parent);
      }

      // bottom border
      if (!node.isRoot()) {
        ctx.fillStyle = node.branchColor;
        var tm = node.textMetrics;
        ctx.fillRect(0, tm.height + padding, tm.width, node.lineWidth);
      }

      node.forEachChild(function(child) {
        drawLines(child, node);
      });

      ctx.restore();
    }
216300
function(plot) {
            if (plot.options.type === "square") {
                plot.options.attrs.width = plot.options.size;
                plot.options.attrs.height = plot.options.size;
                plot.options.attrs.x = plot.coords.x - (plot.options.size / 2);
                plot.options.attrs.y = plot.coords.y - (plot.options.size / 2);
            } else if (plot.options.type === "image") {
                plot.options.attrs.src = plot.options.url;
                plot.options.attrs.width = plot.options.width;
                plot.options.attrs.height = plot.options.height;
                plot.options.attrs.x = plot.coords.x - (plot.options.width / 2);
                plot.options.attrs.y = plot.coords.y - (plot.options.height / 2);
            } else if (plot.options.type === "svg") {
                plot.options.attrs.path = plot.options.path;

                // Init transform string
                if (plot.options.attrs.transform === undefined) {
                    plot.options.attrs.transform = "";
                }

                // Retrieve original boundary box if not defined
                if (plot.mapElem.originalBBox === undefined) {
                    plot.mapElem.originalBBox = plot.mapElem.getBBox();
                }

                // The base transform will resize the SVG path to the one specified by width/height
                // and also move the path to the actual coordinates
                plot.mapElem.baseTransform = "m" + (plot.options.width / plot.mapElem.originalBBox.width) + ",0,0," +
                                                   (plot.options.height / plot.mapElem.originalBBox.height) + "," +
                                                   (plot.coords.x - plot.options.width / 2) + "," +
                                                   (plot.coords.y - plot.options.height / 2);

                plot.options.attrs.transform = plot.mapElem.baseTransform + plot.options.attrs.transform;

            } else { // Default : circle
                plot.options.attrs.x = plot.coords.x;
                plot.options.attrs.y = plot.coords.y;
                plot.options.attrs.r = plot.options.size / 2;
            }
        }
1221222
def add_edge(*vertices, **kvargs)
      edge = new_edge(*vertices, mixins: @mixins, **kvargs)
      insert_edge(edge)
      vertices.each { |vertex| callback(vertex, :edge_added, edge) }
      edge
    end
477259
private void boundaryLineBoundaryLine_(int half_edge, int id_a, int id_b,
			int cluster_index_a, int cluster_index_b) {
		if (m_matrix[MatrixPredicate.BoundaryBoundary] == 0)
			return;

		if (m_topo_graph.getHalfEdgeUserIndex(m_topo_graph
				.getHalfEdgePrev(m_topo_graph.getHalfEdgeTwin(half_edge)),
				m_visited_index) != 1) {
			int cluster = m_topo_graph.getHalfEdgeTo(half_edge);
			int clusterParentage = m_topo_graph.getClusterParentage(cluster);

			if ((clusterParentage & id_a) != 0
					&& (clusterParentage & id_b) != 0) {
				int index_a = m_topo_graph.getClusterUserIndex(cluster,
						cluster_index_a);
				int index_b = m_topo_graph.getClusterUserIndex(cluster,
						cluster_index_b);
				assert (index_a != -1);
				assert (index_b != -1);

				if ((index_a % 2 != 0) && (index_b % 2 != 0)) {
					assert ((m_topo_graph.getClusterParentage(cluster) & id_a) != 0 && (m_topo_graph
							.getClusterParentage(cluster) & id_b) != 0);
					m_matrix[MatrixPredicate.BoundaryBoundary] = 0;
				}
			}
		}
	}
552596
def addPoint( self, x, y ):
        
        self._points.append((x, y))
        self._dirty = True
551343
def add_line(self, start, end, color=(0.5, 0.5, 0.5), width=1):
        
        source = vtk.vtkLineSource()
        source.SetPoint1(start)
        source.SetPoint2(end)

        vertexIDs = vtk.vtkStringArray()
        vertexIDs.SetNumberOfComponents(1)
        vertexIDs.SetName("VertexIDs")
        # Set the vertex labels
        vertexIDs.InsertNextValue("a")
        vertexIDs.InsertNextValue("b")
        source.GetOutput().GetPointData().AddArray(vertexIDs)

        mapper = vtk.vtkPolyDataMapper()
        mapper.SetInputConnection(source.GetOutputPort())
        actor = vtk.vtkActor()
        actor.SetMapper(mapper)
        actor.GetProperty().SetColor(color)
        actor.GetProperty().SetLineWidth(width)
        self.ren.AddActor(actor)
899867
def add_edge(edges, edge_points, coords, i, j):
    
    if (i, j) in edges or (j, i) in edges:
        # already added
        return( edges.add((i, j)), edge_points.append(coords[[i, j]]))
1360479
public TableBuilder addOutlineBorder(BorderStyle style) {
		this.addBorder(0, 0, model.getRowCount(), model.getColumnCount(), OUTLINE, style);
		return this;
	}
316124
private void boundaryLineExteriorLine_(int half_edge, int id_a, int id_b,
			int cluster_index_a, int predicate) {
		if (m_matrix[predicate] == 0)
			return;

		if (m_topo_graph.getHalfEdgeUserIndex(m_topo_graph
				.getHalfEdgePrev(m_topo_graph.getHalfEdgeTwin(half_edge)),
				m_visited_index) != 1) {
			int cluster = m_topo_graph.getHalfEdgeTo(half_edge);
			int clusterParentage = m_topo_graph.getClusterParentage(cluster);

			if ((clusterParentage & id_b) == 0) {
				int index = m_topo_graph.getClusterUserIndex(cluster,
						cluster_index_a);
				assert (index != -1);

				if (index % 2 != 0) {
					assert ((m_topo_graph.getClusterParentage(cluster) & id_a) != 0);
					m_matrix[predicate] = 0;
				}
			}
		}
	}
468123
def line(self, lines):
        """"""
        shapeType = POLYLINE
        self._shapeparts(parts=lines, shapeType=shapeType)
149103
def append_line(self, new_line):
        """"""
        # TODO: The user still has to write the raw line, this is error prone.
        self._write(('PGM', [Integer, String]), self.idx, new_line)