/** Creates a texture that contains a region (in pixels) of another texture. The new * texture will reference the base texture; no data is duplicated. */ public static STexture fromTexture(Texture texture, Rectangle region = null, Rectangle frame = null) { STexture subTexture = new SubTexture(texture, region, false); subTexture.mFrame = frame; return(subTexture); }
/** Creates a texture that contains a region (in pixels) of another texture. The new * texture will reference the base texture; no data is duplicated. */ public static STexture fromTexture(Texture texture, Rectangle region=null, Rectangle frame=null) { STexture subTexture = new SubTexture(texture, region, false); subTexture.mFrame = frame; return subTexture; }