Hi all
I would like an image to rotate whist it is moving.
Is there a way to do this
Thanks Roy
rotate
Re: rotate
Of course you can do it (remember the rotating objects in Xmas Demo II for example, or the old rotating playing cards demos?) but - at least until the 2D graphics library that I suggested gets written - the method is entirely different for BB4W and BBCSDL, and you don't say which you are using!

Richard.
-
- Posts: 31
- Joined: Mon 02 Apr 2018, 15:48
Re: rotate
Hi Richard
I was hoping to get this demo to run on all platforms.
I will look at the demos above
Thanks Roy
I was hoping to get this demo to run on all platforms.
I will look at the demos above
Thanks Roy
Re: rotate
OK. In the absence of the proposed 2D library you will have no choice but to use a conditional test, typically of INKEY$(-256), to discover what platform it is (BB4W or BBCSDL) and execute the appropriate platform-specific code.
How important is performance (i.e. speed) to your application? Do you need support for an 'alpha channel' (e.g. a sprite with transparent regions)? Do you need scaling as well as rotation? Depending on the answers I may be able to throw together a quick-and-dirty 2D library which will allow you to make progress. The BBCSDL code is no problem - I have that - but I don't currently have functionally-equivalent BB4W code and it would have to be cobbled-together.
Richard.
-
- Posts: 31
- Joined: Mon 02 Apr 2018, 15:48
Re: rotate
Hi Richard
Regards Roy
Yes, I've done the scaling, it's just the rotating to sort.Do you need scaling as well as rotation?
Regards Roy
Re: rotate
Leaving me to guess whether you need support for an alpha channel. This is crucial, because if you don't you can use the PlgBlt API, but if you do it's going to need a much more complicated solution (such as assembler code). As you haven't answered, there's nothing I can do. Sorry.
Richard.
-
- Posts: 31
- Joined: Mon 02 Apr 2018, 15:48
Re: rotate
Sorry Richard
I do not need support for an alpha channel.
regards Roy
I do not need support for an alpha channel.
regards Roy
Re: rotate
In that case it shouldn't need anything complicated like assembler code: you could use SYS "PlgBlt" in the BB4W case and SYS "SDL_RenderCopyEx" in the BBCSDL case. Both can do rotation and scaling, but PlgBlt has no alpha (transparency) capability. Do you still need me to help with that, or is it within your skillset?
Richard.
-
- Posts: 31
- Joined: Mon 02 Apr 2018, 15:48
Re: rotate
Thanks for all help, Richard
I'll look at the links and see how I go.
Regards Roy
I'll look at the links and see how I go.
Regards Roy
-
- Posts: 3
- Joined: Wed 31 Oct 2018, 10:02
Re: rotate
Hello!
I have some problems with PlgBlt . Can anybody help me with a sample? What I need is to rotate a BMP 1280 x 1024 bit for 90 deg contra clockwise.
Thank you!
Regards
Lojze
I have some problems with PlgBlt . Can anybody help me with a sample? What I need is to rotate a BMP 1280 x 1024 bit for 90 deg contra clockwise.
Thank you!
Regards
Lojze