Package ghidra.graph.viewer.vertex
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,java.awt.Shape>
public class VisualGraphVertexShapeTransformer<V extends VisualVertex> extends java.lang.Object implements com.google.common.base.Function<V,java.awt.Shape>
The defaultVisualGraph
renderer. By default, the shape returned by this class is aRectangle
of the given vertex'scomponent
.This class is aware of
VertexShapeProvider
s, which allows vertex creators to provide vertex shapes that differ for rendering and clicking. See that class for more info.
-
-
Constructor Summary
Constructors Constructor Description VisualGraphVertexShapeTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Shape
apply(V vertex)
java.awt.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-outjava.awt.Shape
transformToFullShape(V v)
Returns the full (the actual) shape of a vertex.
-
-
-
Method Detail
-
transformToCompactShape
public java.awt.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 java.awt.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:
the
- vertex- Returns:
- the shape
-
apply
public java.awt.Shape apply(V vertex)
- Specified by:
apply
in interfacecom.google.common.base.Function<V extends VisualVertex,java.awt.Shape>
-
-