#include <cnamecol.h>
Inheritance diagram for CTransparencyReplacer:
Public Member Functions | |
CTransparencyReplacer () | |
default constructor | |
~CTransparencyReplacer () | |
BOOL | SetReplacementValue (INT32 Value) |
access | |
INT32 | GetReplacementValue () |
access | |
BOOL | SetAdjustmentValue (double Value) |
access | |
double | GetAdjustmentValue () |
access | |
BOOL | SetInvertedAdjuster (double Value) |
access to our inverted adjuster | |
double | GetInvertedAdjuster () |
access | |
void | SetTransparencyAttr (TranspFillAttribute *pAttr) |
access | |
BOOL | ReplaceTransparency () |
Does the deed of replacing the transparency value in our attribute with the one we have been given. | |
BOOL | RestoreTransparency () |
Does the deed of replacing the transparency value in our attribute with the one we have been given. | |
BOOL | IsInitialised () |
as above | |
Protected Attributes | |
UINT32 | m_OriginalTransp |
INT32 | m_ReplaceTransp |
double | m_TranspAdjust |
double | m_InvertAdjust |
TranspFillAttribute * | m_pTranspFill |
Definition at line 239 of file cnamecol.h.
|
default constructor
Definition at line 791 of file cnamecol.cpp. 00792 { 00793 m_pTranspFill = NULL; 00794 m_OriginalTransp = 0; 00795 m_ReplaceTransp = -1; 00796 m_TranspAdjust = 1.0; 00797 m_InvertAdjust = 1.0; 00798 }
|
|
Definition at line 245 of file cnamecol.h.
|
|
access
Definition at line 875 of file cnamecol.cpp. 00876 { 00877 return m_TranspAdjust; 00878 }
|
|
access
Definition at line 915 of file cnamecol.cpp. 00916 { 00917 return m_InvertAdjust; 00918 }
|
|
access
Definition at line 835 of file cnamecol.cpp. 00836 { 00837 return m_ReplaceTransp; 00838 }
|
|
as above
Definition at line 1034 of file cnamecol.cpp. 01035 { 01036 return (m_pTranspFill != NULL && (m_ReplaceTransp >= 0 || m_TranspAdjust >= 0)); 01037 }
|
|
Does the deed of replacing the transparency value in our attribute with the one we have been given.
Definition at line 953 of file cnamecol.cpp. 00954 { 00955 if (m_pTranspFill == NULL) 00956 return FALSE; 00957 00958 // first cache the original value 00959 m_OriginalTransp = *m_pTranspFill->GetStartTransp(); 00960 00961 // recall that a negative replacement value means don't replace 00962 if (m_ReplaceTransp >= 0) 00963 m_pTranspFill->Transp = (UINT32)m_ReplaceTransp; 00964 00965 if (m_TranspAdjust >= 0) 00966 { 00967 /* Ok, so what is going on here? Basically this: 00968 - We have two adjusters, they both generate a value which is a proportion of the maximum transparency 00969 - One of the adjusters is inverted (i.e. as its value increases, its output value decreases 00970 - Both adjusters make sure they are within legal limits 00971 - The adjuster value is added to the original value 00972 - We take a straight mean of the two adjusted values and set it back to the attribute 00973 */ 00974 00975 double TranspAdj = m_TranspAdjust * MAX_TRANSPARENCY; 00976 double TranspAdj1 = m_InvertAdjust * MAX_TRANSPARENCY; 00977 00978 INT32 Adjust = INT32(TranspAdj); 00979 Adjust -= MAX_TRANSPARENCY; 00980 00981 INT32 InvertAdjust = INT32(MAX_TRANSPARENCY- TranspAdj1); 00982 00983 INT32 FirstTransp = m_pTranspFill->Transp + Adjust; 00984 00985 INT32 FinalTransp = FirstTransp + InvertAdjust; 00986 00987 if (FinalTransp > MAX_TRANSPARENCY) 00988 FinalTransp = MAX_TRANSPARENCY; 00989 if (FinalTransp < 0) 00990 FinalTransp = 0; 00991 // TRACEUSER( "Diccon", _T("New Transp = %d\n"), FinalTransp); 00992 m_pTranspFill->Transp = UINT32(FinalTransp); 00993 } 00994 00995 return TRUE; 00996 }
|
|
Does the deed of replacing the transparency value in our attribute with the one we have been given.
Definition at line 1012 of file cnamecol.cpp. 01013 { 01014 if (m_pTranspFill == NULL) 01015 return FALSE; 01016 01017 m_pTranspFill->Transp = m_OriginalTransp; 01018 01019 return TRUE; 01020 }
|
|
access
Definition at line 853 of file cnamecol.cpp. 00854 { 00855 if (Value > 3.0 || Value < 0) 00856 return FALSE; 00857 m_TranspAdjust = Value; 00858 00859 return TRUE; 00860 }
|
|
access to our inverted adjuster
Definition at line 893 of file cnamecol.cpp. 00894 { 00895 if (Value > 3.0 || Value < 0) 00896 return FALSE; 00897 m_InvertAdjust = Value; 00898 00899 return TRUE; 00900 }
|
|
access
Definition at line 813 of file cnamecol.cpp. 00814 { 00815 if (Value > MAX_TRANSP_VALUE) 00816 return FALSE; 00817 00818 m_ReplaceTransp = Value; 00819 return TRUE; 00820 }
|
|
access
Definition at line 934 of file cnamecol.cpp. 00935 { 00936 m_pTranspFill = pAttrVal; 00937 }
|
|
Definition at line 266 of file cnamecol.h. |
|
Definition at line 262 of file cnamecol.h. |
|
Definition at line 268 of file cnamecol.h. |
|
Definition at line 263 of file cnamecol.h. |
|
Definition at line 265 of file cnamecol.h. |