#include <fillramp.h>
Inheritance diagram for TransparencyRamp:
Public Member Functions | |
virtual | ~TransparencyRamp () |
Deletes all members of the list. This is an internal private function which is used by other operations in this class. | |
TranspRampItem * | AddEntry (float pos, UINT32 transp) |
Add a new transparency ramp entry. Its selected state is FALSE. | |
TranspRampItem * | GetFirstTransp () const |
TranspRampItem * | GetNextTransp (TranspRampItem *pItem) const |
TransparencyRamp & | operator= (const TransparencyRamp &other) |
Assign this transparency ramp the same values as those refered to in other. | |
BOOL | IsDifferentTo (TransparencyRamp *pRamp) |
Another matching function. See if this transparency ramp is different to that pointed to by pRamp See Also: TransparencyRamp::operator==. | |
UINT32 * | GetFirstSelectedTransp () |
Get a pointer to the first selected item's transparency field. NULL will be returned if there are no selected items. | |
INT32 | operator== (const TransparencyRamp &other) const |
Try to match this ramp with another ramp. We simply check the numbers in the list, and if the same call the transparency ramp entry eqivalence operator against each list entry. | |
void | DeleteAll () |
Deletes all members of the list. This is an internal private function which is used by other operations in this class. | |
BOOL | SetItemTransp (UINT32 index, UINT32 transp) |
Set the transparency of an existing ramp entry to a new value. | |
INT32 | SetSelectedTransp (UINT32 transp) |
Sets all selected items in this ramp to the given transparency. |
Definition at line 411 of file fillramp.h.
|
Deletes all members of the list. This is an internal private function which is used by other operations in this class.
Definition at line 2090 of file fillramp.cpp. 02091 { 02092 DeleteAll(); 02093 }
|
|
Add a new transparency ramp entry. Its selected state is FALSE.
Definition at line 2130 of file fillramp.cpp. 02131 { 02132 ERROR2IF(((pos<0.0)||(pos>1.0)), FALSE, "position out of range!"); 02133 02134 // create ourselves a new colour ramp item 02135 TranspRampItem *pNewItem = new TranspRampItem(pos,transp); 02136 02137 if (pNewItem) 02138 // insert it into the list 02139 InsertNewItem(pNewItem); 02140 02141 // return the item pointer 02142 return pNewItem; 02143 }
|
|
Deletes all members of the list. This is an internal private function which is used by other operations in this class.
Reimplemented from List. Definition at line 2108 of file fillramp.cpp. 02109 { 02110 TranspRampItem* pItem; 02111 while ((pItem=((TranspRampItem*)RemoveTail()))!=NULL) 02112 delete pItem; 02113 }
|
|
Get a pointer to the first selected item's transparency field. NULL will be returned if there are no selected items.
Definition at line 2307 of file fillramp.cpp. 02308 { 02309 TranspRampItem *pItem = GetFirstTransp(); 02310 while (pItem!=NULL) 02311 { 02312 if (pItem->IsSelected()) 02313 return pItem->GetTranspAddr(); 02314 pItem = GetNextTransp(pItem); 02315 } 02316 return NULL; 02317 }
|
|
Definition at line 435 of file fillramp.h. 00436 { 00437 return (TranspRampItem*)GetHead(); 00438 }
|
|
Definition at line 441 of file fillramp.h. 00442 { 00443 return (TranspRampItem*)GetNext(pItem); 00444 }
|
|
Another matching function. See if this transparency ramp is different to that pointed to by pRamp See Also: TransparencyRamp::operator==.
Definition at line 2196 of file fillramp.cpp. 02197 { 02198 ERROR3IF(this==NULL, "NULL 'this' object in TransparencyRamp::IsDifferentTo()"); 02199 if (pRamp==NULL) 02200 return TRUE; 02201 return (!((*this)==(*pRamp))); 02202 }
|
|
Assign this transparency ramp the same values as those refered to in other.
Definition at line 2218 of file fillramp.cpp. 02219 { 02220 // toast all entries in our list 02221 DeleteAll(); 02222 BOOL ok = TRUE; 02223 02224 TranspRampItem *pThisItem, *pOtherItem = other.GetFirstTransp(); 02225 while (pOtherItem && ok) 02226 { 02227 pThisItem = new TranspRampItem(*pOtherItem); 02228 ok = (pThisItem != NULL); 02229 if (ok) 02230 { 02231 // Add the new colour to our list 02232 AddTail(pThisItem); 02233 pOtherItem = other.GetNextTransp(pOtherItem); 02234 } 02235 } 02236 02237 // run a debug check. 02238 ERROR3IF(!ok, "TransparencyRamp::operator= failed to copy the complete TransparencyRamp"); 02239 02240 return (*this); 02241 }
|
|
Try to match this ramp with another ramp. We simply check the numbers in the list, and if the same call the transparency ramp entry eqivalence operator against each list entry.
Definition at line 2162 of file fillramp.cpp. 02163 { 02164 if (GetCount() != other.GetCount()) 02165 return FALSE; 02166 02167 TranspRampItem *pThisItem = GetFirstTransp(); 02168 TranspRampItem *pThatItem = other.GetFirstTransp(); 02169 02170 BOOL ok=TRUE; 02171 while (pThisItem && ok) 02172 { 02173 ok = ((*pThisItem)==(*pThatItem)); 02174 pThisItem = GetNextTransp(pThisItem); 02175 pThatItem = other.GetNextTransp(pThatItem); 02176 } 02177 02178 return TRUE; 02179 }
|
|
Set the transparency of an existing ramp entry to a new value.
Definition at line 2286 of file fillramp.cpp. 02287 { 02288 RampItem *pItem = GetValidIndexedItem(index); 02289 if (pItem!=NULL) 02290 ((TranspRampItem*)pItem)->SetTransparency(t); 02291 return (pItem!=NULL); 02292 }
|
|
Sets all selected items in this ramp to the given transparency.
Definition at line 2257 of file fillramp.cpp. 02258 { 02259 INT32 c=0; 02260 TranspRampItem *pItem = GetFirstTransp(); 02261 while (pItem!=NULL) 02262 { 02263 if (pItem->IsSelected()) 02264 { 02265 pItem->SetTransparency(transp); 02266 c++; 02267 } 02268 pItem = GetNextTransp(pItem); 02269 } 02270 return c; 02271 }
|