APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

anti alias turn on by default? post and replies

Return to the anti alias turn on by default? thread
Login to post to this thread

anti alias turn on by default?
lookang Avatar
lookang
245 Posts

hi prof paco and wolfgang,

is there a way to turn on the anti alias for text and drawing by default?

if this feature is available already, it can address the concerns of my students about the dated graphics in java.

it looks great when anti alias turn on.

thank you for your kind attention :)

Attached File: antialias_on_2013-10-28_2219.png


OSP@SG blog
OSP@SG Digital Library

Replies to anti alias turn on by default?

Re: anti alias turn on by default? -
Francisco Esquembre
237 Posts

Hi Loo Kang,

If your drawing panel is called, say drawingPanel, add the following lines to the Initialization:

_view.drawingPanel.setAntialiasTextOn(on);
_view.drawingPanel.setAntialiasShapeOn(on);

Paco



Re: Re: anti alias turn on by default? -
lookang Avatar
lookang
245 Posts

got it!
thanks!
_view.worldview.setAntialiasTextOn(true);
_view.worldview.setAntialiasShapeOn(true);


OSP@SG blog
OSP@SG Digital Library


OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book