2965N/A/*
2965N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2965N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2965N/A *
2965N/A * This code is free software; you can redistribute it and/or modify it
2965N/A * under the terms of the GNU General Public License version 2 only, as
2965N/A * published by the Free Software Foundation.
2965N/A *
2965N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2965N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2965N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2965N/A * version 2 for more details (a copy is included in the LICENSE file that
2965N/A * accompanied this code).
2965N/A *
2965N/A * You should have received a copy of the GNU General Public License version
2965N/A * 2 along with this work; if not, write to the Free Software Foundation,
2965N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2965N/A *
2965N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2965N/A * or visit www.oracle.com if you need additional information or have any
2965N/A * questions.
2965N/A */
2965N/A
2965N/A/*
2965N/A * @test
2965N/A * @bug 4358979
2965N/A * @summary Tests RadialGradientPaint encoding
2965N/A * @author Sergey Malenkov
2965N/A */
2965N/A
2965N/Aimport java.awt.Color;
2965N/Aimport java.awt.RadialGradientPaint;
2965N/Aimport java.awt.geom.AffineTransform;
2965N/Aimport java.awt.geom.Point2D;
2965N/A
2965N/Aimport static java.awt.MultipleGradientPaint.ColorSpaceType.LINEAR_RGB;
2965N/Aimport static java.awt.MultipleGradientPaint.CycleMethod.REFLECT;
2965N/A
2965N/Apublic final class java_awt_RadialGradientPaint extends AbstractTest<RadialGradientPaint> {
2965N/A public static void main(String[] args) {
2965N/A new java_awt_RadialGradientPaint().test(true);
2965N/A }
2965N/A
2965N/A protected RadialGradientPaint getObject() {
2965N/A float[] f = { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f };
2965N/A Color[] c = { Color.BLUE, Color.GREEN, Color.RED, Color.BLUE, Color.GREEN, Color.RED };
2965N/A return new RadialGradientPaint(f[0], f[1], f[2], f, c);
2965N/A }
2965N/A
2965N/A protected RadialGradientPaint getAnotherObject() {
2965N/A return null; /* TODO: could not update property
2965N/A float[] f = { 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f };
2965N/A Color[] c = { Color.RED, Color.GREEN, Color.BLUE, Color.RED, Color.GREEN, Color.BLUE };
2965N/A return new RadialGradientPaint(
2965N/A new Point2D.Float(f[0], f[1]), 100.0f,
2965N/A new Point2D.Float(f[2], f[3]),
2965N/A f, c, REFLECT, LINEAR_RGB,
2965N/A new AffineTransform(f));*/
2965N/A }
2965N/A}