{ "id": "109211", "key": "TIMOB-12593", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15273", "description": "2013 Sprint 05 API", "name": "2013 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2013-03-11" }, { "id": "14815", "description": "2013 Sprint 05", "name": "2013 Sprint 05", "archived": true, "released": true, "releaseDate": "2013-03-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-02-27T19:18:15.000+0000", "created": "2013-02-05T18:45:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "iOS", "module_imageview", "module_views", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:16.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Issue\r\n\r\nUsing backgroundLeftCaps and backgroundTopCaps on views/imageviews does not have the same effect as the button. The image in imageview/view interpolates/blends the stretched region unlike a button image.\r\n\r\nh3. Steps to Reproduce\r\n\r\n1. Run the sample code here:\r\n\r\nhttp://pastie.org/private/h9rbm8ky381wvtob04ghww \r\n\r\nCopy the attached image \"testimage.png\" to Resources folder.\r\n\r\n2. Notice the output in the screenshot attached. \r\n\r\nThe button version at the top is correct, it only shows the pixels we want and it does not do any interpolation. However the view and imageview with the same \"caps\" data, blends/interpolates the stretched region. \r\n\r\nh3. Expected Output\r\n\r\nThe imageview/view should look the same as a button.", "attachment": [ { "id": "35304", "filename": "Screen Shot 2013-02-05 at 10.41.25 AM.png", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2013-02-05T18:45:54.000+0000", "size": 98681, "mimeType": "image/png" }, { "id": "35305", "filename": "testimage.png", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2013-02-05T18:45:54.000+0000", "size": 1357, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Caps not working for View/ImageView", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK: 3.0.0.GA\r\nPlatform OS: iOS 5.1", "comment": { "comments": [ { "id": "239426", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Case\n{code}\nvar win = Ti.UI.createWindow({\n backgroundColor: 'white'\n})\n\nvar scroll = Ti.UI.createScrollView({\n layout: 'vertical'\n})\nwin.add(scroll)\n\nscroll.add(createTest(20, 20, 'button'))\nscroll.add(createTest(20, 20, 'view'))\nscroll.add(createTest(20, 20, 'imageview'))\n\nwin.open()\n\n\nfunction createTest(left, top, type) {\n var img = 'testimage.png'\n \n var view = Ti.UI.createView({\n layout: 'horizontal',\n width: 300,\n height: 100,\n top: 10\n }) \n \n switch (type) {\n case 'button':\n var sub = Ti.UI.createButton({\n backgroundImage: img,\n width: 100,\n height: 100,\n backgroundLeftCap: left,\n backgroundTopCap: top\n }) \n view.add(sub)\n break\n case 'view':\n var sub = Ti.UI.createView({\n backgroundImage: img,\n width: 100,\n height: 100,\n backgroundLeftCap: left,\n backgroundTopCap: top\n })\n view.add(sub)\n break\n case 'imageview':\n var sub = Ti.UI.createImageView({\n backgroundImage: img,\n width: 100,\n height: 100,\n backgroundLeftCap: left,\n backgroundTopCap: top\n })\n view.add(sub)\n break\n }\n \n var label = Ti.UI.createLabel({\n left: 5,\n text: 'left:' + left + ' top:' + top + ' ' + type \n })\n view.add(label)\n \n return view\n}\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-22T18:57:38.000+0000", "updated": "2013-02-22T18:57:38.000+0000" }, { "id": "239427", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/3898", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-22T18:58:11.000+0000", "updated": "2013-02-22T18:58:11.000+0000" }, { "id": "241356", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with:\nTitanium Studio, build: 3.0.2.201302191606\nTitanium Studio, build: 3.1.0.v20130306185542\nDevices:\niPad mini iOS 6.0\niPhone5 iOS 6.1.2", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-08T18:09:17.000+0000", "updated": "2013-03-08T18:09:17.000+0000" }, { "id": "249030", "author": { "name": "climbd", "key": "climbd", "displayName": "Trevor Borgmeier", "active": true, "timeZone": "America/Chicago" }, "updateAuthor": { "name": "climbd", "key": "climbd", "displayName": "Trevor Borgmeier", "active": true, "timeZone": "America/Chicago" }, "created": "2013-04-25T16:36:20.000+0000", "updated": "2013-04-25T16:36:20.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }