[Kst] extragear/graphics/kst/src/libkstmath

Andrew Walker arwalker at sumusltd.com
Fri Jun 2 19:00:08 CEST 2006


With about a dozen plots in front of me it is pretty clear that using 2000
gives lines that are too narrow. A width of 0 or 1 is too narrow, and is
hard to distinguish from a width of 2.

The value of 2000 doesn't seem correct from a theoretical viewpoint either.
The value should be approximately (8+11)*72 (i.e. 1400). Assuming a
reasonable margin this will drop to 1200. This value gives reasonable
results as well.

Obviously this becomes a matter of opinion at some point, but I think its
clear that 2000 is too high.

Andrew

-----Original Message-----
From: barth.netterfield at utoronto.ca
[mailto:barth.netterfield at utoronto.ca]
Sent: Friday, June 02, 2006 8:50 AM
To: kst at kde.org
Subject: Re: [Kst] extragear/graphics/kst/src/libkstmath


So am I right in concluding that you have just increased line widths by
2000/800 in all cases?

If so, I am curious to know the motivation for this.  Was line with = 2 not
a
~2pt line when printed?  Or was it desired to not be able to make a 2pt wide
line?

Quoting Andrew Walker <arwalker at sumusltd.com>:

> From trial and error to give the best output when printing.
>
> -----Original Message-----
> From: George Staikos [mailto:staikos at kde.org]
> Sent: Friday, June 02, 2006 5:43 AM
> To: kst at kde.org
> Subject: Re: [Kst] extragear/graphics/kst/src/libkstmath
>
>
> On Thursday 01 June 2006 12:00, Andrew Walker wrote:
>
> >  int KstPainter::lineWidthAdjustmentFactor() const {
> > -  const QRect& w(window());
> > -  /* For square windows, the line width is in units of 0.1% of window
> size
> > */ -  /* For printing to Letter or A10, line width is ~in points */
> > -  const int factor = (w.width() + w.height()) / 2000;
> > +  int factor = 1;
> > +
> > +  if (type() == P_PRINT || type() == P_EXPORT) {
> > +    const QRect& w(window());
> > +
> > +    factor = (w.width() + w.height()) / 800;
>
>    Where does this number come from?  The previous algorithm was
> documented,
> and was even explicitly documented:
>
> ------------------------------------------------------------------------
> r520834 | staikos | 2006-03-20 17:58:11 -0500 (Mon, 20 Mar 2006) | 2 lines
>
> document the magic number and increment it by one
>
>
>    Please document the new approach.  Thanks.
>
> --
> George Staikos
> KDE Developer				http://www.kde.org/
> Staikos Computing Services Inc.		http://www.staikos.net/
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>


_______________________________________________
Kst mailing list
Kst at kde.org
https://mail.kde.org/mailman/listinfo/kst



More information about the Kst mailing list