public virtual void OnPartialRenderFinished(RenderFinishedEventArgs e) { Action <RenderFinishedEventArgs> handler = PartialRenderFinished; if (handler != null) { handler(e); } }
protected virtual void OnRenderFinished(RenderFinishedEventArgs e) { Action <RenderFinishedEventArgs> handler = RenderFinished; if (handler != null) { handler(e); } }
protected virtual void OnPreRender() { var result = Canvas.OnPreRender(); var handler = PreRender; var args = new RenderFinishedEventArgs(); args.TotalWidth = 0; args.TotalHeight = 0; args.Width = 0; args.Height = 0; args.RenderResult = result; if (handler != null) { handler(args); } }
protected virtual void OnRenderFinished(RenderFinishedEventArgs e) { RoutedEventArgs newEventArgs = new RoutedEventArgs(RenderFinishedEvent); RaiseEvent(newEventArgs); }
private void AddPartialResult(RenderFinishedEventArgs result) { lock (this) { Width = result.TotalWidth; Height = result.TotalHeight; var bitmap = (Bitmap)result.RenderResult; IntPtr hBitmap = bitmap.GetHbitmap(); try { PartialResults.Add(Imaging.CreateBitmapSourceFromHBitmap( hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight(bitmap.Width, bitmap.Height))); } finally { DeleteObject(hBitmap); } } }
private void DrawResult(RenderFinishedEventArgs result) { lock (this) { Width = result.TotalWidth; Height = result.TotalHeight; var bitmap = (Bitmap)result.RenderResult; IntPtr hBitmap = bitmap.GetHbitmap(); try { // ImageSourceConverter c = new ImageSourceConverter(); // var imgSOurce = (c.ConvertFrom(bitmap)) as ImageSource; // imagi.Source = imgSOurce; var bitmapSource = Imaging.CreateBitmapSourceFromHBitmap( hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight(bitmap.Width, bitmap.Height)); imagi.Dispatcher.Invoke(() => { imagi.Source = bitmapSource; }); //PartialResults.Add(bitmapSource); } finally { DeleteObject(hBitmap); } } }
protected virtual void OnRenderFinished(RenderFinishedEventArgs e) { }
private void AddPartialResult(RenderFinishedEventArgs result) { lock (this) { Width = (int)result.TotalWidth; Height = (int)result.TotalHeight; _images.Add((Image)result.RenderResult); Invalidate(); } }
protected virtual void OnRenderFinished(RenderFinishedEventArgs e) { EventHandler handler = RenderFinished; if (handler != null) handler(this, EventArgs.Empty); }
private void _renderer_PartialRenderFinished(RenderFinishedEventArgs obj) { _diagramCanvasList.Add((Windows.UI.Xaml.Controls.Canvas)obj.RenderResult); }
private void _renderer_RenderFinished(RenderFinishedEventArgs obj) { this.diagramContainer.Children.Clear(); int canvasCount = 1; double lastY = 0; foreach (var canvas in _diagramCanvasList) { this.diagramContainer.Children.Add(canvas); canvasCount--; //if (canvasCount == 0) break; //TEMP lastY += canvas.Height; } }
public virtual void OnPartialRenderFinished(RenderFinishedEventArgs e) { Action<RenderFinishedEventArgs> handler = PartialRenderFinished; if (handler != null) handler(e); }
protected virtual void OnRenderFinished(RenderFinishedEventArgs e) { Action<RenderFinishedEventArgs> handler = RenderFinished; if (handler != null) handler(e); }
private void AppendRenderResult(RenderFinishedEventArgs result) { CanvasElement.style.width = result.TotalWidth + "px"; CanvasElement.style.height = result.TotalHeight + "px"; if (result.RenderResult != null) { Node itemToAppend; if (@typeof(result.RenderResult) == "string") { var partialResult = (HtmlDivElement)document.createElement("div"); partialResult.innerHTML = result.RenderResult.As<string>(); itemToAppend = partialResult.firstChild; } else { itemToAppend = (Node)result.RenderResult; } CanvasElement.appendChild(itemToAppend); } }
protected virtual void OnPartialRenderFinished(RenderFinishedEventArgs obj) { Action<RenderFinishedEventArgs> handler = PartialRenderFinished; if (handler != null) handler(obj); }