List of usage examples for com.google.gwt.canvas.dom.client Context2d setGlobalAlpha
public final native void setGlobalAlpha(double alpha) ;
From source file:playn.html.HtmlImmediateLayerCanvas.java
License:Apache License
@Override void paint(Context2d ctx, float parentAlpha) { if (!visible()) return;//from w w w . ja va 2 s . com ctx.save(); transform(ctx); ctx.setGlobalAlpha(parentAlpha * alpha); render(ctx); ctx.restore(); }
From source file:playn.html.HtmlSurfaceLayerCanvas.java
License:Apache License
@Override void paint(Context2d ctx, float parentAlpha) { if (!visible()) return;//w w w . j a va 2 s.co m ctx.save(); transform(ctx); ctx.setGlobalAlpha(parentAlpha * alpha); ctx.drawImage(canvas.canvas(), 0, 0); ctx.restore(); }