Doxygen Source Code Documentation
phline.c File Reference
#include "f2c.h"
Go to the source code of this file.
Defines | |
#define | zzdash_1 zzdash_ |
Functions | |
int | phline_ (real *x1, real *y1, real *x2, real *y2) |
Variables | |
struct { | |
integer ndash | |
real xldash [8] | |
real xid | |
} | zzdash_ |
Define Documentation
|
Definition at line 15 of file phline.c. Referenced by phline_(). |
Function Documentation
|
Definition at line 20 of file phline.c. References dabs, x2, y1, zzdash_1, and zzphph_(). Referenced by plotpak_phline(), and zzline_().
00021 { 00022 /* System generated locals */ 00023 real r__1, r__2; 00024 00025 /* Local variables */ 00026 static real xleft; 00027 static integer id; 00028 static real dx1, dy1, dx2, dy2, dx3, dy3; 00029 extern /* Subroutine */ int zzphph_(real *, real *, real *, real *); 00030 static real fac, xyl; 00031 00032 00033 /* Draw a dashed line between 2 internal coordinate points; */ 00034 /* replaces old PHLINE, which is now renamed ZZPHPH */ 00035 00036 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00037 */ 00038 00039 dx1 = *x1; 00040 dy1 = *y1; 00041 dx2 = *x2; 00042 dy2 = *y2; 00043 00044 if (zzdash_1.ndash <= 1) { 00045 zzphph_(&dx1, &dy1, &dx2, &dy2); 00046 goto L9000; 00047 } 00048 00049 L100: 00050 /* Computing 2nd power */ 00051 r__1 = dx2 - dx1; 00052 /* Computing 2nd power */ 00053 r__2 = dy2 - dy1; 00054 xyl = sqrt(r__1 * r__1 + r__2 * r__2); 00055 if (xyl <= 1e-5f) { 00056 goto L9000; 00057 } 00058 id = (integer) zzdash_1.xid + 1; 00059 xleft = (id - zzdash_1.xid) * (r__1 = zzdash_1.xldash[id - 1], dabs(r__1)) 00060 ; 00061 if (xyl <= xleft) { 00062 if (zzdash_1.xldash[id - 1] > 0.f) { 00063 zzphph_(&dx1, &dy1, &dx2, &dy2); 00064 } 00065 zzdash_1.xid += xyl / (r__1 = zzdash_1.xldash[id - 1], dabs(r__1)); 00066 goto L9000; 00067 } else { 00068 fac = xleft / xyl; 00069 dx3 = dx1 + fac * (dx2 - dx1); 00070 dy3 = dy1 + fac * (dy2 - dy1); 00071 if (zzdash_1.xldash[id - 1] > 0.f) { 00072 zzphph_(&dx1, &dy1, &dx3, &dy3); 00073 } 00074 dx1 = dx3; 00075 dy1 = dy3; 00076 zzdash_1.xid = (real) (id % zzdash_1.ndash); 00077 goto L100; 00078 } 00079 00080 L9000: 00081 return 0; 00082 } /* phline_ */ |
Variable Documentation
|
|
|
|
|
|
|
|