Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics do not display #4

Open
conorpeterson opened this issue Jul 19, 2014 · 0 comments
Open

Graphics do not display #4

conorpeterson opened this issue Jul 19, 2014 · 0 comments

Comments

@conorpeterson
Copy link

System: Macbook with 10.9.3, uname -a:
Darwin magikarp.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

Java version: Oracle's own Java 8 update 11. java -version:
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

Built with NetBeans 8.0 Patch 2 for Mac, build 201403101706.

Issue: The graphics in the main routing screen do not display. Instead of seeing the board, the program draws only the gray background. Many of the UI buttons do not paint either but do still respond to mouse clicks. Otherwise the program seems to function normally.

Detail: In several drawing routines found in boardgraphics/GraphicsContext.java, the original author attempts to cast a Shape into a Rectangle which leads to an exception on my system. An example from line 130 of GraphicsContext.java:
Rectangle clip_shape = (Rectangle)p_g.getClip() ;

I was able to avoid an exception by changing the line to read:
Rectangle clip_shape = p_g.getClip().getBounds()

The same fix needs to be applied to lines 130, 273, 313, and 432. On my machine, fixing these lines brought the graphics back, everything looks normal.

Dema added a commit to Dema/FreeRouting that referenced this issue Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant