MCPcopy Index your code
hub / github.com/processing/processing / hideCursor

Method hideCursor

core/src/processing/awt/PSurfaceAWT.java:1520–1539  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1518
1519
1520 @Override
1521 public void hideCursor() {
1522 // Because the OS may have shown the cursor on its own,
1523 // don't return if 'cursorVisible' is set to true. [rev 0216]
1524
1525 if (invisibleCursor == null) {
1526 BufferedImage cursorImg =
1527 new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
1528 // this is a temporary workaround for the CHIP, will be removed
1529 Dimension cursorSize = Toolkit.getDefaultToolkit().getBestCursorSize(16, 16);
1530 if (cursorSize.width == 0 || cursorSize.height == 0) {
1531 invisibleCursor = Cursor.getDefaultCursor();
1532 } else {
1533 invisibleCursor =
1534 canvas.getToolkit().createCustomCursor(cursorImg, new Point(8, 8), "blank");
1535 }
1536 }
1537 canvas.setCursor(invisibleCursor);
1538 cursorVisible = false;
1539 }
1540
1541
1542 @Override

Callers 1

setTitleMethod · 0.95

Calls 1

setCursorMethod · 0.65

Tested by

no test coverage detected