Package j2dbench

Examples of j2dbench.Group


    static String transDescriptions[] = {
        null, "Opaque", "Bitmask", "Translucent",
    };

    public static void init() {
        imageroot = new Group(graphicsroot, "imaging",
                              "Imaging Benchmarks");
        imageroot.setTabbed();
        imgsrcroot = new Group.EnableSet(imageroot, "src",
                                         "Image Rendering Sources");
        imgsrcroot.setBordered(true);
        imgtestroot = new Group(imageroot, "tests",
                                "Image Rendering Tests");
        imgtestroot.setBordered(true);

        new OffScreen();

        if (hasGraphics2D) {
            if (hasCompatImage) {
                new CompatImg(Transparency.OPAQUE);
                new CompatImg(Transparency.BITMASK);
                new CompatImg(Transparency.TRANSLUCENT);
            }

            if (hasVolatileImage) {
                new VolatileImg();
            }

            bufimgsrcroot =
                new Group.EnableSet(imgsrcroot, "bufimg",
                                    "BufferedImage Rendering Sources");
            new BufImg(BufferedImage.TYPE_INT_RGB);
            new BufImg(BufferedImage.TYPE_INT_ARGB);
            new BufImg(BufferedImage.TYPE_BYTE_GRAY);
            new BmByteIndexBufImg();

            imageOpRoot = new Group(imageroot, "imageops",
                                    "Image Op Benchmarks");
            imageOpOptRoot = new Group(imageOpRoot, "opts", "Options");
            imageOpTestRoot = new Group(imageOpRoot, "tests", "Tests");
            graphicsTestRoot = new Group(imageOpTestRoot, "graphics2d",
                                         "Graphics2D Tests");
            bufImgOpTestRoot = new Group(imageOpTestRoot, "bufimgop",
                                         "BufferedImageOp Tests");
            rasterOpTestRoot = new Group(imageOpTestRoot, "rasterop",
                                         "RasterOp Tests");

            ArrayList opStrs = new ArrayList();
            ArrayList opDescs = new ArrayList();
            opStrs.add("convolve3x3zero");
View Full Code Here


        } catch (NoClassDefFoundError e) {
        }
    }

    public static void init() {
        renderroot = new Group(graphicsroot, "render", "Rendering Benchmarks");
        renderoptroot = new Group(renderroot, "opts", "Rendering Options");
        rendertestroot = new Group(renderroot, "tests", "Rendering Tests");

        ArrayList paintStrs = new ArrayList();
        ArrayList paintDescs = new ArrayList();
        paintStrs.add("single");
        paintDescs.add("Single Color");
        paintStrs.add("random");
        paintDescs.add("Random Color");
        if (hasGraphics2D) {
            paintStrs.add("gradient2");
            paintDescs.add("2-color GradientPaint");
            if (hasMultiGradient) {
                paintStrs.add("linear2");
                paintDescs.add("2-color LinearGradientPaint");
                paintStrs.add("linear3");
                paintDescs.add("3-color LinearGradientPaint");
                paintStrs.add("radial2");
                paintDescs.add("2-color RadialGradientPaint");
                paintStrs.add("radial3");
                paintDescs.add("3-color RadialGradientPaint");
            }
            paintStrs.add("texture20");
            paintDescs.add("20x20 TexturePaint");
            paintStrs.add("texture32");
            paintDescs.add("32x32 TexturePaint");
        }
        String[] paintStrArr = new String[paintStrs.size()];
        paintStrArr = (String[])paintStrs.toArray(paintStrArr);
        String[] paintDescArr = new String[paintDescs.size()];
        paintDescArr = (String[])paintDescs.toArray(paintDescArr);
        paintList =
            new Option.ObjectList(renderoptroot,
                                  "paint", "Paint Type",
                                  paintStrArr, paintStrArr,
                                  paintStrArr, paintDescArr,
                                  0x1);
        ((Option.ObjectList) paintList).setNumRows(5);

        // add special RandomColorOpt for backwards compatibility with
        // older options files
        new RandomColorOpt();

        if (hasGraphics2D) {
            doAlphaColors =
                new Option.Toggle(renderoptroot, "alphacolor",
                                  "Set the alpha of the paint to 0.125",
                                  Option.Toggle.Off);
            doAntialias =
                new Option.Toggle(renderoptroot, "antialias",
                                  "Render shapes antialiased",
                                  Option.Toggle.Off);
            String strokeStrings[] = {
                "width0",
                "width1",
                "width5",
                "width20",
                "dash0_5",
                "dash1_5",
                "dash5_20",
                "dash20_50",
            };
            String strokeDescriptions[] = {
                "Solid Thin lines",
                "Solid Width 1 lines",
                "Solid Width 5 lines",
                "Solid Width 20 lines",
                "Dashed Thin lines",
                "Dashed Width 1 lines",
                "Dashed Width 5 lines",
                "Dashed Width 20 lines",
            };
            BasicStroke strokeObjects[] = {
                new BasicStroke(0f),
                new BasicStroke(1f),
                new BasicStroke(5f),
                new BasicStroke(20f),
                new BasicStroke(0f, BasicStroke.CAP_SQUARE,
                                BasicStroke.JOIN_MITER, 10f,
                                new float[] { 5f, 5f }, 0f),
                new BasicStroke(1f, BasicStroke.CAP_SQUARE,
                                BasicStroke.JOIN_MITER, 10f,
                                new float[] { 5f, 5f }, 0f),
                new BasicStroke(5f, BasicStroke.CAP_SQUARE,
                                BasicStroke.JOIN_MITER, 10f,
                                new float[] { 20f, 20f }, 0f),
                new BasicStroke(20f, BasicStroke.CAP_SQUARE,
                                BasicStroke.JOIN_MITER, 10f,
                                new float[] { 50f, 50f }, 0f),
            };
            strokeList =
                new Option.ObjectList(renderoptroot,
                                      "stroke", "Stroke Type",
                                      strokeStrings, strokeObjects,
                                      strokeStrings, strokeDescriptions,
                                      0x2);
            ((Option.ObjectList) strokeList).setNumRows(4);
        }

        new DrawDiagonalLines();
        new DrawHorizontalLines();
        new DrawVerticalLines();
        new FillRects();
        new DrawRects();
        new FillOvals();
        new DrawOvals();
        new FillPolys();
        new DrawPolys();

        if (hasGraphics2D) {
            rendershaperoot = new Group(rendertestroot, "shape",
                                        "Shape Rendering Tests");

            new FillCubics();
            new DrawCubics();
            new FillEllipse2Ds();
View Full Code Here

    private static Group streamRoot;
    private static Group streamTestRoot;

    public static void init() {
        streamRoot = new Group(outputRoot, "stream",
                               "Image Stream Benchmarks");
        streamTestRoot = new Group(streamRoot, "tests",
                                   "ImageOutputStream Tests");

        new IOSConstruct();
        new IOSWrite();
        new IOSWriteByteArray();
View Full Code Here

    static Group constructtestroot;

    public static void init() {
      // don't even bother with this at all if we don't have Java2 APIs.
      if (hasGraphics2D) {
        constructroot = new Group(textroot, "construction", "Construction Benchmarks");
        constructtestroot = new Group(constructroot, "tests", "Construction Tests");

        new GVFromFontString();
        new GVFromFontChars();
        new GVFromFontCI();
        new GVFromFontGlyphs();
View Full Code Here

    static Group bufimgtestroot;
    static Group rastertestroot;
    static Group dbtestroot;

    public static void init() {
        pixelroot = new Group("pixel", "Pixel Access Benchmarks");

        pixeloptroot = new Group(pixelroot, "opts", "Pixel Access Options");
        doRenderTo = new Option.Toggle(pixeloptroot, "renderto",
                                       "Render to Image before test",
                                       Option.Toggle.Off);
        doRenderFrom = new Option.Toggle(pixeloptroot, "renderfrom",
                                         "Render from Image before test",
                                         Option.Toggle.Off);

        // BufferedImage Sources
        bufimgsrcroot = new Group.EnableSet(pixelroot, "src",
                                            "BufferedImage Sources");
        new BufImg(BufferedImage.TYPE_BYTE_BINARY, 1);
        new BufImg(BufferedImage.TYPE_BYTE_BINARY, 2);
        new BufImg(BufferedImage.TYPE_BYTE_BINARY, 4);
        new BufImg(BufferedImage.TYPE_BYTE_INDEXED);
        new BufImg(BufferedImage.TYPE_BYTE_GRAY);
        new BufImg(BufferedImage.TYPE_USHORT_555_RGB);
        new BufImg(BufferedImage.TYPE_USHORT_565_RGB);
        new BufImg(BufferedImage.TYPE_USHORT_GRAY);
        new BufImg(BufferedImage.TYPE_3BYTE_BGR);
        new BufImg(BufferedImage.TYPE_4BYTE_ABGR);
        new BufImg(BufferedImage.TYPE_INT_RGB);
        new BufImg(BufferedImage.TYPE_INT_BGR);
        new BufImg(BufferedImage.TYPE_INT_ARGB);

        // BufferedImage Tests
        bufimgtestroot = new Group(pixelroot, "bimgtests",
                                   "BufferedImage Tests");
        new BufImgTest.GetRGB();
        new BufImgTest.SetRGB();

        // Raster Tests
        rastertestroot = new Group(pixelroot, "rastests",
                                   "Raster Tests");
        new RasTest.GetDataElements();
        new RasTest.SetDataElements();
        new RasTest.GetPixel();
        new RasTest.SetPixel();

        // DataBuffer Tests
        dbtestroot = new Group(pixelroot, "dbtests",
                               "DataBuffer Tests");
        new DataBufTest.GetElem();
        new DataBufTest.SetElem();
    }
View Full Code Here

    private static Group imageWriterOptRoot;
    private static Option installListenerTog;
    private static Group imageWriterTestRoot;

    public static void init() {
        imageRoot = new Group(outputRoot, "image", "Image Writing Benchmarks");
        imageRoot.setTabbed();

        // Image I/O Benchmarks
        if (hasImageIO) {
            imageioRoot = new Group(imageRoot, "imageio", "Image I/O");

            // Image I/O Options
            imageioOptRoot = new Group(imageioRoot, "opts",
                                       "Image I/O Options");
            initIIOWriteFormats();
            imageioWriteFormatList =
                new Option.ObjectList(imageioOptRoot,
                                      "format", "Image Format",
                                      imageioWriteFormatShortNames,
                                      imageioWriterSpis,
                                      imageioWriteFormatShortNames,
                                      imageioWriteFormatShortNames,
                                      0x0);

            // Image I/O Tests
            imageioTestRoot = new Group(imageioRoot, "tests",
                                        "Image I/O Tests");
            new ImageIOWrite();

            // ImageWriter Options
            imageWriterRoot = new Group(imageioRoot, "writer",
                                        "ImageWriter Benchmarks");
            imageWriterOptRoot = new Group(imageWriterRoot, "opts",
                                           "ImageWriter Options");
            installListenerTog =
                new Option.Toggle(imageWriterOptRoot,
                                  "installListener",
                                  "Install Progress Listener",
                                  Option.Toggle.Off);

            // ImageWriter Tests
            imageWriterTestRoot = new Group(imageWriterRoot, "tests",
                                            "ImageWriter Tests");
            new ImageWriterWrite();
        }
    }
View Full Code Here

    private static Group streamRoot;
    private static Group streamTestRoot;

    public static void init() {
        streamRoot = new Group(inputRoot, "stream",
                               "Image Stream Benchmarks");
        streamTestRoot = new Group(streamRoot, "tests",
                                   "ImageInputStream Tests");

        new IISConstruct();
        new IISRead();
        new IISReadByteArray();
View Full Code Here

    protected static Group imageioGeneralOptRoot;
    protected static Option destFileChannelOpt;
    protected static Option useCacheTog;

    public static void init() {
        outputRoot = new Group(iioRoot, "output", "Output Benchmarks");
        outputRoot.setTabbed();

        // Options
        outputOptRoot = new Group(outputRoot, "opts", "Options");

        // General Options
        generalOptRoot = new Group(outputOptRoot,
                                   "general", "General Options");
        generalDestRoot = new Group.EnableSet(generalOptRoot,
                                              "dest", "Destintations");
        destFileOpt = new OutputType("file", "File", OUTPUT_FILE);
        destByteArrayOpt = new OutputType("byteArray", "byte[]", OUTPUT_ARRAY);

        if (hasImageIO) {
            // Image I/O Options
            imageioGeneralOptRoot = new Group(outputOptRoot,
                                              "imageio", "Image I/O Options");
            if (fileChannelIOSSpi != null) {
                destFileChannelOpt =
                    new OutputType("fileChannel", "FileChannel",
                                   OUTPUT_FILECHANNEL);
View Full Code Here

            //         files that are used in the InputImageTests, so
            //         unfortunately we need to punt on pre-1.4 JDKs...
            return;
        }

        iioRoot = new Group("imageio", "Image I/O Benchmarks");
        iioRoot.setTabbed();

        iioOptRoot = new Group(iioRoot, "opts", "General Options");

        int[] sizes = new int[] {1, 20, 250, 1000, 4000};
        String[] sizeStrs = new String[] {
            "1x1", "20x20", "250x250", "1000x1000", "4000x4000"
        };
View Full Code Here

    protected static Group imageioGeneralOptRoot;
    protected static Option sourceFileChannelOpt;
    protected static Option useCacheTog;

    public static void init() {
        inputRoot = new Group(iioRoot, "input", "Input Benchmarks");
        inputRoot.setTabbed();

        // Options
        inputOptRoot = new Group(inputRoot, "opts", "Options");

        // General Options
        generalOptRoot = new Group(inputOptRoot,
                                   "general", "General Options");
        generalSourceRoot = new Group.EnableSet(generalOptRoot,
                                                "source", "Sources");
        sourceFileOpt = new InputType("file", "File", INPUT_FILE);
        sourceUrlOpt = new InputType("url", "URL", INPUT_URL);
        sourceByteArrayOpt = new InputType("byteArray", "byte[]", INPUT_ARRAY);

        if (hasImageIO) {
            // Image I/O Options
            imageioGeneralOptRoot = new Group(inputOptRoot,
                                              "imageio", "Image I/O Options");
            if (fileChannelIISSpi != null) {
                sourceFileChannelOpt =
                    new InputType("fileChannel", "FileChannel",
                                  INPUT_FILECHANNEL);
View Full Code Here

TOP

Related Classes of j2dbench.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.