-
-
Couldn't load subscription status.
- Fork 3.6k
Open
Labels
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.0.5 (2.0+)
Web browser and version
Any
Operating system
Any
Steps to reproduce this
Steps:
- Load an image
- Use it as a texture with
texture(img) - Draw a rounded rectangle with
rect(x, y, w, h, radius)
The rectangle should have the image on it, but instead, it stretches out a single column of pixels.
1.11.0:
Snippet:
let img
async function setup() {
createCanvas(400, 400, WEBGL);
img = await loadImage('https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Felis_catus-cat_on_snow.jpg/640px-Felis_catus-cat_on_snow.jpg')
texture(img)
rect(-150, -100, 300, 200, 8)
}Live: https://editor.p5js.org/davepagurek/sketches/rQqOSvCjW
