ImageSource Class
NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Media
Base class for an image that can be drawn.
public abstract class ImageSource
Constructors
ImageSource(Graphics g)
protected ImageSource(Graphics g)
Creates an image source backed by the given graphics.
Properties
Width
public virtual int Width { get; }
The width of the image in pixels.
Height
public virtual int Height { get; }
The height of the image in pixels.
Methods
MakeTransparent(int rgb)
public void MakeTransparent(int rgb)
Marks a color key (0xRRGGBB) transparent so those pixels are skipped when the image is drawn — the standard TinyCLR way to knock out an icon's flat backdrop (e.g. 0xFF00F2 magenta). Applies to the backing surface, so it affects every subsequent draw of this image.