Why rect doesn't fill up the screen?

I have a simple program here which I am expecting to see just black screen. It turns out to have a white border around it. This means that rect doesn’t fill up the entire screen. Why? What am I missing? I am running Codea 2.7.3 on iPad mini with iOS 12.1.1

function setup()     

end

function draw()     
    background(255, 255, 255, 255)
    
    -- why this leaves white border around the screen?
    -- strokeWidth(3)  -- any number here doesn't make any differences
    stroke(0, 0, 0, 255)
    fill(0, 0, 0, 255)
    rectMode(CORNER)
    rect(0, 0, WIDTH, HEIGHT)
    
    -- add this doesn't help either 
    -- strokeWidth(1) -- only when this is >= 2
    line(0, 0, 0, HEIGHT)
    line(0, HEIGHT, WIDTH, HEIGHT)
    line(WIDTH, HEIGHT, WIDTH, 0)
    line(0, 0, WIDTH, 0)
end

@tsukit Just Add noSmooth(). See example.

function setup()     
end

function draw()     
    background(255, 255, 255, 255)
    fill(0, 0, 0, 255)
    noSmooth()      -- add this 
    rectMode(CORNER)
    rect(0, 0, WIDTH, HEIGHT)
end

@tsukit - try noStroke() before rect.

@Bri_G noStroke() doesn’t work, but noSmooth does.

@dave1707 - wasn’t sure which one ite was, used both of them once in a texture which left a gap without them. Never chased up to see which one removed the gap. Thanks.

@dave1707 and @Bri_G thanks. NoSmooth() works!

It’s weid to me that the smoothing process has impact on this simple area fill of rect where there is no curve involved.

@tsukit smooth and noSmooth aren’t for curves. Their purpose is to average the color from one area to another or not. If you have a white area overlapping a black area, then smooth will average the area along the border of those 2 areas. noSmooth won’t and the border area will just go from one color to the other.

@tsukit yeah what @dave1707 said — they probably aren’t well named, but you can think about them more like antialiasing.

Got it. Thanks guys.