Class HyperbolicShapeTransformer

    • Constructor Detail

      • HyperbolicShapeTransformer

        public HyperbolicShapeTransformer​(java.awt.Component component)
        Create an instance, setting values from the passed component and registering to listen for size changes on the component.
      • HyperbolicShapeTransformer

        public HyperbolicShapeTransformer​(java.awt.Component component,
                                          MutableTransformer delegate)
        Create an instance, setting values from the passed component and registering to listen for size changes on the component, with a possibly shared transform delegate.
    • Method Detail

      • transform

        public java.awt.Shape transform​(java.awt.Shape shape)
        Transform the supplied shape with the overridden transform method so that the shape is distorted by the hyperbolic transform.
        Specified by:
        transform in interface BidirectionalTransformer
        Specified by:
        transform in interface ShapeTransformer
        Overrides:
        transform in class LensTransformer
        Parameters:
        shape - a shape to transform
        Returns:
        a GeneralPath for the transformed shape
      • transform

        public java.awt.Shape transform​(java.awt.Shape shape,
                                        float flatness)
        Description copied from interface: ShapeFlatnessTransformer
        map a shape from graph coordinate system to the screen coordinate system
        Specified by:
        transform in interface ShapeFlatnessTransformer
        flatness - used to break the supplied shape into segments
        Returns:
        a GeneralPath (Shape) representing the screen points of the shape