#include <blendatt.h>
Public Member Functions | |
BlendAttrParam () | |
Default constructor. | |
~BlendAttrParam () | |
Destructor This will delete pBlendedNodeAttr and pBlendedAttrVal if these values are not NULL. | |
BOOL | Init (RenderRegion *pThisRenderRegion, NodeAttribute *pThisOtherAttr, double ThisBlendRatio, ColourBlendType ColBlend, CCAttrMap *pStartAttrMap, CCAttrMap *pEndAttrMap, BOOL LastStep=FALSE) |
This inits the object with the given params. Fails if pThisOtherAttr is NULL or ThisBlendRatio is out of range. If ok the following is true - GetRenderRegion will return pThisRenderRegion GetOtherAttr() will return pThisOtherAttr GetBlendRatio() will return ThisBlendRatio GetOtherAttrVal() will return pThisOtherAttr->GetAttributeValue() (can be NULL!!) GetBlendedAttr() will return NULL GetBlendedAttrVal() will return NULL. | |
BOOL | Init (RenderRegion *pThisRenderRegion, NodeAttribute *pThisOtherAttr, double ThisBlendRatio, double thisObjectRatio, BOOL objProcess, ColourBlendType ColBlend, CCAttrMap *pStartAttrMap, CCAttrMap *pEndAttrMap, BOOL LastStep=FALSE) |
This inits the object with the given params. | |
RenderRegion * | GetRenderRegion () |
NodeAttribute * | GetOtherAttr () |
AttributeValue * | GetOtherAttrVal () |
double | GetBlendRatio () |
double | GetObjectRatio () |
BOOL | GetObjectProfileProcessing () |
ColourBlendType | GetColourBlend () |
CCAttrMap * | GetStartAttrMap () |
CCAttrMap * | GetEndAttrMap () |
NodeAttribute * | GetBlendedAttr () |
When you call this, the pointer passed back becomes your responsibility (if its not NULL). This means that you will have to delete it if you don't want to cause memory leaks. Also, you will get NULL for all subsequent calls, until a new value is set by SetBlendedAttr(). | |
AttributeValue * | GetBlendedAttrVal () |
When you call this, the pointer passed back becomes your responsibility (if its not NULL). This means that you will have to delete it if you don't want to cause memory leaks. Also, you will get NULL for all subsequent calls, until a new value is set by SetBlendedAttrVal(). | |
void | SetBlendedAttr (NodeAttribute *pAttr) |
When you call this func, the object you pass it becomes the property of the BlendAttrParam object. If it's internal pointer is the same as the entry param, nothing happends If it's internal pointer is not NULL and different to the entry param, the old one is deleted first. | |
void | SetBlendedAttrVal (AttributeValue *pAttrVal) |
When you call this func, the object you pass it becomes the property of the BlendAttrParam object. If it's internal pointer is the same as the entry param, nothing happends If it's internal pointer is not NULL and different to the entry param, the old one is deleted first. | |
BOOL | IsLastBlendStep () |
Private Member Functions | |
CC_DECLARE_MEMDUMP (BlendAttrParam) | |
Private Attributes | |
RenderRegion * | pRenderRegion |
NodeAttribute * | pOtherNodeAttr |
AttributeValue * | pOtherAttrVal |
double | BlendRatio |
NodeAttribute * | pBlendedNodeAttr |
AttributeValue * | pBlendedAttrVal |
CCAttrMap * | pAttrMapStart |
CCAttrMap * | pAttrMapEnd |
ColourBlendType | ColourBlend |
BOOL | m_bLastStep |
double | objectRatio |
BOOL | objectProfileProcessing |
This is particularly true of fills - who contain both 'colour' data and position data. When profiling the attributes of the blend, we do not want to alter the position data with respect to the attribute profile.
Definition at line 144 of file blendatt.h.
|
Default constructor.
Definition at line 2094 of file attr.cpp. 02095 { 02096 pRenderRegion = NULL; 02097 pOtherNodeAttr = NULL; 02098 pOtherAttrVal = NULL; 02099 BlendRatio = 0.0; 02100 pBlendedNodeAttr= NULL; 02101 pBlendedAttrVal = NULL; 02102 ColourBlend = COLOURBLEND_FADE; 02103 objectRatio = 0.0; 02104 objectProfileProcessing = FALSE; 02105 }
|
|
Destructor This will delete pBlendedNodeAttr and pBlendedAttrVal if these values are not NULL.
Definition at line 2122 of file attr.cpp. 02123 { 02124 if (pBlendedNodeAttr != NULL) delete pBlendedNodeAttr; 02125 if (pBlendedAttrVal != NULL) delete pBlendedAttrVal; 02126 }
|
|
|
|
When you call this, the pointer passed back becomes your responsibility (if its not NULL). This means that you will have to delete it if you don't want to cause memory leaks. Also, you will get NULL for all subsequent calls, until a new value is set by SetBlendedAttr().
Definition at line 2288 of file attr.cpp. 02289 { 02290 ERROR3IF(pBlendedNodeAttr == NULL,"pBlendedNodeAttr is NULL"); 02291 02292 NodeAttribute* p = pBlendedNodeAttr; 02293 pBlendedNodeAttr = NULL; 02294 return (p); 02295 }
|
|
When you call this, the pointer passed back becomes your responsibility (if its not NULL). This means that you will have to delete it if you don't want to cause memory leaks. Also, you will get NULL for all subsequent calls, until a new value is set by SetBlendedAttrVal().
Definition at line 2316 of file attr.cpp. 02317 { 02318 ERROR3IF(pBlendedAttrVal == NULL,"pBlendedAttrVal is NULL"); 02319 02320 AttributeValue* p = pBlendedAttrVal; 02321 pBlendedAttrVal = NULL; 02322 return (p); 02323 }
|
|
Definition at line 167 of file blendatt.h. 00167 { return BlendRatio; }
|
|
Definition at line 170 of file blendatt.h. 00170 { return ColourBlend; }
|
|
Definition at line 173 of file blendatt.h. 00173 { return pAttrMapEnd; }
|
|
Definition at line 169 of file blendatt.h. 00169 { return (objectProfileProcessing); }
|
|
Definition at line 168 of file blendatt.h. 00168 { return objectRatio; }
|
|
Definition at line 165 of file blendatt.h. 00165 { return pOtherNodeAttr; }
|
|
Definition at line 166 of file blendatt.h. 00166 { return pOtherAttrVal; }
|
|
Definition at line 164 of file blendatt.h. 00164 { return pRenderRegion; }
|
|
Definition at line 172 of file blendatt.h. 00172 { return pAttrMapStart; }
|
|
This inits the object with the given params.
Definition at line 2224 of file attr.cpp. 02228 { 02229 // Check that this is the first time it's been called 02230 ERROR3IF(pOtherNodeAttr != NULL,"This has already been initialised"); 02231 if (pOtherNodeAttr != NULL) return FALSE; 02232 02233 // check valid entry params 02234 ERROR3IF(pThisOtherAttr == NULL || (ThisBlendRatio <= 0.0) || (ThisBlendRatio >= 1.0),"Dodgy entry params"); 02235 if (pThisOtherAttr == NULL || (ThisBlendRatio <= 0.0) || (ThisBlendRatio >= 1.0)) return FALSE; 02236 02237 // Remember the render region 02238 pRenderRegion = pThisRenderRegion; 02239 02240 // Store the other NodeAttribute's ptr 02241 pOtherNodeAttr = pThisOtherAttr; 02242 02243 // Store the way colours should be blended 02244 ColourBlend = ColBlend; 02245 02246 // Get pOtherNodeAttr's attr value ptr 02247 // NOTE!! This can be NULL as not all NodeAttributes implement this function. 02248 // This is OK as the ones that don't support GetAttributeValue() won't have a Blend() 02249 // function either, and if they do have a Blend() func, it will error when it's called 02250 pOtherAttrVal = pThisOtherAttr->GetAttributeValue(); 02251 02252 // Set up the other member vars 02253 BlendRatio = ThisBlendRatio; 02254 pBlendedNodeAttr= NULL; 02255 pBlendedAttrVal = NULL; 02256 02257 pAttrMapStart = pStartAttrMap; 02258 pAttrMapEnd = pEndAttrMap; 02259 02260 m_bLastStep = LastStep; 02261 02262 objectRatio = thisObjectRatio; 02263 02264 objectProfileProcessing = objProcess; 02265 02266 return TRUE; 02267 }
|
|
This inits the object with the given params. Fails if pThisOtherAttr is NULL or ThisBlendRatio is out of range. If ok the following is true - GetRenderRegion will return pThisRenderRegion GetOtherAttr() will return pThisOtherAttr GetBlendRatio() will return ThisBlendRatio GetOtherAttrVal() will return pThisOtherAttr->GetAttributeValue() (can be NULL!!) GetBlendedAttr() will return NULL GetBlendedAttrVal() will return NULL.
Definition at line 2159 of file attr.cpp. 02162 { 02163 // Check that this is the first time it's been called 02164 ERROR3IF(pOtherNodeAttr != NULL,"This has already been initialised"); 02165 if (pOtherNodeAttr != NULL) return FALSE; 02166 02167 // check valid entry params 02168 ERROR3IF(pThisOtherAttr == NULL || (ThisBlendRatio <= 0.0) || (ThisBlendRatio >= 1.0),"Dodgy entry params"); 02169 if (pThisOtherAttr == NULL || (ThisBlendRatio <= 0.0) || (ThisBlendRatio >= 1.0)) return FALSE; 02170 02171 // Remember the render region 02172 pRenderRegion = pThisRenderRegion; 02173 02174 // Store the other NodeAttribute's ptr 02175 pOtherNodeAttr = pThisOtherAttr; 02176 02177 // Store the way colours should be blended 02178 ColourBlend = ColBlend; 02179 02180 // Get pOtherNodeAttr's attr value ptr 02181 // NOTE!! This can be NULL as not all NodeAttributes implement this function. 02182 // This is OK as the ones that don't support GetAttributeValue() won't have a Blend() 02183 // function either, and if they do have a Blend() func, it will error when it's called 02184 pOtherAttrVal = pThisOtherAttr->GetAttributeValue(); 02185 02186 // Set up the other member vars 02187 BlendRatio = ThisBlendRatio; 02188 pBlendedNodeAttr= NULL; 02189 pBlendedAttrVal = NULL; 02190 02191 pAttrMapStart = pStartAttrMap; 02192 pAttrMapEnd = pEndAttrMap; 02193 02194 m_bLastStep = LastStep; 02195 02196 return TRUE; 02197 }
|
|
Definition at line 194 of file blendatt.h. 00194 { return m_bLastStep; }
|
|
When you call this func, the object you pass it becomes the property of the BlendAttrParam object. If it's internal pointer is the same as the entry param, nothing happends If it's internal pointer is not NULL and different to the entry param, the old one is deleted first.
Definition at line 2341 of file attr.cpp. 02342 { 02343 if (pBlendedNodeAttr != pAttr) 02344 { 02345 if (pBlendedNodeAttr != NULL) delete pBlendedNodeAttr; 02346 pBlendedNodeAttr = pAttr; 02347 } 02348 }
|
|
When you call this func, the object you pass it becomes the property of the BlendAttrParam object. If it's internal pointer is the same as the entry param, nothing happends If it's internal pointer is not NULL and different to the entry param, the old one is deleted first.
Definition at line 2366 of file attr.cpp. 02367 { 02368 if (pBlendedAttrVal != pAttrVal) 02369 { 02370 if (pBlendedAttrVal != NULL) delete pBlendedAttrVal; 02371 pBlendedAttrVal = pAttrVal; 02372 } 02373 }
|
|
Definition at line 201 of file blendatt.h. |
|
Definition at line 209 of file blendatt.h. |
|
Definition at line 211 of file blendatt.h. |
|
Definition at line 217 of file blendatt.h. |
|
Definition at line 215 of file blendatt.h. |
|
Definition at line 207 of file blendatt.h. |
|
Definition at line 206 of file blendatt.h. |
|
Definition at line 204 of file blendatt.h. |
|
Definition at line 203 of file blendatt.h. |
|
Definition at line 200 of file blendatt.h. |
|
Definition at line 199 of file blendatt.h. |
|
Definition at line 197 of file blendatt.h. |