Confuse with JGoView coordinated system

Hi



Say image below:





The DARK_YELLOW rectangle was draw by code like this:



gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_YELLOW));

gc.drawRectangle(cn.getBoundingRect()); gc.dispose();







I think the DARK_YELLOW rectangle and the red(selection) Rectangle should be coincide,actualy was not.



Any one can tell me why?Thank you

JGo for SWT has always supported translation (scrolling) and scaling (zooming) in its JGoViews, even with old versions of SWT.

I suggest you use the static JGoDrawable.drawRect method for doing drawing, along with the other JGoDrawable methods. These methods support translation and scaling, and work on both Swing and SWT platforms.