Package java.awt

Examples of java.awt.Graphics.translate()


        if (job != null) {
            final Graphics graphic = job.getGraphics();
            // Dimension pageSize = job.getPageDimension();

            if (graphic != null) {
                graphic.translate(10, 10);
                final int x = 50;
                int y = 50;

                graphic.setFont(TITLE_FONT);
View Full Code Here


                g.drawPolygon(hexaX, hexaY, 6);
                if ((x -= 3) < 0) x += rctx.maxX;
                if ((y -= 1) < 0) y += rctx.maxY;
            } while (--numReps > 0);
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class FillCubics extends RenderTests {
        static final double relTmax = .5 - Math.sqrt(3) / 6;
View Full Code Here

            RenderTests.Context rctx = (RenderTests.Context) ctx;
            int size = rctx.size - 1;
            int x = rctx.initX;
            int y = rctx.initY;
            Graphics g = rctx.graphics;
            g.translate(rctx.orgX, rctx.orgY);
            Color rCArray[] = rctx.colorlist;
            int ci = rctx.colorindex;
            if (rctx.animate) {
                do {
                    if (rCArray != null) {
View Full Code Here

                    }
                    g.drawLine(x, y, x + size, y + size);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class DrawHorizontalLines extends RenderTests {
        public DrawHorizontalLines() {
View Full Code Here

            RenderTests.Context rctx = (RenderTests.Context) ctx;
            int size = rctx.size - 1;
            int x = rctx.initX;
            int y = rctx.initY;
            Graphics g = rctx.graphics;
            g.translate(rctx.orgX, rctx.orgY);
            Color rCArray[] = rctx.colorlist;
            int ci = rctx.colorindex;
            if (rctx.animate) {
                do {
                    if (rCArray != null) {
View Full Code Here

                    }
                    g.drawLine(x, y, x + size, y);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class DrawVerticalLines extends RenderTests {
        public DrawVerticalLines() {
View Full Code Here

            RenderTests.Context rctx = (RenderTests.Context) ctx;
            int size = rctx.size - 1;
            int x = rctx.initX;
            int y = rctx.initY;
            Graphics g = rctx.graphics;
            g.translate(rctx.orgX, rctx.orgY);
            Color rCArray[] = rctx.colorlist;
            int ci = rctx.colorindex;
            if (rctx.animate) {
                do {
                    if (rCArray != null) {
View Full Code Here

                    }
                    g.drawLine(x, y, x, y + size);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class FillRects extends RenderTests {
        public FillRects() {
View Full Code Here

            RenderTests.Context rctx = (RenderTests.Context) ctx;
            int size = rctx.size;
            int x = rctx.initX;
            int y = rctx.initY;
            Graphics g = rctx.graphics;
            g.translate(rctx.orgX, rctx.orgY);
            Color rCArray[] = rctx.colorlist;
            int ci = rctx.colorindex;
            if (rctx.animate) {
                do {
                    if (rCArray != null) {
View Full Code Here

                    }
                    g.fillRect(x, y, size, size);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class DrawRects extends RenderTests {
        public DrawRects() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.