@Override public void drawGlyphVector(GlyphVector g, float x, float y) { groupG2D.drawGlyphVector(g, x, y); alphaG2D.drawGlyphVector(g, x, y); }
public void drawGlyphVector(GlyphVector g, float x, float y) { delegate.drawGlyphVector(g, x, y); }
/** * Draw a String centered in the middle of a Rectangle. * * @param g The Graphics instance. * @param text The String to draw. * @param rect The Rectangle to center the text in. * @param font */ public void drawCenteredStringWOutline(Graphics2D g, String text, Rectangle rect, Font font) { // Get the FontMetrics FontMetrics metrics = g.getFontMetrics(font); // Determine the X coordinate for the text int x = rect.x + (rect.width - metrics.stringWidth(text)) / 2; // Determine the Y coordinate for the text (note we add the ascent, as in java 2d 0 is top of the screen) int y = rect.y + ((rect.height - metrics.getHeight()) / 2) + metrics.getAscent(); // Set the font g.setFont(font); GlyphVector gv = font.createGlyphVector(g.getFontRenderContext(), text); g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); g.drawGlyphVector(gv, x, y); g.translate(x - 1, y - 1); for (int i = 0; i < text.length(); i++) { g.setColor(Color.BLACK); g.draw(gv.getGlyphOutline(i)); } g.translate(-x + 1, -y + 1); }
final Rectangle2D rect = bounds.get(i); ypos += rect.getHeight(); graphics.drawGlyphVector(line, xpos, ypos);
drawStraightLabelStrikethroughIfNeeded(outline, metrics, false); if (labelRenderingMode == LabelRenderingMode.STRING) { graphics.drawGlyphVector(gv, 0, 0); } else if (labelRenderingMode == LabelRenderingMode.OUTLINE) { graphics.fill(outline); graphics.fill(outline); } else { graphics.drawGlyphVector(gv, 0, 0);
@Override public void drawGlyphVector(GlyphVector g, float x, float y) { groupG2D.drawGlyphVector(g, x, y); alphaG2D.drawGlyphVector(g, x, y); }
/** * Forwards the call to the parent. * * @param g the <code>GlyphVector</code> to be rendered * @param x coordinates. * @param y the position in User Space where the glyphs should be rendered */ public void drawGlyphVector( final GlyphVector g, final float x, final float y ) { parent.drawGlyphVector( g, x, y ); }
@Override public void drawGlyphVector (GlyphVector g, float x, float y) { _copy.drawGlyphVector(g, x, y); _primary.drawGlyphVector(g, x, y); }
@Override public void drawGlyphVector(final Graphics2D graphics, final GlyphVector str, final int x, final int y) { graphics.drawGlyphVector(str, x, y); }
private void drawGlyphVector(GlyphVector g, float x, float y) { graphics2d.drawGlyphVector(g, x, y); }
@Override public void drawGlyphVector(GlyphVector g, float x, float y) { delegate.drawGlyphVector(g, x, y); }
@Override public void drawGlyphVector(GlyphVector gv, float x, float y) { g.drawGlyphVector(gv, x, y); }
@Override public void drawGlyphVector(Graphics2D graphics, GlyphVector str, int x, int y) { graphics.setColor(Color.WHITE); graphics.setPaint(/*new GradientPaint(x, y, color, x, y + gradientSize / 2, color2, true)*/color); graphics.drawGlyphVector(str, x, y); }
@Override public void drawGlyphVector(Graphics2D graphics, GlyphVector str, int x, int y) { //shadow graphics.setColor(DROP_SHADOW_COLOR); graphics.drawGlyphVector(str, x + dropShadowDepth, y + dropShadowDepth); // normal graphics.setColor(Color.WHITE); graphics.setPaint(new GradientPaint(x, y, color1, x, y + gradientSize / 2, color2, true)); graphics.drawGlyphVector(str, x, y); }
@Override public void drawGlyphVector(Graphics2D graphics, GlyphVector str, int x, int y) { graphics.setColor(Color.WHITE); graphics.setPaint(new GradientPaint(x, y, color1, x, y + gradientSize / 2, color2, true)); graphics.drawGlyphVector(str, x, y); }
public void drawGlyphVector(GlyphVector g, float x, float y) { System.out.println( "drawGlyphVector(GlyphVector, float, float):" ); System.out.println( "g = " + g ); System.out.println( "x = " + x ); System.out.println( "y = " + y ); g2D.drawGlyphVector( g, x, y ); }
public void drawGlyphVector(GlyphVector g, float x, float y) { System.out.println( "drawGlyphVector(GlyphVector, float, float):" ); System.out.println( "g = " + g ); System.out.println( "x = " + x ); System.out.println( "y = " + y ); g2D.drawGlyphVector( g, x, y ); }
public void drawGlyphVector(GlyphVector g, float x, float y) { System.out.println( "drawGlyphVector(GlyphVector, float, float):" ); System.out.println( "g = " + g ); System.out.println( "x = " + x ); System.out.println( "y = " + y ); g2D.drawGlyphVector( g, x, y ); }
@Override public final void drawGlyphVector(GlyphVector g, float x, float y) { // XXXX: call validate with bounding box of primitive validate(); offScreenGraphics2D.drawGlyphVector(g, x, y); }
public void drawGlyphVector(OutputDevice outputDevice, FSGlyphVector fsGlyphVector, float x, float y ) { Object prevHint = null; Graphics2D graphics = ((Java2DOutputDevice)outputDevice).getGraphics(); if ( graphics.getFont().getSize() > threshold ) { prevHint = graphics.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, antiAliasRenderingHint ); } GlyphVector vector = ((AWTFSGlyphVector)fsGlyphVector).getGlyphVector(); graphics.drawGlyphVector(vector, (int)x, (int)y ); if ( graphics.getFont().getSize() > threshold ) { graphics.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, prevHint ); } }