Open 1sra3l opened 3 years ago
Hey, I dont prefer using this library cuz its not the only feature unavailable in the library there are many more,u could try using ggez or macroquad (or sdl2),now to your problem: u could try modifying the function to take width and height as parameters this will solve your problem
@zealouscarrot I have played with macroquad and it has some serious issues on linux (audio is a big issue) UI theming is not complete. I may look back at ggez again, but there was a reason I wanted to use this one. I suppose I could just make my own fixed version of this, but it would seem to be better if this dev was involved, and I could just PR a fix, or at least understand what the code was trying to do....
Hi, your library is indeed simple and lacks an important simple feature, being able to draw a rectangle portion of an image. Your draw_image code seems to allow setting the (x,y) of the rendering rectangle, but not the (w,h). I thought (SDL2 canvas)[https://docs.rs/sdl2/0.34.5/sdl2/render/struct.Canvas.html#method.copy] went more like:
However in your (code)[https://github.com/alexandercampbell/simple/blob/master/src/window.rs#L224] is looks like