File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
itext/itext.layout/itext/layout/renderer Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ public virtual void DrawBackground(DrawContext drawContext) {
462462 Rectangle backgroundArea = ApplyMargins ( bBox , false ) ;
463463 if ( backgroundArea . GetWidth ( ) <= 0 || backgroundArea . GetHeight ( ) <= 0 ) {
464464 ILogger logger = LoggerFactory . GetLogger ( typeof ( iText . Layout . Renderer . AbstractRenderer ) ) ;
465- logger . Error ( MessageFormatUtil . Format ( iText . IO . LogMessageConstant . RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background"
465+ logger . Warn ( MessageFormatUtil . Format ( iText . IO . LogMessageConstant . RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background"
466466 ) ) ;
467467 return ;
468468 }
@@ -486,7 +486,7 @@ public virtual void DrawBackground(DrawContext drawContext) {
486486 GetImage ( ) . GetHeight ( ) , backgroundImage . GetImage ( ) . GetWidth ( ) , backgroundImage . GetImage ( ) . GetHeight ( ) ) ;
487487 if ( imageRectangle . GetWidth ( ) <= 0 || imageRectangle . GetHeight ( ) <= 0 ) {
488488 ILogger logger = LoggerFactory . GetLogger ( typeof ( iText . Layout . Renderer . AbstractRenderer ) ) ;
489- logger . Error ( MessageFormatUtil . Format ( iText . IO . LogMessageConstant . RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background-image"
489+ logger . Warn ( MessageFormatUtil . Format ( iText . IO . LogMessageConstant . RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES , "background-image"
490490 ) ) ;
491491 return ;
492492 }
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public ImageRenderer(Image image)
9999 public override LayoutResult Layout ( LayoutContext layoutContext ) {
100100 LayoutArea area = layoutContext . GetArea ( ) . Clone ( ) ;
101101 Rectangle layoutBox = area . GetBBox ( ) . Clone ( ) ;
102- float ? retrievedWidth = RetrieveWidth ( layoutBox . GetWidth ( ) ) ;
102+ float ? retrievedWidth = HasProperty ( Property . WIDTH ) ? RetrieveWidth ( layoutBox . GetWidth ( ) ) : null ;
103103 IList < Rectangle > floatRendererAreas = layoutContext . GetFloatRendererAreas ( ) ;
104104 float clearHeightCorrection = FloatingHelper . CalculateClearHeightCorrection ( this , floatRendererAreas , layoutBox
105105 ) ;
Original file line number Diff line number Diff line change 1- 6050baf43726dc4ce3100fd436758dce7eaa63e2
1+ 36b7b2ab1debbcf4abb399de672d2ee2c03eea4d
You can’t perform that action at this time.
0 commit comments