高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|