{"action":"created","issue":{"url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306/issues/66","repository_url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306","labels_url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306/issues/66/comments","events_url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306/issues/66/events","html_url":"https://github.com/squix78/esp8266-oled-ssd1306/issues/66","id":164703871,"number":66,"title":"drawRect and fillRect produce rects of different size","user":{"login":"igrr","id":4349050,"avatar_url":"https://avatars.githubusercontent.com/u/4349050?v=3","gravatar_id":"","url":"https://api.github.com/users/igrr","html_url":"https://github.com/igrr","followers_url":"https://api.github.com/users/igrr/followers","following_url":"https://api.github.com/users/igrr/following{/other_user}","gists_url":"https://api.github.com/users/igrr/gists{/gist_id}","starred_url":"https://api.github.com/users/igrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrr/subscriptions","organizations_url":"https://api.github.com/users/igrr/orgs","repos_url":"https://api.github.com/users/igrr/repos","events_url":"https://api.github.com/users/igrr/events{/privacy}","received_events_url":"https://api.github.com/users/igrr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-10T07:27:54Z","updated_at":"2016-07-10T10:02:28Z","closed_at":null,"body":"Currently the code in OLEDDisplay::drawRect is as follows:\r\n```c++\r\n  drawHorizontalLine(x, y, width);\r\n  drawVerticalLine(x, y, height);\r\n  drawVerticalLine(x + width, y, height);\r\n  drawHorizontalLine(x, y + height, width);\r\n```\r\nCompared to `fillRect` function, this draws a rectangle which is 1 pixel wider and 1 pixel higher. Also it lacks a pixel at the lower-right corner. \r\n\r\n![media-20160710](https://cloud.githubusercontent.com/assets/4349050/16712203/35416962-46b2-11e6-82d7-d33099e10c55.jpg)\r\n\r\nIf I change that to `x + width - 1` and `y + height - 1`, i get same size as for `fillRect`.\r\nI'm not sure if such a \"fix\" qualifies as a change in API though :)\r\n\r\nAnd by the way, why is `fillRect` using `drawHorizontalLine`? Isn't `drawVerticalLine` faster because it can set up to 8 pixels at a time?"},"comment":{"url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306/issues/comments/231580776","html_url":"https://github.com/squix78/esp8266-oled-ssd1306/issues/66#issuecomment-231580776","issue_url":"https://api.github.com/repos/squix78/esp8266-oled-ssd1306/issues/66","id":231580776,"user":{"login":"FWeinb","id":1250430,"avatar_url":"https://avatars.githubusercontent.com/u/1250430?v=3","gravatar_id":"","url":"https://api.github.com/users/FWeinb","html_url":"https://github.com/FWeinb","followers_url":"https://api.github.com/users/FWeinb/followers","following_url":"https://api.github.com/users/FWeinb/following{/other_user}","gists_url":"https://api.github.com/users/FWeinb/gists{/gist_id}","starred_url":"https://api.github.com/users/FWeinb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FWeinb/subscriptions","organizations_url":"https://api.github.com/users/FWeinb/orgs","repos_url":"https://api.github.com/users/FWeinb/repos","events_url":"https://api.github.com/users/FWeinb/events{/privacy}","received_events_url":"https://api.github.com/users/FWeinb/received_events","type":"User","site_admin":false},"created_at":"2016-07-10T10:02:28Z","updated_at":"2016-07-10T10:02:28Z","body":"Thanks for reporting, this won't qualify as a change in API because this is clearly a bug in the code. Good idea to improve `fillRect` by using `drawVerticalLine`!"}}
{"actor":{"display_login":"FWeinb"}}