Benjamin Singleton

Results 6 comments of Benjamin Singleton
trafficstars

I do really like the idea to change the names of EXTEND and SHRINK to COVER and CONTAIN! I didn't know about the CSS API, but having them be consistent...

> One other alternative could be using image(img, bx, by, [bWidth], [bHeight], [fitOptions]), where fitOptions is an object I can see this being a good method for making the function...

Another example of using COVER I use very often would be to cover the entire background of a sketch with an image, and allowing it update live based on both...

I don't know how clear this was in my original comment as I tried to keep it as brief as possible, but the API using `image(img, dx, dy, dWidth, dHeight,...

Ah, I see I got the two mixed up. In that case, having the extended arguments list be: `image(img, bx, by, bWidth, bHeight, sx, sy, [sWidth], [sHeight], [fit], [xAlign], [yAlign])`...

In that example, the bottom of the image would be at the bottom of the bounding box, with the top of the image spilling out of the box instead.