Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Transform image in Gosu
- - By vadim2 Date 2011-03-14 14:49
Is it possible in the engine to transform the image. I mean to change the coordinates of its vertices. Were admissible coordinates (100.100) (250.100) (250.100) (250.250), and changed into (114.100) (250.100) (250.100) (250.250)?
Parent - - By jlnr (dev) Date 2011-03-14 14:57
Image#draw_as_quad, enjoy :)
Parent - - By vadim2 Date 2011-03-14 16:32
Snx. I still need to rotate an image. How to be prompt please
Parent - - By lol_o2 Date 2011-03-14 16:46
To rotate any draw function use rotate method (window.rotate(angle) do... )
Parent - - By vadim2 Date 2011-03-14 18:15
Can you give an example code, just can not understand how it works:). I've done this:
window.rotate (60) {
@image
}
Parent - - By lol_o2 Date 2011-03-14 18:29
By window, I meant a Gosu::Window object (the one which draws etc.)

If you make a window in $window variable (for example)

$window.rotate(angle) do
...
...
end

If you want, after angle you can also type a center position (like in draw_rot with image)
rotate(angle,center_x,center_y)
Parent - - By vadim2 Date 2011-03-14 18:31
And what exactly in the dots to write:)?
Parent - By lol_o2 Date 2011-03-14 18:32
Anything you want :)
draw_quad, image.draw  etc.
Up Topic Gosu / Gosu Exchange / Transform image in Gosu

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill