From: Mark Johnson <mrj@le...> - 2003-07-02 20:39:23
I'm a fairly new developer of VXL, but it was brought to my attention
that the current highlighting method used by vgui doesn't work that
well. Highlighted objects under both Linux and Windows (using gtk and
mfc adaptors, respectively) generally tend to have a border of color
left around them when the pointer highlights another object.
The current scheme for highlighting involves drawing a blue soview on
top of the highlighted soview, and then, when un-highlighting the
object, drawing the original object in its original color on top of the
highlight-colored object. This leads to the color bleeding mentioned
To fix this and to make things operate a little better in the
vgui_displaylist2d_tableau, I have altered that class to actually post
overlay redraw events and only draw the highlighted objects upon entry
of the mouse pointer into the region around the object. "Clearing" the
highlight is taken care of by the vgui_overlay_helper class, as it just
copies the back buffer into the window.
Unfortunately, however, the MFC adaptor does not support overlays. I
have changed it to support overlays, though, by adding code similar to
what is found in the GTK adaptor. But the overlay_helper requires double
buffering to do its job, which is turned off by default in the MFC
adaptor because of the vgui_mfc_accelerator class (which states in
comments that enabling "acceleration" and double buffering crashes
Disabling the vgui_mfc_accelerator and making sure double buffering is
enabled in the MFC adaptor fixes everything -- highlights work well, the
display code is a lot cleaner, definitions like those in
vgui_rubberband_tableau to alter the code because the MFC adaptor
doesn't support overlays become unnecessary.
So is it worth disabling the vgui_mfc_accelerator in order to have a
better highlighting mechanism? Is the mfc_accelerator necessary to a lot
of people using VXL? Or does anyone know how to make it function while
still having double-buffering enabled?
Get latest updates about Open Source Projects, Conferences and News.