/** The ratio between a solid dash and the white-space in a dashed-border */
public static final float DASHED_BORDER_SPACE_RATIO = 0.5f;
- /** The length of the dash as a factor of the border width i.e. 4 -> dashWidth = 4*borderWidth */
- protected static final float DASHED_BORDER_LENGTH_FACTOR = 4.0f;
+ /** The length of the dash as a factor of the border width i.e. 2 -> dashWidth = 2*borderWidth */
+ protected static final float DASHED_BORDER_LENGTH_FACTOR = 2.0f;
private final GraphicsPainter graphicsPainter;
/**
* This test will fail if either of the below statements isn't true:
- * org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_SPACE_RATIO = 0.5f:q
- * org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_LENGTH_FACTOR = 4.0f.
+ * org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_SPACE_RATIO = 0.5f
+ * org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_LENGTH_FACTOR = 2.0f.
*/
@Test
public void testDrawBorderLine() throws Exception {
generator.flushPDFDoc();
OutputStream outStream = new ByteArrayOutputStream();
outStream = generator.getStream().getBufferOutputStream();
- assertTrue(((ByteArrayOutputStream) outStream).toString().contains("[4 2] 0 d 1 w"));
+ assertTrue(((ByteArrayOutputStream) outStream).toString().contains("[2.105263 1.052632] 0 d 1 w"));
}
public void tearDown() {
public void testDrawBorderLine() throws Exception {
borderPainter.drawBorderLine(0, 0, 40000, 1000, true, true,
Constants.EN_DASHED, Color.BLACK);
- assertTrue(outStream.toString().contains("[4.0 2.0] 0 setdash"));
+ assertTrue(outStream.toString().contains("[2.1052632 1.0526316] 0 setdash"));
}
public void tearDown() {