![]() |
【转帖】i want to change the backgroundcolor in viewing
i want to change the backgroundcolor in viewing.
i want to change the backgroundcolor in viewing. hi, if(m_bbgwhite) { m_pdevice->setlogicalpalette(odcmacadpalette(odrgb(255,255,2 55)), 256); m_pdevice->setbackgroundcolor(odrgb(255,255,255)); // setpalettebackground(odrgb(255,255,255)); } else { m_pdevice->setlogicalpalette(odcmacadpalette(odrgb(0,0,0)) , 256); m_pdevice->setbackgroundcolor(odrgb(0,0,0)); // setpalettebackground(odrgb(0,0,0)); } is this correct?? it works well in model space but paper space dosen't. let me know how to change backgroundcolor. attached images hi, code from odamfcapp: quote: const odcolorref* palette = theapp.curpalette(); odgspalette ppalcpy; ppalcpy.insert(ppalcpy.begin(), palette, palette+256); ppalcpy[0] = theapp.activebackground(); m_pdevice->setlogicalpalette(ppalcpy.asarrayptr(), 256); odgspaperlayouthelperptr ppshelper = odgspaperlayouthelper::cast(m_pdevice); if(ppshelper.isnull()) { m_bpsoverall = false; m_pdevice->setbackgroundcolor(ppalcpy[0]); // for model space } else { m_bpsoverall = (ppshelper->overallview().get() == ppshelper->activeview().get()); m_pdevice->setbackgroundcolor(odrgb(173,174,173)); // acad's color for paper bg } odgicontextfordbdatabase *pctx = this; pctx->setpalettebackground(theapp.activebackground()) ; the background color for paperspace is not a paper color - this is a background for paper color. set additionally background color using odgicontextfordbdatabase::setpalettebackground(). |
所有的时间均为北京时间。 现在的时间是 11:33 AM. |