Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Negative w/h in rect()

edited October 2011 in Bugs Posts: 6

Origin at the bottom left is unfamiliar to me, so I wanted to draw a rect from the top-down, like this:

rect(12, 12, 174, -174)

Have a look what it does.

Comments

  • Posts: 425

    What about a 'home made' function like

    function rectFromTop(x,y,w,h)
        pushStyle()
        rectMode(CORNER)
        rect(x,y-h,w,h)
        popStyle()
    end
    
  • dave1707dave1707 Mod
    Posts: 7,753

    @spyromus It must be iPad specific. I tried your code on an iPad Air and nothing showed. I stumbled on this code. It's supposed to show a circle without anything inside it (noFill). The size is 92,000,000 and I wasn't expecting this.


    displayMode(FULLSCREEN) function setup() end function draw() background(40, 40, 50) noFill() stroke(255) strokeWidth(2) ellipse(WIDTH/2,HEIGHT/2,92000000) end
  • Posts: 6

    Did you guys notice the date of my original post?

Sign In or Register to comment.