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: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: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: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

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

Joint:getAnchors

Joint:getAnchors Get the anchor points of the joint. Function Synopsis x1, y1, x2, y2 = Joint:getAnchors( ) Arguments None. Returns number x1 The x-component of the anchor on Body 1. number y1 The y-component of the anchor on Body 1. number x2 The x-component of the anchor on Body 2. number y2 The y-component of the anchor on Body 2. See Also Joint

Joint:getBodies

Joint:getBodies Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets the bodies that the Joint is attached to. Function Synopsis bodyA, bodyB = Joint:getBodies( ) Arguments None. Returns Body bodyA (nil) The first Body. Body bodyB (nil) The second Body. See Also Joint Body

Joint:getCollideConnected

Joint:getCollideConnected Gets whether the connected Bodies collide. Function Synopsis c = Joint:getCollideConnected( ) Arguments None. Returns boolean c True if they collide, false otherwise. See Also Joint

Joint:getReactionForce

Joint:getReactionForce Returns the reaction force in newtons on the second body Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis x, y = Joint:getReactionForce( invdt ) Arguments number x How long the force applies. Usually the inverse time step or 1/dt. Returns number x The x-component of the force. number y The y-component of the force. Function Removed in LÖVE 0.8.0 This variant is not supported in that and later versions. Synopsi

Joint:getReactionTorque

Joint:getReactionTorque Returns the reaction torque on the second body. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis torque = Joint:getReactionTorque( invdt ) Arguments number invdt How long the force applies. Usually the inverse time step or 1/dt. Returns number torque The reaction torque on the second body. Function Removed in LÖVE 0.8.0 This variant is not supported in that and later versions. Synopsis torque = Joint:getReacti