The setLinePattern method of DrawRect works fine without using the setRounding method. When rounding is set, the setLinePattern has no effect, the item's line is displayed in solid style every time.
Also for DrawOval, DrawDimaond the method has no effect.
The code snipset produces a range of stacked rectangles, one for every line pattern, uncommment the commented line, then you will see the effect.
Browser Chrome, Firefox
SmartGwt 6.0-Power (Build 20160910)
Also for DrawOval, DrawDimaond the method has no effect.
Code:
import com.smartgwt.client.types.LinePattern;
import com.smartgwt.client.widgets.drawing.DrawPane;
import com.smartgwt.client.widgets.drawing.DrawRect;
public class BorderFigure
extends DrawPane
{
private int width;
private int height;
public BorderFigure(int left, int top, int width, int height)
{
super();
this.width = width;
this.height = height;
setLeft(left);
setTop(top);
setWidth(width);
setHeight(height);
createContent();
}
private void createContent()
{
for ( int ii = 0; ii < LinePattern.values().length; ii++ )
{
final int diff = 10 + (20 * ii);
DrawRect drawRect = new DrawRect();
drawRect.setLeft(diff);
drawRect.setTop(diff);
drawRect.setWidth(width - (2 * diff));
drawRect.setHeight(height - (2 * diff));
drawRect.setLinePattern(LinePattern.values()[ii]);
drawRect.setLineColor("#000000");
// drawRect.setRounding(0.1f);
addDrawItem(drawRect, true);
}
}
}
Browser Chrome, Firefox
SmartGwt 6.0-Power (Build 20160910)
Comment