Esempio n. 1
0
        /** 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);
        }
Esempio n. 2
0
 /** 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;
 }