{"action":"opened","issue":{"url":"https://api.github.com/repos/vispy/vispy/issues/1140","labels_url":"https://api.github.com/repos/vispy/vispy/issues/1140/labels{/name}","comments_url":"https://api.github.com/repos/vispy/vispy/issues/1140/comments","events_url":"https://api.github.com/repos/vispy/vispy/issues/1140/events","html_url":"https://github.com/vispy/vispy/issues/1140","id":121453409,"number":1140,"title":"Incorrect size before resizing, when using visuals","user":{"login":"mdelorme","id":2743366,"avatar_url":"https://avatars.githubusercontent.com/u/2743366?v=3","gravatar_id":"","url":"https://api.github.com/users/mdelorme","html_url":"https://github.com/mdelorme","followers_url":"https://api.github.com/users/mdelorme/followers","following_url":"https://api.github.com/users/mdelorme/following{/other_user}","gists_url":"https://api.github.com/users/mdelorme/gists{/gist_id}","starred_url":"https://api.github.com/users/mdelorme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdelorme/subscriptions","organizations_url":"https://api.github.com/users/mdelorme/orgs","repos_url":"https://api.github.com/users/mdelorme/repos","events_url":"https://api.github.com/users/mdelorme/events{/privacy}","received_events_url":"https://api.github.com/users/mdelorme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-10T10:33:34Z","updated_at":"2015-12-10T10:33:34Z","closed_at":null,"body":"Hi, \r\n\r\nI'm having a problem and can't figure if it is a bug or something I completely overlooked. When I am using visuals with a homemade subclass of SceneCanvas. In my app everything works perfectly as long as I don't use visuals. When i do, the rendering appears shrunk a lot and gets to the right size only when I resize the window. This was not happening before but I moved to the latest commit on `master`, and since then it does not seems to be working.\r\n\r\nHere is a minimal example :\r\n```python\r\nimport vispy\r\nfrom vispy import scene\r\nfrom vispy import app\r\nfrom vispy import gloo\r\nfrom vispy import visuals\r\n\r\nclass Frame(scene.SceneCanvas):\r\n    def __init__(self):\r\n        super(Frame, self).__init__(size=(800, 800))\r\n        self.unfreeze()\r\n        self.x_legend = visuals.TextVisual(u'Temperature', font_size=20., color=(1,1,1,1))\r\n        self.y_legend = visuals.TextVisual(u'Luminosity', font_size=20., color=(1,1,1,1), rotation=-90)\r\n        self.x_axis = visuals.AxisVisual(pos=((self.size[0]*0.1, self.size[1]*0.9),(self.size[0]*0.1, self.size[1]*0.1)))\r\n        self.y_axis = visuals.AxisVisual(pos=((self.size[0]*0.1, self.size[1]*0.1),(self.size[0]*0.9, self.size[1]*0.1)),tick_direction=(0.0, 1.0))\r\n\r\n\r\n    def on_resize(self, event):\r\n        self.size = event.size\r\n        gloo.set_viewport(0, 0, *self.size)\r\n        self.adjust_visuals()\r\n        \r\n\r\n    def adjust_visuals(self):\r\n        self.x_legend.pos = (self.size[0] / 2, self.size[1]*0.975)\r\n        self.y_legend.pos = (self.size[0]*0.025, self.size[1] / 2)\r\n        self.x_axis.pos = ((self.size[0]*0.075, self.size[1]*0.925),(self.size[0]*0.075, self.size[1]*0.075))\r\n        self.y_axis.pos = ((self.size[0]*0.075, self.size[1]*0.925),(self.size[0]*0.925, self.size[1]*0.925))\r\n        \r\n        self.x_legend.transforms.configure(canvas=self, viewport=(0, 0, self.size[0], self.size[1]))\r\n        self.y_legend.transforms.configure(canvas=self, viewport=(0, 0, self.size[0], self.size[1]))\r\n        self.x_axis.transforms.configure(canvas=self, viewport=(0, 0, self.size[0], self.size[1]))\r\n        self.y_axis.transforms.configure(canvas=self, viewport=(0, 0, self.size[0], self.size[1]))\r\n    \r\n    def on_draw(self, event):\r\n        gloo.clear(color=True, depth=True)\r\n\r\n        self.adjust_visuals()\r\n\r\n        self.x_legend.draw()\r\n        self.y_legend.draw()\r\n        self.x_axis.draw()\r\n        self.y_axis.draw()\r\n\r\n\r\nif __name__ == '__main__':\r\n    f = Frame()\r\n    f.show()\r\n    app.run()\r\n```\r\n\r\nHere are two images showing the problem :\r\n\r\nBefore resizing :\r\n![minimal1](https://cloud.githubusercontent.com/assets/2743366/11713064/eacafa50-9f28-11e5-9105-cb2f4fccaa00.png)\r\n\r\nAfter resizing :\r\n![minimal2](https://cloud.githubusercontent.com/assets/2743366/11713063/eaca5e38-9f28-11e5-9bad-f54e8a192394.png)\r\n\r\nThe problem appears no matter what backend I choose (I tried Pyqt4 and GLFW)\r\n\r\n\r\nI'm not entirely sure if it is a bug or something I overlooked :) So I'd be glad if you had any answer !"}}