[multiple changes]
2004-04-20 Ingo Proetel <proetel@aicas.com> * java/awt/FontMetrics.java: (charsWidth): fixed accumulation of total_width (getWidth): simple default implementation * java/awt/Polygon.java (getBoundingBox): Use correct y-coordinate in Rectangle constructor. * java/awt/image/Raster.java (toString): Added method. * java/awt/image/SampleModel.java (<init>): Added error cause information to thrown exception. * java/awt/image/SinglePixelPackedSampleModel.java (getDataElements): New method. (setDataElements): New method. (setPixels): New method. (toString): New method. 2004-04-20 Sascha Brawer <brawer@dandelis.ch> * java/awt/image/ComponentColorModel.java (createCompatibleSampleModel): Return PixelInterleavedSampleModel for TYPE_BYTE and TYPE_USHORT transferTypes, in order to pass the Mauve tests on this method. Improved documentation. From-SVN: r80894
This commit is contained in:
parent
2c4d54e6d0
commit
23f0ecff4a
7 changed files with 260 additions and 18 deletions
|
@ -292,8 +292,7 @@ charsWidth(char buf[], int offset, int len)
|
|||
{
|
||||
int total_width = 0;
|
||||
for (int i = offset; i < len; i++)
|
||||
total_width = charWidth(buf[i]);
|
||||
|
||||
total_width += charWidth(buf[i]);
|
||||
return(total_width);
|
||||
}
|
||||
|
||||
|
@ -328,7 +327,12 @@ bytesWidth(byte buf[], int offset, int len)
|
|||
public int[]
|
||||
getWidths()
|
||||
{
|
||||
return(new int[256]);
|
||||
int [] result = new int[256];
|
||||
for(char i = 0; i < 256; i++)
|
||||
{
|
||||
result[i]= charWidth(i);
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
@ -347,3 +351,4 @@ toString()
|
|||
|
||||
} // class FontMetrics
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue