Cell Explorer (cellexp) delivered example shows cells from the cell library. But it displays a gray background with each cell regardsless of background color of cell library. If you set clearFirst option as TRUE, then a dark gray background is drawn.
mdlElmdscr_extendedDisplayToWindow ((MSWindow *)dbP, displayRectP,&viewflags ,edP, &rotMatrix, &localRange.org, &cellExtent, 0, -1,NULL,clearFirst,NULL);
If you set clearFirst option to FALSE then dark gray background isn't drawn but you have to clear background using mdlWindow_rectClear() function.
mdlWindow_rectClear ((MSWindow *)db, itemRectP, NULL);
Is there any other option to display the cell without a dark gray background using only mdlElmdscr_extendedDisplayToWindow() function?
Ahmet Sedat ALIS
Ahmet, I use the function (without extended) inside my own preview control, and get the background as it is defined for the current model. How do you init your viewflags ? And how is your drawing background defined ?
PS the background is the one used for wireframe mode of views, take care, that with illustration etc. this might difffer.
Thank you Michael.
Viewflags are as follows;
ViewFlags viewflags;memset (&viewflags, 0, sizeof(viewflags));viewflags.patterns = TRUE;viewflags.on_off = TRUE;viewflags.points = TRUE;viewflags.constructs = TRUE;viewflags.dimens = TRUE;viewflags.fast_curve = TRUE;viewflags.fast_text = TRUE;viewflags.fast_font = TRUE;
Drawing background color of cell library is black. I am using wireframe mode.
Sedat AlisAEC Technology Inc.
Hm viewflags are similar, expect for fast_text and Fast_font which I keep off. In addition I declare the follwoing, which should correspond with the view-attributes for view1-8
viewflags.useDisplaySet = TRUE;
viewflags.line_wghts = TRUE;
viewflags.background = TRUE;
viewflags.fill = TRUE;
viewflags.renderMode = m_nViewMode;
Rendermode is normally set to VIEWMODE_WIREFRAME, but i even us some of the other viewmodes.
To be absolutely clear, the background is even in my case not taken from the library, but the background of the currently active model. I have not seen anything to change this.
Yes you are right, it seems background color is taken from currently active model.
PMFJI, but it might be worthwhile checking to see if you have MS_DEFAULTSHEETRGB defined. There is information regarding what that configuration variable is and does in Help > Contents (as well how the model's background color is determined).
Thank you Phil.
I tried to define new MS_DEFAULTSHEETRGB configuration variable as follows, but it didn't make any difference.