Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.graphics.shading

pack-priv Class CubicBezierCurve

extends Object
Class Inheritance
Imports
java.awt.geom.Point2D

This class is used to describe the edge of each patch for type 6 shading. This was done as part of GSoC2014, Tilman Hausherr is the mentor.
Author
Shaola Ren

Field Summary

Modifier and TypeField and Description
private final Point2D[]
private final Point2D[]
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
CubicBezierCurve(Point2D[]
4 control points [p0, p1, p2, p3]
ctrlPnts
,
int
dividing level, if l = 0, one cubic Bezier curve is divided into 2^0 = 1 segments, if l = n, one cubic Bezier curve is divided into 2^n segments
l
)

Constructor of CubicBezierCurve

Method Summary

Modifier and TypeMethod and Description
pack-priv Point2D[]

Returns:

sampled points
getCubicBezierCurve
()

Get sampled points of this cubic Bezier curve.

pack-priv int

Returns:

level
getLevel
()

Get level parameter

private Point2D[]
getPoints(int l)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

controlPointsback to summary
private final Point2D[] controlPoints
curveback to summary
private final Point2D[] curve
levelback to summary
private final int level

Constructor Detail

CubicBezierCurveback to summary
pack-priv CubicBezierCurve(Point2D[] ctrlPnts, int l)

Constructor of CubicBezierCurve

Parameters
ctrlPnts:Point2D[]

4 control points [p0, p1, p2, p3]

l:int

dividing level, if l = 0, one cubic Bezier curve is divided into 2^0 = 1 segments, if l = n, one cubic Bezier curve is divided into 2^n segments

Method Detail

getCubicBezierCurveback to summary
pack-priv Point2D[] getCubicBezierCurve()

Get sampled points of this cubic Bezier curve.

Returns:Point2D[]

sampled points

getLevelback to summary
pack-priv int getLevel()

Get level parameter

Returns:int

level

getPointsback to summary
private Point2D[] getPoints(int l)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override