Surface
From Pointui
A canvas that can be drawn on either by using the global Renderer object or by loading an image from the file system.
Contents |
Methods
int GetHeight()
Returns the height in pixels of the Surface.
int GetWidth()
Returns the width in pixels of the Surface.
void Clear()
Clears the Surface.
void LoadFromFile(String filename)
void LoadFromFile(String filename, int desiredWidth, int desiredHeight)
Loads an image from the file system and expands it out onto the Surface. If the desiredWidth and desiredHeight parameters are supplied then an attempt is made to load the image at the requested dimensions. Automatic clipping will be applied if the dimensions cannot be achieved without stretching the original image.
NOTE: “.jif” images ignore the desiredWidth and desiredHeight parameters and are always loaded at their actual size.
