Function: samplerPosition()
samplerPosition(
point,touch,width,height):Point
Defined in: src/ui/elements/PcCanvas/index.ts:122
Where the colour sample tool's window goes (its top left, in screen pixels): with a mouse or pen, so the outlined pixel in its enlarged view is on the pointer (which is hidden); with touch, centred above the finger. Kept on screen.
Parameters
point
touch
boolean
width
number
height
number
Returns
Example
samplerPosition({ x: 100, y: 200 }, false, 1000, 800); // { x: 72.5, y: 122.5 }