Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture size not getting set properly #40

Open
bigtunacan opened this issue Jan 11, 2015 · 0 comments
Open

Texture size not getting set properly #40

bigtunacan opened this issue Jan 11, 2015 · 0 comments

Comments

@bigtunacan
Copy link

I've uploaded a basic example to github

https://github.com/bigtunacan/nature

The gist of it though is I have created an Ashton::Texture with width/height matching my Gosu::Window. When I draw directly to the Gosu::Window things will draw correctly, but if I draw to the Ashton::Texture images will be cut off in though they should be within the bounds of the texture.

In the example I have linked to if you run it you will see an image that is cut off as described.

I have something that looks like this

def initialize
  self.texture = Ashton::Texture.new 640, 480
end

then in my update

def update
  self.texture.render do
    self.img.draw(150, 0, 0)
  end
end

The image is 89 px wide, but it will be cut off even though the texture width is set to 640.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant