static void UpdateInvalidArea(GdiPlusDrawBoard d, IRenderElement rootElement) { int enter_canvasX = d.OriginX; int enter_canvasY = d.OriginY; d.SetCanvasOrigin(enter_canvasX - d.Left, enter_canvasY - d.Top); UpdateArea u = GetFreeUpdateArea(); u.CurrentRect = d.InvalidateArea; if (u.Width > 0 && u.Height > 0) { rootElement.Render(d, u); #if DEBUG rootElement.dbugShowRenderPart(d, u); #endif } else { } d.IsContentReady = true; d.SetCanvasOrigin(enter_canvasX, enter_canvasY);//restore ReleaseUpdateArea(u); }
static void UpdateInvalidateArea(DrawBoard d, IRenderElement topWindowRenderBox, UpdateArea updateArea) { int enter_canvas_x = d.OriginX; int enter_canvas_y = d.OriginY; d.SetCanvasOrigin(enter_canvas_x - d.Left, enter_canvas_y - d.Top); topWindowRenderBox.Render(d, updateArea); //Rectangle rect = mycanvas.Rect; //topWindowRenderBox.DrawToThisCanvas(mycanvas, rect); #if DEBUG dbugDrawDebugRedBoxes(d); #endif d.SetCanvasOrigin(enter_canvas_x, enter_canvas_y);//restore }
//------- static void UpdateAllArea(GdiPlusDrawBoard d, IRenderElement topWindowRenderBox) { int enter_canvasX = d.OriginX; int enter_canvasY = d.OriginY; d.SetCanvasOrigin(enter_canvasX - d.Left, enter_canvasY - d.Top); UpdateArea u = GetFreeUpdateArea(); u.CurrentRect = d.Rect; topWindowRenderBox.Render(d, u); #if DEBUG topWindowRenderBox.dbugShowRenderPart(d, u); #endif d.IsContentReady = true; d.SetCanvasOrigin(enter_canvasX, enter_canvasY);//restore ReleaseUpdateArea(u); }