ID:1402439
 
When fiddling around with some old projects that would heavily benefit from some v500 features I noticed that when I cropped a graphic down using icon.Crop() the result could end up non-square which would throw off animate() rotations and the sort, so I came up with a way of cropping out bits of your icons without the result being downsized.

icon
proc
n_Crop(x1=0,y1=0,x2=0,y2=0,resize=1)
// This provides a Crop() function that won't result in the final graphic being resized down.
// More animate()-friendly crops.
// If called like normal Crop() it'll work like normal Crop()

if(resize) src.Crop(x1,x2,y1,y2)
else src.DrawBox(rgb(0,0,0,0),x1,y1,x2,y2)


Works exactly like icon.Crop() but has a resize argument, which if set to false will leave the resulting graphic at the previous size.