{"action":"created","issue":{"url":"https://api.github.com/repos/mitchmindtree/elmesque/issues/17","labels_url":"https://api.github.com/repos/mitchmindtree/elmesque/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/mitchmindtree/elmesque/issues/17/comments","events_url":"https://api.github.com/repos/mitchmindtree/elmesque/issues/17/events","html_url":"https://github.com/mitchmindtree/elmesque/issues/17","id":77569246,"number":17,"title":"Create an `element::Prim` variant for cropping the view of an `Element`.","user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T08:57:39Z","updated_at":"2015-05-19T15:48:20Z","closed_at":"2015-05-19T15:48:20Z","body":"I imagine the method in use would look something like this:\r\n```Rust\r\nlet cropped_element = my_element.crop(x, y, w, h);\r\n```\r\nWhere `w` and `h` are the width and height of the cropped rectangle, and `x` and `y` are the position within the `Element` at which the rectangle is cropped.\r\n\r\nI believe we might be able to use `Viewport` for this, but my understanding of its use is still a little hazy.\r\n\r\nEdit: actually, it seems `draw_state` [might have an option for this](https://github.com/gfx-rs/draw_state/blob/master/src/lib.rs#L80)."},"comment":{"url":"https://api.github.com/repos/mitchmindtree/elmesque/issues/comments/103559643","html_url":"https://github.com/mitchmindtree/elmesque/issues/17#issuecomment-103559643","issue_url":"https://api.github.com/repos/mitchmindtree/elmesque/issues/17","id":103559643,"user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T15:48:20Z","updated_at":"2015-05-19T15:48:20Z","body":"Closed by [this commit](https://github.com/mitchmindtree/elmesque/commit/8b578208267416fc48936b739ff0eef97c231dc9)."}}