SFML.Graphics.Texture.Texture C# (CSharp) Method

Texture() public method

Construct the texture from a file in a stream
public Texture ( Stream stream, IntRect area ) : System
stream Stream Stream containing the file contents
area IntRect Area of the image to load
return System
        public Texture(Stream stream, IntRect area) :
            base(IntPtr.Zero)
        {
            using (StreamAdaptor adaptor = new StreamAdaptor(stream))
            {
                CPointer = sfTexture_createFromStream(adaptor.InputStreamPtr, ref area);
            }

            if (CPointer == IntPtr.Zero)
                throw new LoadingFailedException("texture");
        }

Same methods

Texture::Texture ( Image image ) : System
Texture::Texture ( Image image, IntRect area ) : System
Texture::Texture ( IntPtr cPointer ) : System
Texture::Texture ( Stream stream ) : System
Texture::Texture ( Texture copy ) : System
Texture::Texture ( byte bytes ) : System
Texture::Texture ( string filename ) : System
Texture::Texture ( string filename, IntRect area ) : System
Texture::Texture ( uint width, uint height ) : System