ImageCursor
Inherits from: Cursor
Overview
A custom image representation of the mouse cursor. On platforms that don't support custom cursors,
Cursor.DEFAULT will be used in place of the specified ImageCursor.
Example:
import javafx.scene.*;
import javafx.scene.image.*;
def image = Image { url: "{__DIR__}mycursor.png" }
Scene {
width: 400
height: 300
cursor: ImageCursor {
image: image
hotspotX: image.width/2
hotspotY: image.height/2
}
}
Profile: common
Variable Summary
| name | type | Default Value | description |
|---|---|---|---|
| image | Image | null |
The image to display when the cursor is active. If the image is null,
|
| hotspotX | Number | 0 |
The X coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.width-1]. A value less than 0 will be set to 0. A value greater than image.width-1 will be set to image.width-1. |
| hotspotY | Number | 0 |
The Y coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.height-1]. A value less than 0 will be set to 0. A value greater than image.height-1 will be set to image.height-1. |
