Package limelight.ui

Examples of limelight.ui.MockGraphics$DrawnImage


  }

  @Override
  public Graphics2D getGraphics()
  {
    return new MockGraphics();
  }
View Full Code Here


    panel = new MockProp();
    style = panel.getStyle();
    border = new Box(5, 5, 100, 100);
    panel.boxInsideMargins = border;
    painter = BorderPainter.instance;
    graphics = new MockGraphics();
  }
View Full Code Here

  private Box clip;

  public void setUp() throws Exception
  {
    attribute = new StaticFillStrategyValue();
    graphics = new MockGraphics();
    clip = new Box(0, 0, 60, 60);
    graphics.clip = clip;
  }
View Full Code Here

  private Box clip;

  public void setUp() throws Exception
  {
    attribute = new ScaleYFillStrategyValue();
    graphics = new MockGraphics();
    clip = new Box(0, 0, 60, 60);
    graphics.clip = clip;
  }
View Full Code Here

    MockPainter mockBackgroundPainter = new MockPainter();
    BackgroundPainter.instance = mockBackgroundPainter;
    MockPainter mockBorderPainter = new MockPainter();
    BorderPainter.instance = mockBorderPainter;
    MockProp panel = new MockProp();
    MockGraphics graphics = new MockGraphics();

    DefaultPainter.instance.paint(graphics, panel);

    assertEquals(true, mockBackgroundPainter.painted);
    assertEquals(true, mockBorderPainter.painted);
View Full Code Here

  public void setUp() throws Exception
  {
    panel = new MockProp();
    style = panel.getStyle();
    painter = BackgroundPainter.instance;
    graphics = new MockGraphics();
  }
View Full Code Here

  private Box clip;

  public void setUp() throws Exception
  {
    attribute = new ScaleFillStrategyValue();
    graphics = new MockGraphics();
    clip = new Box(0, 0, 60, 60);
    graphics.clip = clip;
  }
View Full Code Here

  private MockGraphics graphics;
  private Pen pen;

  public void setUp() throws Exception
  {
    graphics = new MockGraphics();
    pen = new Pen(graphics);
  }
View Full Code Here

  @Test
  public void itDrawsAnImageOfTheSameSize() throws Exception
  {
    NinePatch patch = NinePatch.load(image);
    MockGraphics graphics = new MockGraphics();
    patch.draw(graphics, 0, 0, 15, 41);
    assertEquals(9, graphics.drawnImages.size());

    checkDrawnImage(graphics.drawnImages.get(0), new Rectangle(1, 1, 3, 11), new Rectangle(0, 0, 3, 11));   // top left
    checkDrawnImage(graphics.drawnImages.get(1), new Rectangle(4, 1, 5, 11), new Rectangle(3, 0, 5, 11));   // top middle
View Full Code Here

  @Test
  public void itDrawsAnImageMinimalSize() throws Exception
  {
    NinePatch patch = NinePatch.load(image);
    MockGraphics graphics = new MockGraphics();
    patch.draw(graphics, 0, 0, 10, 28);
    assertEquals(4, graphics.drawnImages.size());

    checkDrawnImage(graphics.drawnImages.get(0), new Rectangle(1, 1, 3, 11), new Rectangle(0, 0, 3, 11));   // top left
    checkDrawnImage(graphics.drawnImages.get(1), new Rectangle(9, 1, 7, 11), new Rectangle(3, 0, 7, 11));   // top right
View Full Code Here

TOP

Related Classes of limelight.ui.MockGraphics$DrawnImage

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.