MCPcopy Create free account
hub / github.com/benfry/processing4 / hideCursor

Method hideCursor

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

Source from the content-addressed store, hash-verified

1351
1352
1353 @Override
1354 public void hideCursor() {
1355 // Because the OS may have shown the cursor on its own,
1356 // don't return if 'cursorVisible' is set to true. [rev 0216]
1357
1358 if (invisibleCursor == null) {
1359 BufferedImage cursorImg =
1360 new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
1361 // this is a temporary workaround for the CHIP, will be removed
1362 Dimension cursorSize = Toolkit.getDefaultToolkit().getBestCursorSize(16, 16);
1363 if (cursorSize.width == 0 || cursorSize.height == 0) {
1364 invisibleCursor = Cursor.getDefaultCursor();
1365 } else {
1366 invisibleCursor =
1367 canvas.getToolkit().createCustomCursor(cursorImg, new Point(8, 8), "blank");
1368 }
1369 }
1370 canvas.setCursor(invisibleCursor);
1371 cursorVisible = false;
1372 }
1373
1374
1375 @Override

Callers 1

setTitleMethod · 0.95

Calls 1

setCursorMethod · 0.65

Tested by

no test coverage detected