![]() |
【转帖】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. |