25 #ifndef ODTRVISVISUALSTYLE
26 #define ODTRVISVISUALSTYLE
100 cstr(pNew, pStr, nLen); pNew[nLen] = 0;
114 while (*pStrLeft && *pStr)
116 if (*pStrLeft != *pStr)
120 return *pStrLeft == *pStr;
129 while (pStr[nLen]) nLen++;
168 for (
OdUInt32 nType = 0; nType < nTypes; nType++)
189 void set(
bool bVal,
bool bSet =
true)
213 void set(
double dVal,
bool bSet =
true)
275 SETBIT(flags, nFlag, bSet);
365 static void lwd_mod(
int& curExtension) { curExtension = (curExtension + 1) / 2; }
368 switch (curExtension)
381 if (curExtension > minLimit)
389 if (curExtension > maxExtension)
390 maxExtension = curExtension;
420 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
432 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
434 if (from.
m_props[nProp].isModified())
437 m_props[nProp].setModified(
false);
476 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
491 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
492 pProps[nProp].setModified(bSet);
499 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
501 if (pProps[nProp].isModified())
520 if (nResolved) *nResolved = 0;
if (nUnresolved) *nUnresolved = 0;
524 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
529 if (owner.
m_props[nProp].operation())
532 if (nResolved) (*nResolved)++;
534 else if (nUnresolved)
546 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
548 if (!
m_props[nProp].operation())
558 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
564 if (nSubstituted) (*nSubstituted)++;
566 else if (nUnresolved && !
m_props[nProp].operation())
596 int maxExtension = 0;
bool OdEqual(double x, double y, double tol=1.e-10)
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
const OdChar * c_str() const
bool compare(const OdTrVisVisualStyle &with, bool bCmpType=false, bool bCmpProps=true) const
void setName(const OdString &name)
void setInternal(bool bSet)
OdTrVisVisualStyle(const OdTrVisVisualStyle &from)
void copyType(const OdTrVisVisualStyle &from)
void resetModified(bool bSet=false)
int computeExtentsEnlargement() const
OdGiVisualStyle::Type type() const
bool backSubstitution(const OdTrVisVisualStyle &child, OdUInt32 *nSubstituted=NULL, OdUInt32 *nUnresolved=NULL)
bool operator==(const OdTrVisVisualStyle &with) const
OdGiVisualStyle::Type m_type
OdUInt32 numProperties() const
void computeRenderMode(OdTrVisRenderMode &pRM, bool bBestMatch=false) const
void copyModified(const OdTrVisVisualStyle &from, bool bCopyType=true)
void copyFrom(const OdTrVisVisualStyle &from, bool bCopyType=true, bool bCopyDiff=false)
void setPropertiesNumber(OdUInt32 nProps)
OdVector< OdTrVisVisualStyleProperty > PropsCont
void checkLength(OdUInt32 nProp) const
OdTrVisVisualStyleProperty & property(OdGiVisualStyleProperties::Property prop)
const OdString & name() const
OdUInt32 countUnresolved() const
void setTemporary(bool bSet)
void setType(OdGiVisualStyle::Type tpy)
OdUInt32 countModified() const
bool operator!=(const OdTrVisVisualStyle &with) const
bool resolveInheritance(const OdTrVisVisualStyle &owner, OdUInt32 *nResolved=NULL, OdUInt32 *nUnresolved=NULL)
const OdTrVisVisualStyleProperty & property(OdGiVisualStyleProperties::Property prop) const
OdTrVisVisualStyle & operator=(const OdTrVisVisualStyle &from)
void set(double dVal, bool bSet=true)
void set(const OdChar *sVal, bool bSet=true)
void checkType(const OdGiVariant::VariantType *pTypes, OdUInt32 nTypes) const
void set(OdInt32 iVal, bool bSet=true)
OdTrVisVisualStyleProperty(const OdTrVisVisualStyleProperty &from)
void setFlag(OdUInt32 nFlag, bool bSet)
bool compare(const OdTrVisVisualStyleProperty &with, bool bCmpVal=true, bool bCmpOp=false, bool bCmpNum=false) const
void copyFrom(const OdTrVisVisualStyleProperty &from, bool bSet=true)
OdUInt32 propertyNumber() const
void blockExecution() const
struct OdTrVisVisualStyleProperty::DataType m_type
bool operator!=(const OdTrVisVisualStyleProperty &with) const
void set(OdUInt32 uVal, bool bSet=true, bool bAsColor=false)
void setModified(bool bSet)
void setPropertyNumber(OdUInt32 propNum)
union OdTrVisVisualStyleProperty::TypeData m_data
void setOperation(bool bSet)
ColorType getColorType() const
const OdChar * getString() const
bool getFlag(OdUInt32 nFlag) const
OdUInt8 getBoolAsInt() const
void set(ODCOLORREF cVal, ColorType type, bool bSet=true)
void setType(OdGiVariant::VariantType type)
bool isValidType(OdGiVariant::VariantType type) const
bool operator==(const OdTrVisVisualStyleProperty &with) const
void set(bool bVal, bool bSet=true)
OdGiVariant::VariantType type() const
ODCOLORREF getColor(ColorType *pType=NULL) const
void set(const OdString &sVal, bool bSet=true)
OdTrVisVisualStyleProperty()
OdTrVisVisualStyleProperty & operator=(const OdTrVisVisualStyleProperty &from)
void checkType(OdGiVariant::VariantType type) const
~OdTrVisVisualStyleProperty()
void set(const char *sVal, bool bSet=true)
void resize(size_type logicalLength, const T &value)
const T * asArrayPtr() const
OdVector & setPhysicalLength(size_type physicalLength)
GLuint const GLchar * name
GLuint GLsizei GLsizei GLint GLenum * type
void setFaceNormalsEnabled(bool bSet)
void setStencilBufferEnabled(bool bSet)
void setLightingEnabled(bool bSet)
void setDepthBufferEnabled(bool bSet)
void setPolygonOffsetEnabled(bool bSet)
static void lwd_mod(int &curExtension)
static bool run(const OdTrVisVisualStyle &pVS, OdGiVisualStyleProperties::Property EdgeFlags, OdUInt32 EdgeFlag, OdGiVisualStyleProperties::Property PropName, int minLimit, ModifierType modType, int &maxExtension)
static void jitter_mod(int &curExtension)
void setInherit(bool bSet)
void setType(OdGiVariant::VariantType type)
void setPropNumber(OdUInt32 num)
OdUInt32 getPropNumber() const
OdGiVariant::VariantType getType() const
void setModified(bool bSet)
void setPropSet(bool bSet=true)
void cstr(OdChar *pStr, const OdChar *pStr_, OdUInt32 nLen) const
void setDouble(double dVal)
void setInt(OdInt32 iVal)
void setString(const OdChar *pStr)
void setUInt(OdUInt32 uVal)
const OdChar * getString() const
bool cmpString(const OdChar *pStr) const
OdUInt32 lclk(const OdChar *pStr) const