JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate Interface Reference

Class supporting more full control over the process of rendering the bitmapped text. More...

Inheritance diagram for com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate:
Collaboration diagram for com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate:

Public Member Functions

boolean intensityOnly ()
 Indicates whether the backing store of this TextRenderer should be intensity-only (the default) or full-color. More...
 
Rectangle2D getBounds (String str, Font font, FontRenderContext frc)
 Computes the bounds of the given String relative to the origin. More...
 
Rectangle2D getBounds (CharSequence str, Font font, FontRenderContext frc)
 Computes the bounds of the given character sequence relative to the origin. More...
 
Rectangle2D getBounds (GlyphVector gv, FontRenderContext frc)
 Computes the bounds of the given GlyphVector, already assumed to have been created for a particular Font, relative to the origin. More...
 
void draw (Graphics2D graphics, String str, int x, int y)
 Render the passed character sequence at the designated location using the supplied Graphics2D instance. More...
 
void drawGlyphVector (Graphics2D graphics, GlyphVector str, int x, int y)
 Render the passed GlyphVector at the designated location using the supplied Graphics2D instance. More...
 

Detailed Description

Class supporting more full control over the process of rendering the bitmapped text.

Allows customization of whether the backing store text bitmap is full-color or intensity only, the size of each individual rendered text rectangle, and the contents of each individual rendered text string. The default implementation of this interface uses an intensity-only texture, a closely-cropped rectangle around the text, and renders text using the color white, which is modulated by the set color during the rendering process.

Definition at line 957 of file TextRenderer.java.

Member Function Documentation

◆ draw()

void com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate.draw ( Graphics2D  graphics,
String  str,
int  x,
int  y 
)

Render the passed character sequence at the designated location using the supplied Graphics2D instance.

The surrounding region will already have been cleared to the RGB color (0, 0, 0) with zero alpha. The initial drawing context of the passed Graphics2D will be set to use AlphaComposite.Src, the color white, the Font specified in the TextRenderer's constructor, and the rendering hints specified in the TextRenderer constructor. Changes made by the end user may be visible in successive calls to this method, but are not guaranteed to be preserved. Implementors of this method should reset the Graphics2D's state to that desired each time this method is called, in particular those states which are not the defaults.

Implemented in com.jogamp.opengl.util.awt.TextRenderer.DefaultRenderDelegate.

◆ drawGlyphVector()

void com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate.drawGlyphVector ( Graphics2D  graphics,
GlyphVector  str,
int  x,
int  y 
)

Render the passed GlyphVector at the designated location using the supplied Graphics2D instance.

The surrounding region will already have been cleared to the RGB color (0, 0, 0) with zero alpha. The initial drawing context of the passed Graphics2D will be set to use AlphaComposite.Src, the color white, the Font specified in the TextRenderer's constructor, and the rendering hints specified in the TextRenderer constructor. Changes made by the end user may be visible in successive calls to this method, but are not guaranteed to be preserved. Implementors of this method should reset the Graphics2D's state to that desired each time this method is called, in particular those states which are not the defaults.

Implemented in com.jogamp.opengl.util.awt.TextRenderer.DefaultRenderDelegate.

◆ getBounds() [1/3]

Rectangle2D com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate.getBounds ( CharSequence  str,
Font  font,
FontRenderContext  frc 
)

Computes the bounds of the given character sequence relative to the origin.

Implemented in com.jogamp.opengl.util.awt.TextRenderer.DefaultRenderDelegate.

◆ getBounds() [2/3]

Rectangle2D com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate.getBounds ( GlyphVector  gv,
FontRenderContext  frc 
)

Computes the bounds of the given GlyphVector, already assumed to have been created for a particular Font, relative to the origin.

Implemented in com.jogamp.opengl.util.awt.TextRenderer.DefaultRenderDelegate.

◆ getBounds() [3/3]

Rectangle2D com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate.getBounds ( String  str,
Font  font,
FontRenderContext  frc 
)

Computes the bounds of the given String relative to the origin.

Implemented in com.jogamp.opengl.util.awt.TextRenderer.DefaultRenderDelegate.

Here is the caller graph for this function:

◆ intensityOnly()

boolean com.jogamp.opengl.util.awt.TextRenderer.RenderDelegate.intensityOnly ( )

Indicates whether the backing store of this TextRenderer should be intensity-only (the default) or full-color.

Implemented in com.jogamp.opengl.util.awt.TextRenderer.DefaultRenderDelegate.


The documentation for this interface was generated from the following file: