Bug report.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Shirley

Bug report.

Post by Shirley » Thu Feb 13, 2003 11:31 pm

/**
* Constructs a new ImageTitle.
*
* @param image the image.
* @param position the title position (LEFT, RIGHT, TOP, BOTTOM).
* @param horizontalAlignment the horizontal alignment of the title (LEFT, CENTER or RIGHT).
* @param verticalAlignment the vertical alignment of the title (TOP, MIDDLE or BOTTOM).
*/
public ImageTitle(Image image, int position, int horizontalAlignment, int verticalAlignment) {

this(image, position, image.getHeight(null), image.getWidth(null),
horizontalAlignment, verticalAlignment,
AbstractTitle.DEFAULT_SPACER);

}

/**
* Constructs a new ImageTitle with the given image scaled to the given
* width and height in the given location.
*
* @param image the image.
* @param height the height used to draw the image.
* @param width the width used to draw the image.
* @param position the title position (LEFT, RIGHT, TOP, BOTTOM).
* @param horizontalAlignment the horizontal alignment of the title (LEFT, CENTER or RIGHT).
* @param verticalAlignment the vertical alignment of the title (TOP, MIDDLE or BOTTOM).
* @param spacer the amount of space to leave around the outside of the title.
*/
public ImageTitle(Image image, int height, int width, int position,
int horizontalAlignment, int verticalAlignment, Spacer spacer) {

super(position, horizontalAlignment, verticalAlignment, spacer);
this.image = image;
this.height = height;
this.width = width;

}

The constructor with 6 parameters have "position" as 4th parameter. The first constructor put "position" on the wrong place.

David Gilbert

Re: Bug report.

Post by David Gilbert » Fri Feb 14, 2003 6:32 am

Thanks for the report. The bug exists in 0.9.4, but not in 0.9.5.

Regards,

Dave Gilbert

Locked