{ "id": "169779", "key": "TIMOB-25280", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2021-02-11T12:14:40.000+0000", "created": "2017-09-14T14:11:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2021-02-11T12:14:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nCurrently the .toImage method for views will only work if the view is in the XAML visual tree, that is to say added to another view/window. I believe this is a limitation of the API used [rendertargetbitmap|https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.imaging.rendertargetbitmap], I think it might be possible to use [XamlRenderingBackgroundTask|https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Media.Imaging.XamlRenderingBackgroundTask] see https://stackoverflow.com/questions/29262195/rendertargetbitmap-without-putting-it-on-ui\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n width: 400,\r\n height: 400,\r\n borderRadius: 200\r\n});\r\n// win.add(view);\r\nview.toImage(function (image) {\r\n console.log('image done');\r\n console.log(image.length)\r\n});\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: Allow view.toImage to work on elements not in the XAML visual tree", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Ti SDK: 6.2.0.GA, 7.0.0.v20170906135653", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }