查看单个帖子
旧 2009-05-07, 06:57 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】when Is Linetypegenerationcriteria Called

when is linetypegenerationcriteria called?
when is linetypegenerationcriteria called?
in my odgsbasevectorizedevice/odgigeometrysimplifier override i want to selectively receive lines and arcs with or without linetype segmentation. the choise made this way:
if our native application can support the current linetype, then we do not want oda to "segmentize" the line or arc. if the linetype definition cannot be translated to a native linetype, then we want the segmentation done by oda.
currently i detect and examine the current linetype by overriding ontraitsmodified(). then on the next linetypegenerationcriteria() call i return dbl_max if we can do the linetype ourselves.
but that depends on a call sequence where oda first calls ontraitsmodified when the effective linetype of the object is set and then will call linetypegenerationcriteria() before it decides to segmentize or not.
will this methode work, or is there a safer way?
-rune jorgensen
www.dds.no
hi,
>>will this method work, or is there a safer way?
i think, it should. why would not you try ?
you can also use setlinetypescalemultiplier(0.0) to disable linetyping, but don't forget to store original value to enable later. or you can override linetypescalemultiplier() to return 0.0 when you don't want line type to be applied and return whatever base class returned when you do.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)