/* This file is part of the source code for 3D-XplorMath-J, Version 1.0 (January 2008). * Copyright (c) 2008 The 3D-XplorMath Consortium (http://3d-xplormath.org). * This source code is released under a BSD License, which allows redistribution * in source and binary form, with or without modification, provided copyright * and license information are included, and with no warranty or guarantee of * any kind. For details, see http://3d-xplormath.org/j/source/BSDLicense.txt */ package vmm.core.render; import java.awt.Graphics2D; import java.awt.RenderingHints; import vmm.core.Transform; public class SetAntialiased extends GeometryElement2D { private boolean antialiased; public SetAntialiased(boolean antialiased) { this.antialiased = antialiased; } protected void draw(Transform transform, Graphics2D g) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialiased? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_ON); } }