Examples of MockGraphics


Examples of limelight.ui.MockGraphics

  @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

Examples of limelight.ui.MockGraphics

  @Test
  public void itDrawsAnImageStretchedInBothDimensions() throws Exception
  {
    NinePatch patch = NinePatch.load(image);
    MockGraphics graphics = new MockGraphics();
    patch.draw(graphics, 0, 0, 100, 100);
    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, 90, 11));   // top middle
View Full Code Here

Examples of limelight.ui.MockGraphics

  private Box clip;

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

Examples of limelight.ui.MockGraphics

  private Box clip;

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

Examples of limelight.ui.MockGraphics

  private Box clip;

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

Examples of limelight.ui.MockGraphics

  private Box clip;

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

Examples of limelight.ui.MockGraphics

    return size.height;
  }

  public Graphics getGraphics()
  {
    return new MockGraphics();
  }
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.