Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2001 11:02:04 +0100
From:      Nik Clayton <nik@freebsd.org>
To:        Will Andrews <will@physics.purdue.edu>, Alexander Langer <alex@big.endian.de>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/astro/xearth/files freebsd.committers.markers
Message-ID:  <20010427110204.A10472@canyon.nothing-going-on.org>
In-Reply-To: <20010427015306.E5017@casimir.physics.purdue.edu>; from will@physics.purdue.edu on Fri, Apr 27, 2001 at 01:53:06AM -0500
References:  <200104261908.f3QJ8Lb11152@freefall.freebsd.org> <20010426162159.V5017@casimir.physics.purdue.edu> <20010427084826.A1537@cichlids.cichlids.com> <20010427015306.E5017@casimir.physics.purdue.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--VrqPEDrXMn8OVzN4
Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA"
Content-Disposition: inline


--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 27, 2001 at 01:53:06AM -0500, Will Andrews wrote:
> On Fri, Apr 27, 2001 at 08:48:26AM +0200, Alexander Langer wrote:
> > Well, that's not quite true.
> > The whole Europe/Asia area is quite readable.
> > AND:  The file is still readable.
> > I'd prefer to keep the use of this file, really.
>=20
> You missed the point, which is that at some point every area on Earth
> will be saturated with names.  Please don't bother; folks who wish to
> see who lives where can look at the markers file.  I think density of
> their area matters more than who exactly is there.
>=20
> I'm not going to promise I won't be going in and removing names from the
> map, but I dislike hacks like these.  Simply put, they don't work.

In the interests of having our cake and eating it, try the attached patch,=
=20
which adds a "-markertext" option (and associated "-nomarkertext" option)=
=20
to control whether or not markers are displayed with the associated text.

N
--=20
FreeBSD: The Power to Serve             http://www.freebsd.org/
FreeBSD Documentation Project           http://www.freebsd.org/docproj/

          --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---

--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="xearth.patch"
Content-Transfer-Encoding: quoted-printable

diff -ruN xearth/work/xearth-1.1/x11.c xearth.new/work/xearth-1.1/x11.c
--- xearth/work/xearth-1.1/x11.c	Sun Nov  7 08:01:19 1999
+++ xearth.new/work/xearth-1.1/x11.c	Fri Apr 27 10:58:32 2001
@@ -198,6 +198,8 @@
 { "-markers",     ".markers",     XrmoptionNoArg,  "on"  },
 { "-nomarkers",   ".markers",     XrmoptionNoArg,  "off" },
 { "-markerfile",  ".markerfile",  XrmoptionSepArg, 0     },
+{ "-markertext",  ".markertext",  XrmoptionNoArg,  "on"  },
+{ "-nomarkertext",".markertext",  XrmoptionNoArg,  "off" },
 { "-showmarkers", ".showmarkers", XrmoptionNoArg,  "on"  },
 { "-wait",        ".wait",        XrmoptionSepArg, 0     },
 { "-timewarp",    ".timewarp",    XrmoptionSepArg, 0     },
@@ -313,6 +315,7 @@
   do_shade        =3D get_boolean_resource("shade", "Shade");
   do_label        =3D get_boolean_resource("label", "Label");
   do_markers      =3D get_boolean_resource("markers", "Markers");
+  do_markertext   =3D get_boolean_resource("markertext", "MarkerText");
   markerfile      =3D get_string_resource("markerfile", "Markerfile");
   wait_time       =3D get_integer_resource("wait", "Wait");
   time_warp       =3D get_float_resource("timewarp", "Timewarp");
@@ -1342,7 +1345,7 @@
   XDrawArc(dpy, work_pix, gc, x-2, y-2, 4, 4, 0, 360*64);
=20
   text =3D info->label;
-  if (text !=3D NULL)
+  if ((text !=3D NULL) && do_markertext)
   {
     len =3D strlen(text);
     XTextExtents(font, text, len, &direction, &ascent, &descent, &extents);
diff -ruN xearth/work/xearth-1.1/xearth.c xearth.new/work/xearth-1.1/xearth=
.c
--- xearth/work/xearth-1.1/xearth.c	Sun Nov  7 08:10:54 1999
+++ xearth.new/work/xearth-1.1/xearth.c	Fri Apr 27 10:32:18 2001
@@ -105,6 +105,7 @@
 int      grid_small;            /* dot spacing along grids     */
 int      do_label;              /* label image                 */
 int      do_markers;            /* display markers (X only)    */
+int	 do_markertext;		/* display marker text (X only)*/
 char    *markerfile;            /* for user-spec. marker info  */
 int      wait_time;             /* wait time between redraw    */
 double   time_warp;             /* passage of time multiplier  */
@@ -457,6 +458,7 @@
   do_shade         =3D 1;
   do_label         =3D 0;
   do_markers       =3D 1;
+  do_markertext    =3D 1;
   wait_time        =3D 300;
   time_warp        =3D 1;
   day              =3D 100;
@@ -565,6 +567,15 @@
     else if (strcmp(argv[i], "-nomarkers") =3D=3D 0)
     {
       do_markers =3D 0;
+    }
+    else if (strcmp(argv[i], "-markertext") =3D=3D 0)
+    {
+      do_markertext =3D 1;
+      warning("markers not supported with GIF and PPM output");
+    }
+    else if (strcmp(argv[i], "-nomarkertext") =3D=3D 0)
+    {
+      do_markertext =3D 0;
     }
     else if (strcmp(argv[i], "-markerfile") =3D=3D 0)
     {
diff -ruN xearth/work/xearth-1.1/xearth.h xearth.new/work/xearth-1.1/xearth=
.h
--- xearth/work/xearth-1.1/xearth.h	Sun Nov  7 08:11:27 1999
+++ xearth.new/work/xearth-1.1/xearth.h	Fri Apr 27 10:35:50 2001
@@ -309,6 +309,7 @@
 extern int    grid_small;
 extern int    do_label;
 extern int    do_markers;
+extern int    do_markertext;
 extern char  *markerfile;
 extern int    wait_time;
 extern double time_warp;
diff -ruN xearth/work/xearth-1.1/xearth.man xearth.new/work/xearth-1.1/xear=
th.man
--- xearth/work/xearth-1.1/xearth.man	Sun Nov  7 08:23:06 1999
+++ xearth.new/work/xearth-1.1/xearth.man	Fri Apr 27 10:55:37 2001
@@ -35,6 +35,7 @@
 .RB [ \-markerfile
 .I file
 ]
+.RB [ \-markertext \fP|\fB -nomarkertext ]
 .RB [ \-showmarkers ]
 .RB [ \-stars \fP|\fB \-nostars ]
 .RB [ \-starfreq
@@ -371,6 +372,14 @@
 OBTAINING THE \fIXEARTH\fP SOURCE DISTRIBUTION, below).
=20
 .TP
+.B \-markertext \fP|\fB \-nomarkertext
+Enable/disable markertext.  If markers are enabled and \fIxearth\fP is
+rendering in to an X window then display the associated text from the=20
+marker file next to the marker. As the amount of markers in your marker
+file increases it can become impossible to separate the text cleanly
+between different markers.
+
+.TP
 .B \-showmarkers
 This option indicates that \fIxearth\fP should load the marker data
 (whether built-in or user-specified), print a copy of it to standard
@@ -668,6 +677,10 @@
 .B markerfile \fP(file name)
 Specify a file from which user-defined marker data (locations and
 names) should be read (see \fB\-markerfile\fP, above).
+
+.TP
+.B markertext \fP(boolean)
+Enable/disable marker text (see \fB-markertext\fP, above).
=20
 .TP
 .B stars \fP(boolean)

--AqsLC8rIMeq19msA--

--VrqPEDrXMn8OVzN4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjrpQ5sACgkQk6gHZCw343Ue7QCfSCu7nd0nfrRB0VhOXWGQCW2K
yt8An2swWdulctO9DtAiOlULlhLHx/WV
=H4/8
-----END PGP SIGNATURE-----

--VrqPEDrXMn8OVzN4--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010427110204.A10472>