Package com.google.gwt.canvas.dom.client

Examples of com.google.gwt.canvas.dom.client.Context2d.restore()


    Context2d context = surface.getContext();
    context.save();
    context.translate(x + width / 2, y + height / 2);
    context.scale(width / 2, height / 2);
    context.arc(0, 0, 1, 0, MathHelper.TWO_PI, true);
    context.restore();
  }
}
View Full Code Here


    ctx.save(); // Save the current state
    ctx.setFillStyle("#FFF"); // Make changes to the settings
    ctx.setGlobalAlpha(0.5);
    ctx.fillRect(30, 30, 90, 90); // Draw a rectangle with new settings

    ctx.restore(); // Restore previous state
    ctx.fillRect(45, 45, 60, 60); // Draw a rectangle with restored settings

    ctx.restore(); // Restore original state
    ctx.fillRect(60, 60, 30, 30); // Draw a rectangle with restored settings
  }
View Full Code Here

    ctx.fillRect(30, 30, 90, 90); // Draw a rectangle with new settings

    ctx.restore(); // Restore previous state
    ctx.fillRect(45, 45, 60, 60); // Draw a rectangle with restored settings

    ctx.restore(); // Restore original state
    ctx.fillRect(60, 60, 30, 30); // Draw a rectangle with restored settings
  }
}
View Full Code Here

                    }
                    context.closePath();
                    context.stroke();
                }
            }
            context.restore();
        }
        context.restore();
    }
}
View Full Code Here

                    context.stroke();
                }
            }
            context.restore();
        }
        context.restore();
    }
}
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.