25#ifndef ODTRVISVISUALSTYLE
26#define ODTRVISVISUALSTYLE
100 cstr(pNew, pStr, nLen); pNew[nLen] = 0;
110 if (!
m_ptrVal != !pStr)
return false;
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);
353 static void lwd_mod(
int& curExtension) { curExtension = (curExtension + 1) / 2; }
356 switch (curExtension)
369 if (curExtension > minLimit)
377 if (curExtension > maxExtension)
378 maxExtension = curExtension;
398 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
408 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
410 if (from.
m_props[nProp].isModified())
413 m_props[nProp].setModified(
false);
433 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
447 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
448 pProps[nProp].setModified(bSet);
455 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
457 if (pProps[nProp].isModified())
476 if (nResolved) *nResolved = 0;
if (nUnresolved) *nUnresolved = 0;
480 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
485 if (owner.
m_props[nProp].operation())
488 if (nResolved) (*nResolved)++;
490 else if (nUnresolved)
502 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
504 if (!
m_props[nProp].operation())
514 for (
OdUInt32 nProp = 0; nProp < nProps; nProp++)
520 if (nSubstituted) (*nSubstituted)++;
522 else if (nUnresolved && !
m_props[nProp].operation())
554 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
const OdTrVisVisualStyleProperty & property(OdGiVisualStyleProperties::Property prop) const
void copyModified(const OdTrVisVisualStyle &from)
OdTrVisVisualStyle(const OdTrVisVisualStyle &from)
void resetModified(bool bSet=false)
OdTrVisVisualStyle & operator=(const OdTrVisVisualStyle &from)
int computeExtentsEnlargement() const
bool backSubstitution(const OdTrVisVisualStyle &child, OdUInt32 *nSubstituted=NULL, OdUInt32 *nUnresolved=NULL)
bool operator==(const OdTrVisVisualStyle &with) const
void copyFrom(const OdTrVisVisualStyle &from, bool bCopyDiff=false)
OdUInt32 numProperties() const
OdTrVisVisualStyleProperty & property(OdGiVisualStyleProperties::Property prop)
void computeRenderMode(OdTrVisRenderMode &pRM, bool bBestMatch=false) const
bool compare(const OdTrVisVisualStyle &with) const
void setPropertiesNumber(OdUInt32 nProps)
OdVector< OdTrVisVisualStyleProperty > PropsCont
void checkLength(OdUInt32 nProp) const
OdUInt32 countUnresolved() const
OdUInt32 countModified() const
bool operator!=(const OdTrVisVisualStyle &with) const
bool resolveInheritance(const OdTrVisVisualStyle &owner, OdUInt32 *nResolved=NULL, OdUInt32 *nUnresolved=NULL)
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
OdTrVisVisualStyleProperty & operator=(const OdTrVisVisualStyleProperty &from)
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
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()
const OdChar * getString() const
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 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)
const OdChar * getString() const
void setString(const OdChar *pStr)
void setUInt(OdUInt32 uVal)
bool cmpString(const OdChar *pStr) const
OdUInt32 lclk(const OdChar *pStr) const