From 3f2392c41a291b5a29b626d0b3235083c7a6ba96 Mon Sep 17 00:00:00 2001 From: Franck Wajsburt Date: Wed, 4 Sep 2002 14:52:55 +0000 Subject: [PATCH] =?UTF-8?q?3=20nouvelles=20fonctions=20de=20transformation?= =?UTF-8?q?s=20pour=20la=20table=20mbk=5Fto=5Frds=5Fsegment=20=20=20vws=20?= =?UTF-8?q?=20:=20identique=20=C3=A0=20vw=20mais=20avec=20un=20r=C3=A9tr?= =?UTF-8?q?=C3=A9cissement=20=C3=A0=20droite=20de=20la=20valeur=20de=20OFF?= =?UTF-8?q?SET=20=20=20=20=20=20=20=20=20=20ce=20r=C3=A9tr=C3=A9cissement?= =?UTF-8?q?=20est=20toujours=20=C3=A0=20droite=20quelquesoit=20l'orientati?= =?UTF-8?q?on=20du=20=20=20=20=20=20=20=20=20=20segment.=20=20=20alcw=20:?= =?UTF-8?q?=20identique=20a=20lcw=20pour=20decrire=20un=20rectangle=20de?= =?UTF-8?q?=20largeur=20constante=20=C3=A0=20=20=20=20=20=20=20=20=20=20ga?= =?UTF-8?q?uche,=20mais=20une=20gauche=20absolue=20et=20non=20pas=20relati?= =?UTF-8?q?ve=20=C3=A0=20l'orientation=20=20=20=20=20=20=20=20=20=20du=20s?= =?UTF-8?q?egment=20=20=20arcw=20:=20identique=20=C3=A0=20rcw,=20mais=20po?= =?UTF-8?q?ur=20un=20rectangle=20=C3=A0=20droite=20absolue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alliance/src/rds/src/rfmacces.c | 44 +++++++++++++++++++++++++++++++++ alliance/src/rds/src/rpr.h | 4 ++- alliance/src/rds/src/rprparse.c | 2 ++ alliance/src/rds/src/rprparse.h | 2 +- 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/alliance/src/rds/src/rfmacces.c b/alliance/src/rds/src/rfmacces.c index 95ead9d3..edf794be 100644 --- a/alliance/src/rds/src/rfmacces.c +++ b/alliance/src/rds/src/rfmacces.c @@ -272,6 +272,50 @@ rdsrec_list *segmbkrds( Figure, Segment, Lynx ) break; } } + else + if ( TRANS == RDS_TRANS_ARCW ) + { + switch ( Segment->TYPE ) + { + case LEFT : + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 - (WS >> 1) - DWR - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 - (WS >> 1) - OFFSET; + + break; + + case DOWN : + case UP : X1R = X1 + (WS >> 1) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + (WS >> 1) + DWR + OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + else + if ( TRANS == RDS_TRANS_ALCW ) + { + switch ( Segment->TYPE ) + { + case LEFT : + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 + (WS >> 1) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + (WS >> 1) + DWR + OFFSET; + + break; + + case DOWN : + case UP : X1R = X1 - (WS >> 1) - DWR - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 - (WS >> 1) - OFFSET; + Y2R = Y2 + DLR; + + break; + } + } X1R = RfmRoundLow ( X1R ); Y1R = RfmRoundLow ( Y1R ); diff --git a/alliance/src/rds/src/rpr.h b/alliance/src/rds/src/rpr.h index dacf96e2..10afa2e8 100644 --- a/alliance/src/rds/src/rpr.h +++ b/alliance/src/rds/src/rpr.h @@ -80,8 +80,10 @@ # define RDS_TRANS_LCW (unsigned char)1 # define RDS_TRANS_RCW (unsigned char)2 # define RDS_TRANS_VWS (unsigned char)3 +# define RDS_TRANS_ALCW (unsigned char)4 +# define RDS_TRANS_ARCW (unsigned char)5 -# define RDS_MAX_TRANS ( RDS_TRANS_VWS + 1 ) +# define RDS_MAX_TRANS ( RDS_TRANS_ARCW + 1 ) # define MBK_REF_REF 0 # define MBK_REF_CON 1 diff --git a/alliance/src/rds/src/rprparse.c b/alliance/src/rds/src/rprparse.c index d2c2ed47..3b2fcfb7 100644 --- a/alliance/src/rds/src/rprparse.c +++ b/alliance/src/rds/src/rprparse.c @@ -126,6 +126,7 @@ static keyword KeywordDefine [ RPR_MAX_KEYWORD ] = { + { "alcw", RDS_TRANS_ALCW }, { "all", RDS_USE_ALL }, { "alu1", ALU1 }, { "alu2", ALU2 }, @@ -136,6 +137,7 @@ { "alu7", ALU7 }, { "alu8", ALU8 }, { "alu9", ALU9 }, + { "arcw", RDS_TRANS_ARCW }, { "c_x_n", C_X_N }, { "c_x_p", C_X_P }, { "calu1", CALU1 }, diff --git a/alliance/src/rds/src/rprparse.h b/alliance/src/rds/src/rprparse.h index 7efe1dd0..040cceff 100644 --- a/alliance/src/rds/src/rprparse.h +++ b/alliance/src/rds/src/rprparse.h @@ -31,7 +31,7 @@ # define RPR_MAX_RDS_UNIT 100000L # define RPR_EPSILON ((double)0.001) # define RPR_MAX_BUFFER 512 -# define RPR_MAX_KEYWORD 149 +# define RPR_MAX_KEYWORD 151 # define RPR_SEPARATORS_STRING " \t\n" # define RPR_COMMENT_CHAR '#'