[Ikvm-commit] ikvm/openjdk/sun/font StandardGlyphVector.java, 1.2, 1.3
Brought to you by:
jfrijters
From: Small S. <sma...@us...> - 2009-05-30 21:33:23
|
Update of /cvsroot/ikvm/ikvm/openjdk/sun/font In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8885/openjdk/sun/font Modified Files: StandardGlyphVector.java Log Message: fixing the painting of the GlyphVector with the StandardGlyphVector from Sun Index: StandardGlyphVector.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/sun/font/StandardGlyphVector.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StandardGlyphVector.java 16 May 2009 16:34:40 -0000 1.2 --- StandardGlyphVector.java 30 May 2009 21:32:32 -0000 1.3 *************** *** 147,152 **** @Override ! public boolean equals(GlyphVector set){ ! throw new NotImplementedException(); } --- 147,181 ---- @Override ! public boolean equals(GlyphVector gv){ ! if(!(gv instanceof StandardGlyphVector)){ ! return false; ! } ! StandardGlyphVector sgv = (StandardGlyphVector)gv; ! if(!glyphs.equals(sgv.glyphs)){ ! return false; ! } ! if(equals(font, sgv.font)){ ! return false; ! } ! if(equals(frc, sgv.frc)){ ! return false; ! } ! return true; ! } ! ! /** ! * Compare 2 objects via equals where both can be null ! */ ! private static boolean equals(Object obj1, Object obj2){ ! if(obj1 != null){ ! if(!obj1.equals(obj2)){ ! return false; ! } ! }else{ ! if(obj2 != null){ ! return false; ! } ! } ! return true; } *************** *** 166,170 **** @Override public int getGlyphCode(int glyphIndex){ ! throw new NotImplementedException(); } --- 195,199 ---- @Override public int getGlyphCode(int glyphIndex){ ! return glyphs.charAt(glyphIndex); } *************** *** 172,176 **** @Override public int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn){ ! throw new NotImplementedException(); } --- 201,211 ---- @Override public int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn){ ! if(codeReturn == null || codeReturn.length < numEntries){ ! codeReturn = new int[numEntries]; ! } ! for(int i=0; i<numEntries; i++){ ! codeReturn[i] = glyphs.charAt(i + beginGlyphIndex); ! } ! return codeReturn; } *************** *** 274,278 **** /** * Convert a CharacterIterator to a string ! * @param iterator the itereator * @return the string */ --- 309,313 ---- /** * Convert a CharacterIterator to a string ! * @param iterator the iterator * @return the string */ |