public virtual void InvalidateGraphics(Rectangle clientArea) { //bubble up to parent //clientArea => area relative to this element //adjust to //adjust client area if (_viewportY != 0) { #if DEBUG System.Diagnostics.Debug.WriteLine(__aa_dbugId + ":i1_" + _viewportY.ToString()); #endif } if (_justBlockRun != null) { clientArea.Offset( (int)(_justBlockRun.Left), (int)(_justBlockRun.Top + _justBlockRun.HostLine.CachedLineTop)); _justBlockRun.HostLine.OwnerBox.InvalidateGraphics(clientArea); return; } CssBox parentBox = _absLayerOwner ?? this.ParentBox; if (parentBox != null) { clientArea.Offset((int)this.LocalX, (int)this.LocalY); parentBox.InvalidateGraphics(clientArea); } }
internal void InvalidateGraphics() { switch (_runKind) { case CssRunKind.BlockRun: { //TODO: review here again CssBlockRun blockRun = (CssBlockRun)this; CssLineBox ownerLine = blockRun.HostLine; Rectangle r = new Rectangle( (int)(this.Left + blockRun.Left), (int)(this.Top + blockRun.Top + ownerLine.CachedLineTop), (int)this.Width, (int)this.Height); CssBox ownerBox = ownerLine.OwnerBox; ownerBox.InvalidateGraphics(r); } break; default: //fine owner { CssLineBox ownerLine = this.HostLine; Rectangle r = new Rectangle( (int)(this.Left), (int)(this.Top + ownerLine.CachedLineTop), (int)this.Width, (int)this.Height); CssBox ownerBox = ownerLine.OwnerBox; ownerBox.InvalidateGraphics(r); } break; } }
public void InvalidateGraphics() { //bubble invalidate area to to parent? if (_justBlockRun != null) { Rectangle clientArea = this.GetVisualRectBounds(); #if DEBUG if (_viewportY != 0) { //TODO review here again*** //clientArea.Offset(0, -_viewportY); //clientArea.Intersect(justBlockRun.HostLine.OwnerBox.GetVisualRectBounds()); ////#if DEBUG //// Console.WriteLine(__aa_dbugId + ":i2_" + _viewportY.ToString()); ////#endif } #endif clientArea.Offset( (int)(_justBlockRun.Left), (int)(_justBlockRun.Top + _justBlockRun.HostLine.CachedLineTop)); _justBlockRun.HostLine.OwnerBox.InvalidateGraphics(clientArea); return; } CssBox parentBox = _absLayerOwner ?? this.ParentBox; if (parentBox != null) { Rectangle clientArea = this.GetVisualRectBounds(); #if DEBUG if (_viewportY != 0) { ////TODO review here again*** //clientArea = new Rectangle(0, 0, (int)parentBox.VisualWidth, (int)parentBox.VisualHeight); ////clientArea.Offset(0, -_viewportY); ////clientArea.Intersect(parentBox.GetVisualRectBounds()); ////#if DEBUG //// Console.WriteLine(__aa_dbugId + ":i2_" + _viewportY.ToString()); ////#endif } #endif parentBox.InvalidateGraphics(clientArea); } }