[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Julian

12/1/2004 1:57:00 PM

Hi all, I'm well into my CAD program and am a bit concerned with performance
when drawing rubber band effects.

After much pondering in the early days I went for redrawing every
Element/Primitive in my Collection during the mouse move event.
This works well up to approx 10,000 Elements/Primitives after which there is
a noticeable jerkiness during the rubber band effect. I've done some quick
tests with passing a region to the Invalidate method, but I don't think that
this will give the performance required.
I'm reluctant to move away from managed code (using XOR mode etc), so I
guess my question is what is your experience is in this area with GDI+ and
what can be done, if anything, to elevate this problem?


Thank you

Julian


20 Answers

wansch

12/7/2004 2:07:00 PM

0

Hi,

My experience in this is the same.
So that will not help.
I posted a question similar to this "Selection of primitives" on 12.03.2004
here.



"Julian" wrote:

> Hi all, I'm well into my CAD program and am a bit concerned with performance
> when drawing rubber band effects.
>
> After much pondering in the early days I went for redrawing every
> Element/Primitive in my Collection during the mouse move event.
> This works well up to approx 10,000 Elements/Primitives after which there is
> a noticeable jerkiness during the rubber band effect. I've done some quick
> tests with passing a region to the Invalidate method, but I don't think that
> this will give the performance required.
> I'm reluctant to move away from managed code (using XOR mode etc), so I
> guess my question is what is your experience is in this area with GDI+ and
> what can be done, if anything, to elevate this problem?
>
>
> Thank you
>
> Julian
>
>
>

Julian

12/10/2004 2:14:00 PM

0

Hi, I guess we are at the limitation of managed GDI+, I plan to investigate
vg.net, when I get time, this may be a solution:

http://www.vgd...

Let me know what you think

Julian


wansch <wansch@discussions.microsoft.com> wrote in message
news:250BEBD0-2362-4751-A567-64B2FAC0D421@microsoft.com...
> Hi,
>
> My experience in this is the same.
> So that will not help.
> I posted a question similar to this "Selection of primitives" on
12.03.2004
> here.
>
>
>
> "Julian" wrote:
>
> > Hi all, I'm well into my CAD program and am a bit concerned with
performance
> > when drawing rubber band effects.
> >
> > After much pondering in the early days I went for redrawing every
> > Element/Primitive in my Collection during the mouse move event.
> > This works well up to approx 10,000 Elements/Primitives after which
there is
> > a noticeable jerkiness during the rubber band effect. I've done some
quick
> > tests with passing a region to the Invalidate method, but I don't think
that
> > this will give the performance required.
> > I'm reluctant to move away from managed code (using XOR mode etc), so I
> > guess my question is what is your experience is in this area with GDI+
and
> > what can be done, if anything, to elevate this problem?
> >
> >
> > Thank you
> >
> > Julian
> >
> >
> >


Frank Hileman

12/10/2004 4:01:00 PM

0

You may also be interested in the MicroDesigner we are working on -- an
extensible framework for custom designers such as yours. You can read about
that or join the design group in the forums.

Regards,
Frank Hileman

check out VG.net: http://www.vg...
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

"Julian" <supertramp1963@yahoo.co.uk> wrote in message
news:uFK$CHs3EHA.2012@TK2MSFTNGP15.phx.gbl...
> Hi, I guess we are at the limitation of managed GDI+, I plan to
> investigate
> vg.net, when I get time, this may be a solution:
>
> http://www.vg.../
>
> Let me know what you think
>
> Julian
>
>
> wansch <wansch@discussions.microsoft.com> wrote in message
> news:250BEBD0-2362-4751-A567-64B2FAC0D421@microsoft.com...
>> Hi,
>>
>> My experience in this is the same.
>> So that will not help.
>> I posted a question similar to this "Selection of primitives" on
> 12.03.2004
>> here.
>>
>>
>>
>> "Julian" wrote:
>>
>> > Hi all, I'm well into my CAD program and am a bit concerned with
> performance
>> > when drawing rubber band effects.
>> >
>> > After much pondering in the early days I went for redrawing every
>> > Element/Primitive in my Collection during the mouse move event.
>> > This works well up to approx 10,000 Elements/Primitives after which
> there is
>> > a noticeable jerkiness during the rubber band effect. I've done some
> quick
>> > tests with passing a region to the Invalidate method, but I don't think
> that
>> > this will give the performance required.
>> > I'm reluctant to move away from managed code (using XOR mode etc), so I
>> > guess my question is what is your experience is in this area with GDI+
> and
>> > what can be done, if anything, to elevate this problem?
>> >
>> >
>> > Thank you
>> >
>> > Julian
>> >
>> >
>> >
>
>


jeff

12/11/2004 4:11:00 AM

0

If you are open to a comercial .NET component
that may meet your needs for CAD style application
you may want to look at our MetaDraw component
Www.Bennet-Tec.com/MetaDraw.htm

* * Please include a copy of this message with your reply

Jeff Bennett
Jeff@Bennet-Tec.Com

* Bennet-Tec Information Systems, Inc
* 50 Jericho Tpk, Jericho, NY 11753
* Phone 516 997 5596, Fax - 5597
* RELIABLE Components Make You Look Sharp!
* TList/Pro * ALLText HT/Pro * MetaDraw *
* Custom Software Development Services Too.
* WWW.Bennet-Tec.Com

=================== ===================

Dec 10 -
> I guess we are at the limitation of managed GDI+,


Dec 1 -
> Hi all, I'm well into my CAD program and am a bit
> concerned with performance when drawing rubber band effects.
>
>
> After much pondering in the early days I went for redrawing
every
> Element/Primitive in my Collection during the mouse move event.
> This works well up to approx 10,000 Elements/Primitives after
which there is
> a noticeable jerkiness during the rubber band effect. I've done
some quick
> tests with passing a region to the Invalidate method, but I
don't think that
> this will give the performance required.
> I'm reluctant to move away from managed code (using XOR mode
etc), so I
> guess my question is what is your experience is in this area
with GDI+ and
> what can be done, if anything, to elevate this problem?

