API Reference > OdDb Classes > OdDbLayerTableRecord Class > OdDbLayerTableRecord Methods > setTransparency Method > OdDbLayerTableRecord::setTransparency Method (OdCmTransparency&, OdDbObjectId&)
OdDbLayerTableRecord::setTransparency Method (OdCmTransparency&, OdDbObjectId&)
Syntax
C++
void setTransparency(const OdCmTransparency& cmTransparency, const OdDbObjectId& idViewport);
Parameters 
Description 
const OdCmTransparency& cmTransparency 
[in] Reference to the transparency instance to be set as an Alpha-value in range 1 to 255.  
const OdDbObjectId& idViewport 
[in] Object ID of the viewport in which the layer must have the specific transparency. 

Sets the transparency for the layer record object (as XData). This transparency is used when the Transparency property of an entity belonged to this layer is set to byLayer value. The initial value is byAlpha = 100% value (solid) by default. The same entity can be rendered using different transparencies in different viewports. 

 

The same layer can have different transparencies in different viewports. Therefore this method is overdriven. The method with two arguments sets the specific transparency for the viewport.

Example of Working with the Layer Record Object 

Specific Properties of Layers 

Colors and Transparencies 

OdDbLayerTableRecord::transparency() method

Copyright © 2002–2020. Open Design Alliance. All rights reserved.