Big problems with Drawing Methods. (GW.)

I'm trying to create a script similar to drawing script DTools Dview. But I'm getting bad results, because the screen has to refresh for every change made in the viewport, and all lines must be redrawn again.

Those are the sentences that refresh and clears the screen, that are giving me headaches:
gw.enlargeUpdateRect #whole
gw.updateScreen()

Any idea to draw many lines without refreshing or clearing the screen by each change I do?

Thank you

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Nysuatro's picture

I do not think there will be

I do not think there will be any problem. I hope you dont create that array every time he redraws? Because then indeed it will slow down.

If you only register a function that draws the content of the array. You will probably be fine.

rodimus111's picture

I need to draw all lines that

I need to draw all lines that are possible. The only way I can do that is to append each new line in an Array, and redraws all again. The problem I see are the limits of memory and the slowdowns after drawing too many lines.

Nysuatro's picture

You need to use these

You need to use these functions to register the funtion as a viewport callback

registerRedrawViewsCallback
unRegisterRedrawViewsCallback

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.