@@ -142,7 +142,7 @@ public void imageWidthTest02() throws IOException, InterruptedException {
142
142
143
143
image .setProperty (Property .MAX_WIDTH , UnitValue .createPercentValue (50 ));
144
144
minMaxWidth = renderer .getMinMaxWidth (5000 );
145
- Assert .assertEquals (2500 .0 , minMaxWidth .getMaxWidth (), EPSILON );
145
+ Assert .assertEquals (1024 .0 , minMaxWidth .getMaxWidth (), EPSILON );
146
146
minMaxWidth = renderer .getMinMaxWidth (500 );
147
147
Assert .assertEquals (250.0 , minMaxWidth .getMaxWidth (), EPSILON );
148
148
image .setProperty (Property .MAX_HEIGHT , 100f );
@@ -154,12 +154,12 @@ public void imageWidthTest02() throws IOException, InterruptedException {
154
154
image .setProperty (Property .MIN_WIDTH , UnitValue .createPointValue (2000 ));
155
155
image .setProperty (Property .MAX_WIDTH , UnitValue .createPointValue (3000 ));
156
156
minMaxWidth = renderer .getMinMaxWidth (5000 );
157
- Assert .assertEquals (3000 .0 , minMaxWidth .getMaxWidth (), EPSILON );
157
+ Assert .assertEquals (2000 .0 , minMaxWidth .getMaxWidth (), EPSILON );
158
158
Assert .assertEquals (0.0 , minMaxWidth .getMaxWidth () - minMaxWidth .getMinWidth (), EPSILON );
159
159
image .setProperty (Property .MIN_HEIGHT , 100f );
160
160
image .setProperty (Property .HEIGHT , 100f );
161
161
minMaxWidth = renderer .getMinMaxWidth (5000 );
162
- Assert .assertEquals ( 3000 , minMaxWidth .getMaxWidth (), EPSILON );
162
+ Assert .assertEquals ( 100.0 * 1024.0 / 768.0 , minMaxWidth .getMaxWidth (), EPSILON );
163
163
}
164
164
165
165
}
0 commit comments