I just made a change to how we draw to support drawing partial lines, which means this call actually hurts performance significantly because it sets whole lines dirty! You want to call a function like this:

- (void)setRectDirtyFromX:(int)fromX Y:(int)fromY toX:(int)toX Y:(int)toY
{
    assert(fromX >= 0);
    assert(fromX < WIDTH);
    assert(toX >= 0);
    assert(toX <= WIDTH);  // <= because not inclusive of toX.
    assert(fromY >= 0);
    assert(fromY < HEIGHT);
    assert(toY >= 0);
    assert(toY < HEIGHT);
    assert(fromY <= toY);
    if (fromY == toY) {
        assert(fromX <= toX);
    }
    for (int y = fromY; y <= toY; y++) {
        int i = fromX + y * WIDTH;
        [self setRangeDirty:NSMakeRange(i, toX + y * WIDTH - i)];
    }
}