G
Guest
Hello,
I try to write a small controll, where you can move around other controls on
a panel with the mouse. The controls can be connected by lines wich are drawn
on the panel surface. I have solved this with overriding MouseDown and
MouseMove events of the panel.
So drawing is done during the MouseMove event, when there about 10 controls
connected by lines on the panel, the performance is very bad. I tried
different invalidation concepts but none realy was good. When I invalidate
the hole panel (region) all lines are redrawn, wich is ok when there are many
lines. But moving a single control and line, this concept is bad. When I
invalidate only those line areas wich move the performance is ok when I move
one control and line, but it suffers performance when I move many lines.
My question is?
Is it good idea to solve moving graphics at runtime with gdi+ or is it
better to use Direct3D. Or is there a common pattern to solve such problems?
Thanks for help.
I try to write a small controll, where you can move around other controls on
a panel with the mouse. The controls can be connected by lines wich are drawn
on the panel surface. I have solved this with overriding MouseDown and
MouseMove events of the panel.
So drawing is done during the MouseMove event, when there about 10 controls
connected by lines on the panel, the performance is very bad. I tried
different invalidation concepts but none realy was good. When I invalidate
the hole panel (region) all lines are redrawn, wich is ok when there are many
lines. But moving a single control and line, this concept is bad. When I
invalidate only those line areas wich move the performance is ok when I move
one control and line, but it suffers performance when I move many lines.
My question is?
Is it good idea to solve moving graphics at runtime with gdi+ or is it
better to use Direct3D. Or is there a common pattern to solve such problems?
Thanks for help.