internal virtual void clearRect(int x, int y, int w, int h) { CanvasBlend oldBlend = graphics.Blend; graphics.Blend = CanvasBlend.Copy; CanvasSolidColorBrush brush = new CanvasSolidColorBrush(graphics, Colors.Transparent); brush.Color = Colors.Transparent; brush.Opacity = 1; graphics.FillRectangle(x, y, w, h, brush); graphics.Blend = oldBlend; }
public void Draw(ITexture texture, Matrix3x2 transform, Vector4 tint) { CanvasBlend previousBlend = this.canvasDrawingSession.Blend; using (CanvasSpriteBatch spriteBatch = this.canvasDrawingSession.CreateSpriteBatch()) { this.canvasDrawingSession.Blend = CanvasBlend.Add; CanvasBitmap bitmap = ((Texture)texture).Bitmap; spriteBatch.Draw(bitmap, transform, tint, CanvasSpriteFlip.None); this.canvasDrawingSession.Blend = previousBlend; } }
private void InitializeConstants() { minDuration = 1f; maxDuration = 1.8f; blendState = CanvasBlend.Add; }
private void InitializeConstants() { minDuration = 1f; maxDuration = 1.8f; blendState = CanvasBlend.Add; }