g2d.translate(x - 10 + (width - (int)(m_iWidth * scale)) / 2, y + 10);
g2d.scale(scale, scale);
try {
m_barcode.generateBarcode(new Java2DCanvasProvider(g2d, 0), m_sCode);
} catch (IllegalArgumentException e) {
g2d.drawRect(0, 0, m_iWidth, m_iHeight);
g2d.drawLine(0, 0, m_iWidth, m_iHeight);
g2d.drawLine(m_iWidth, 0, 0, m_iHeight);
}