Package icyllis.arc3d.core.j2d

# Class J2DUtils.J2DPathConverter

java.lang.Object
icyllis.arc3d.core.j2d.J2DUtils.J2DPathConverter

All Implemented Interfaces:
  `PathConsumer`

Enclosing class:
  `J2DUtils`

public static class J2DUtils.J2DPathConverter extends Object implements PathConsumer

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `J2DPathConverter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes the current contour by drawing a straight line back to the point of the last `PathConsumer.moveTo(float, float)`.
  `Path2D`
  `convert(PathIterable src, Path2D dst)`
  `void`
  `cubicTo(float x1, float y1, float x2, float y2, float x3, float y3)`
  Accepts a curved segment, defined by three new points, to the path by drawing a cubic Bézier curve that intersects both the current point and the specified point `(x3,y3)`, using the specified points `(x1,y1)` and `(x2,y2)` as cubic control points.
  `void`
  `done()`
  Called after the last segment of the last sub-path when the iteration of the path segments is completely done.
  `void`
  `lineTo(float x, float y)`
  Accepts a point to the path by drawing a straight line from the current point to the new specified point `(x,y)`.
  `void`
  `moveTo(float x, float y)`
  Accepts a point to the path consumer by moving to the specified point `(x,y)`.
  `void`
  `quadTo(float x1, float y1, float x2, float y2)`
  Accepts a curved segment, defined by two new points, to the path by drawing a quadratic Bézier curve that intersects both the current point and the specified point `(x2,y2)`, using the specified point `(x1,y1)` as a quadratic control point.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface icyllis.arc3d.core.PathConsumer

  `cubicTo, quadTo`

- ## Constructor Details

  - ### J2DPathConverter

    public J2DPathConverter()

- ## Method Details

  - ### convert

    public Path2D convert(PathIterable src, Path2D dst)

  - ### moveTo

    public void moveTo(float x, float y)
    Description copied from interface: `PathConsumer`
    Accepts a point to the path consumer by moving to the specified point `(x,y)`.
    Specified by:
      `moveTo` in interface `PathConsumer`
    Parameters:
      `x` - the specified X coordinate
      `y` - the specified Y coordinate

  - ### lineTo

    public void lineTo(float x, float y)
    Description copied from interface: `PathConsumer`
    Accepts a point to the path by drawing a straight line from the current point to the new specified point `(x,y)`.
    Specified by:
      `lineTo` in interface `PathConsumer`
    Parameters:
      `x` - the specified X coordinate
      `y` - the specified Y coordinate

  - ### quadTo

    public void quadTo(float x1, float y1, float x2, float y2)
    Description copied from interface: `PathConsumer`
    Accepts a curved segment, defined by two new points, to the path by drawing a quadratic Bézier curve that intersects both the current point and the specified point `(x2,y2)`, using the specified point `(x1,y1)` as a quadratic control point.
    Specified by:
      `quadTo` in interface `PathConsumer`
    Parameters:
      `x1` - the X coordinate of the quadratic control point
      `y1` - the Y coordinate of the quadratic control point
      `x2` - the X coordinate of the final end point
      `y2` - the Y coordinate of the final end point

  - ### cubicTo

    public void cubicTo(float x1, float y1, float x2, float y2, float x3, float y3)
    Description copied from interface: `PathConsumer`
    Accepts a curved segment, defined by three new points, to the path by drawing a cubic Bézier curve that intersects both the current point and the specified point `(x3,y3)`, using the specified points `(x1,y1)` and `(x2,y2)` as cubic control points.
    Specified by:
      `cubicTo` in interface `PathConsumer`
    Parameters:
      `x1` - the X coordinate of the first cubic control point
      `y1` - the Y coordinate of the first cubic control point
      `x2` - the X coordinate of the second cubic control point
      `y2` - the Y coordinate of the second cubic control point
      `x3` - the X coordinate of the final end point
      `y3` - the Y coordinate of the final end point

  - ### close

    public void close()
    Description copied from interface: `PathConsumer`
    Closes the current contour by drawing a straight line back to the point of the last `PathConsumer.moveTo(float, float)`. If the path is already closed then this method has no effect.
    Specified by:
      `close` in interface `PathConsumer`

  - ### done

    public void done()
    Description copied from interface: `PathConsumer`
    Called after the last segment of the last sub-path when the iteration of the path segments is completely done.
    Specified by:
      `done` in interface `PathConsumer`