| Summary: | [cocoa, gef] Guide markers not fully visible on Cocoa | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Scott Kovatch <skovatch> |
| Component: | SWT | Assignee: | Scott Kovatch <skovatch> |
| Status: | RESOLVED FIXED | QA Contact: | Silenio Quarti <Silenio_Quarti> |
| Severity: | major | ||
| Priority: | P3 | CC: | ahunter.eclipse, justin, skovatch |
| Version: | 3.6 | Flags: | Silenio_Quarti:
review+
|
| Target Milestone: | 3.6.2 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Bug Depends on: | 313315 | ||
| Bug Blocks: | |||
|
Description
Scott Kovatch
(In reply to comment #6) > It turns out that in the GuideFigure drawing code, where it draws the 'V' or > '>' part of the guide (depending on whether vertical/horizontal) it is using > drawLine() to draw each point - these calls are not actually drawing anything > on Cocoa where P1 = P2. > Alternatively another SWT bug needs to be raised as to why > o.e.swt.graphics.GC.drawLine(x,y, x,y) draws nothing under Cocoa. Carbon had this bug as well, and the fix never propagated to Cocoa. This should do it: ### Eclipse Workspace Patch 1.0 #P org.eclipse.swt Index: Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java,v retrieving revision 1.78 diff -u -r1.78 GC.java --- Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java 7 May 2010 19:40:38 -0000 1.78 +++ Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java 24 May 2010 22:17:00 -0000 @@ -1147,6 +1147,10 @@ */ public void drawLine(int x1, int y1, int x2, int y2) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); + if (x1 == x2 && y1 == y2 && data.lineWidth <= 1) { + drawPoint(x1, y1); + return; + } NSAutoreleasePool pool = checkGC(DRAW); try { NSBezierPath path = data.path; No rush yet on the review; just tracking for 3.6.2. Fixed in R3_6_maintenance branch > 20101103. |