#include <ppbrush.h>
Inheritance diagram for PathProcessorBrush:

Public Member Functions | |
| PathProcessorBrush () | |
| Constructor. | |
| ~PathProcessorBrush () | |
| Destructor - basically this just wipes the caches. | |
| virtual void | ProcessPath (Path *pPath, RenderRegion *pRender, PathShape ShapePath=PATHSHAPE_PATH) |
| Called by the RenderRegion to apply the path processing operation to the given path. | |
| virtual BOOL | WillChangeFillAndBrushSeparately (void) |
| Called by the RenderRegion to determine if this PathProcessorBrush affects the "fill" and "Brush" portions of the path separately. (Generally speaking, only fill/Brush providers will cause these two different "bits" of a path to be rendered separately). This call is made BEFORE this Processor's ProcessPath function will be called. | |
| virtual BOOL | IsAPathProcessorBrush () |
| Virtual identifier. | |
| virtual BOOL | IsDifferent (PathProcessorBrush *pOther) |
| Equality operator. | |
| virtual PathProcessorBrush * | Clone (void) |
| To copy PathProcessorBrush or derived-class object. | |
| virtual BOOL | NeedsTransparency (void) const |
| virtual BOOL | IsBlended () |
| virtual BOOL | DoBecomeA (BecomeA *pBecomeA, Path *pPath, Node *pParent) |
| To convert our brush into its individual paths and attributes, very similar to the bounding box routine in that we extract the path from our parent node and use it to calculate our blenpaths etc. | |
| virtual BOOL | DoesActuallyDoAnything (RenderRegion *pRender) |
| To determine whether or not our path processor is 'default' i.e. if does not change the path at all. If so then the render region will be free to use DrawPathToOutputDevice which will let us use dash patterns, arrowheads etc. | |
| BOOL | WriteNative (BaseCamelotFilter *pFilter) |
| Writes out a record that represents the processor, to either Native or Web file format. | |
| DocRect | CalculateBoundingBox (Path *pPath, NodeRenderableInk *pParent) |
| Calculates the bounding rect, unfortunately the only way to do this is to do a 'fake' render. So this function is essentially the same as processpath but it doesn't require a render region. | |
| DocRect | TimeStampBoundingBox () |
| Calculates the bounding rect, unfortunately the only way to do this is to do a 'fake' render. So this function is essentially the same as processpath but it doesn't require a render region. | |
| void | SetCalculateBoundingBox (BOOL Set) |
| Sets the flag indicating whether or not to calculate the bounding rect on the next pass through RenderBrushAtPoint. | |
| DocRect | GetCachedRect () |
| access fn. | |
| INT32 | GetObjectCountToDistance (MILLIPOINT Distance) |
| To find out how many brush objects we will have in the distance given. | |
| MILLIPOINT | GetDistanceToObject (UINT32 ObjectNum) |
| Finds out at what we distance we place the ObjectNum'th object. | |
| MILLIPOINT | GetSpacingAtDistance (MILLIPOINT Distance) |
| If we are Distance along our path then thif function finds out how far it would be to the next brush object. | |
| BOOL | GetSpacingAndScalingAtDistance (MILLIPOINT Distance, MILLIPOINT *pSpacing, double *pScaling, UINT32 *pPressure=NULL) |
| Retrieves the values for spacing, scaling and pressure, that are in effect at Distance along the path. | |
| BOOL | AdvanceBrushToDistance (MILLIPOINT Distance) |
| Advances the member variables in this PPB to the values they would acquire if the given distance were to be rendered. Basically another variant on GetSpacing AtDistance. | |
| UINT32 | GetLastObject () |
| The last object member keeps track of which object to render next as we proceed along the path. | |
| BOOL | IsThisPathProcessorOnTheStack (RenderRegion *pRender) |
| as above | |
| void | AdjustSpacingForClosedPath (NodeRenderableInk *pInk) |
| When we apply a brush to a closed path we want to adjust the spacing so that the distance between the start object and the end object is the same as the distance between the start object and the second object. Here we check to see if the ink node is a single shape that produces a closed path (no groups etc.). We will then get the length of that path and try to get the best spacing value. | |
| void | AdjustSpacingForClosedPath (Path *pPath, double dPathLength) |
| When we apply a brush to a closed path we want to adjust the spacing so that the distance between the start object and the end object is the same as the distance between the start object and the second object. Here we check to see if the ink node is a single shape that produces a closed path (no groups etc.). We will then get the length of that path and try to get the best spacing value. | |
| void | SetBrushDefinition (BrushHandle Handle) |
| Sets this path processor up to use the given vector Brush definition in all future rendering. | |
| BrushHandle | GetBrushDefinitionHandle (void) |
| As above. | |
| virtual BrushDefinition * | GetOurBrushDefinition () |
| As above. | |
| MILLIPOINT | GetSpacing (void) |
| As above. | |
| BOOL | SetSpacing (MILLIPOINT Spacing) |
| To set the spacing between brush objects. | |
| BOOL | SetSpacingIncrProp (double Incr) |
| To set the spacing increment between brush objects. | |
| double | GetSpacingIncrProp () |
| As above. | |
| BOOL | SetSpacingIncrConst (MILLIPOINT Incr) |
| To set the proportional spacing increment between brush objects. | |
| MILLIPOINT | GetSpacingIncrConst () |
| As above. | |
| UINT32 | GetSpacingMaxRand () |
| As above. | |
| BOOL | SetSpacingMaxRand (UINT32 Value) |
| As above. | |
| UINT32 | GetSpacingRandSeed () |
| As above. | |
| BOOL | SetSpacingRandSeed (UINT32 Value) |
| As above. | |
| void | SetSpacingRandCache (UINTArray *pArray) |
| BOOL | SetSpacingMaxPressure (UINT32 NewMax) |
| As above. | |
| UINT32 | GetSpacingMaxPressure () |
| As above. | |
| MILLIPOINT | GetLastSpacing () |
| As above. | |
| PathOffset | GetPathOffsetType (void) |
| as above | |
| MILLIPOINT | GetPathOffsetValue (void) |
| as above | |
| void | SetPathOffsetType (PathOffset Offset) |
| to set the offset type for this brush | |
| void | SetPathOffsetValue (MILLIPOINT Value) |
| to set the offset distance for this brush | |
| BOOL | SetPathOffsetIncrProp (double Incr) |
| to set the offset distance for this brush | |
| double | GetPathOffsetIncrProp () |
| as above | |
| BOOL | SetPathOffsetIncrConst (MILLIPOINT Incr) |
| to set the offset distance for this brush | |
| MILLIPOINT | GetPathOffsetIncrConst () |
| as above | |
| void | SetOffsetTypeRandCache (UINTArray *pArray) |
| UINT32 | GetOffsetTypeRandSeed () |
| As above. | |
| BOOL | SetOffsetTypeRandSeed (UINT32 Seed) |
| As above. | |
| UINT32 | GetOffsetValueMaxRand () |
| As above. | |
| BOOL | SetOffsetValueMaxRand (UINT32 Value) |
| As above. | |
| UINT32 | GetOffsetValueRandSeed () |
| As above. | |
| BOOL | SetOffsetValueRandSeed (UINT32 Seed) |
| As above. | |
| void | SetOffsetValueRandCache (UINTArray *pArray) |
| void | SetTiling (BOOL Value) |
When a brush tiles it means that the attribute types:
| |
| BOOL | IsTiled () |
| as above | |
| BOOL | SetRotationAngle (double Angle) |
| as above | |
| double | GetRotationAngle () |
| as above | |
| double | GetRotationIncrConst () |
| as above | |
| BOOL | SetRotationIncrConst (double Value) |
| as above | |
| double | GetRotationIncrProp () |
| as above | |
| BOOL | SetRotationIncrProp (double Value) |
| as above | |
| void | SetRotated (BOOL Value) |
| as above | |
| BOOL | IsRotated () |
| as above | |
| UINT32 | GetRotationMaxRand () |
| as above | |
| BOOL | SetRotationMaxRand (UINT32 Value) |
| as above | |
| UINT32 | GetRotationRandSeed () |
| as above | |
| void | SetRotationRandSeed (UINT32 Seed) |
| as above | |
| UINT32 | GetRotationMaxPressure () |
| as above | |
| BOOL | SetRotationMaxPressure (UINT32 Value) |
| as above | |
| double | GetBrushScaling () |
| as above | |
| BOOL | SetBrushScaling (double Scale) |
| to set the member that determine to what scale of the original object each brush object is drawn | |
| double | GetBrushScalingIncr () |
| as above | |
| BOOL | SetBrushScalingIncr (double Incr) |
| to set the member that determine the increment to scaling applied to each brush object Note that the scaling MUST be set before this is called | |
| double | GetBrushScalingIncrConst () |
| as above | |
| BOOL | SetBrushScalingIncrConst (double Value) |
| to set the member that determine the increment to scaling applied to each brush object | |
| UINT32 | GetScalingMaxRand () |
| As above. | |
| BOOL | SetScalingMaxRand (UINT32 Value) |
| As above. | |
| UINT32 | GetScalingRandSeed () |
| As above. | |
| BOOL | SetScalingRandSeed (UINT32 Value) |
| As above. | |
| UINT32 | GetScalingMaxPressure () |
| As above. | |
| BOOL | SetScalingMaxPressure (UINT32 Max) |
| As above. | |
| double | GetLastScaling () |
| As above. | |
| void | SetScaleToLineWidth (BOOL Value) |
| as above | |
| BOOL | IsScalingToLineWidth () |
| void | ScaleToValue (MILLIPOINT Width, BOOL IgnorePressure=FALSE) |
| Scales the brush object such that the height of the largest object is equal to Value. Note that as of 27/10/2000 this must incorporate offset, scaling and rotation values. | |
| double | GetScaleValue (MILLIPOINT Width) |
| as above, but simply retuns the value | |
| double | GetHueIncrement () |
| as above | |
| BOOL | SetHueIncrement (double Incr) |
| as above | |
| UINT32 | GetHueMaxRand () |
| as above | |
| BOOL | SetHueMaxRand (UINT32 Max) |
| as above | |
| UINT32 | GetHueRandSeed () |
| as above | |
| BOOL | SetHueRandSeed (UINT32 Seed) |
| as above | |
| double | GetSatIncrement () |
| as above | |
| BOOL | SetSatIncrement (double Incr) |
| as above | |
| UINT32 | GetSatMaxRand () |
| as above | |
| BOOL | SetSatMaxRand (UINT32 Max) |
| as above | |
| UINT32 | GetSatRandSeed () |
| as above | |
| BOOL | SetSatRandSeed (UINT32 Seed) |
| as above | |
| SequenceType | GetSequenceType () |
| as above | |
| void | SetSequenceType (SequenceType Type) |
| as above | |
| UINT32 | GetSequenceSeed () |
| as above | |
| void | SetSequenceSeed (UINT32 Seed) |
| as above | |
| BOOL | GetUseLocalFillColour () |
| as above | |
| void | SetUseLocalFillColour (BOOL UseLocal) |
| if this flag is set to TRUE, then the cached fill will not be used when rendering. Instead the nearest stroke colour will be rendered. This is so that people can drop colours onto the brush. | |
| BOOL | GetUseLocalTransp () |
| as above | |
| void | SetUseLocalTransp (BOOL) |
| if this flag is set to TRUE then any cached transparencies will not be rendered. Instead the transparency applied to our parent ink object will be rendered. | |
| BOOL | GetUseNamedColours () |
| as above | |
| void | SetUseNamedColours (BOOL Value) |
| if this flag is set to FALSE then any named colours in our brush will not be rendered, instead we will use the local stroke colour | |
| INT32 | GetBrushTransparency () |
| as above | |
| BOOL | SetBrushTransparency (INT32 Value) |
| as above | |
| UINT32 | GetTransparencyPressure () |
| Sets the extent to which pressure affects transparency. | |
| BOOL | SetTransparencyPressure (UINT32 Value) |
| Sets the extent to which pressure affects transparency. | |
| UINT32 | GetNumBrushObjects () |
| as above | |
| void | SetParentAttribute (AttrBrushType *pAttr) |
| as above | |
| AttrBrushType * | GetParentAttribute () |
| returns the attribute associated with this ppb | |
| void | SetMaxScaling (double Scale) |
| as above | |
| void | SetCurrentPressure (UINT32 Pressure) |
| As above. | |
| UINT32 | GetCurrentPressure () |
| As above. | |
| void | CopyBrushData (BrushData *pData) |
| copies the info from the path processor to the brushdata object | |
| void | CopyDataFromObject (BrushData *pData) |
| copies the info from the brushdata object to the processor | |
| MILLIPOINT | GetBrushSize (BOOL IgnorePressure=FALSE) |
| as above | |
| void | SetStrokeColour (DocColour Col) |
| if the brush is overriding colours then this function can be used to set the stroke colour to use. Although this will be set automatically in ProcessPath. Mostly for use by OpDrawBrush | |
| void | RenderBrushAtPoint (DocCoord Point, double Angle, UINT32 BrushObjectIndex, UINT32 Counter, RenderRegion *pRender, HandleBrushBecomeA *pBecomeA=NULL, BOOL RealtimeBrush=FALSE, BrushDefinition *pBrushDefinition=NULL) |
| Multipurpose ! Renders a brush object at the point specified if we supply a render region, or calculates the bounding box of the brush at this point and adds it to our cached rect, or makes calls PassBack for our BecomeA object.Multipurpose ! Renders a brush object at the point specified if we supply a render region, or calculates the bounding box of the brush at this point and adds it to our cached rect, or makes calls PassBack for our BecomeA object. | |
| BOOL | ResetRandomNumberGenerators () |
| Seeds srand with either the seed supplied or by using time (i.e. a random seed) as above, note that you MUST have already seeded the sequence as above, note that you MUST have already seeded the sequence to reset all the random number generators so that they repeat their sequence from the beginning. Call this prior to rendering. | |
| CDistanceSampler * | GetPressureCacheAndInitialise () |
| This should be called to get the pressure cache from the attribute and to set up the relevant members when we wish to start retrieving pressure data from the beginning. | |
| CDistanceSampler * | GetPressureCacheAndInitialise (RenderRegion *pRegion, ValueFunction **ppValFunc) |
| This should be called to get the pressure cache from the attribute and to set up the relevant members when we wish to start retrieving pressure data from the beginning. | |
| CDistanceSampler * | GetPressureCacheAndInitialise (NodeRenderableInk *pInkNode, ValueFunction **ppValFunc) |
| This should be called to get the pressure cache from the attribute and to set up the relevant members when we wish to start retrieving pressure data from the beginning. | |
| void | SwitchAlternateValue () |
| void | Reset () |
Sets the various members etc. to the values that they must hold at the beginning of any of the following:
| |
| double | GetNextScaling (UINT32 Index) |
| Pretty much as above, but with the following notes: There are several different ways of applying a rotation angle to brush objects:. | |
| MILLIPOINT | GetNextSpacing () |
| Returns the next spacing to use, this can be determined in several ways, as with the other object placement attributes. | |
| UINT32 | GetNextInkObject (UINT32 LastObject, UINT32 NumObjects) |
| as above | |
| UINT32 | GetNextOffsetType () |
| as above | |
| void | SetNextOffsetType () |
| Asks the processor to determine its next offset type and record it in a data member. This only occurs if the processor has its path offset type set to random. If you are calling RenderBrushAtPoint externally rather than from ProcessPath then you should call this for each ink object. | |
| BOOL | PrepareForRenderingLoop (UINT32 NumBrushObjects) |
| Prepares the caches that we will use to store data about the transformations performed during rendering. Currently only scaling has been implemented but we should also get rotation and tangential information too. This should be called sometime after calling Reset and before you start actually rendering. | |
| void | CleanUpAfterRender () |
| deletes the caches that we used to store rendering data | |
| BOOL | SetLastRenderedData (UINT32 BrushObject, double Scaling, double Tangent, double Rotation) |
| Should be called to update the caches that store our cached transformation data so that we only have to perform changes in transformations. Currently only OpDrawBrush need call this as the normal path processor rendering loop updates itself, though this may change. Note also that the rotation and tangent data are not yet used. | |
| void | DecideWhetherToUseActualScaling (UINT32 BrushObject) |
| Decides whether or not to set the UseActualScaling flag for the next call of GetNextScaling. Basically if we have not rendered this object before then the scaling we wish to use will be the absolute scaling. However subsequently we only wish to know about scaling changes. This function is called by OpDrawBrush::RenderStepsForTime, and ProcessPath. | |
Static Public Member Functions | |
| static void | GetRandomLimits (UINT32 Base, UINT32 MaxRand, UINT32 *pLower, UINT32 *pUpper) |
| To determine the upper and lower bounds of a random range. | |
| static void | GetRotationRandomLimits (UINT32 Base, UINT32 MaxRand, UINT32 *pLower, UINT32 *pUpper) |
| To determine the upper and lower bounds of a random range, differs from the above function in that the maximum rotation random factor is different. | |
Protected Member Functions | |
| void | RenderAttributes (RenderRegion *pRender, CCAttrMap *pAttrMap, CHSVChanger *pReplacer, CTransparencyReplacer *pTranspRep) |
Renders the attributes to the given render region. This function has ended up being really messy because people have insisted on being able to override various of the cached attributes. Heres a brief rundown:
| |
| void | AdjustFillAttributes (CCAttrMap *pAttrMap, CHSVChanger *pReplacer, CTransparencyReplacer *pTransRep) |
| DocCoord | AdjustPositionForOffset (DocCoord OriginalPosition, double Angle, double Scaling, MILLIPOINT, UINT32 OffsetType) |
| To determine where the next brush object should be drawn. The position from the line can be altered by the following factors;. | |
| DocCoord | AdjustPositionForBlendPathOffset (DocCoord OriginalPosition, BlendPathOffset *pOffset, double Scaling, double Angle) |
| To determine where the next brush object should be drawn. The position from the line can be altered by the following factors;. | |
| void | AddPointsInRectToList (DocRect Rect, Path *pPath, CPathPointList *pList) |
| void | AddAllPointsToList (Path *pPath, CPathPointList *pList) |
| BOOL | GetPointAtDistance (Path *pPath, MILLIPOINT Distance, DocCoord *pPoint, double *pTangent) |
| Gets the coordinate of a point a certain distance along this path, either by looking in its cache pr by calling the Path class function. | |
| void | RenderTimeStampPoints (RenderRegion *pRender) |
| Accesses the timestamp cache of the parent attribute and tests its points against the bounds of the render region, rendering them if they are inside. | |
| INT32 | HowManyObjectsInDistance (MILLIPOINT Distance) |
| as above | |
| UINT32 | GetCurrentPressureEffect (UINT32 MaxEffect, BOOL FixedMax=FALSE) |
| Simply pass in the maximum effect that you allow and this returns the effect caused by the current pressure value. | |
| void | AdjustAndRenderTransparency (RenderRegion *pRender, AttrFillGeometry *pAttrTransp, CTransparencyReplacer *pRep) |
| double | GetNextAngle () |
| Pretty much as above, but with the following notes: There are several different ways of applying a rotation angle to brush objects:. | |
| MILLIPOINT | GetNextOffset () |
| as above | |
| double | GetNextSaturationMultiplier () |
| this differs slightly from the other GetNext functions in that it does not return a saturation value. Instead it returns a multiplier value which should be given to an HSVChanger object, the HSVChanger should then apply that multiplier to the colours in the brush | |
| double | GetNextHueMultiplier () |
| this differs slightly from the other GetNext functions in that it does not return a hue value. Instead it returns a multiplier value which should be given to an HSVChanger object, the HSVChanger should then apply that multiplier to the colours in the brush | |
| double | GetNextTransparencyAdjust () |
| double | GetNextPressureTranspAdjust () |
| as above, currently the only thing that affects transparency is pressure. Note that -1 indicates that we are not adjusting transparency | |
| BOOL | ObjectIsWithinRect (DocRect Rect, DocCoord Centre, MILLIPOINT HalfWidth, MILLIPOINT HalfHeight, double Scaling, double Angle=0) |
| as above | |
| CSampleItem | GetNextSampleItem (CDistanceSampler *pSampler, ValueFunction *pValFunc, double PathProportion=0) |
| Your one stop shop for getting the next pressure value to use. Note that we may not be using pressure at all in which case all of the inputs will be NULL. | |
Protected Attributes | |
| BrushHandle | m_BrushHandle |
| double | m_LastScalingRendered |
| BOOL * | m_pObjectRendered |
| BOOL | m_UseActualScaling |
| double * | m_pLastScalingRendered |
| double * | m_pLastTangent |
| double * | m_pLastRotation |
| DocColour | m_CurrentStrokeCol |
| BOOL | m_DisableMe |
| MILLIPOINT | m_BrushSpacing |
| double | m_BrushSpacingIncrProp |
| MILLIPOINT | m_BrushSpacingIncrConst |
| UINT32 | m_BrushSpacingMaxRand |
| UINT32 | m_BrushSpacingRandSeed |
| UINT32 | m_SpacingMaxPressure |
| MILLIPOINT | m_LastSpacing |
| BOOL | m_bTile |
| BOOL | m_bRotate |
| double | m_RotateAngle |
| double | m_RotAngleIncrProp |
| double | m_RotAngleIncrConst |
| double | m_LastAngle |
| UINT32 | m_RotationMaxRand |
| UINT32 | m_RotationRandSeed |
| UINT32 | m_RotationMaxPressure |
| PathOffset | m_PathOffsetType |
| MILLIPOINT | m_PathOffsetValue |
| double | m_PathOffsetIncrProp |
| MILLIPOINT | m_PathOffsetIncrConst |
| UINT32 | m_OffsetMaxPressure |
| MILLIPOINT | m_LastOffset |
| UINT32 | m_LastOffsetType |
| UINT32 | m_OffsetTypeRandSeed |
| UINT32 | m_OffsetValueMaxRand |
| UINT32 | m_OffsetValueRandSeed |
| double | m_BrushScaling |
| double | m_BrushScalingIncr |
| double | m_BrushScalingIncrConst |
| double | m_LastScaling |
| double | m_CurrentScaling |
| UINT32 | m_BrushScalingMaxRand |
| UINT32 | m_BrushScalingRandSeed |
| UINT32 | m_ScalingMaxPressure |
| double | m_BrushHueIncrement |
| UINT32 | m_BrushHueMaxRand |
| UINT32 | m_BrushHueRandSeed |
| UINT32 | m_HueMaxPressure |
| double | m_LastHueMultiplier |
| double | m_BrushSatIncrement |
| UINT32 | m_BrushSatMaxRand |
| UINT32 | m_BrushSatRandSeed |
| UINT32 | m_SatMaxPressure |
| double | m_LastSatMultiplier |
| SequenceType | m_SequenceType |
| UINT32 | m_SequenceRandSeed |
| BOOL | m_MirrorSeqAscend |
| BOOL | m_bUseLocalFillColour |
| BOOL | m_bUseLocalTransp |
| BOOL | m_bUseNamedColours |
| INT32 | m_BrushTransparency |
| UINT32 | m_TranspMaxPressure |
| UINT32 | m_TimeStampMaxPressure |
| UINT32 | m_AltValue |
| MILLIPOINT | m_LineWidth |
| BOOL | m_bScaleToLineWidth |
| BOOL | m_bRenderAllAttributes |
| AttrBrushType * | m_pParentAttr |
| PressureItem | m_CurrentPressure |
| DocRect | m_CachedRect |
| BOOL | m_bCalculateRect |
| BOOL | m_bValidPressure |
| AttrFlatTranspFill * | m_pDefaultTransp |
| MILLIPOINT | m_LastSpacingNoRandom |
| MILLIPOINT | m_LastOffsetNoRandom |
| double | m_LastScalingNoRandom |
| double | m_LastRotationNoRandom |
| double | m_MaxScaling |
| UINT32 | m_LastObject |
| MTRand * | m_pSpacingRNG |
| MTRand * | m_pScalingRNG |
| MTRand * | m_pOffsetTypeRNG |
| MTRand * | m_pOffsetValueRNG |
| MTRand * | m_pRotationRNG |
| MTRand * | m_pSaturationRNG |
| MTRand * | m_pHueRNG |
| MTRand * | m_pSequenceRNG |
Private Member Functions | |
| CC_DECLARE_DYNAMIC (PathProcessorBrush) | |
Definition at line 150 of file ppbrush.h.
|
|
|
Destructor - basically this just wipes the caches.
Definition at line 270 of file ppbrush.cpp. 00271 { 00272 00273 #ifdef USE_MTRNG 00274 if (m_pSpacingRNG != NULL) 00275 delete m_pSpacingRNG; 00276 if (m_pScalingRNG != NULL) 00277 delete m_pScalingRNG; 00278 if (m_pOffsetTypeRNG != NULL) 00279 delete m_pOffsetTypeRNG; 00280 if (m_pOffsetValueRNG != NULL) 00281 delete m_pOffsetValueRNG; 00282 if (m_pRotationRNG != NULL) 00283 delete m_pRotationRNG; 00284 if (m_pSaturationRNG != NULL) 00285 delete m_pSaturationRNG; 00286 if (m_pHueRNG != NULL) 00287 delete m_pHueRNG; 00288 if (m_pSequenceRNG != NULL) 00289 delete m_pSequenceRNG; 00290 #endif 00291 00292 if (m_pDefaultTransp != NULL) 00293 delete m_pDefaultTransp; 00294 }
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1786 of file ppbrush.cpp. 01788 { 01789 if (pRender == NULL || pAttrTransp == NULL || pRep == NULL) 01790 return; 01791 01792 if (!pAttrTransp->IsATranspFill()) 01793 { 01794 ERROR3("Attribute is not transparent in PathProcessorBrush::AdjustAndRenderTransparency"); 01795 return; 01796 } 01797 01798 TranspFillAttribute* pTranspVal = (TranspFillAttribute*)pAttrTransp->GetAttributeValue(); 01799 if (pTranspVal != NULL) 01800 { 01801 // see if our parent attr has a local transparency value, if so we will use that 01802 if (m_pParentAttr != NULL) 01803 { 01804 UINT32 ReplaceVal = m_pParentAttr->GetLocalTranspValue(); 01805 if (ReplaceVal > 0) 01806 pRep->SetReplacementValue((INT32)ReplaceVal); 01807 UINT32 Type = m_pParentAttr->GetLocalTranspType(); 01808 pTranspVal->SetTranspType(Type); 01809 } 01810 pRep->SetTransparencyAttr(pTranspVal); 01811 pRep->ReplaceTransparency(); 01812 } 01813 01814 pAttrTransp->Render(pRender); 01815 }
|
|
||||||||||||||||
|
Definition at line 1837 of file ppbrush.cpp. 01839 { 01840 if (pAttrMap == NULL || pColChange == NULL || pTranspRep == NULL) 01841 { 01842 ERROR3("Invalid inputs to PathProcessorBrush::AdjustFillAttributes"); 01843 return; 01844 } 01845 01846 01847 // lets find our attributes 01848 CCRuntimeClass *pType; 01849 void *pVal; 01850 NodeAttribute *pNodeAttr; 01851 01852 BOOL FoundTransp = FALSE; 01853 01854 // iterating all (key, value) pairs 01855 for( CCAttrMap::iterator Pos = pAttrMap->GetStartPosition(); Pos != pAttrMap->GetEndPosition(); ) 01856 { 01857 // Get attr at position Pos 01858 pAttrMap->GetNextAssoc(Pos,pType,pVal); 01859 01860 // pVal is actually an attribute, so get a ptr to it and render it 01861 pNodeAttr = (NodeAttribute *)pVal; 01862 01863 if (pNodeAttr->IsAColourFill()) 01864 { 01865 if (!m_bUseLocalFillColour) 01866 { 01867 01868 //first find out if we have a named colour 01869 ColourFillAttribute* pVal = (ColourFillAttribute*)pNodeAttr->GetAttributeValue(); 01870 if (pVal->ContainsNamedColour()) 01871 { 01872 if (!m_bUseNamedColours) 01873 { 01874 // we need to initialise the Replacer with our attribute and the local 01875 // stroke colour 01876 if (m_pParentAttr != NULL && pColChange != NULL) 01877 { 01878 DocColour Col = m_CurrentStrokeCol; 01879 pColChange->Initialise(pVal, &Col); 01880 pColChange->ReplaceColours(); 01881 01882 } 01883 // note that CNamedColorReplacer::RestoreColours() MUST be called AFTER 01884 // DrawPaths in the render routine, if it is not the the colours are permanently replaced. 01885 } 01886 } 01887 01888 // change HSV values if we need to 01889 if (pColChange->ShouldChangeHSV()) 01890 { 01891 pColChange->SetColourFill(pVal); 01892 pColChange->ChangeHSVValues(); 01893 } 01894 01895 } 01896 01897 } 01898 if (pNodeAttr->IsATranspFill()) 01899 { 01900 TranspFillAttribute* pTranspVal = (TranspFillAttribute*)pNodeAttr->GetAttributeValue(); 01901 if (pTranspVal != NULL) 01902 { 01903 // see if our parent attr has a local transparency value, if so we will use that 01904 if (m_pParentAttr != NULL) 01905 { 01906 UINT32 ReplaceVal = m_pParentAttr->GetLocalTranspValue(); 01907 if (ReplaceVal > 0) 01908 { 01909 pTranspRep->SetReplacementValue((INT32)ReplaceVal); 01910 UINT32 Type = m_pParentAttr->GetLocalTranspType(); 01911 pTranspVal->SetTranspType(Type); 01912 } 01913 01914 } 01915 01916 pTranspRep->SetTransparencyAttr(pTranspVal); 01917 pTranspRep->ReplaceTransparency(); 01918 FoundTransp = TRUE; 01919 } 01920 } 01921 01922 } 01923 01924 // if we didn't find a transparency attribute then we might have to |