*** empty log message ***
authorclaus
Fri, 12 Aug 1994 01:42:03 +0200
changeset 58 721460c8fd3a
parent 57 67580ed7d733
child 59 d83c23755711
*** empty log message ***
Form.st
GLXWorkstat.st
GLXWorkstation.st
--- a/Form.st	Fri Aug 12 01:41:18 1994 +0200
+++ b/Form.st	Fri Aug 12 01:42:03 1994 +0200
@@ -26,7 +26,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Form.st,v 1.10 1994-08-05 01:14:10 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.11 1994-08-11 23:41:38 claus Exp $
 '!
 
 !Form class methodsFor:'documentation'!
@@ -47,7 +47,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/Form.st,v 1.10 1994-08-05 01:14:10 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.11 1994-08-11 23:41:38 claus Exp $
 "
 !
 
@@ -1884,7 +1884,7 @@
 !
 
 show
-    ((FormView new model:self) extent:self extent) realize
+    ((FormView new model:self) extent:self extent) open
 
     "ScrollBar scrollUpButtonForm show"
 ! !
@@ -1908,7 +1908,8 @@
     "create a new form on device, aDevice and
      initialize the pixels from the file filename;
      the data in the file is assumed to be for dpi resolution;
-     if it is different from the deisplays, magnify the picture"
+     if it is different from the displays resolution, magnify or
+     shrink the picture (but only in integer magnification steps)"
 
     ^ (self on:aDevice) readFromFile:filename resolution:dpi
 !
@@ -1922,7 +1923,8 @@
 fromFile:filename resolution:dpi
     "create a new form taking the bits from a file on the default device
      the data in the file is assumed to be for dpi resolution;
-     if it is different from the deisplays, magnify the picture"
+     if it is different from the displays resolution, magnify or
+     shrink the picture (but only in integer magnification steps)"
 
     ^ (self on:Display) readFromFile:filename resolution:dpi
 ! !
--- a/GLXWorkstat.st	Fri Aug 12 01:41:18 1994 +0200
+++ b/GLXWorkstat.st	Fri Aug 12 01:42:03 1994 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.11 1994-08-05 01:14:17 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.12 1994-08-11 23:42:03 claus Exp $
 '!
 
 %{
@@ -55,7 +55,7 @@
 #endif
 
 #ifndef NULL
-# define NULL (char *)0		/* sigh */
+# define NULL (char *)0         /* sigh */
 #endif
 
 typedef enum {
@@ -591,7 +591,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.11 1994-08-05 01:14:17 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.12 1994-08-11 23:42:03 claus Exp $
 "
 !
 
@@ -623,7 +623,7 @@
     limited argument checking - make certain, that you pass the correct
     arguments.
 
-    $Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.11 1994-08-05 01:14:17 claus Exp $
+    $Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.12 1994-08-11 23:42:03 claus Exp $
 
     written june 93 by claus
     VGL stuff dec 93
@@ -769,7 +769,7 @@
 !
 
 glxTranslateX:x y:y z:z in:aGLXWindowId
-    "translate current matrix"
+    "translate current matrix, given individual x, y and z values"
 
 %{  /* NOCONTEXT */
 
@@ -784,8 +784,23 @@
 %}
 !
 
+glxTranslate:arrayOf3Floats in:aGLXWindowId
+    "translate current matrix, given a 3-element vector"
+
+%{  /* NOCONTEXT */
+
+    float vec[3], *v;
+
+    if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false);
+
+    SETWIN(aGLXWindowId)
+    translate((Coord)(v[0]), (Coord)(v[1]), (Coord)(v[2]));
+    RETURN (true);
+%}
+!
+
 glxScaleX:x y:y z:z in:aGLXWindowId
-    "scale & mirror current matrix"
+    "scale & mirror current matrix, given individual x, y and z values"
 
 %{  /* NOCONTEXT */
 
@@ -800,8 +815,24 @@
 %}
 !
 
+glxScale:arrayOf3Floats in:aGLXWindowId
+    "scale current matrix, given a 3-element vector"
+
+%{  /* NOCONTEXT */
+
+    float vec[3], *v;
+
+    if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false);
+
+    SETWIN(aGLXWindowId)
+    scale(v[0], v[1], v[2]);
+    RETURN (true);
+%}
+!
+
 glxRotateX:angle in:aGLXWindowId
-    "rotate the current matrix on x axis"
+    "rotate the current matrix on x axis.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -813,7 +844,8 @@
 !
 
 glxRotateY:angle in:aGLXWindowId
