Package gwt.g2d.client.graphics

Examples of gwt.g2d.client.graphics.Surface.restore()


        .setTextBaseline(TextBaseline.BOTTOM)
        .setShadowOffsetX(5.0)
        .setShadowOffsetY(5.0)
        .setShadowBlur(5.0);
   
    surface.restore();
    testResult("Restore Global Alpha", .5, surface.getGlobalAlpha());
    testResult("Restore Global Composition", Composition.SOURCE_OVER,
        surface.getGlobalCompositeOperation());
    testResult("Restore Line Cap", LineCap.BUTT, surface.getLineCap());
    testResult("Restore Line Join", LineJoin.ROUND, surface.getLineJoin());
View Full Code Here


        surface.setStrokeStyle(KnownColor.WHITE).setLineWidth(20);
      }
      surface.strokeShape(new ShapeBuilder()
          .drawLineSegment(lastPosition, new Vector2(event.getX(), event.getY()))
          .build());
      surface.restore();
      lastPosition.set(event.getX(), event.getY());
    }   
  }

  @Override
View Full Code Here

    for (int j = 0; j < 500; j++) {
      surface.save()
          .translate(size / 2 - Random.nextInt(size),
              size / 2 - Random.nextInt(size));
      drawStar(Random.nextInt(4) + 2);
      surface.restore();
    }
  }

  @Override
  public void update() {
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.