3 nouvelles fonctions de transformations pour la table mbk_to_rds_segment
vws : identique à vw mais avec un rétrécissement à droite de la valeur de OFFSET ce rétrécissement est toujours à droite quelquesoit l'orientation du segment. alcw : identique a lcw pour decrire un rectangle de largeur constante à gauche, mais une gauche absolue et non pas relative à l'orientation du segment arcw : identique à rcw, mais pour un rectangle à droite absolue.
This commit is contained in:
parent
5afebf41a0
commit
3f2392c41a
|
@ -272,6 +272,50 @@ rdsrec_list *segmbkrds( Figure, Segment, Lynx )
|
||||||
break;
|
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 );
|
X1R = RfmRoundLow ( X1R );
|
||||||
Y1R = RfmRoundLow ( Y1R );
|
Y1R = RfmRoundLow ( Y1R );
|
||||||
|
|
|
@ -80,8 +80,10 @@
|
||||||
# define RDS_TRANS_LCW (unsigned char)1
|
# define RDS_TRANS_LCW (unsigned char)1
|
||||||
# define RDS_TRANS_RCW (unsigned char)2
|
# define RDS_TRANS_RCW (unsigned char)2
|
||||||
# define RDS_TRANS_VWS (unsigned char)3
|
# 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_REF 0
|
||||||
# define MBK_REF_CON 1
|
# define MBK_REF_CON 1
|
||||||
|
|
|
@ -126,6 +126,7 @@
|
||||||
static keyword KeywordDefine [ RPR_MAX_KEYWORD ] =
|
static keyword KeywordDefine [ RPR_MAX_KEYWORD ] =
|
||||||
|
|
||||||
{
|
{
|
||||||
|
{ "alcw", RDS_TRANS_ALCW },
|
||||||
{ "all", RDS_USE_ALL },
|
{ "all", RDS_USE_ALL },
|
||||||
{ "alu1", ALU1 },
|
{ "alu1", ALU1 },
|
||||||
{ "alu2", ALU2 },
|
{ "alu2", ALU2 },
|
||||||
|
@ -136,6 +137,7 @@
|
||||||
{ "alu7", ALU7 },
|
{ "alu7", ALU7 },
|
||||||
{ "alu8", ALU8 },
|
{ "alu8", ALU8 },
|
||||||
{ "alu9", ALU9 },
|
{ "alu9", ALU9 },
|
||||||
|
{ "arcw", RDS_TRANS_ARCW },
|
||||||
{ "c_x_n", C_X_N },
|
{ "c_x_n", C_X_N },
|
||||||
{ "c_x_p", C_X_P },
|
{ "c_x_p", C_X_P },
|
||||||
{ "calu1", CALU1 },
|
{ "calu1", CALU1 },
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# define RPR_MAX_RDS_UNIT 100000L
|
# define RPR_MAX_RDS_UNIT 100000L
|
||||||
# define RPR_EPSILON ((double)0.001)
|
# define RPR_EPSILON ((double)0.001)
|
||||||
# define RPR_MAX_BUFFER 512
|
# define RPR_MAX_BUFFER 512
|
||||||
# define RPR_MAX_KEYWORD 149
|
# define RPR_MAX_KEYWORD 151
|
||||||
|
|
||||||
# define RPR_SEPARATORS_STRING " \t\n"
|
# define RPR_SEPARATORS_STRING " \t\n"
|
||||||
# define RPR_COMMENT_CHAR '#'
|
# define RPR_COMMENT_CHAR '#'
|
||||||
|
|
Loading…
Reference in New Issue