afreechart/src/main/java/org/afree/chart/text/TextBlock.java
/*
     * public void draw(final Canvas canvas, final float anchorX, final float
     * anchorY, final TextBlockAnchor anchor, final float rotateX, final float
     * rotateY, final double angle) {
     * 
     * final Size2D d = calculateDimensions(canvas); final float[] offsets =
     * calculateOffsets(anchor, d.getWidth(), d .getHeight()); final Iterator
     * iterator = this.lines.iterator(); float yCursor = 0.0f; while
     * (iterator.hasNext()) { final TextLine line = (TextLine) iterator.next();
     * line.draw(canvas, anchorX + offsets[0], anchorY + offsets[1] + yCursor,
     * TextAnchor.TOP_LEFT, rotateX, rotateY, angle); final Size2D dimension =
     * line.calculateDimensions(canvas); yCursor = yCursor + (float)
     * dimension.getHeight(); }
     * 
     * }
     */
public void draw(final Canvas canvas, final float anchorX, final float
anchorY, final TextBlockAnchor anchor, final float rotateX, final float
rotateY, final double angle) {




public void draw ( final Canvas canvas final float anchorX final float anchorY final TextBlockAnchor anchor final float rotateX final float rotateY final double angle ) {
public void draw(final Canvas canvas, final float anchorX, final float anchorY,
            final TextBlockAnchor anchor, final float rotateX,
            final float rotateY, final double angle) {
        final Size2D d = calculateDimensions(canvas);
        final float[] offsets = calculateOffsets(anchor, d.getWidth(), d
                .getHeight());
        final Iterator iterator = this.lines.iterator();
        float yCursor = 0.0f;
        while (iterator.hasNext()) {
            TextLine line = (TextLine) iterator.next();
            Size2D dimension = line.calculateDimensions(canvas);
            float lineOffset = 0.0f;
            if (this.lineAlignment == HorizontalAlignment.CENTER) {
                lineOffset = (float) (d.getWidth() - dimension.getWidth()) / 2.0f;
            } else if (this.lineAlignment == HorizontalAlignment.RIGHT) {
                lineOffset = (float) (d.getWidth() - dimension.getWidth());
            }
            line.draw(canvas, anchorX + offsets[0] + lineOffset, anchorY
                    + offsets[1] + yCursor, TextAnchor.TOP_LEFT, rotateX,
                    rotateY, angle);
            yCursor = yCursor + (float) dimension.getHeight();
        }
    }
public void draw ( final Canvas canvas , final float anchorX , final float anchorY , final TextBlockAnchor anchor , final float rotateX , final float rotateY , final double angle ) { final Size2D d = calculateDimensions ( canvas ) ; final float [ ] offsets = calculateOffsets ( anchor , d . getWidth ( ) , d . getHeight ( ) ) ; final Iterator iterator = this . lines . iterator ( ) ; float yCursor = 0.0f ; while ( iterator . hasNext ( ) ) { TextLine line = ( TextLine ) iterator . next ( ) ; Size2D dimension = line . calculateDimensions ( canvas ) ; float lineOffset = 0.0f ; if ( this . lineAlignment == HorizontalAlignment . CENTER ) { lineOffset = ( float ) ( d . getWidth ( ) - dimension . getWidth ( ) ) / 2.0f ; } else if ( this . lineAlignment == HorizontalAlignment . RIGHT ) { lineOffset = ( float ) ( d . getWidth ( ) - dimension . getWidth ( ) ) ; } line . draw ( canvas , anchorX + offsets [ 0 ] + lineOffset , anchorY + offsets [ 1 ] + yCursor , TextAnchor . TOP_LEFT , rotateX , rotateY , angle ) ; yCursor = yCursor + ( float ) dimension . getHeight ( ) ; } }
public void draw(final Canvas canvas, final float anchorX, final float
 anchorY, final TextBlockAnchor anchor, final float rotateX, final float
 rotateY, final double angle) {
public void draw ( final Canvas canvas final float anchorX final float anchorY final TextBlockAnchor anchor final float rotateX final float rotateY final double angle ) {