Class TensorPatch

java.lang.Object
org.apache.pdfbox.pdmodel.graphics.shading.Patch
org.apache.pdfbox.pdmodel.graphics.shading.TensorPatch

class TensorPatch extends Patch
This class is used to describe a patch for type 7 shading. This was done as part of GSoC2014, Tilman Hausherr is the mentor.
  • Constructor Details

    • TensorPatch

      protected TensorPatch(Point2D[] tcp, float[][] color)
      Constructor of a patch for type 7 shading.
      Parameters:
      tcp - 16 control points
      color - 4 corner colors
  • Method Details

    • reshapeControlPoints

      private Point2D[][] reshapeControlPoints(Point2D[] tcp)
    • calcLevel

      private int[] calcLevel()
    • isOnSameSideCC

      private boolean isOnSameSideCC(Point2D p)
    • isOnSameSideDD

      private boolean isOnSameSideDD(Point2D p)
    • getTriangles

      private List<ShadedTriangle> getTriangles()
    • getFlag1Edge

      protected Point2D[] getFlag1Edge()
      Description copied from class: Patch
      Get the implicit edge for flag = 1.
      Specified by:
      getFlag1Edge in class Patch
      Returns:
      implicit control points
    • getFlag2Edge

      protected Point2D[] getFlag2Edge()
      Description copied from class: Patch
      Get the implicit edge for flag = 2.
      Specified by:
      getFlag2Edge in class Patch
      Returns:
      implicit control points
    • getFlag3Edge

      protected Point2D[] getFlag3Edge()
      Description copied from class: Patch
      Get the implicit edge for flag = 3.
      Specified by:
      getFlag3Edge in class Patch
      Returns:
      implicit control points
    • getPatchCoordinatesColor

      private CoordinateColorPair[][] getPatchCoordinatesColor()
    • getBernsteinPolynomials

      private double[][] getBernsteinPolynomials(int lvl)