private PaintBorder ( |
||
box | ||
border | CssSide | |
solidColor | Color | |
rect | ||
리턴 | void |
/// <summary> /// Paints the fragment /// </summary> /// <param name="g">the device to draw to</param> protected override void PaintImp(PaintVisitor p) { #if DEBUG p.dbugEnterNewContext(this, PaintVisitor.PaintVisitorContextName.Init); #endif Color bgColorHint = p.CurrentSolidBackgroundColorHint;//save var rect = new RectangleF(0, 0, this.VisualWidth, this.VisualHeight); if (rect.Height > 2 && RenderUtils.IsColorVisible(ActualBackgroundColor)) { p.FillRectangle(ActualBackgroundColor, rect.Left, rect.Top, rect.Width, rect.Height); } if (rect.Height > 1) { p.PaintBorders(this, rect); } else { p.PaintBorder(this, CssSide.Top, this.BorderTopColor, rect); } p.CurrentSolidBackgroundColorHint = bgColorHint;//restore #if DEBUG p.dbugExitContext(); #endif }
/// <summary> /// Paints the fragment /// </summary> /// <param name="g">the device to draw to</param> protected override void PaintImp(PaintVisitor p) { #if DEBUG p.dbugEnterNewContext(this, PaintVisitor.PaintVisitorContextName.Init); #endif var rect = new RectangleF(0, 0, this.VisualWidth, this.VisualHeight); if (rect.Height > 2 && RenderUtils.IsColorVisible(ActualBackgroundColor)) { p.FillRectangle(ActualBackgroundColor, rect.X, rect.Y, rect.Width, rect.Height); } if (rect.Height > 1) { p.PaintBorders(this, rect); } else { p.PaintBorder(this, CssSide.Top, this.BorderTopColor, rect); } #if DEBUG p.dbugExitContext(); #endif }