Class ApplySpaceChangeShape

java.lang.Object
de.intarsys.tools.geometry.TransformedShape
de.intarsys.tools.geometry.ApplySpaceChangeShape
All Implemented Interfaces:
IShapeWrapper, Shape, Cloneable

public class ApplySpaceChangeShape extends TransformedShape
The transformation is defined by two matrices, each defining a coordinate system. The source transformation is the space the shape is defined in, the target transformation is the space for the resulting shape.
  • Constructor Details

  • Method Details

    • create

      public static TransformedShape create(Shape shape, AffineTransform transform)
      Create a new Shape whose coordinates are specified in the space defined by "transform".
      Parameters:
      shape - The wrapped base shape
      transform - The coordinate space where "shape" is defined.
      Returns:
      The new TransformedShape
    • create

      public static TransformedShape create(Shape shape, AffineTransform sourceTransform, AffineTransform targetTransform)
    • setTransform

      public static TransformedShape setTransform(Shape shape, AffineTransform targetTransform)
      Create a new Shape that behaves like the base shape with its coordinates relative to the new space defined by "newTransform".

      You can use this to "view" on an already existing shape from another coordinate system.

      Parameters:
      shape - The base shape
      targetTransform - The new coordinate space
      Returns:
      The transformed shape, showing "shape" from the space defined by "newTransform"
    • apply

      protected Shape apply()
      Specified by:
      apply in class TransformedShape
    • clone

      public Object clone()
      Returns an exact copy of this Area object.
      Specified by:
      clone in class TransformedShape
      Returns:
      Created clone object
    • getSourceTransform

      public AffineTransform getSourceTransform()
    • getTargetTransform

      public AffineTransform getTargetTransform()
    • getTransform

      public AffineTransform getTransform()
      Specified by:
      getTransform in class TransformedShape