Class VertexImageShaperDemo

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class VertexImageShaperDemo
    extends JPanel
    Demonstrates the use of images to represent graph vertices. The images are supplied via the VertexShapeFunction so that both the image and its shape can be utilized.

    The images used in this demo (courtesy of slashdot.org) are rectangular but with a transparent background. When vertices are represented by these images, it looks better if the actual shape of the opaque part of the image is computed so that the edge arrowheads follow the visual shape of the image. This demo uses the FourPassImageShaper class to compute the Shape from an image with transparent background.

    Author:
    Tom Nelson
    See Also:
    Serialized Form
    • Constructor Detail

      • VertexImageShaperDemo

        public VertexImageShaperDemo()
    • Method Detail

      • main

        public static void main​(String[] args)