public class FontExtrusion extends Object
The shape of the extrusion path is, by default, a straight line from 0.0 to 0.2 (known as a straight bevel). The shape may be modified via the extrusionShape parameter, a Shape object that describes the 3D contour of a Font3D object.
User is responsible for data sanity and must make sure that extrusionShape does not cause intersection of adjacent glyphs or within single glyph. Else undefined output may be generated.
Constructor and Description |
---|
FontExtrusion()
Constructs a FontExtrusion object with default parameters.
|
FontExtrusion(Shape extrusionShape)
Constructs a FontExtrusion object with the specified shape, using
the default tessellation tolerance.
|
FontExtrusion(Shape extrusionShape,
double tessellationTolerance)
Constructs a FontExtrusion object with the specified shape, using
the specified tessellation tolerance.
|
Modifier and Type | Method and Description |
---|---|
Shape |
getExtrusionShape()
Gets the FontExtrusion's shape parameter.
|
double |
getTessellationTolerance()
Returns the tessellation tolerance with which this FontExtrusion was
created.
|
void |
setExtrusionShape(Shape extrusionShape)
Sets the FontExtrusion's shape parameter.
|
public FontExtrusion()
Font3D
public FontExtrusion(Shape extrusionShape)
extrusionShape
- the shape object to use to generate the
extrusion path.
A null shape specifies that a straight line from 0.0 to 0.2
(straight bevel) is used.IllegalArgumentException
- if multiple contours in
extrusionShape, or contour is not monotonic or least x-value
of a contour point is not 0.0fFont3D
public FontExtrusion(Shape extrusionShape, double tessellationTolerance)
extrusionShape
- the shape object to use to generate the
extrusion path.
A null shape specifies that a straight line from 0.0 to 0.2
(straight bevel) is used.tessellationTolerance
- the tessellation tolerance value
used in tessellating the extrusion shape.
This corresponds to the flatness
parameter in
the java.awt.Shape.getPathIterator
method.IllegalArgumentException
- if multiple contours in
extrusionShape, or contour is not monotonic or least x-value
of a contour point is not 0.0fFont3D
public void setExtrusionShape(Shape extrusionShape)
extrusionShape
- the shape object to use to generate the
extrusion path.
A null shape specifies that a straight line from 0.0 to 0.2
(straight bevel) is used.IllegalArgumentException
- if multiple contours in
extrusionShape, or contour is not monotonic or least x-value
of a contour point is not 0.0fFont3D
,
Shape
public Shape getExtrusionShape()
public double getTessellationTolerance()
Copyright © 2016–2022 SciJava. All rights reserved.