Summary

A pixel map, or just a simple image.

Constructors

Pixmap Create a new empty pixel map. It can then be drawn to via the Editor.Paint class, like so: <code> var myPixMap = new Pixmap( 16, 16 ); Paint.Target( myPixMap ); Paint.Antialiasing = true; Paint.ClearPen(); Paint.SetBrush( Color.Red ); Paint.DrawRect( new Rect( 0, myPixMap.Size ), 2 ); Paint.Target( null ); </code>

Properties

HasAlpha Whether this pixel map supports the alpha channel.
Height Height of the pixel map.
Size THe size of this pixel map.
Width Width of the pixel map.

Methods

Clear Fill the pixel map with given color.
Finalize
GetBmp Returns the raw bytes of a BMP file that contains this pixel maps image. Internally writes and deletes a file, so be careful using it often.
GetJpeg Returns the raw bytes of a JPEG file that contains this pixel maps image. Internally writes and deletes a file, so be careful using it often.
GetPixel
GetPng Returns the raw bytes of a PNG file that contains this pixel maps image. Internally writes and deletes a file, so be careful using it often.
Resize Returns a new pixel map that contains resized version of this image with given dimensions. Will try to preserve aspect ratio.
SaveJpg Save the pixel map as a JPEG file at given location.
SavePng Save the pixel map as a PNG file at given location.
Scroll Duplicate a sub-rectangle of the image at re-draw it at given coordinates.
UpdateFromPixels

Static Methods

FromBitmap Create a pixmap from a bitmap
FromFile Load an image from a file on disk, specifically from "core/tools/images".
FromTexture Create a pixmap from a texture.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.