2362N/A * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Base class for enqueuing rendering operations in a single-threaded 0N/A * rendering environment. Instead of each operation being rendered 0N/A * immediately by the underlying graphics library, the operation will be 0N/A * added to the provided RenderQueue, which will be processed at a later 0N/A * time by a single thread. 0N/A * This class provides implementations of drawLine(), drawRect(), drawPoly(), 0N/A * fillRect(), draw(Shape), and fill(Shape), which are useful for a 0N/A * hardware-accelerated renderer. The other draw*() and fill*() methods 0N/A * simply delegate to draw(Shape) and fill(Shape), respectively. 0N/A * Validates the state in the provided SunGraphics2D object and sets up 0N/A * any special resources for this operation (e.g. enabling gradient 0N/A // render a simple line 0N/A // process the queue first and then enqueue the points 0N/A // enqueue parameters 0N/A // enqueue the points 0N/A // queue is too small to accomodate all points; perform the 0N/A // operation directly on the queue flushing thread 0N/A // these are bogus values; the caller will use validate() 0N/A // to ensure that they are set properly prior to each usage 0N/A * operation to ensure the clip bounds are up to date. 0N/A * drawPath() support... 0N/A // assert rq.lock.isHeldByCurrentThread(); 0N/A // assert rq.lock.isHeldByCurrentThread(); 0N/A * fillPath() support... 0N/A * Called from fillPath() to indicate that we are about to 0N/A * start issuing drawScanline() calls. 0N/A * Called from fillPath() to indicate that we are done 0N/A * issuing drawScanline() calls. 0N/A // Here we are able to use fillPath() for 0N/A // high-quality fills. 0N/A // Transform (translation) will be done by FillSpans (we could 0N/A // delegate to fillPolygon() here, but most hardware accelerated 0N/A // libraries cannot handle non-convex polygons, so we will use 0N/A // the FillSpans approach by default) 0N/A // Transform will be done by the PathIterator 0N/A // Subtract transx/y from the SSI clip to match the 0N/A // (potentially untranslated) geometry fed to it