예제 #1
0
 /// <summary>
 /// Draw background and border.
 /// </summary>
 /// <param name="backgroundBrush">The brush used for background.</param>
 /// <param name="borderBrush">The brush used for border.</param>
 /// <param name="borderThickness">Border thickness.</param>
 /// <param name="renderBounds">Render bounds of the visual.</param>
 /// <param name="isFirstChunk">Whether this is paragraph's first chunk.</param>
 /// <param name="isLastChunk">Whether this is paragraph's last chunk.</param>
 internal void DrawBackgroundAndBorder(Brush backgroundBrush, Brush borderBrush, Thickness borderThickness, Rect renderBounds, bool isFirstChunk, bool isLastChunk)
 {
     if (_backgroundBrush != backgroundBrush || _renderBounds != renderBounds ||
         _borderBrush != borderBrush || !Thickness.AreClose(_borderThickness, borderThickness))
     {
         // Open DrawingContext and draw background.
         using (DrawingContext dc = RenderOpen())
         {
             DrawBackgroundAndBorderIntoContext(dc, backgroundBrush, borderBrush, borderThickness, renderBounds, isFirstChunk, isLastChunk);
         }
     }
 }
 // Token: 0x060068FC RID: 26876 RVA: 0x001D9C60 File Offset: 0x001D7E60
 internal void DrawBackgroundAndBorder(Brush backgroundBrush, Brush borderBrush, Thickness borderThickness, Rect renderBounds, bool isFirstChunk, bool isLastChunk)
 {
     if (this._backgroundBrush != backgroundBrush || this._renderBounds != renderBounds || this._borderBrush != borderBrush || !Thickness.AreClose(this._borderThickness, borderThickness))
     {
         using (DrawingContext drawingContext = base.RenderOpen())
         {
             this.DrawBackgroundAndBorderIntoContext(drawingContext, backgroundBrush, borderBrush, borderThickness, renderBounds, isFirstChunk, isLastChunk);
         }
     }
 }