int screenLine = chunkCache.getScreenLineOfOffset(line,offset); if(screenLine == -1) { if(line < firstLine) screenLine = 0; else if(line > physLastLine) screenLine = visibleLines; chunkCache.updateChunksUpTo(screenLine); }  FontMetrics fm = painter.getFontMetrics();  retVal.y = screenLine * fm.getHeight();  ChunkCache.LineInfo info = chunkCache.getLineInfo(screenLine); if(!info.chunksValid) System.err.println("offset to xy: not valid");  retVal.x = (int)(horizontalOffset + chunkCache.offsetToX( info.chunks,offset));  return retVal;
int line = buffer.getLineOfOffset(offset); offset -= buffer.getLineStartOffset(line); Point retVal = new Point(); return offsetToXY(line,offset,retVal);
	public Point offsetToXY(int line, int offset, Point retVal)	{		int screenLine = chunkCache.getScreenLineOfOffset(line,offset);		if(screenLine == -1)		{			if(line < firstLine)				screenLine = 0;			else if(line > physLastLine)				screenLine = visibleLines;			chunkCache.updateChunksUpTo(screenLine);		}		FontMetrics fm = painter.getFontMetrics();		retVal.y = screenLine * fm.getHeight();		ChunkCache.LineInfo info = chunkCache.getLineInfo(screenLine);		if(!info.chunksValid)			System.err.println("offset to xy: not valid");		retVal.x = (int)(horizontalOffset + chunkCache.offsetToX(			info.chunks,offset));		return retVal;	} //}}}