@Override public void paint(DrawComponent dc, GC g) { ShapeDrawComponent sdc = (ShapeDrawComponent) dc; Path path = convertShape(sdc.getGeneralShape()); if (sdc.isFill()) { g.setBackground(ColorUtil.toSWTColor(sdc.getFillColor())); g.fillPath(path); } g.setForeground(ColorUtil.toSWTColor(sdc.getLineColor())); // g.setLineWidth(sdc.getLineWidth()); g.setLineWidth((int) sdc.getLineWidth()); g.setLineStyle(convertLineStyle(sdc.getLineStyle())); g.drawPath(path); }
public void fill(Shape s) { Path p = convertToPath(s); _gc.fillPath(p); p.dispose(); }