Skip to content

Scalling with scale(1,0) does nothing. but scale(0,1) works  #183

@ReneTC

Description

@ReneTC

Describe the bug
recently I wanted to squish a box flat. Let's try it.


from p5 import *

def setup():
        size(640, 360)

def draw():
    no_stroke()

    background(0)

    fill(255)
    #here i will put different scale values
    rect((0, 0), 200, 200)


if __name__ == '__main__':
  run()

I get a white box:
image

scaling with scale(0,1) flattens the box 100% in the x direction. Which makes perfect sense. But scaling with scale(1,0) does nothing. Box remains untouched.

Everything works perfectly with other values for y, say scale(1,0.5). It squishes the box 50%.

Expected behavior
y values should be smoshed to 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions