Package com.neophob.sematrix.core.glue

Examples of com.neophob.sematrix.core.glue.MatrixData


    }

   
    private void testWithResolution(int x, int y) {
      MatrixData matrix = new MatrixData(x,y);
     
      List<Visual> vlist = new ArrayList<Visual>();
      Visual v = createVisual(matrix, col);
      vlist.add(v);
      Collector.getInstance().setAllVisuals(vlist);
View Full Code Here


    @Test
    public void presetFadeTest() throws Exception {
      final int fps = 50;
     
      MatrixData matrix = new MatrixData(8, 8);
      IFader switchFader = new Switch(matrix, fps);
      assertEquals(Fader.FaderName.SWITCH.getId(), switchFader.getId());

      //special case, the switch fader is always done!
      assertTrue(switchFader.isDone());
View Full Code Here

   
    @Test
    public void visualFadeTest() throws Exception {
      final int fps = 5000;
     
      MatrixData matrix = new MatrixData(8, 8);
      IFader switchFader = new Switch(matrix, fps);
      assertEquals(Fader.FaderName.SWITCH.getId(), switchFader.getId());

      //special case, the switch fader is always done!
      assertTrue(switchFader.isDone());
View Full Code Here

    @Test
    public void presetFadeTest() throws Exception {
      final int fps = 50;
           
      MatrixData matrix = new MatrixData(8, 8);
      IFader switchFader = new Crossfader(matrix, fps);
      assertEquals(Fader.FaderName.CROSSFADE.getId(), switchFader.getId());

      assertFalse(switchFader.isDone());
      assertFalse(switchFader.isStarted());
View Full Code Here

   
    @Test
    public void visualFadeTest() throws Exception {
      final int fps = 50;
           
      MatrixData matrix = new MatrixData(8, 8);
      IFader switchFader = new Crossfader(matrix, 20, fps);
      assertEquals(Fader.FaderName.CROSSFADE.getId(), switchFader.getId());

      assertFalse(switchFader.isDone());
      assertFalse(switchFader.isStarted());
View Full Code Here

     *
     * @param x
     * @param y
     */
    private void testWithResolution(int x, int y) {
      MatrixData matrix = new MatrixData(x,y);
     
      List<Visual> vlist = new ArrayList<Visual>();
      vlist.add(createVisual(matrix, col));
      Collector.getInstance().setAllVisuals(vlist);
     
View Full Code Here

      Layout l = new HorizontalLayout(panels);
      assertEquals(panels, l.getRow1Size());
      assertEquals(0, l.getRow2Size());     
      assertEquals(Layout.LayoutName.HORIZONTAL, l.getLayoutName());
     
      MatrixData matrix = new MatrixData(8, 8);
      IFader f = new Switch(matrix, 50);
      List<OutputMapping> ioMapping = new ArrayList<OutputMapping>();
     
      //testcase#1: each output has a visual assigned
    for (int n=0; n<panels; n++) {
View Full Code Here

        }
      }
    }
   
    private void testWithResolution(int x, int y) {
      MatrixData matrix = new MatrixData(x,y);
      PixelControllerEffect pce = new PixelControllerEffect(matrix, sound);
      pce.initAll();

      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
View Full Code Here

        }
      }
    }
   
    private void testWithResolution(int x, int y) {
      MatrixData matrix = new MatrixData(x,y);
      PixelControllerResize pcr = new PixelControllerResize();
      pcr.initAll();

      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
      Mixer m = new Checkbox(matrix);
      ColorSet c = new ColorSet("test", new int[]{1,2,3});
      Visual v = new Visual(g,e,m,c);     

      for (IResize rsz: pcr.getAllResizers()) {
        BufferedImage bi = rsz.createImage(v.getBuffer(), matrix.getBufferXSize(), matrix.getBufferYSize());
        int[] b1 = rsz.getBuffer(bi, matrix.getDeviceXSize(), matrix.getDeviceYSize());
        int[] b2 = rsz.getBuffer(v.getBuffer(), matrix.getDeviceXSize(), matrix.getDeviceYSize(),
            matrix.getBufferXSize(), matrix.getBufferYSize());
        assertArrayEquals(b1, b2);
      }
     
    }
View Full Code Here

public class MatrixDataTest {
   
    @Test
    public void processMessages() throws Exception {
      //verify the buffer get multiplied with 8
      MatrixData matrix = new MatrixData(8,8);
      assertEquals(64, matrix.getBufferXSize());
      assertEquals(64, matrix.getBufferYSize());
     
      //verify the buffer get multiplied with 8
      matrix = new MatrixData(16,16);
      assertEquals(128, matrix.getBufferXSize());
     
      //verify the buffer get multiplied with 4
      matrix = new MatrixData(32,32);
      assertEquals(128, matrix.getBufferXSize());
     
      //verify the buffer get multiplied with 2
      matrix = new MatrixData(64,64);
      assertEquals(128, matrix.getBufferXSize());

      //verify the buffer get multiplied with 1
      matrix = new MatrixData(512, 512);
      assertEquals(512, matrix.getBufferXSize());
     
      matrix = new MatrixData(24,18);
    }
View Full Code Here

TOP

Related Classes of com.neophob.sematrix.core.glue.MatrixData

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.