< prev index next >

src/demo/share/jfc/J2Ddemo/java2d/demos/Mix/BezierScroller.java

Print this page

        

*** 1,8 **** /* * ! * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * --- 1,8 ---- /* * ! * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: *
*** 70,80 **** * README.txt file scrolling up. Composited Image fading in and out. */ @SuppressWarnings("serial") public class BezierScroller extends AnimatingControlsSurface { ! private static String appletStrs[] = { " ", "J2Ddemo", "BezierScroller - Animated Bezier Curve shape with images", "For README.txt file scrolling run in application mode", " " }; private static final int NUMPTS = 6; private static Color greenBlend = new Color(0, 255, 0, 100); private static Color blueBlend = new Color(0, 0, 255, 100); --- 70,80 ---- * README.txt file scrolling up. Composited Image fading in and out. */ @SuppressWarnings("serial") public class BezierScroller extends AnimatingControlsSurface { ! private static String[] appletStrs = { " ", "J2Ddemo", "BezierScroller - Animated Bezier Curve shape with images", "For README.txt file scrolling run in application mode", " " }; private static final int NUMPTS = 6; private static Color greenBlend = new Color(0, 255, 0, 100); private static Color blueBlend = new Color(0, 0, 255, 100);
*** 82,93 **** private static BasicStroke bs = new BasicStroke(3.0f); private static Image hotj_img; private static BufferedImage img; private static final int UP = 0; private static final int DOWN = 1; ! private float animpts[] = new float[NUMPTS * 2]; ! private float deltas[] = new float[NUMPTS * 2]; private BufferedReader reader; private int nStrs; private int strH; private int yy, ix, iy, imgX; private List<String> vector, appletVector; --- 82,93 ---- private static BasicStroke bs = new BasicStroke(3.0f); private static Image hotj_img; private static BufferedImage img; private static final int UP = 0; private static final int DOWN = 1; ! private float[] animpts = new float[NUMPTS * 2]; ! private float[] deltas = new float[NUMPTS * 2]; private BufferedReader reader; private int nStrs; private int strH; private int yy, ix, iy, imgX; private List<String> vector, appletVector;
*** 291,301 **** g2.draw(gp); g2.setColor(greenBlend); g2.fill(gp); PathIterator pi = gp.getPathIterator(null); ! float pts[] = new float[6]; while (!pi.isDone()) { if (pi.currentSegment(pts) == PathIterator.SEG_CUBICTO) { g2.drawImage(hotj_img, (int) pts[0], (int) pts[1], this); } pi.next(); --- 291,301 ---- g2.draw(gp); g2.setColor(greenBlend); g2.fill(gp); PathIterator pi = gp.getPathIterator(null); ! float[] pts = new float[6]; while (!pi.isDone()) { if (pi.currentSegment(pts) == PathIterator.SEG_CUBICTO) { g2.drawImage(hotj_img, (int) pts[0], (int) pts[1], this); } pi.next();
*** 308,318 **** g2.setComposite(ac); g2.drawImage(img.getSubimage(imgX, 0, 80, 80), ix, iy, this); } } ! public static void main(String argv[]) { createDemoFrame(new BezierScroller()); } static final class DemoControls extends CustomControls implements --- 308,318 ---- g2.setComposite(ac); g2.drawImage(img.getSubimage(imgX, 0, 80, 80), ix, iy, this); } } ! public static void main(String[] argv) { createDemoFrame(new BezierScroller()); } static final class DemoControls extends CustomControls implements
< prev index next >