Gerald Myroup

12/22/2004 7:28:00 PM

0

Was wondering if you ever found a solution to your rubberband issue.
Also, if you don't mind talking about it, what type of CAD program are
you creating?





*** Sent via Developersdex http://www.develop... ***
Don't just participate in USENET...get rewarded for it!

Julian

1/6/2005 5:13:00 PM

0

Hi Gerald, I have not had much time to investigate this issue, as I'm up to
my elbows in offsetting algorithms at the moment!

But it is an issue that worries me, are you facing the same problems?

My CAD system is actually a CAM system for CNC machine tools, but it shares
many CAD features








Gerald Myroup <gmyroup@pointmedical.com> wrote in message
news:#bc#mxF6EHA.3820@TK2MSFTNGP11.phx.gbl...
> Was wondering if you ever found a solution to your rubberband issue.
> Also, if you don't mind talking about it, what type of CAD program are
> you creating?
>
>
>
>
>
> *** Sent via Developersdex http://www.develop... ***
> Don't just participate in USENET...get rewarded for it!


Gerald Hernandez

1/6/2005 5:40:00 PM

0


"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.



Sean Hederman

1/6/2005 6:17:00 PM

0

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.
>
>
>


Julian

1/7/2005 12:21:00 PM

0

Hi Gerald, I had been mulling over the same concept in my head. It defiantly
has potential, but there are some areas that it won't work, for me anyway.
Namely dynamic Zooming, this will obviously require complete re rendering of
all elements plus another feature that requires dynamic colour changes.
But for rubber banding, dynamic panning etc I don't see why it should not
work, I found this example:

http://www.vb-helper.com/howto_net_rubberband...


The rubber band does flash a little, but that easily addressed.

I will do some testing


Julian


_ G O D _

8/25/2011 6:25:00 PM

0

"The Revd" <peeling@degenerate.Grik> wrote
news:o00d57hbcle44ar7377o3dlojcpqifcpcs@4ax.com...
> "_ G O D _" wrote:
> news:27v5q.123937$eG6.5076@newsfe09.iad...
>>Tiny Israel is the ultimate rape victim....
>>Israel is like the rape victim who never receives justice from
>>a series of biased judges. But it is now even worse for the
>>embattled Jewish state. The most hostile anti-Israel President,
>>Barack Hussein Obama, and a State Department....
>><http://www.renewamerica.com/columns/sharpe/...
>>See all stories on this topic:
>><http://news.google.ca/news/story?ncl=http://www.renewamerica.com/columns/sharpe/110825&hl=en&...
>
> Do you have a problem with a US President being anti-'Israel'?
>


It is not my problem, because I'm against the completely
corrupt and criminal judicial system as well as predatory
incarceration industry that perpetuate its gulag economy....
--
_____________________________________________________
http://www.un.org/en/documents/udhr/i...
I intend to last long enough to put out of business all COck-suckers
and other beneficiaries of the institutionalized slavery and genocide.
------------------------------------------------------------------------------------------
"The army that will defeat terrorism doesn't wear uniforms, or drive
Humvees, or calls in air-strikes. It doesn't have a high command, or
high security, or a high budget. The army that can defeat terrorism
does battle quietly, clearing minefields and vaccinating children. It
undermines military dictatorships and military lobbyists. It subverts
sweatshops and special interests.Where people feel powerless, it
helps them organize for change, and where people are powerful, it
reminds them of their responsibility." ~~~~ Author Unknown ~~~~
___________________________________________________
--