Joint:destroy

Joint:destroy Explicitly destroys the Joint. An error will occur if you attempt to use the object after calling this function. In 0.7.2, when you don't have time to wait for garbage collection, this function may be used to free the object immediately. Function Synopsis Joint:destroy( ) Arguments None. Returns Nothing. See Also Joint

ImageData:setPixel

ImageData:setPixel Sets the color of a pixel at a specific position in the image. Valid x and y values start at 0 and go up to image width and height minus 1. Function Synopsis ImageData:setPixel( x, y, r, g, b, a ) Arguments number x The position of the pixel on the x-axis. number y The position of the pixel on the y-axis. number r The red component (0-255). number g The green component (0-255). number b The blue component (0-255). number a The alpha component (0-255). Returns Nothin

ImageData:paste

ImageData:paste Paste into ImageData from another source ImageData. Function Synopsis ImageData:paste( source, dx, dy, sx, sy, sw, sh ) Arguments ImageData source Source ImageData from which to copy. number dx Destination top-left position on x-axis. number dy Destination top-left position on y-axis. number sx Source top-left position on x-axis. number sy Source top-left position on y-axis. number sw Source width. number sh Source height. Returns Nothing. Notes Note that this functio

ImageData:mapPixel

ImageData:mapPixel Transform an image by applying a function to every pixel. This function is a higher order function. It takes another function as a parameter, and calls it once for each pixel in the ImageData. The passed function is called with six parameters for each pixel in turn. The parameters are numbers that represent the x and y coordinates of the pixel and its red, green, blue and alpha values. The function should return the new red, green, blue, and alpha values for that pixel. fu

ImageData:getWidth

ImageData:getWidth Gets the width of the ImageData in pixels. Function Synopsis width = ImageData:getWidth( ) Arguments None. Returns number width The width of the ImageData in pixels. See Also ImageData

ImageData:getString

ImageData:getString Removed in LÖVE 0.9.0 It has been moved to Data:getString. Gets the full ImageData as a string. Function Synopsis pixels = ImageData:getString( ) Arguments None. Returns string pixels The raw data. See Also ImageData

ImageData:getPixel

ImageData:getPixel Gets the color of a pixel at a specific position in the image. Valid x and y values start at 0 and go up to image width and height minus 1. Non-integer values are floored. Prior to 0.10.2, this function does not properly handle non-integer coordinates, and may produce an invalid result when non-integer values are passed. Function Synopsis r, g, b, a = ImageData:getPixel( x, y ) Arguments number x The position of the pixel on the x-axis. number y The position of the pixel

ImageData:getHeight

ImageData:getHeight Gets the height of the ImageData in pixels. Function Synopsis height = ImageData:getHeight( ) Arguments None. Returns number height The height of the ImageData in pixels. See Also ImageData

ImageData:getDimensions

ImageData:getDimensions Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the width and height of the ImageData in pixels. Function Synopsis width, height = ImageData:getDimensions( ) Arguments None. Returns number width The width of the ImageData in pixels. number height The height of the ImageData in pixels. See Also ImageData

ImageData:encode

ImageData:encode Encodes the ImageData and optionally writes it to the save directory. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis filedata = ImageData:encode( format, filename ) Arguments ImageFormat format The format to encode the image as. string filename (nil) The filename to write the file to. If nil, no file will be written but the FileData will still be returned. Returns FileData filedata The encoded image as a new FileData o