Re: Windows vertical retrace

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:
> 
> ags wrote:
> 
> > One question though.. why is there no non-erasing equivalent for paintRect?
> 
> Because nobody asked for it.
> 
> }}}
<eucode>
> global procedure redrawRect( integer id, integer x1, integer y1, integer x2,
> integer y2 )
> 
>     -- Redraws only a portion of the window
>     atom hWnd
>     atom rect
> 
>     -- Allocate rectangle
>     rect = w32acquire_mem( 0, SIZEOF_RECT )
>     poke4(rect, {x1,y1,x2,y2})
> 
>     hWnd = getHandle( id )
> 
>     -- invalidate sub-window of the current window
>     if w32Func( xInvalidateRect, {hWnd, rect, 0} ) then
>         VOID = w32Func(xSendMessage,{hWnd, WM_PAINT, 0, 0 })
>     end if
> 
>     -- Free the rectangle structure
>     w32release_mem( rect )
> 
> end procedure
> 
> </eucode>
{{{

> -- 
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell

smile

This works well.  Though with rapidly updating graphics it still seems better to
repaint everything at once.

Thanks
Gary

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu