Skip to content

Texture size not getting set properly #40

Open
@bigtunacan

Description

@bigtunacan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions