Re: Problem using DrawFile_Render



In message <48d7eae24f.root@xxxxxxxxxxxxxxxx>
on 22 Sep 2008 Erik G wrote:

As Michael Gerbracht wrote on 22 Sep 2008:

Unfortunately I have a follow up question to DrawFile_Render. I can now
render draw files and also started to implement them inside of a wimp
window. I also played with the clipping rectangle which only renders all
objects that intersect the given rectangle. My naive understanding was
that this call will only update the screen inside the clipping rectangle.
But unfortunately it renders all objects, that cross the rectangle,
completely. This also means that objects are plotted outside the clipping
rectange and therefore outside the visible area of the given window, just
somewhere on the desktop.

If you have a propper redraw loop, which first calls Wimp_RedrawWindow
and then Wimp_GetRectangle until there are no more rectangles to be
drawn, these Wimp calls will set the graphics window to clip to the
rectangle.

This means you can call DrawFile_Render inside the loop, and the Wimp
will prevent any modification of pixels outside the rectangle being
drawn.

Just to add to this: it is true that DrawFile_Render will plot material
outside the clipping rectangle specified in R4 if it intersects with the
interior of the rectangle. This does not matter if the Draw file you are
plotting is allowed to cover the whole of your Wimp window. But if you are
wanting to limit the Draw file to part of a window, you will have to set the
graphics window yourself.

My wife had to do this in DrawPrint, for example. See
http://sinenomine.co.uk/software/ for the effect that was required.

--
Matthew Phillips
Dundee
.



Relevant Pages

  • Re: Problem using DrawFile_Render
    ... render draw files and also started to implement them inside of a wimp ... I also played with the clipping rectangle which only renders all ... But unfortunately it renders all objects, that cross the rectangle, ... rectange and therefore outside the visible area of the given window, ...
    (comp.sys.acorn.programmer)
  • Re: Problem using DrawFile_Render
    ... so ATM I do not try to plot the draw file into a window of a wimp ... Why not render the file in a Wimp window though? ...
    (comp.sys.acorn.programmer)
  • Re: Wimp_DragBox Redraws
    ... window within a redraw loop and return to the Wimp without restoring it ... program draws outside the rectangle gets clipped automatically. ...
    (comp.sys.acorn.programmer)
  • Re: how to minimize processing when repainting
    ... >>>Say an app should redraw a part of itself when, for example, it receives some ... >>>entire window to be repainted. ... But if it's a lot of work to repaint the ... >>>instead you call InvalidateRectwith only the small rectangle that needs to ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Window handles
    ... the feature isn't formally documented anywhere that I've ... > into any application linked to Dr Wimp. ... open a conventional Info window from an iconbar menu, ... Regards from Ray Favre. ...
    (comp.sys.acorn.programmer)