---
title: "init(image:foregroundColorHint:backgroundColorHint:hotSpot:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscursor/init(image:foregroundcolorhint:backgroundcolorhint:hotspot:)"
---

# init(image:foregroundColorHint:backgroundColorHint:hotSpot:)

Initializes the cursor with the specified image and hot spot.

## Declaration

```swift
convenience init(image newImage: NSImage, foregroundColorHint fg: NSColor?, backgroundColorHint bg: NSColor?, hotSpot: NSPoint)
```

## Parameters

- `newImage`: The image to assign to the cursor.
- `fg`: The foreground color. This is currently ignored.
- `bg`: The background color. This is currently ignored.
- `hotSpot`: The point to assign as the cursor’s hot spot.

## Return Value

Return Value The initialized cursor object.

## See Also

### Deprecated

- [mouseEntered(with:)](appkit/nscursor/mouseentered(with:).md)
- [setOnMouseEntered(_:)](appkit/nscursor/setonmouseentered(_:).md)
- [isSetOnMouseEntered](appkit/nscursor/issetonmouseentered.md)
- [mouseExited(with:)](appkit/nscursor/mouseexited(with:).md)
- [setOnMouseExited(_:)](appkit/nscursor/setonmouseexited(_:).md)
- [isSetOnMouseExited](appkit/nscursor/issetonmouseexited.md)
