}
@Test
public void testParamHatchwidth() throws ParseException {
IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=0.2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
if(sh.isInteriorStylable()) {
assertEquals(0.2*IShape.PPC, sh.getHatchingsWidth(), 0.00001);
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=0.2cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(0.2*IShape.PPC, sh.getHatchingsWidth(), 0.00001);
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=2mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(0.2*IShape.PPC, sh.getHatchingsWidth(), 0.00001);
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=0.1in]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(0.1*IShape.PPC/PSTricksConstants.INCH_VAL_CM, sh.getHatchingsWidth(), 0.00001);
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=2mm, hatchwidth=0.1pt]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(0.1*IShape.PPC/PSTricksConstants.CM_VAL_PT, sh.getHatchingsWidth(), 0.00001);
assertTrue(PSTParser.errorLogs().isEmpty());
}
}