views:

48

answers:

1

do u know any techniques allowing to speed up 2d primitives such as lines and circles?

i develop application that allow to edit images containing such primitives. they can be moved and selected in the same way as windows desktop icons are (including group selection by rectangle). also objects that cursor is on are highlighted.

it seems that there are many display updated involved when mouse is used. so i need to do it smartly.

i know that:

  1. changing GDI+ to D3D can speed up display greately
  2. dirty rects allow to restrict updates to only those rectangles that changed. (major drawback is that rectangles containing lines can be as big as display area)
  3. xor technique allow to clear primitive by drawing it second time. (drawback is that it seems to be useless with multicolor images and primitives with common points)

thanks for useful tips & links.

+1  A: 

Take a look at Michael Abrash's Graphics Programming Black Book

Mitch Wheat