PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Rotation/scaling a clippered surface?

Hi all,

My image surface is clippered and using BltFast to show (has to be BltFast cuz it enables negative positioning), does it mean that I can't do any rotation/scaling with this surface at the same time?

I've tried makng 2 copies of the image surface, clipper the upper one and show it using BltFast, then scaling the bottom layer using Blt as follow ..

//setting clipper and stick an image on this surface
m_bottomSurface.SetClipper(&some;_rect);
m_bottomSurface.BltFast(0, -100, &m;_topSurface, NULL, NULL, NULL);

//show everything
pBackbuffer->BltFast(0, y_pos, &m;_bottomSurface, NULL, NULL, NULL);

Sounded alright to me but it didn't work, i got a black sreen :(

Any suggestions would be appreciated!
There were issues related to clipping in previous versions of GapiDraw. Are you using GapiDraw 3.0?
yea that's right johan, im using 3.00. is it better for me to use 3.01?

and i have done sth like this and its getting better .... only that its giving me both the original and scaled image all on one screen

//setclipper
RECT rect = {0, 0, 240, 320};
m_pDisplay->GetBackBuffer()->SetClipper(▭);

//stick m_top onto m_bottom with scaling
m_bottom.CreateSurface(&m;_top);

m_top.Blt(NULL, &m;_iconlist, NULL,
GDBLT_KEYSRC |
GDBLT_ROTATIONANGLE |
GDBLT_ROTATIONSCALE,
&bltfx;);

//show m_bottom on the screen
pBackbuffer->BltFast(0, y_pos, &m;_bottom, NULL, NULL, NULL);

... so thats what i got at the moment ... my goal is to show only the scaled image on the screen... *keep trying* :)
Sorry, no idea. :( Keep on trying... There are no known bugs in 3.0 so you can continue with that version!
Okie thanks johan ^_^