[V8i C] Displaying cell without background color

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.

BoolInt clearFirst=TRUE;

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?

Regards,

Ahmet Sedat ALIS

Parents
  • 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.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

Reply
  • 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.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

Children