Created
January 25, 2020 09:50
-
-
Save craigmccauley/20c95e58345e63a39e5fcbf4b57e52d9 to your computer and use it in GitHub Desktop.
ImageJ 40 by 40 box on cursor location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//make rectange 40 by 40 on cursor location | |
//get location of cursor | |
var cursorX, cursorY, cursorZ, buttonFlags; | |
getCursorLoc(cursorX, cursorY, cursorZ, buttonFlags); | |
//set rectange vars | |
var rectangleWidth = 40; | |
var rectangleHeight = 40; | |
var rectangleX = cursorX - (rectangleWidth / 2); | |
var rectangleY = cursorY - (rectangleHeight / 2); | |
makeRectangle(rectangleX, rectangleY, rectangleWidth, rectangleHeight); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment