Next: Edge Graphics Up: Graph Objects Previous: Graph Views

## Vertex Graphics

Figure 9.5: Defining graph functions:
| (oval-item vg)

(slot) Holds an object of class <guarded-oval>, where the latter prevents the user from changing the ``fill'' slot, since ``color'' is the slot which controls the color of the vertex. NOT SETTLED YET - MUST OTHER ATTRIBUTES BE GUARDED TOO?

| (txt-item vg)

(slot) Holds the STk <txt-item> which holds the the vertex label. Note that vertex-label and vertex-name are two different concepts. The name is constant, while the label can change to display various information.

| (vertex vg)

(slot) Holds the <vertex*> object contained within vg.

| (coords vg)

(slot) The viewing coordinates of <vertex-item> vg.

| (world-coords vg)

(slot) The world coordinates of <vertex-item> vg.

| (size vg)

(slot) The size in pixels of the oval depicting the vertex.

| (width vg)

(slot)The width of the outline encircling the vertex-item. The default is 1.

| (outline vg)

(slot) The color of the outline encircling the vertex-item.

| (color vg)

(slot) The color of the oval depicting the vertex.

| (text-color vg)

(slot) The color of the vertex label.

| (font vg)

(slot) The font of the vertex label.

| (stipple vg)

(slot) The stipple of the oval depicting the vertex. For example, ``'' is the default value, and ''gray-50'' gives the oval a sparser background. See the Tk documentation for other options.

| (tags vg)

(slot) The STk tags associated with the vertex-item. This information is contained in a list, and some common values include 'vertex, which is always present in vertices, and 'link:selected-item,' which is added if the user selects the vertex.

| (degree vg)

(method) returns the degree of the vertex contained within vertex-item vg.

| (random-neighbor vg)

(method) returns a random neighbor (out-neighbor) of vertex-item vg.

| (vertex-item? vg)

(method) Returns #t if vg is a vertex-item object.

Next: Edge Graphics Up: Graph Objects Previous: Graph Views