几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】convert odcmentitycolor to odcmcolor (http://www.dimcax.com/hust/showthread.php?t=15477)

yang686526 2009-05-04 06:12 PM

【转帖】convert odcmentitycolor to odcmcolor
 
convert odcmentitycolor to odcmcolor
convert odcmentitycolor to odcmcolor
hello,
it certainly seems to be a dumb question, but i wonder if i missed something or not.
oddbmtextfragment::color returns a odcmentitycolor.
our tools library have a function taking an odcmcolor argument.
obviously, i want to convert odcmentitycolor to oidcmcolor. immediatly, i look into the api doc to find a link between the two classes : none ! the help doesn't mention any inheritance or a common parent class, whereas both look alike!! cmcolor.h confirms that.
i guess that odcmentitycolor::truecolor can be used only if colormethod == isbycolor.
in despair, i copy the colormethod. given the method, i copy the colorindex, or red, green and finally blue or do nothing. it's a prehistoric way for conversion convert but it's the only one i found possible...
no ideas ?
odcmentitycolor entcolor;
odcmcolor res;
res.setcolor(entcolor.color());
oddbcmentitycolor oddbcmcolor::entitycolor()
sergey slezkin


所有的时间均为北京时间。 现在的时间是 05:40 AM.