{{newin|[[0.9.0]]|090|type=function}}
Creates a new hardware [[Cursor]] object from an image file or [[ImageData]].

Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates.

The hot spot is the point the operating system uses to determine what was clicked and at what position the mouse cursor is. For example, the normal arrow pointer normally has its hot spot at the top left of the image, but a crosshair cursor might have it in the middle.

{{newobjectnotice}}
== Function ==
=== Synopsis ===
<source lang="lua">
cursor = love.mouse.newCursor( imageData, hotx, hoty )
</source>
=== Arguments ===
{{param|ImageData|imageData|The ImageData to use for the new Cursor.}}
{{param|number|hotx (0)|The x-coordinate in the ImageData of the cursor's hot spot.}}
{{param|number|hoty (0)|The y-coordinate in the ImageData of the cursor's hot spot.}}
=== Returns ===
{{param|Cursor|cursor|The new Cursor object.}}
== Function ==
=== Synopsis ===
<source lang="lua">
cursor = love.mouse.newCursor( filename, hotx, hoty )
</source>
=== Arguments ===
{{param|string|filename|Path to the image to use for the new Cursor.}}
{{param|number|hotx (0)|The x-coordinate in the image of the cursor's hot spot.}}
{{param|number|hoty (0)|The y-coordinate in the image of the cursor's hot spot.}}
=== Returns ===
{{param|Cursor|cursor|The new Cursor object.}}

== Function ==
=== Synopsis ===
<source lang="lua">
cursor = love.mouse.newCursor( fileData, hotx, hoty )
</source>
=== Arguments ===
{{param|FileData|fileData|Data representing the image to use for the new Cursor.}}
{{param|number|hotx (0)|The x-coordinate in the image of the cursor's hot spot.}}
{{param|number|hoty (0)|The y-coordinate in the image of the cursor's hot spot.}}
=== Returns ===
{{param|Cursor|cursor|The new Cursor object.}}

== See Also ==
* [[parent::love.mouse]]
* [[love.mouse.setCursor]]
* [[love.mouse.getCursor]]
* [[Constructs::Cursor]]
[[Category:Functions]]
{{#set:Description=Creates a new hardware [[Cursor]] object from an image.}}

== Other Languages ==
{{i18n|love.mouse.newCursor}}