Opened 13 years ago

Closed 13 years ago

#2502 closed enhancement (fixed)

Turtleart tamyblock mouse in turtle coordinates

Reported by: tonyforster Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Sample code gives mouse in screen coordinates (top left=0) not turtle coordinates (centre = 0), change to turtle coordinates?

Change History (1)

comment:1 Changed 13 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

http://git.sugarlabs.org/turtleart/mainline/commit/8aad41077510f1b488a580b48cac038146fd389c

This should map to turtle coordinates:

lc.heap.append((lc.tw.canvas.height / 2) - lc.tw.mouse_y)
lc.heap.append(lc.tw.mouse_x - (lc.tw.canvas.width / 2))

Will be incorporated into v104.

Note: See TracTickets for help on using tickets.