X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fgltext.c;h=43d50fb9649b45d2bfe2e31c1eee42d5bef3dcc9;hp=070a4e33d49d10c67561fb3d9f18d20bdcf6c11a;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/glx/gltext.c b/hacks/glx/gltext.c index 070a4e33..43d50fb9 100644 --- a/hacks/glx/gltext.c +++ b/hacks/glx/gltext.c @@ -1,4 +1,4 @@ -/* gltext, Copyright (c) 2001-2008 Jamie Zawinski +/* gltext, Copyright (c) 2001-2012 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -30,6 +30,7 @@ #include "xlockmore.h" #include "colors.h" #include "tube.h" +#include "sphere.h" #include "rotator.h" #include "gltrackball.h" #include "textclient.h" @@ -233,6 +234,10 @@ parse_text (ModeInfo *mi) # if defined(_AIX) sprintf(tp->text, "%s\n%s %s.%s", uts.nodename, uts.sysname, uts.version, uts.release); +# elif defined(USE_IPHONE) + /* "My iPhone\n iPhone4,1\n Darwin 11.0.0" */ + sprintf(tp->text, "%s\n%s\n%s %s", + uts.nodename, uts.machine, uts.sysname, uts.release); # elif defined(__APPLE__) /* MacOS X + XDarwin */ { const char *file = @@ -444,14 +449,26 @@ fill_character (GLUTstrokeFont font, int c, Bool wire, int *polysP) # else int smooth = False; # endif + if (j != stroke->num_coords) *polysP += tube (lx, ly, 0, coord->x, coord->y, 0, tube_width, tube_width * 0.15, - TUBE_FACES, smooth, True, wire); + TUBE_FACES, smooth, False, wire); lx = coord->x; ly = coord->y; + + /* Put a sphere at the endpoint of every line segment. Wasteful + on curves like "0" but necessary on corners like "4". */ + if (! wire) + { + glPushMatrix(); + glTranslatef (lx, ly, 0); + glScalef (tube_width, tube_width, tube_width); + *polysP += unit_sphere (TUBE_FACES, TUBE_FACES, wire); + glPopMatrix(); + } } } return (int) (ch->right + tube_width); @@ -586,6 +603,7 @@ draw_text (ModeInfo *mi) glPushMatrix (); glScalef(1.1, 1.1, 1.1); + glRotatef(current_device_rotation(), 0, 0, 1); { double x, y, z; @@ -595,7 +613,6 @@ draw_text (ModeInfo *mi) (z - 0.5) * 8); gltrackball_rotate (tp->trackball); - glRotatef(current_device_rotation(), 0, 0, 1); if (face_front_p) {