Top Description Fields Constructors Methods
jogamp.graph.font.typecast

public Class TypecastRenderer

extends Object
Class Inheritance
Imports
jogamp.graph.font.typecast.ot.OTGlyph, .Point, jogamp.opengl.Debug, com.jogamp.graph.curve.OutlineShape, com.jogamp.graph.geom.Vertex, .Vertex.Factory

Factory to build an OutlineShape from Glyphs. http://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html http://walon.org/pub/ttf/ttf_glyphs.htm

Field Summary

Modifier and TypeField and Description
private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
addShapeLineTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1)

private static void
addShapeMoveTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1)

private static void
addShapeQuadTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1, final Point p2)

private static void
addShapeQuadTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1, final float p2x, final float p2y, final boolean p2OnCurve)

public static OutlineShape
buildShape(final char symbol, final OTGlyph glyph, final Vertex.Factory<? extends Vertex> vertexFactory)

private static void addShapeCubicTo(final OutlineShape shape, Factory<?

private static void
buildShapeImpl(final OutlineShape shape, final char symbol, final OTGlyph glyph, final Vertex.Factory<? extends Vertex> vertexFactory)

private static void buildShapeImpl02(final OutlineShape shape, char symbol, OTGlyph glyph, Factory<?

private static float
midValue(final float a, final float b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG

Constructor Detail

TypecastRendererback to summary
public TypecastRenderer()

Method Detail

addShapeLineToback to summary
private static void addShapeLineTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1)
addShapeMoveToback to summary
private static void addShapeMoveTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1)
addShapeQuadToback to summary
private static void addShapeQuadTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1, final Point p2)
addShapeQuadToback to summary
private static void addShapeQuadTo(final OutlineShape shape, final Vertex.Factory<? extends Vertex> vertexFactory, final Point p1, final float p2x, final float p2y, final boolean p2OnCurve)
buildShapeback to summary
public static OutlineShape buildShape(final char symbol, final OTGlyph glyph, final Vertex.Factory<? extends Vertex> vertexFactory)

private static void addShapeCubicTo(final OutlineShape shape, Factory<? extends Vertex> vertexFactory, Point p1, Point p2, Point p3) { shape.addVertex(0, vertexFactory.create(p1.x, p1.y, 0, p1.onCurve)); shape.addVertex(0, vertexFactory.create(p2.x, p2.y, 0, p2.onCurve)); shape.addVertex(0, vertexFactory.create(p3.x, p3.y, 0, p3.onCurve)); }

buildShapeImplback to summary
private static void buildShapeImpl(final OutlineShape shape, final char symbol, final OTGlyph glyph, final Vertex.Factory<? extends Vertex> vertexFactory)

private static void buildShapeImpl02(final OutlineShape shape, char symbol, OTGlyph glyph, Factory<? extends Vertex> vertexFactory) { // Iterate through all of the points in the glyph. Each time we find a // contour end point, add the point range to the path. int startIndex = 0; int count = 0; for (int i = 0; i < glyph.getPointCount(); i++) { count++; if ( glyph.getPoint(i).endOfContour ) { for(int j=0; j<count; j++) { final Point p = glyph.getPoint(startIndex + j); shape.addVertex(0, vertexFactory.create(p.x, p.y, 0, p.onCurve)); } shape.closeLastOutline(false); startIndex = i + 1; count = 0; } } }

midValueback to summary
private static float midValue(final float a, final float b)