public static int sld2awtCap ( String sldCap ) { if ( sldCap . equals ( "" ) || sldCap . equals ( lineCapNames [ 1 ] ) ) { return BasicStroke . CAP_BUTT ; } else if ( sldCap . equals ( lineCapNames [ 2 ] ) ) { return BasicStroke . CAP_ROUND ; } else if ( sldCap . equals ( lineCapNames [ 3 ] ) ) { return BasicStroke . CAP_SQUARE ; } else { throw new IllegalArgumentException ( "unsupported line cap" ) ; } }
Convert a sld line cap definition to the java awt value .