[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] New Ruler functions

I don't agree.

GetRulerCoord is used only by the code that is working our how to space
out the graticules on the ruler, how to draw them and how to label them.
It has no effect on redraw rectangles at all - just on coords shown to
the user within those rectangles.

It is, I admit, untested but it's just a simple extension of the code
that already modifies the displayed coords to take the user-settable
page origin into account and it seems to be doing the intended job to
me. Have you tried it?


> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx 
> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Martin Wuerthner
> Sent: 06 July 2006 12:44
> To: dev@xxxxxxxxxxxxxx
> Subject: Re: [XaraXtreme-dev] New Ruler functions
> In message <50B23B32-A1A9-469F-A183-4DA2162B7023@xxxxxxxx>
>           Phil Martin <phil@xxxxxxxx> wrote:
> > GetRulerCoord(DocRect, UserRect*)
> > Override to make rulers show coordinates in any coordinate space of 
> > the tool's choosing by converting the supplied DocRect into 
> the output 
> > UserRect. The UserRect is by default already filled in with the 
> > rectangle in standard UserCoords (simply SpreadCoords translated to 
> > UserOrigin).
> > If you override this you will need to repaint the rulers on 
> entry and 
> > exit from your tool.
> Sorry, this cannot work. The UserRect the current tool can 
> modify via this method is simply the area on screen to be 
> redrawn, so by changing this rectangle, all the tool can do 
> is prevent some part of the ruler from being redrawn. The 
> relationship between displayed ruler coordinates and the page 
> coordinates remains the same.
> Martin