-    "rotate the current matrix on y axis"
+    "rotate the current matrix on y axis.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -825,7 +857,8 @@
 !
 
 glxRotateZ:angle in:aGLXWindowId
-    "rotate the current matrix on z axis"
+    "rotate the current matrix on z axis.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -838,7 +871,8 @@
 
 glxRotate:angle axis:axis in:aGLXWindowId
     "rotate the current matrix around the axis given by the axis arg,
-     which must be one of the symbols: #x, #y or #z"
+     which must be one of the symbols: #x, #y or #z.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -860,7 +894,8 @@
 !
 
 glxRotateX:xAngle y:yAngle z:zAngle in:aGLXWindowId
-    "rotate the current matrix on all axis"
+    "rotate the current matrix on all axes, given individual x, y and z values.
+     The values may be floats (degrees) or integers (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -875,6 +910,24 @@
     ^ false
 !
 
+glxRotate:arrayOf3Floats in:aGLXWindowId
+    "rotate current matrix, given a 3-element vector.
+     The elements of the array must be floats (degrees)."
+
+%{  /* NOCONTEXT */
+
+    float vec[3], *v;
+
+    if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false);
+
+    SETWIN(aGLXWindowId)
+    rot(v[0], 'x');
+    rot(v[1], 'y');
+    rot(v[2], 'z');
+    RETURN (true);
+%}
+!
+
 glxLookatVx:vx vy:vy vz:vz px:px py:py pz:pz twist:twist in:aGLXWindowId
     "define viewing transformation"
 
@@ -5965,12 +6018,12 @@
     float fbuff[30];
 
     if (__isByteArray(image)) {
-	cp = _ByteArrayInstPtr(image)->ba_element;
-	fp = getFloatsFromFloatArrayInto(props, fbuff);
+        cp = _ByteArrayInstPtr(image)->ba_element;
+        fp = getFloatsFromFloatArrayInto(props, fbuff);
 
         SETWIN(aGLXWindowId)
         texdef2d(_longVal(index), _longVal(nc), _longVal(w), _longVal(h),
-	         (const unsigned long *)cp, _longVal(np), fp);
+                 (const unsigned long *)cp, _longVal(np), fp);
         RETURN (true);
     }
 #endif
@@ -6209,6 +6262,7 @@
 !
 
 glxV3f: v in: aGLXWindowId
