Bitmap Description sealed class Tinman.Engine.Drawing.Bitmap Derived from ResourceBase abstract The Bitmap represents an image resource for 2D rendering via Graphics. Public / Constructors HandleFile public static method HandleFile → (2) path in : Path [not-null] Path to image file. flags opt : BitmapFlags = BitmapFlags.Default The bitmap flags. returns → IResourceHandle The bitmap handle. Creates a new bitmap handle for the image file. This handle will always perform sRGB decompression on path in. See also Graphics.LoadBitmapFrom1 HandleImage public static method HandleImage → (2) image in : IImage [not-null] The image descriptor. flags opt : BitmapFlags = BitmapFlags.Default The bitmap flags. returns → IResourceHandle The bitmap handle. Creates a new bitmap handle for the given image descriptor. See also Graphics.LoadBitmapFrom2 HandlePixels public static method HandlePixels → (2) pixels in : ColorBuffer [not-null] The image pixels. flags opt : BitmapFlags = BitmapFlags.Default The bitmap flags. returns → IResourceHandle The bitmap handle. Creates a new bitmap handle for the given image pixels. HandleRenderTarget [OwnerReturn] public static method HandleRenderTarget → (1) handle in : RenderTargetHandle [not-null] The render target handle. returns → IResourceHandle The bitmap handle. Creates a new bitmap handle for the given render target. Wrap [OwnerReturn] public static method Wrap → (2) texture in : ITexture2D [not-null] The texture to wrap. slice opt : int32 = 0 [0..texture.Count-1] The texture slice to wrap. returns → Bitmap The Bitmap. Wraps the given ITexture2D object in a Bitmap. Public / Methods Clip [OwnerReturn] public method Clip → (4) x in : int32 [0..Bitmap.Width-1] Pixel X-coordinate of top-left corner of sub-rectangle. y in : int32 [0..Bitmap.Height-1] Pixel Y-coordinate of top-left corner of sub-rectangle. width in : int32 [1..Bitmap.Width-x] Width of sub-rectangle. height in : int32 [1..Bitmap.Height-y] Width of sub-rectangle. returns → Bitmap The sub-rectangle bitmap. Returns a sub-rectangle of this bitmap. GetUV [Pure] public method GetUV → (2) x in : float32 Bitmap X-coordinate. y in : float32 Bitmap Y-coordinate. returns → Vec2F The texture coordinates. Returns the U and V texture coordinates of given bitmap coordinates. The bitmap coordinates (0|0) refer to the top-left corner of the top-left bitmap pixel. The lower-right corner of the lower-right pixel is at (Width|Height). SetPixels public method SetPixels → (1) buffer in : ColorBuffer [not-null] The pixel buffer. Will be padded with Colors.Zero if too small. Sets the pixels of this image. Public / Attributes Height public attribute Height → (get) value : int32 [>=0] The bitmap height, in pixels. Returns the height of this bitmap. Size public attribute Size → (get) value : Vec2I The bitmap size (width, height), in pixels. Returns the bitmap size. Slice public attribute Slice → (get) value : int32 [>=0] the texture slice. Returns the texture slice of this bitmap. See also Bitmap.Texture Texture public attribute Texture → (get) value : ITexture2D [not-null] The texture resource. Returns the texture resource of this bitmap. See also Bitmap.Slice Width public attribute Width → (get) value : int32 [>=0] The bitmap width, in pixels. Returns the width of this bitmap. Anchor BitmapFlags