Angus Leeming wrote:
On Thursday 24 October 2002 12:56 pm, Rob Lahaye wrote:Now I think of it, we may better use "scale = -1" (or any negative value) to indicate the use of width/height. Checking "scale < 0" is safer than checking "scale == 0.0", isn't it?Nah. What we have is fine. If implemented correctly.
Angus, I don't like the way "scale == 0.0" is implemented now: lyx::float_equal(igp.scale, 0.0, 0.05) I still prefer using positive value for scaling, otherwise width/height. Advantages with this are: 1) The scale equal zero comparison is only at one single spot in the code, in FormGraphics::apply(). 2) "igp.scale > 0", is less typing than lyx::float_equal(...). That also improves readability. 3) "If implemented correctly" is still tricky, "> 0" is not. So, I suggest to consider the attached patch. And, argh, there's a bug with the input filters for lyxscale and scale. Also fixed in present patch. Regards, Rob.
FloatScale.diff.gz
Description: application/gzip