#include <xpfcaps.h>
Inheritance diagram for XPFCFillTrans:
Public Member Functions | |
XPFCFillTrans (XPFConvertType ConvertType, XPFProp Shape, XPFProp Type, XPFProp Repeat, XPFBOOL bProfile) | |
virtual | ~XPFCFillTrans () |
Protected Member Functions | |
virtual BOOL | DoAttributesMatch (RenderRegion *pRegion) |
Protected Attributes | |
XPFProp | m_Shape |
XPFProp | m_Type |
XPFProp | m_Repeat |
XPFBOOL | m_bProfile |
Private Member Functions | |
CC_DECLARE_MEMDUMP (XPFCFillTrans) |
Definition at line 834 of file xpfcaps.h.
|
Definition at line 840 of file xpfcaps.h. 00841 : XPFCapability(ConvertType) 00842 { 00843 m_Shape = Shape; 00844 m_Type = Type; 00845 m_Repeat = Repeat; 00846 m_bProfile = bProfile; 00847 }
|
|
Definition at line 848 of file xpfcaps.h.
|
|
|
|
Reimplemented from XPFCapability. Definition at line 850 of file xpfcaps.cpp. 00851 { 00852 // If this item specifies the shape property 00853 if (m_Shape != XPFB_UNKNOWN) 00854 { 00855 // Get the transp attribute from the render region 00856 TranspFillAttribute* pTrans = (TranspFillAttribute*)(pRegion->GetCurrentAttribute(ATTR_TRANSPFILLGEOMETRY)); 00857 if (m_Shape != pTrans->GetGeometryShape()) 00858 return(FALSE); 00859 } 00860 00861 // If this item specifies the type property 00862 if (m_Type != XPFB_UNKNOWN) 00863 { 00864 // Get the transp attribute from the render region 00865 TranspFillAttribute* pTrans = (TranspFillAttribute*)(pRegion->GetCurrentAttribute(ATTR_TRANSPFILLGEOMETRY)); 00866 // Get the type 00867 INT32 Type = pTrans->GetTranspType(); 00868 // If we are flat, mix and 0% trans 00869 if (Type == TT_Mix && 00870 pTrans->GetGeometryShape() == FILLSHAPE_FLAT && 00871 *(pTrans->GetStartTransp()) == 0) 00872 { 00873 // We are actually type none 00874 Type = TT_NoTranspType; 00875 } 00876 if (m_Type != Type) 00877 return(FALSE); 00878 } 00879 00880 // If this item specifies the repeat property 00881 if (m_Repeat != XPFB_UNKNOWN) 00882 { 00883 // Get the transp and repeat attributes from the render region 00884 INT32 Repeat = ((TranspFillMappingAttribute*)(pRegion->GetCurrentAttribute(ATTR_TRANSPFILLMAPPING)))->Repeat; 00885 INT32 Shape = ((TranspFillAttribute*)(pRegion->GetCurrentAttribute(ATTR_TRANSPFILLGEOMETRY)))->GetGeometryShape(); 00886 switch (Repeat) 00887 { 00888 case XPFP_FILLREPEAT_REPEAT: 00889 if (Shape >= FILLSHAPE_FLAT && Shape <= FILLSHAPE_DIAMOND) 00890 Repeat = XPFP_FILLREPEAT_SIMPLE; 00891 break; 00892 00893 case XPFP_FILLREPEAT_REPEATINV: 00894 if (Shape >= FILLSHAPE_FLAT && Shape <= FILLSHAPE_DIAMOND) 00895 Repeat = XPFP_FILLREPEAT_SIMPLE; 00896 break; 00897 00898 case XPFP_FILLREPEAT_REPEATEXTRA: 00899 if (Shape >= FILLSHAPE_BITMAP && Shape <= FILLSHAPE_PLASMA) 00900 Repeat = XPFP_FILLREPEAT_SIMPLE; 00901 break; 00902 } 00903 if (m_Repeat != Repeat) 00904 return(FALSE); 00905 } 00906 00907 // If this item specifies the profile property 00908 if (m_bProfile != XPFB_UNKNOWN) 00909 { 00910 // Get the fill attribute from the render region 00911 TranspFillAttribute* pFill = (TranspFillAttribute*)(pRegion->GetCurrentAttribute(ATTR_TRANSPFILLGEOMETRY)); 00912 CProfileBiasGain DefaultProfile; 00913 BOOL bProfile = !(*(pFill->GetProfilePtr()) == DefaultProfile); 00914 if (m_bProfile != bProfile) 00915 return(FALSE); 00916 } 00917 00918 return(TRUE); 00919 }
|
|
|
|
|
|
|
|
|