{"action":"opened","issue":{"url":"https://api.github.com/repos/tuhiproject/tuhi/issues/111","repository_url":"https://api.github.com/repos/tuhiproject/tuhi","labels_url":"https://api.github.com/repos/tuhiproject/tuhi/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/tuhiproject/tuhi/issues/111/comments","events_url":"https://api.github.com/repos/tuhiproject/tuhi/issues/111/events","html_url":"https://github.com/tuhiproject/tuhi/issues/111","id":366965858,"node_id":"MDU6SXNzdWUzNjY5NjU4NTg=","number":111,"title":"Broken stroke data with Bamboo Slate offline mode","user":{"login":"espresso3389","id":1311400,"node_id":"MDQ6VXNlcjEzMTE0MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1311400?v=4","gravatar_id":"","url":"https://api.github.com/users/espresso3389","html_url":"https://github.com/espresso3389","followers_url":"https://api.github.com/users/espresso3389/followers","following_url":"https://api.github.com/users/espresso3389/following{/other_user}","gists_url":"https://api.github.com/users/espresso3389/gists{/gist_id}","starred_url":"https://api.github.com/users/espresso3389/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espresso3389/subscriptions","organizations_url":"https://api.github.com/users/espresso3389/orgs","repos_url":"https://api.github.com/users/espresso3389/repos","events_url":"https://api.github.com/users/espresso3389/events{/privacy}","received_events_url":"https://api.github.com/users/espresso3389/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-04T20:53:09Z","updated_at":"2018-10-04T20:53:09Z","closed_at":null,"author_association":"NONE","body":"In certain cases, offline strokes may start with relative Y coordinate.\r\nCurrent code in [get_coordinate](https://github.com/tuhiproject/tuhi/blob/master/tuhi/wacom.py#L732) assumes the first point is absolute or otherwise the point is ignored.\r\n\r\nI found that, in certain cases, Y and Z of the first point might be relative and then we should use the byte sequence of [WacomPacketHandlerStrokePrefixSlate](https://github.com/tuhiproject/tuhi/blob/master/tuhi/wacom.py#L253) as if it were a previous coordinate triplet.\r\n\r\nThat is, `WacomPacketHandlerStrokePrefixSlate` seems always starts with `?f,ff,ee,ee,ee` but last padded 4 bytes can be interpreted as Y0 and Z0. And the first point should be calculated against the Y0 and Z0 if the first point has relatively coded values.\r\n\r\n\r\n"}}
{"actor":{"display_login":"espresso3389"}}