@@ -108,6 +108,7 @@ public abstract class Border {
108108 /// <summary>The hash value for the border.</summary>
109109 private int hash ;
110110
111+ [ Obsolete ]
111112 private Border . Side tmpSide = Border . Side . NONE ;
112113
113114 /// <summary>
@@ -265,47 +266,8 @@ public virtual void Draw(PdfCanvas canvas, float x1, float y1, float x2, float y
265266 /// </param>
266267 /// <param name="borderWidthBefore">defines width of the border that is before the current one</param>
267268 /// <param name="borderWidthAfter">defines width of the border that is after the current one</param>
268- public virtual void Draw ( PdfCanvas canvas , float x1 , float y1 , float x2 , float y2 , float borderRadius , Border . Side
269- side , float borderWidthBefore , float borderWidthAfter ) {
270- tmpSide = side ;
271- Draw ( canvas , x1 , y1 , x2 , y2 , borderRadius , borderWidthBefore , borderWidthAfter ) ;
272- tmpSide = Border . Side . NONE ;
273- }
274-
275- /// <summary>
276- /// <p>
277- /// All borders are supposed to be drawn in such way, that inner content of the element is on the right from the
278- /// drawing direction.
279- /// </summary>
280- /// <remarks>
281- /// <p>
282- /// All borders are supposed to be drawn in such way, that inner content of the element is on the right from the
283- /// drawing direction. Borders are drawn in this order: top, right, bottom, left.
284- /// </p>
285- /// <p>
286- /// Given points specify the line which lies on the border of the content area,
287- /// therefore the border itself should be drawn to the left from the drawing direction.
288- /// </p>
289- /// <p>
290- /// <code>borderWidthBefore</code> and <code>borderWidthAfter</code> parameters are used to
291- /// define the widths of the borders that are before and after the current border, e.g. for
292- /// the bottom border, <code>borderWidthBefore</code> specifies width of the right border and
293- /// <code>borderWidthAfter</code> - width of the left border. Those width are used to handle areas
294- /// of border joins.
295- /// </p>
296- /// </remarks>
297- /// <param name="canvas">PdfCanvas to be written to</param>
298- /// <param name="x1">x coordinate of the beginning point of the element side, that should be bordered</param>
299- /// <param name="y1">y coordinate of the beginning point of the element side, that should be bordered</param>
300- /// <param name="x2">x coordinate of the ending point of the element side, that should be bordered</param>
301- /// <param name="y2">y coordinate of the ending point of the element side, that should be bordered</param>
302- /// <param name="borderRadius">border radius</param>
303- /// <param name="borderWidthBefore">defines width of the border that is before the current one</param>
304- /// <param name="borderWidthAfter">defines width of the border that is after the current one</param>
305- [ System . ObsoleteAttribute ( @"Will be removed in 7.1.0. use Draw(iText.Kernel.Pdf.Canvas.PdfCanvas, float, float, float, float, float, Side, float, float) instead"
306- ) ]
307- public abstract void Draw ( PdfCanvas canvas , float x1 , float y1 , float x2 , float y2 , float borderRadius , float
308- borderWidthBefore , float borderWidthAfter ) ;
269+ public abstract void Draw ( PdfCanvas canvas , float x1 , float y1 , float x2 , float y2 , float borderRadius , Border . Side
270+ side , float borderWidthBefore , float borderWidthAfter ) ;
309271
310272 /// <summary>Draws the border of a cell.</summary>
311273 /// <param name="canvas">PdfCanvas to be written to</param>
@@ -423,7 +385,14 @@ public override int GetHashCode() {
423385 /// the corresponded
424386 /// <see cref="Side">side</see>
425387 /// </returns>
388+ [ System . ObsoleteAttribute ( @"Will be removed in 7.1.0. use GetBorderSide(float, float, float, float, Side) instead"
389+ ) ]
426390 protected internal virtual Border . Side GetBorderSide ( float x1 , float y1 , float x2 , float y2 ) {
391+ return GetBorderSide ( x1 , y1 , x2 , y2 , tmpSide ) ;
392+ }
393+
394+ protected internal virtual Border . Side GetBorderSide ( float x1 , float y1 , float x2 , float y2 , Border . Side tempSide
395+ ) {
427396 bool isLeft = false ;
428397 bool isRight = false ;
429398 if ( Math . Abs ( y2 - y1 ) > 0.0005f ) {
@@ -454,7 +423,7 @@ protected internal virtual Border.Side GetBorderSide(float x1, float y1, float x
454423 }
455424 }
456425 }
457- return tmpSide ;
426+ return tempSide ;
458427 }
459428
460429 /// <summary>Enumerates the different sides of the rectangle.</summary>
0 commit comments