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

What is the advantage of using SetClipper function?


What is the advantage of using SetClipper function?

Postby elevenseventeen » Jul 10, 2006 @ 2:34am

Does SetClipper() function make drawing theoretically faster? For example, since Gapi would no longer need to draw bitmaps, etc that are outside the clipper rect, does this result in a speed improvement overall. If not, what is the reason of SetClipper()? Just trying to understand its purpose.

Thank you!
elevenseventeen
pm Member
 
Posts: 13
Joined: Jul 7, 2006 @ 4:29pm


Postby InexorableTash » Jul 11, 2006 @ 6:41am

If you don't use SetClipper and try to draw outside of the surface boundaries you'll get an error and nothing will be drawn. With SetClipper the parts inside the clipping region will be drawn and you won't get an error.

Having clipping regions be optional appears to be mostly historical; GapiDraw didn't initially have them. If you're doing your own clipping or precise rendering logic it can be instructive to have failures rather than silent mis-behavior of code during development.

Being able to change clipping regions is really cool, though - consider rendering within a "frame" that's smaller than the surface itself.
User avatar
InexorableTash
pm Member
 
Posts: 99
Joined: Sep 13, 2002 @ 6:14am


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