APIdia Launch Partner
Top Description Fields Constructors Methods
sun.java2d.pipe

public Class OutlineTextRenderer

extends Object
implements TextPipe
Class Inheritance
All Implemented Interfaces
sun.java2d.pipe.TextPipe
Imports
java.awt.font.FontRenderContext, .GlyphVector, .TextLayout, .TextLayout, sun.java2d.SunGraphics2D, sun.awt.SunHints, java.awt.Shape, java.awt.geom.AffineTransform

A delegate pipe of SG2D for drawing "large" text with a solid source colour to an opaque destination. The text is drawn as a filled outline. Since the developer is not explicitly requesting this way of rendering, this should not be used if the current paint is not a solid colour. If text anti-aliasing is requested by the application, and filling path, an anti-aliasing fill pipe needs to be invoked. This involves making some of the same decisions as in the validatePipe call, which may be in a SurfaceData subclass, so its awkward to always ensure that the correct pipe is used. The easiest thing, rather than reproducing much of that logic is to call validatePipe() which works but is expensive, although probably not compared to the cost of filling the path. Note if AA hint is ON but text-AA hint is OFF this logic will produce AA text which perhaps isn't what the user expected. Note that the glyphvector obeys its FRC, not the G2D.

Field Summary

Modifier and TypeField and Description
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
drawChars(SunGraphics2D g2d, char[] data, int offset, int length, int x, int y)

Implements sun.java2d.pipe.TextPipe.drawChars.

public void
public void
drawString(SunGraphics2D g2d, String str, double x, double y)

Implements sun.java2d.pipe.TextPipe.drawString.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

THRESHHOLDback to summary
public static final int THRESHHOLD

Constructor Detail

OutlineTextRendererback to summary
public OutlineTextRenderer()

Method Detail

drawCharsback to summary
public void drawChars(SunGraphics2D g2d, char[] data, int offset, int length, int x, int y)

Implements sun.java2d.pipe.TextPipe.drawChars.

drawGlyphVectorback to summary
public void drawGlyphVector(SunGraphics2D g2d, GlyphVector gv, float x, float y)

Implements sun.java2d.pipe.TextPipe.drawGlyphVector.

drawStringback to summary
public void drawString(SunGraphics2D g2d, String str, double x, double y)

Implements sun.java2d.pipe.TextPipe.drawString.