2016年7月14日星期四

MSElementDescr Symbology 相关GET SET

20160714 メモ:
void       mdlElmdscr_setSymbology 
(
 MSElementDescr*       edP ,
 UInt32*       color ,
 Int32*       style ,
 UInt32*       weight ,
 UInt32*       fillColor 
);
Changes the color, weight, and style in the element desciptor pointed to by edP to the values pointed to by color, weight and style. If parameters other than el are NULL, MicroStation does not change the value in element.
この関数でMSElementDescrの色、線種、線幅を変更できます。
引数については、edP以外のはNULLに設定できる。
例:
mdlElmdscr_setSymbology(ww, &color, &style, &weight, NULL);
以下の関数で画層を設定することができます。
mdlElmdscr_setProperties(ww, &level, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
BYLEVEL:
if(_ColorMode == 0) color = COLOR_BYLEVEL;
else color = (UInt32)_Color;
if(_WeightMode == 0) weight = WEIGHT_BYLEVEL;
else weight = (UInt32)_Weight;
if(_StyleMode == 0) style = STYLE_BYLEVEL;
else style = _Style;
mdlElmdscr_setSymbology(ww, &color, &style, &weight, NULL);
もし、COLOR_BYLEVELを利用している場合、色は選択している部品と同じです。

以下の二つ関数はMSElementDescrから持っているシンボロジー・画層を取得する。
mdlElement_getSymbology (&Color,&Weight,&Style,&s->el);
mdlElement_getProperties(&Level,NULL,NULL,NULL,NULL,NULL,NULL,NULL,&s->el);


没有评论:

发表评论