final double topBorder = bounds.getY();
final GuideLine[] vlines = verticalLinealModel.getGuideLines();
final int gridwidth = (int) bounds.getWidth();
for (int i = 0; i < vlines.length; i++)
{
final GuideLine line = vlines[i];
if (line.isActive())
{
final double h = line.getPosition() + topBorder;
final double linePos = h * scaleFactor;
g2.drawLine(0, (int) linePos, gridwidth, (int) (h * scaleFactor));
}
}
}
if (horizontalLinealModel != null)
{
final double leftBorder = bounds.getX();
final GuideLine[] hlines = horizontalLinealModel.getGuideLines();
final int gridHeight = (int) bounds.getHeight();
for (int i = 0; i < hlines.length; i++)
{
final GuideLine line = hlines[i];
if (line.isActive())
{
final double w = line.getPosition() + leftBorder;
final double linePos = w * scaleFactor;
g2.drawLine((int) linePos, 0, (int) linePos, gridHeight);
}
}
}