{"action":"created","issue":{"url":"https://api.github.com/repos/picoe/Eto/issues/363","labels_url":"https://api.github.com/repos/picoe/Eto/issues/363/labels{/name}","comments_url":"https://api.github.com/repos/picoe/Eto/issues/363/comments","events_url":"https://api.github.com/repos/picoe/Eto/issues/363/events","html_url":"https://github.com/picoe/Eto/issues/363","id":97478500,"number":363,"title":"[MonoMac] GridView - DrawableCell problem with several Rectangles","user":{"login":"kierepka","id":344056,"avatar_url":"https://avatars.githubusercontent.com/u/344056?v=3","gravatar_id":"","url":"https://api.github.com/users/kierepka","html_url":"https://github.com/kierepka","followers_url":"https://api.github.com/users/kierepka/followers","following_url":"https://api.github.com/users/kierepka/following{/other_user}","gists_url":"https://api.github.com/users/kierepka/gists{/gist_id}","starred_url":"https://api.github.com/users/kierepka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kierepka/subscriptions","organizations_url":"https://api.github.com/users/kierepka/orgs","repos_url":"https://api.github.com/users/kierepka/repos","events_url":"https://api.github.com/users/kierepka/events{/privacy}","received_events_url":"https://api.github.com/users/kierepka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-27T14:37:39Z","updated_at":"2015-08-14T08:37:51Z","closed_at":"2015-08-14T08:00:11Z","body":"When I try to draw multiple rectangles as part of DrawableCell only the first draws up correctly. In the same way, drawing texts are drawing in the correct way.\r\n\r\n![gridproblem](https://cloud.githubusercontent.com/assets/344056/8908680/b6cfe172-347d-11e5-9be5-8676d633efe0.png)\r\n\r\n\r\nCode which I'm using:\r\n```C#\r\nif (Platform.Supports<DrawableCell> ()) {\r\n\r\n\t\t\t\tvar drawableCell = new DrawableCell ();\r\n\t\t\t\tdrawableCell.Paint += (sender, e) => {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar m = e.Item as MyGridItem;\r\n\t\t\t\t\tif (m != null) {\r\n\t\t\t\t\t\tvar rect = e.ClipRectangle;\r\n\r\n\t\t\t\t\t\tvar txtPos = rect.TopLeft;\r\n\t\t\t\t\t\tvar colorText = AppStyle.GetTextColor (m.ColorsNames [0]);\r\n\t\t\t\t\t\tvar cc = m.Colors.Count;\r\n\t\t\t\t\t\tif (cc == 1) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\te.Graphics.FillRectangle (\r\n\t\t\t\t\t\t\t\tBrushes.Cached (m.Colors [0]), rect);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\te.Graphics.DrawRectangle (colorText, rect);\r\n\t\t\t\t\t\t\te.Graphics.DrawText (fontInGrid, \r\n\t\t\t\t\t\t\t                     colorText, \r\n\t\t\t\t\t\t\t                     txtPos, m.ColorsNames [0]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if (cc > 1) {\r\n\t\t\t\t\t\t\tfloat recWidth = rect.Width / cc;\r\n\r\n\t\t\t\t\t\t\tvar smallRect = rect;\r\n\t\t\t\t\t\t\tsmallRect.Width = recWidth;\r\n\r\n\t\t\t\t\t\t\t//Here are several boxes\t\r\n\t\t\t\t\t\t\tfor (int ci = 0; ci < cc; ci++) {\r\n\t\t\t\t\t\t\t\t//Color for text\r\n\t\t\t\t\t\t\t\tcolorText = AppStyle.GetTextColor (m.ColorsNames [ci]);\r\n\t\t\t\t\t\t\t\t//Text pos (it is ok)\r\n\t\t\t\t\t\t\t\ttxtPos.X += (recWidth * ci);\r\n\t\t\t\t\t\t\t\t//Small rect pos - it is possible something wrong?\r\n\t\t\t\t\t\t\t\tsmallRect.Left = txtPos.X;\r\n\r\n\t\t\t\t\t\t\t\tvar colorName = m.ColorsNames [ci];\r\n\t\t\t\t\t\t\t\t//Or here with colors?\r\n\t\t\t\t\t\t\t\te.Graphics.FillRectangle (\r\n\t\t\t\t\t\t\t\t\tBrushes.Cached (m.Colors [ci]), smallRect);\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te.Graphics.DrawRectangle (colorText, smallRect);\r\n\r\n\r\n\t\t\t\t\t\t\t\tif (colorName.Length > 4)\r\n\t\t\t\t\t\t\t\t\tcolorName = colorName.Substring (0, 4);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te.Graphics.DrawText (fontInGrid, \r\n\t\t\t\t\t\t\t\t                     colorText, \r\n\t\t\t\t\t\t\t\t                     txtPos, colorName);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t};"},"comment":{"url":"https://api.github.com/repos/picoe/Eto/issues/comments/131026584","html_url":"https://github.com/picoe/Eto/issues/363#issuecomment-131026584","issue_url":"https://api.github.com/repos/picoe/Eto/issues/363","id":131026584,"user":{"login":"kierepka","id":344056,"avatar_url":"https://avatars.githubusercontent.com/u/344056?v=3","gravatar_id":"","url":"https://api.github.com/users/kierepka","html_url":"https://github.com/kierepka","followers_url":"https://api.github.com/users/kierepka/followers","following_url":"https://api.github.com/users/kierepka/following{/other_user}","gists_url":"https://api.github.com/users/kierepka/gists{/gist_id}","starred_url":"https://api.github.com/users/kierepka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kierepka/subscriptions","organizations_url":"https://api.github.com/users/kierepka/orgs","repos_url":"https://api.github.com/users/kierepka/repos","events_url":"https://api.github.com/users/kierepka/events{/privacy}","received_events_url":"https://api.github.com/users/kierepka/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T08:37:51Z","updated_at":"2015-08-14T08:37:51Z","body":"Thank you :)"}}