Class dg.Edge

Share:

Description

A skeleton class for the classes of edges.

Objects from the Class

Objects has the methods for extracting and setting the slots for edges, and the method for drawing the edge.

Slots

vertex.indices:

Object of class "numeric": The vertex.indices of the vertices of the edge.

width:

Object of class "numeric": The width of the edge.

dash:

Object of class "character": The dash pattern of the edge.

From the Tcl/tk Reference Manual:

"DASH PATTERNS

Many items support the notion of an dash pattern for outlines.

The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the "outline" color. The other segments are drawn transparant.

The second possible syntax is a character list containing only 5 possible characters $[.,-\_ ]$. The space can be used to enlarge the space between other line elements, and can not occur as the first position in the string. Some examples: -dash . = -dash {2 4} -dash - = -dash {6 4} -dash -. = -dash {6 4 2 4} -dash -.. = -dash {6 4 2 4 2 4} -dash {. } = -dash {2 8} -dash , = -dash {4 4}

The main difference of this syntax with the previous is that it it shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that "." will always be displayed as a dot and "-" always as a dash regardless of the line width.

On systems which support only a limited set of dash patterns, the dash pattern will be displayed as the closest dash pattern that is available. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically to the first one. "

color:

Object of class "character": The color of the edge.

label:

Object of class "character": The label of the edge.

label.position:

Object of class "numeric": The label.position of the edge.

Extends

Class "dg.Node", directly.

Methods

dash<-

signature(x = "dg.Edge") : Set the dash pattern of the edge.

dash

signature(object = "dg.Edge"): Return the dash pattern of the edge.

draw

signature(object = "dg.Edge"): ...

initialize

signature(.Object = "dg.Edge"): ...

label<-

signature(x = "dg.Edge"): Set the label of the edge.

label

signature(object = "dg.Edge"): Return the label of the edge.

name

signature(object = "dg.Edge"): Return the name, equal to the label, of the edge.

nodeIndicesOfEdge<-

signature(x = "dg.Edge"): Set the indices of the vertices of the edge.

nodeIndicesOfEdge

signature(object = "dg.Edge"): Return the indices of the vertices of the edge.

width<-

signature(x = "dg.Edge"): Set the width of the edge.

width

signature(object = "dg.Edge"): Return the width of the edge.

Author(s)

Jens Henrik Badsberg

See Also

dg.VertexEdge-class, dg.BlockEdge-class, dg.FactorEdge-class.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.