API Reference > Classes > PRC Graphical Classes > OdPrcCategory1LineStyle Class > OdPrcCategory1LineStyle Methods > OdPrcCategory1LineStyle::createByColor Method
OdPrcCategory1LineStyle::createByColor Method
Syntax
C++
static OdPrcObjectId createByColor(double r, double g, double b, OdPrcFileStructure & postToFileStructure, bool preventColorDuplication = false);
Parameters 
Description 
double r 
[in] A red color value (0-1 range).  
double g 
[in] A green color value (0-1 range).  
double b 
[in] A blue color value (0-1 range).  
OdPrcFileStructure & postToFileStructure 
[out] A reference to a file structure where the new line style should be created and saved.  
bool preventColorDuplication = false 
[in] Add new color to the end of color array or search the array to prevent duplication.  

The identifier of the newly created line style object.

Puts new RGB color in file structure globals, creates new LineStyle that uses that color and returns its object id

Copyright (c) 2002-2020. Open Design Alliance. All rights reserved.