RE: [jEdit-Syntax-devel] Cursor visibility under JDK1.4beta3
Brought to you by:
marcel-boehme,
oliverhe
|
From: Colin B. <Col...@as...> - 2002-01-03 00:52:30
|
Sorry, next time I'll check the bug reports.
-----Original Message-----
From: Colin Bell
Sent: Thursday, 3 January 2002 11:30
To: 'jed...@li...'
Subject: [jEdit-Syntax-devel] Cursor visibility under JDK1.4beta3
Hi,
I've found an issue with the visibility of the non-block caret with
JDK1.4beta3 under WINNT (not tested under any other OS). A zero width
rectangle doesn't seem to be drawn. This hack fixes the problem although the
caret is drawn extra wide and looks somewhat ugly.
The fix is in TextAreapainter.paintCaret(). Replace the line
gfx.drawRect(caretX,y,caretWidth - 1,height - 1);
with
gfx.drawRect(caretX,y,caretWidth == 1 ? 1 : caretWidth - 1,height - 1);
Interestingly if I write a quick test program that draws a zero-width
rectangle in a component E.G.
public void paint(java.awt.Graphics g) {
super.paint(g);
g.drawRect(20, 20, 0, 20);
}
this works. It makes me suspect it may be an issue with clipping. If I get a
chance I'll look further into it.
Col
http://squirrel-sql.sourceforge.net
_______________________________________________
jEdit-Syntax-devel mailing list
jEd...@li...
https://lists.sourceforge.net/lists/listinfo/jedit-syntax-devel
|