This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Problem when a sprite leaves the screen


Problem when a sprite leaves the screen

Postby Staryon » Apr 18, 2007 @ 5:18am

Last edited by Staryon on Apr 18, 2007 @ 1:09pm, edited 1 time in total.
Staryon
pm Member
 
Posts: 33
Joined: Nov 4, 2006 @ 12:05am


Postby InexorableTash » Apr 18, 2007 @ 6:21am

Short answer: call pDestinationSurface->SetClipper( NULL ) before you do any blting and you should be set.

The default behavior is that a Blt will fail if any part of the destination rectangle is offscreen. (Basically, you've passed in invalid coordinates!)

If you set a clipper (see ), the behavior changes so that if the destination rectangle is partially outside the clipping region, the source/destination rectangles are adjusted for you.
User avatar
InexorableTash
pm Member
 
Posts: 99
Joined: Sep 13, 2002 @ 6:14am


Postby Staryon » Apr 18, 2007 @ 7:33pm

Thanks a million for your detailed answer and for explaining how it works.

I have tried your suggestion and it works great now.

Regards.
Staryon
pm Member
 
Posts: 33
Joined: Nov 4, 2006 @ 12:05am


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron