Package java.awt

Examples of java.awt.Graphics.translate()


            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.drawRect(x, y, size, size);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class FillOvals extends RenderTests {
        public FillOvals() {
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.fillOval(x, y, size, size);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

    public static class DrawOvals extends RenderTests {
        public DrawOvals() {
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.drawOval(x, y, size, size);
                } while (--numReps > 0);
            }
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
        }
    }

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

            int x = rctx.initX;
            int y = rctx.initY;
            int hexaX[] = new int[6];
            int hexaY[] = new int[6];
            Graphics g = rctx.graphics;
            g.translate(rctx.orgX, rctx.orgY);
            Color rCArray[] = rctx.colorlist;
            int ci = rctx.colorindex;
            do {
                hexaX[0] = x;
                hexaX[1] = hexaX[5] = x+size/4;
View Full Code Here

                g.fillPolygon(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 DrawPolys extends RenderTests {
        public DrawPolys() {
View Full Code Here

            int x = rctx.initX;
            int y = rctx.initY;
            int hexaX[] = new int[6];
            int hexaY[] = new int[6];
            Graphics g = rctx.graphics;
            g.translate(rctx.orgX, rctx.orgY);
            Color rCArray[] = rctx.colorlist;
            int ci = rctx.colorindex;
            do {
                hexaX[0] = x;
                hexaX[1] = hexaX[5] = x+size/4;
View Full Code Here

            } else {
                do {
                    g.copyArea(x, y, size, size, dx, dy);
                } while (--numReps > 0);
            }
            g.translate(-gctx.orgX, -gctx.orgY);
        }
    }
}
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.