C# Class Sparrow.ResourceLoading.TextureLoader

Exibir arquivo Open project: fmotagarcia/sparrow-sharp Class Usage Examples

Public Properties

Property Type Description
_context global::Android.Content.Context

Protected Properties

Property Type Description
_glTexture Sparrow.Textures.GLTexture
_isLoaded bool

Public Methods

Method Description
LoadAndroidResource ( int AndroidResourceId ) : GLTexture

Loads an image based on resource ID; only avaiable on Andoid. Note that the resource will be scaled based on screen DPI if you put it into the drawable folder. If you want to avoid this, put it into the drawable-nodpi folder.

LoadFromStream ( Stream stream ) : GLTexture
LoadLocalImage ( string pathToFile ) : GLTexture
LoadLocalImageAsync ( string pathToFile ) : TextureLoader
LoadRemoteImage ( string remoteURL ) : TextureLoader

Protected Methods

Method Description
GenerateTexture ( Bitmap bitmap ) : void
LoadTexture ( UIImage inImage ) : void

Private Methods

Method Description
GenerateTexture ( UIImage image ) : void
LoadLocalBitmapAsync ( string path ) : void
LoadRemoteImageAsync ( string url ) : void
RGBToBGR ( Bitmap bmp ) : Bitmap

Method Details

GenerateTexture() protected method

protected GenerateTexture ( Bitmap bitmap ) : void
bitmap System.Drawing.Bitmap
return void

LoadAndroidResource() public method

Loads an image based on resource ID; only avaiable on Andoid. Note that the resource will be scaled based on screen DPI if you put it into the drawable folder. If you want to avoid this, put it into the drawable-nodpi folder.
public LoadAndroidResource ( int AndroidResourceId ) : GLTexture
AndroidResourceId int
return Sparrow.Textures.GLTexture

LoadFromStream() public method

public LoadFromStream ( Stream stream ) : GLTexture
stream Stream
return Sparrow.Textures.GLTexture

LoadLocalImage() public method

public LoadLocalImage ( string pathToFile ) : GLTexture
pathToFile string
return Sparrow.Textures.GLTexture

LoadLocalImageAsync() public method

public LoadLocalImageAsync ( string pathToFile ) : TextureLoader
pathToFile string
return TextureLoader

LoadRemoteImage() public method

public LoadRemoteImage ( string remoteURL ) : TextureLoader
remoteURL string
return TextureLoader

LoadTexture() protected method

protected LoadTexture ( UIImage inImage ) : void
inImage UIImage
return void

Property Details

_context public_oe static_oe property

public static global::Android.Content.Context _context
return global::Android.Content.Context

_glTexture protected_oe property

protected GLTexture,Sparrow.Textures _glTexture
return Sparrow.Textures.GLTexture

_isLoaded protected_oe property

protected bool _isLoaded
return bool