cb.moveTo(x1, -y1);
cb.lineTo(x2, -y2);
cb.setRGBColorStroke(color.getRed(), color.getGreen(), color.getBlue());
cb.setLineWidth(thickness);
if (color.getAlpha() < 255) {
cb.saveState();
float alpha = color.getAlpha() / 255f;
PdfGState gState = new PdfGState();
gState.setStrokeOpacity(alpha);
cb.setGState(gState);
}