how to change color?

Quantity_NameOfColor aCurrentColor = (Quantity_NameOfColor)j;

it is a part of code in mfc smaple 02_3_TopologyBuilding.

when j is changd, color is changed.

but I don't know that change to what color.

if I set j to some number, what color show me?

I want to know that association between number j and color.

please help me.

Dennis G.'s picture

Hello Erwin,

in $CASROOT/inc (the include directory of your OCC package) check out Quantity_NameOfColor.hxx. It contains an enumeration of all colors which are available by name. The rank of a NameOfColor in the list corresponds to your Number j.


j NameOfColor
1 = Quantity_NOC_BLACK
2 = Quantity_NOC_MATRABLUE
3 = Quantity_NOC_MATRAGRAY
4 = Quantity_NOC_ALICEBLUE

Best Regards,


mekibos's picture

Hello Dennis,

I found that I want to do.

Thank you for your answer.