Which better: BitBltMasked() or draw circle with DrawEllipse
Login to reply to this topic.
Thu, 2004-10-28 10:36
Joined: 2004-05-21
Forum posts: 114
Hello
I need show many circles in screen. What you recommend to use:
1.   Load image from x.mbm and show it with BitBltMasked();
2.   Or draw circles with DrawEllipse();

Thanks in advance!

Ramunas J.


Thu, 2004-10-28 15:06
Joined: 2004-05-24
Forum posts: 982
Quote from: ramis55
Hello
I need show many circles in screen. What you recommend to use:
1.   Load image from x.mbm and show it with BitBltMasked();
2.   Or draw circles with DrawEllipse();

Thanks in advance!

BitBltMasked is faster

pirosl

Sat, 2004-11-06 22:13
Joined: 2003-10-08
Forum posts: 106
Huh: Are you sure, pirosl? My own personal experience seems to show that BitBltMasked() is quite slow compared to most other Graphics Context methods. Plus DrawEllipse() is a basic primitive so it's algorithm must be optimised! (hopefully  Wink ). Mebbe you shud run some simple profiling tests to check in your particular scenario, ramis55.

Regards,
Varun

Wed, 2008-08-13 11:56
Joined: 2007-01-17
Forum posts: 101

BitBltMaksed is used to draw images , DrawEllipse() would be more Apt. Saves having to load an image.


Shashi Kiran G M

Thu, 2008-08-21 01:41
Joined: 2003-01-14
Forum posts: 2133

Or DrawEllipse() into a bitmap gc and then bitblt the resulting bitmap...


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Thu, 2008-09-04 03:52
Joined: 2008-09-04
Forum posts: 1

I notice that when I use BitBlt outside of the dimensions of the HBITMAP associated with the HDC, it seems to cut off correctly without crashing the application. Is BitBlt actually that smart, that I can blit at -20 -20 if I want to clip the source.
-----------------
Stellathomas

Wed, 2008-09-24 11:21
Joined: 2004-11-29
Forum posts: 1419

Stellathomas:
HBITMAP, HDC? sounds like windows programming to me Smiling

But yes, BitBlt supports clipping.

Not only can you draw your bitmap at negative coordinates, also you can set a clipping region through calling SetClippingRegion.

That will clip your bitmap not only against a square clip area but against an arbitrarily formed region.


copyright 2003-2009 NewLC SARL