+    "pass a vector; v must be a 3-element float-vector"
 
 %{  /* NOCONTEXT */
     float vec[3], *c_v;
@@ -6222,6 +6276,23 @@
     ^ false
 !
 
+glxVxf:x yf:y zf:z in: aGLXWindowId
+    "pass a vector from individual x, y and z values"
+
+%{  /* NOCONTEXT */
+    float vec[3];
+
+    _FLOAT_(x, vec[0])
+    _FLOAT_(y, vec[1])
+    _FLOAT_(z, vec[2])
+    SETWIN(aGLXWindowId)
+    v3f(vec);
+    RETURN (true);
+%}
+.
+    ^ false
+!
+
 glxV3d: v in: aGLXWindowId
 
 %{  /* NOCONTEXT */
--- a/GLXWorkstation.st	Fri Aug 12 01:41:18 1994 +0200
+++ b/GLXWorkstation.st	Fri Aug 12 01:42:03 1994 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.11 1994-08-05 01:14:17 claus Exp $
+$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.12 1994-08-11 23:42:03 claus Exp $
 '!
 
 %{
@@ -55,7 +55,7 @@
 #endif
 
 #ifndef NULL
-# define NULL (char *)0		/* sigh */
+# define NULL (char *)0         /* sigh */
 #endif
 
 typedef enum {
@@ -591,7 +591,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.11 1994-08-05 01:14:17 claus Exp $
+$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.12 1994-08-11 23:42:03 claus Exp $
 "
 !
 
@@ -623,7 +623,7 @@
     limited argument checking - make certain, that you pass the correct
     arguments.
 
-    $Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.11 1994-08-05 01:14:17 claus Exp $
+    $Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.12 1994-08-11 23:42:03 claus Exp $
 
     written june 93 by claus
     VGL stuff dec 93
@@ -769,7 +769,7 @@
 !
 
 glxTranslateX:x y:y z:z in:aGLXWindowId
-    "translate current matrix"
+    "translate current matrix, given individual x, y and z values"
 
 %{  /* NOCONTEXT */
 
@@ -784,8 +784,23 @@
 %}
 !
 
+glxTranslate:arrayOf3Floats in:aGLXWindowId
+    "translate current matrix, given a 3-element vector"
+
+%{  /* NOCONTEXT */
+
+    float vec[3], *v;
+
+    if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false);
+
+    SETWIN(aGLXWindowId)
+    translate((Coord)(v[0]), (Coord)(v[1]), (Coord)(v[2]));
+    RETURN (true);
+%}
+!
+
 glxScaleX:x y:y z:z in:aGLXWindowId
-    "scale & mirror current matrix"
+    "scale & mirror current matrix, given individual x, y and z values"
 
 %{  /* NOCONTEXT */
 
@@ -800,8 +815,24 @@
 %}
 !
 
+glxScale:arrayOf3Floats in:aGLXWindowId
+    "scale current matrix, given a 3-element vector"
+
+%{  /* NOCONTEXT */
+
+    float vec[3], *v;
+
+    if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false);
+
+    SETWIN(aGLXWindowId)
+    scale(v[0], v[1], v[2]);
+    RETURN (true);
+%}
+!
+
 glxRotateX:angle in:aGLXWindowId
-    "rotate the current matrix on x axis"
+    "rotate the current matrix on x axis.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -813,7 +844,8 @@
 !
 
 glxRotateY:angle in:aGLXWindowId
-    "rotate the current matrix on y axis"
+    "rotate the current matrix on y axis.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -825,7 +857,8 @@
 !
 
 glxRotateZ:angle in:aGLXWindowId
-    "rotate the current matrix on z axis"
+    "rotate the current matrix on z axis.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -838,7 +871,8 @@
 
 glxRotate:angle axis:axis in:aGLXWindowId
     "rotate the current matrix around the axis given by the axis arg,
-     which must be one of the symbols: #x, #y or #z"
+     which must be one of the symbols: #x, #y or #z.
+     The angle may be a float (degrees) or integer (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -860,7 +894,8 @@
 !
 
 glxRotateX:xAngle y:yAngle z:zAngle in:aGLXWindowId
-    "rotate the current matrix on all axis"
+    "rotate the current matrix on all axes, given individual x, y and z values.
+     The values may be floats (degrees) or integers (tenth of a degree)."
 
 %{  /* NOCONTEXT */
 
@@ -875,6 +910,24 @@
     ^ false
 !
 
+glxRotate:arrayOf3Floats in:aGLXWindowId
+    "rotate current matrix, given a 3-element vector.
+     The elements of the array must be floats (degrees)."
+
+%{  /* NOCONTEXT */
+
+    float vec[3], *v;
+
+    if (! (v = getFloatsFromInto(arrayOf3Floats, vec, 3))) RETURN(false);
+
+    SETWIN(aGLXWindowId)
+    rot(v[0], 'x');
+    rot(v[1], 'y');
+    rot(v[2], 'z');
+    RETURN (true);
+%}
+!
+
 glxLookatVx:vx vy:vy vz:vz px:px py:py pz:pz twist:twist in:aGLXWindowId
     "define viewing transformation"
 
@@ -5965,12 +6018,12 @@
     float fbuff[30];
 
     if (__isByteArray(image)) {
-	cp = _ByteArrayInstPtr(image)->ba_element;
-	fp = getFloatsFromFloatArrayInto(props, fbuff);
+        cp = _ByteArrayInstPtr(image)->ba_element;
+        fp = getFloatsFromFloatArrayInto(props, fbuff);
 
         SETWIN(aGLXWindowId)
         texdef2d(_longVal(index), _longVal(nc), _longVal(w), _longVal(h),
-	         (const unsigned long *)cp, _longVal(np), fp);
+                 (const unsigned long *)cp, _longVal(np), fp);
         RETURN (true);
     }
 #endif
@@ -6209,6 +6262,7 @@
 !
 
 glxV3f: v in: aGLXWindowId
+    "pass a vector; v must be a 3-element float-vector"
 
 %{  /* NOCONTEXT */
     float vec[3], *c_v;
@@ -6222,6 +6276,23 @@
     ^ false
 !
 
+glxVxf:x yf:y zf:z in: aGLXWindowId
+    "pass a vector from individual x, y and z values"
+
+%{  /* NOCONTEXT */
+    float vec[3];
+
+    _FLOAT_(x, vec[0])
+    _FLOAT_(y, vec[1])
+    _FLOAT_(z, vec[2])
+    SETWIN(aGLXWindowId)
+    v3f(vec);
+    RETURN (true);
+%}
+.
+    ^ false
+!
+
 glxV3d: v in: aGLXWindowId
 
 %{  /* NOCONTEXT */