Class VisualGraphVertexShapeTransformer<V extends VisualVertex>

java.lang.Object
ghidra.graph.viewer.vertex.VisualGraphVertexShapeTransformer<V>
Type Parameters:
V - the vertex type
All Implemented Interfaces:
com.google.common.base.Function<V,Shape>, Function<V,Shape>

public class VisualGraphVertexShapeTransformer<V extends VisualVertex> extends Object implements com.google.common.base.Function<V,Shape>
The default VisualGraph renderer. By default, the shape returned by this class is a Rectangle of the given vertex's component.

This class is aware of VertexShapeProviders, which allows vertex creators to provide vertex shapes that differ for rendering and clicking. See that class for more info.

  • Constructor Details

    • VisualGraphVertexShapeTransformer

      public VisualGraphVertexShapeTransformer()
  • Method Details

    • transformToCompactShape

      public Shape transformToCompactShape(V v)
      Returns the compact shape that the user will see when full, detailed rendering is not being performed for a vertex, such as in the satellite viewer or when fully-zoomed-out
      Parameters:
      v - the vertex
      Returns:
      the shape
    • transformToFullShape

      public Shape transformToFullShape(V v)
      Returns the full (the actual) shape of a vertex. This can be used to determine if a mouse point intersects a vertex or to get the real bounding-box of a vertex.
      Parameters:
      v - the vertex
      Returns:
      the shape
    • apply

      public Shape apply(V vertex)
      Specified by:
      apply in interface com.google.common.base.Function<V extends VisualVertex,Shape>
      Specified by:
      apply in interface Function<V extends VisualVertex,Shape>