Class CoonsPatch
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.shading.Patch
-
- org.apache.pdfbox.pdmodel.graphics.shading.CoonsPatch
-
class CoonsPatch extends Patch
This class is used to describe a patch for type 6 shading. This was done as part of GSoC2014, Tilman Hausherr is the mentor.
-
-
Field Summary
-
Fields inherited from class org.apache.pdfbox.pdmodel.graphics.shading.Patch
controlPoints, cornerColor, level, listOfTriangles
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CoonsPatch(java.awt.geom.Point2D[] points, float[][] color)
Constructor of a patch for type 6 shading.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int[]
calcLevel()
protected java.awt.geom.Point2D[]
getFlag1Edge()
Get the implicit edge for flag = 1.protected java.awt.geom.Point2D[]
getFlag2Edge()
Get the implicit edge for flag = 2.protected java.awt.geom.Point2D[]
getFlag3Edge()
Get the implicit edge for flag = 3.private CoordinateColorPair[][]
getPatchCoordinatesColor(CubicBezierCurve c1, CubicBezierCurve c2, CubicBezierCurve d1, CubicBezierCurve d2)
private java.util.List<ShadedTriangle>
getTriangles()
private java.awt.geom.Point2D[][]
reshapeControlPoints(java.awt.geom.Point2D[] points)
-
Methods inherited from class org.apache.pdfbox.pdmodel.graphics.shading.Patch
edgeEquationValue, getFlag1Color, getFlag2Color, getFlag3Color, getLen, getShadedTriangles, isEdgeALine
-
-
-
-
Method Detail
-
reshapeControlPoints
private java.awt.geom.Point2D[][] reshapeControlPoints(java.awt.geom.Point2D[] points)
-
calcLevel
private int[] calcLevel()
-
getTriangles
private java.util.List<ShadedTriangle> getTriangles()
-
getFlag1Edge
protected java.awt.geom.Point2D[] getFlag1Edge()
Description copied from class:Patch
Get the implicit edge for flag = 1.- Specified by:
getFlag1Edge
in classPatch
- Returns:
- implicit control points
-
getFlag2Edge
protected java.awt.geom.Point2D[] getFlag2Edge()
Description copied from class:Patch
Get the implicit edge for flag = 2.- Specified by:
getFlag2Edge
in classPatch
- Returns:
- implicit control points
-
getFlag3Edge
protected java.awt.geom.Point2D[] getFlag3Edge()
Description copied from class:Patch
Get the implicit edge for flag = 3.- Specified by:
getFlag3Edge
in classPatch
- Returns:
- implicit control points
-
getPatchCoordinatesColor
private CoordinateColorPair[][] getPatchCoordinatesColor(CubicBezierCurve c1, CubicBezierCurve c2, CubicBezierCurve d1, CubicBezierCurve d2)
-
-