From 5521e8e958aab1ebe2fa063b01886b8741401329 Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Tue, 11 Feb 2003 08:50:22 +0000 Subject: [PATCH] * doc/groff.texinfo: Improve documentation of `ad'. Document that \D'f...' is dependent on the horizontal resolution. * man/groff_diff.man: Improve documentation of \D'f...'. * src/preproc/grn/hgraph.cc (HGPrintElt) : Don't emit compensating \h'...' for \D'f ...' since the latter no longer moves current position. * src/preproc/pic/troff.cc (troff_output::set_fill): Ditto. --- ChangeLog | 7 +++++++ doc/groff.texinfo | 18 ++++++++++++++++-- man/groff_diff.man | 12 ++++++++++-- man/groff_font.man | 8 ++++---- src/preproc/grn/hgraph.cc | 4 +--- src/preproc/pic/troff.cc | 4 ++-- 6 files changed, 40 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fb3537c..624b5ac6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ 2003-02-11 Werner LEMBERG * doc/groff.texinfo: Improve documentation of `ad'. + Document that \D'f...' is dependent on the horizontal resolution. + * man/groff_diff.man: Improve documentation of \D'f...'. + + * src/preproc/grn/hgraph.cc (HGPrintElt) : Don't emit + compensating \h'...' for \D'f ...' since the latter no longer moves + current position. + * src/preproc/pic/troff.cc (troff_output::set_fill): Ditto. 2003-02-10 Werner LEMBERG diff --git a/doc/groff.texinfo b/doc/groff.texinfo index 8e9fe7c0..dbd4a792 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -10554,6 +10554,12 @@ correspond to intermediate shades of gray. This applies only to solid circles, solid ellipses, and solid polygons. By default, a level of 1000 is used. +@cindex @w{@code{\D'f @dots{}'}} and horizontal resolution +Don't use this command! It has the serious drawback that it will be +always rounded to the next integer multiple of the horizontal resolution +(the value of the @code{hor} keyword in the @file{DESC} file). Use +@code{\M} with a gray value instead (@pxref{Colors}). + @item \D'p @var{dx1} @var{dy1} @var{dx2} @var{dy2} @dots{}' @cindex drawing a polygon (@w{@code{\D'p @dots{}'}}) @cindex polygon, drawing (@w{@code{\D'p @dots{}'}}) @@ -14162,15 +14168,23 @@ order of the lines is not important. @table @code @item res @var{n} @kindex res +@cindex device resolution +@cindex resolution, device There are @var{n}@tie{}machine units per inch. @item hor @var{n} @kindex hor -The horizontal resolution is @var{n}@tie{}machine units. +@cindex horizontal resolution +@cindex resolution, horizontal +The horizontal resolution is @var{n}@tie{}machine units. All horizontal +quantities are rounded to be multiples of this value. @item vert @var{n} @kindex vert -The vertical resolution is @var{n}@tie{}machine units. +@cindex vertical resolution +@cindex resolution, vertical +The vertical resolution is @var{n}@tie{}machine units. All vertical +quantities are rounded to be multiples of this value. @item sizescale @var{n} @kindex sizescale diff --git a/man/groff_diff.man b/man/groff_diff.man index 712a9384..f34e3522 100644 --- a/man/groff_diff.man +++ b/man/groff_diff.man @@ -3,7 +3,7 @@ .ig groff_diff.man -Last update : 29 Jan 2003 +Last update : 10 Feb 2003 This file is part of groff, the GNU roff type-setting system. It is the source of the man-page groff_diff(7). @@ -3183,6 +3183,13 @@ text. Normally this will be black, but some drivers may provide a way of changing this. . +.IP +The corresponding +.BI \[rs]D'f .\|.\|. ' +command shouldn't be used since its argument is always rounded to an +integer multiple of the horizontal resolution which can lead to +surprising results. +. .TP .Text \f[B]DC \f[I]d\f[R]\*[ic]\[rs]n Draw a solid circle with a diameter of @@ -3313,7 +3320,8 @@ Note that .B Df is now mapped onto .BR DFg . -The current position isn't changed by those colour commands. +The current position isn't changed by those colour commands (including +.BR Df ). . . .\" -------------------------------------------------------------------- diff --git a/man/groff_font.man b/man/groff_font.man index 07fe520e..72fcbb8d 100644 --- a/man/groff_font.man +++ b/man/groff_font.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1989-1995, 2001, 2002, 2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -286,10 +286,10 @@ and .B sizes lines are compulsory. . -Other commands are ignored by +Not all commands in the DESC file are used by .B troff -but may be used by postprocessors to store arbitrary information -about the device in the DESC file. +itself; some of the keywords (or even additional ones) are used by +postprocessors to store arbitrary information about the device. . .LP Here a list of obsolete keywords which are recognized by diff --git a/src/preproc/grn/hgraph.cc b/src/preproc/grn/hgraph.cc index d307faa5..869b81c8 100644 --- a/src/preproc/grn/hgraph.cc +++ b/src/preproc/grn/hgraph.cc @@ -215,9 +215,7 @@ HGPrintElt(ELT *element, break; if (graylevel > NSTIPPLES) graylevel = NSTIPPLES; - printf("\\h'-%du'\\D'f %du'", - stipple_index[graylevel], - stipple_index[graylevel]); + printf("\\D'f %du'", stipple_index[graylevel]) cr(); tmove(p1); printf("\\D'%c", command); diff --git a/src/preproc/pic/troff.cc b/src/preproc/pic/troff.cc index 7ee7293f..087e43e4 100644 --- a/src/preproc/pic/troff.cc +++ b/src/preproc/pic/troff.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -478,7 +478,7 @@ void troff_output::line_thickness(double p) void troff_output::set_fill(double f) { if (driver_extension_flag && f != last_fill) { - printf("\\D'f %du'\\h'%du'\n.sp -1\n", int(f*FILL_MAX), -int(f*FILL_MAX)); + printf("\\D'f %du'\n.sp -1\n", int(f*FILL_MAX)); last_fill = f; } if (last_filled) { -- 2.11.4.GIT