public void StartDraw(int x, int y, int width, int height) { Begin(); EditorUserControl editor = _target as EditorUserControl; if (editor?.SupportsOffscreenRendering() ?? false) { var drawingLayerRect = new Rect(x, y, width, height); _drawingLayer = _session.CreateLayer(1.0f, drawingLayerRect); var color = Windows.UI.Color.FromArgb((byte)0, (byte)0, (byte)0, (byte)0); _session.Clear(color); } }
public void BlendOffscreen(UInt32 id, float src_x, float src_y, float src_width, float src_height, float dest_x, float dest_y, float dest_width, float dest_height, Color color) { EditorUserControl editor = _target as EditorUserControl; if (editor?.SupportsOffscreenRendering() ?? false) { CanvasRenderTarget bitmap = editor.GetImage(id); Rect srcRect = new Rect(src_x, src_y, src_width, src_height); Rect dstRect = new Rect(dest_x, dest_y, dest_width, dest_height); _session.DrawImage(bitmap, dstRect, srcRect, color.A_f); } }
public EditorListener(EditorUserControl ucEditor) { _ucEditor = ucEditor; }
public RendererListener(EditorUserControl ucEditor) { _ucEditor = ucEditor; }