Sean Hederman
1/6/2005 6:17:00 PM
Not with a CAD system, but I wrote a workflow designer at my previous
company that included rubber banding. The workflow shapes were drawn onto a
bitmap when they changed. We then drew the background (page and guide
lines), blitted the workflow shapes on top, and then drew the rubber bands.
Exactly as you suggested.
We used the following styles (Control.SetStyle called in OnHandleCreated):
AllPaintingInWmPaint, DoubleBuffer, and UserPaint
"Gerald Hernandez" <Cablewizard@spam_remove@Yahoo.com> wrote in message
news:%236TC2cB9EHA.3236@TK2MSFTNGP15.phx.gbl...
>
> "news.microsoft.com" <supertramp1963@yahoo.co.uk> wrote in message
> news:eQmF$IB9EHA.2112@TK2MSFTNGP14.phx.gbl...
>><SNIP>
>> my elbows in offsetting algorithms at the moment!
> <SNIP>
>
> If you need help in this area, maybe start another thread and I'll see if
> I
> can help.
>
> In regards to the rubberband effect, this is something I am considering
> doing...
> Keep a rendered copy of your current bitmap in memory as a back buffer.
> Then draw your rubber band over the top of the image.
> As the dynamic changes, redraw the underlying bitmap, then draw the new
> dynamic again.
> This would save you the hassle of having to re-render the other elements
> as
> they will remain static as long as your view extents don't change.
> So instead of re-rendering 10,000 elements, you only render the 1 dynamic.
> I have absolutely no idea how this will perform as I haven't actually
> tested
> it, and am probably months away from dealing with a presentation layer.
> However, it does have a couple of advantages over XOR.
> Using this method, you can make the dynamic any color(s) and/or stroke
> styles you want.
> XOR is limited to, well, XOR'ing your existing colors. Plus if you use the
> GDI+ built-in methods, you have only a couple choices of stroke styles.
>
> If someone else has already tried this method, could you share your
> results?
>
> Gerald H.
>
>
>