#include <fillval.h>
Inheritance diagram for FillGeometryAttribute:
Public Member Functions | |
FillGeometryAttribute () | |
Default Constuctor for fill attribute values. Sets the default colours to Black and White. Sets the Control Points to DocCoord(0,0). | |
virtual void | Restore (RenderRegion *, BOOL)=0 |
virtual void | Render (RenderRegion *, BOOL Temp=FALSE)=0 |
virtual void | SimpleCopy (AttributeValue *) |
See AttributeValue::SimpleCopy. | |
virtual BOOL | IsDifferent (AttributeValue *) |
See base class version. | |
virtual FillGeometryAttribute & | operator= (FillGeometryAttribute &Attrib) |
Make the Attribute the same as the other. | |
virtual INT32 | operator== (const FillGeometryAttribute &Attrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual BOOL | RenderFill (RenderRegion *, Path *) |
virtual BOOL | IsAspectLocked () |
virtual void | SetAspectLock (BOOL) |
virtual BOOL | IsPerspective () |
virtual void | MakePerspective () |
virtual void | RemovePerspective () |
virtual DocCoord * | GetStartPoint () |
virtual DocCoord * | GetEndPoint () |
virtual DocCoord * | GetEndPoint2 () |
virtual DocCoord * | GetEndPoint3 () |
virtual void | SetStartPoint (DocCoord *) |
virtual void | SetEndPoint (DocCoord *) |
virtual void | SetEndPoint2 (DocCoord *) |
virtual void | SetEndPoint3 (DocCoord *) |
virtual DocColour * | GetStartColour () |
virtual DocColour * | GetEndColour () |
virtual DocColour * | GetEndColour2 () |
virtual DocColour * | GetEndColour3 () |
virtual void | SetStartColour (DocColour *) |
virtual void | SetEndColour (DocColour *) |
virtual void | SetEndColour2 (DocColour *) |
virtual void | SetEndColour3 (DocColour *) |
virtual UINT32 * | GetStartTransp () |
virtual UINT32 * | GetEndTransp () |
virtual UINT32 * | GetEndTransp2 () |
virtual UINT32 * | GetEndTransp3 () |
virtual void | SetStartTransp (UINT32 *) |
virtual void | SetEndTransp (UINT32 *) |
virtual void | SetEndTransp2 (UINT32 *) |
virtual void | SetEndTransp3 (UINT32 *) |
virtual UINT32 | GetTranspType () |
virtual void | SetTranspType (UINT32 NewType) |
virtual UINT32 | GetDPI () |
virtual BOOL | SetDPI (UINT32 NewDpi) |
virtual UINT32 | GetFractalDPI () |
virtual BOOL | SetFractalDPI (UINT32 NewDpi) |
virtual UINT32 | GetFractalDim () |
virtual void | SetFractalDim (UINT32 NewDim) |
virtual INT32 | GetSeed () |
virtual FIXED16 | GetGraininess () |
virtual FIXED16 | GetGravity () |
virtual FIXED16 | GetSquash () |
virtual BOOL | GetTileable () |
virtual BOOL | SetSeed (INT32 NewSeed) |
virtual BOOL | SetGraininess (FIXED16 NewGrain) |
virtual BOOL | SetGravity (FIXED16 NewGrav) |
virtual BOOL | SetSquash (FIXED16 NewSquash) |
virtual BOOL | SetTileable (BOOL NewTile) |
virtual double | GetNoiseScale () |
virtual BOOL | SetNoiseScale (double) |
virtual BOOL | Randomise () |
virtual BOOL | RecalcFractal () |
virtual BOOL | AttachBitmap (KernelBitmap *pBitmap) |
virtual BOOL | DetachBitmap () |
virtual KernelBitmap * | GetBitmap () |
virtual BOOL | CopyBitmap (KernelBitmap *pBitmap) |
virtual KernelBitmapRef * | GetBitmapRef () |
virtual INT32 | GetTesselation () |
virtual void | SetTesselation (INT32) |
virtual BOOL | Blend (BlendAttrParam *pBlendParam) |
Blends between two fill attributes. This is a general blend function for all fill attributes. It will blend between any types of fill, but will always use the 'type' of the first fill, taking control points, colours, and transparency from the end fill if it can. | |
virtual BOOL | BlendFillColours (DocColour *Start, DocColour *End, DocColour *Blend, double &Ratio, BlendAttrParam *pBlendParam) |
virtual BOOL | BlendFillTransp (UINT32 *Start, UINT32 *End, UINT32 *Blend, double &Ratio, BlendAttrParam *pBlendParam) |
virtual BOOL | BlendControlPoints (DocCoord *Start, DocCoord *End, DocCoord *Blend, double &Ratio, BlendAttrParam *pBlendParam, BOOL swapOrder=FALSE) |
virtual BOOL | CheckForGreyscaleBitmapBlend (KernelBitmap *pBitmap, DocColour *StartCol, DocColour *EndCol) |
Checks for a blend using a Greyscale bitmap, and set the Start and End Cols provided to suitable default Black and White colours. | |
virtual INT32 | Mould (MouldAttribute *, DocCoord *, INT32, DocCoord *) |
Moulds a Fill attribute. | |
virtual BOOL | IsAColourFill () |
virtual BOOL | IsATranspFill () |
virtual BOOL | IsAFlatFill () |
virtual BOOL | IsAGradFill () |
virtual BOOL | IsALinearFill () |
virtual BOOL | IsARadialFill () |
virtual BOOL | IsAConicalFill () |
virtual BOOL | IsABitmapFill () |
virtual BOOL | IsAKindOfBitmapFill () |
virtual BOOL | IsASquareFill () |
virtual BOOL | IsAThreeColFill () |
virtual BOOL | IsAFourColFill () |
virtual BOOL | IsATextureFill () |
virtual BOOL | IsAFractalFill () |
virtual BOOL | IsANoiseFill () |
virtual void | CacheFractalData (FillGeometryAttribute *pCachedFractal) |
Copies any data from this FractalFillAttribute into the cached fractal pointed to on entry. This data is then checked via IsSameAsCachedFractal. | |
virtual BOOL | IsSameAsCachedFractal (FillGeometryAttribute *pCachedFractal) |
A virtual comparison operator used by the fractal cache to check for a matching fractal. | |
virtual BOOL | SupportsFillRamps () |
virtual ColourRamp * | GetColourRamp () |
virtual TransparencyRamp * | GetTranspRamp () |
virtual BOOL | SetColourRamp (ColourRamp *pRamp) |
virtual BOOL | SetTranspRamp (TransparencyRamp *pRamp) |
virtual DocCoord | GetGeometryCoord (float pos) const |
virtual float | GetGeometryParam (const DocCoord &c) const |
virtual INT32 | GetGeometryShape () |
void | SetProfile (CProfileBiasGain &SetWith) |
CProfileBiasGain & | GetProfile () |
CProfileBiasGain * | GetProfilePtr () |
virtual AttributeValue * | MouldIntoStroke (PathStrokerVector *pMoulder, double TransScale=1.0) |
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path. | |
Public Attributes | |
CProfileBiasGain | DiagramMapper |
Protected Member Functions | |
virtual void | TidyMouldPoints (DocCoord *, DocCoord *, BOOL *, INT32) |
KernelBitmap * | GenerateFractalBitmap (INT32, double, double, double, UINT32) |
KernelBitmap * | GenerateNoiseBitmap (FIXED16 grain, INT32 seed) |
Recalculates the Fractal at a new Dpi. |
Definition at line 193 of file fillval.h.
|
Default Constuctor for fill attribute values. Sets the default colours to Black and White. Sets the Control Points to DocCoord(0,0).
Definition at line 270 of file fillval.cpp.
|
|
Reimplemented in BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 276 of file fillval.h. 00276 { return FALSE; }
|
|
Blends between two fill attributes. This is a general blend function for all fill attributes. It will blend between any types of fill, but will always use the 'type' of the first fill, taking control points, colours, and transparency from the end fill if it can.
Reimplemented from AttributeValue. Reimplemented in FlatFillAttribute, GradFillAttribute, FlatTranspFillAttribute, GradTranspFillAttribute, and StrokeTranspAttribute. Definition at line 9351 of file fillval.cpp. 09352 { 09353 // First make a new object of the same type as this one 09354 CCRuntimeClass* ObjectType = GetRuntimeClass(); 09355 FillGeometryAttribute* pNewAttr = (FillGeometryAttribute*)ObjectType->CreateObject(); 09356 09357 if (pNewAttr == NULL) 09358 { 09359 // Fail if we couldn't create the new fill 09360 pBlendParam->SetBlendedAttrVal(NULL); 09361 return FALSE; 09362 } 09363 09364 // Make the new fill an exact copy of this one 09365 pNewAttr->SimpleCopy(this); 09366 09367 // Now get the fill that we are blending to 09368 FillGeometryAttribute* OtherFill = 09369 (FillGeometryAttribute*)pBlendParam->GetOtherAttrVal(); 09370 09371 // and what point along the blend we are at 09372 double Ratio = pBlendParam->GetBlendRatio(); 09373 double objectRatio = pBlendParam->GetObjectRatio(); 09374 09375 // Blend the profiles (if there are any ....) 09376 09377 CProfileBiasGain Default; 09378 09379 CProfileBiasGain BiasGain = DiagramMapper; // the first fills profile 09380 CProfileBiasGain OtherBiasGain = OtherFill->DiagramMapper; // the other fills profile 09381 09382 // only blend profiles if we need to .... 09383 09384 if (!((BiasGain == Default) && (OtherBiasGain == Default))) 09385 { 09386 // then we need to blend the profiles .... 09387 09388 CProfileBiasGain BlendedProfile; // test for now .... 09389 09390 double InvRatio = 1 - Ratio; 09391 double BlendedBias = (BiasGain.GetBias () * InvRatio) + (OtherBiasGain.GetBias () * Ratio); 09392 double BlendedGain = (BiasGain.GetGain () * InvRatio) + (OtherBiasGain.GetGain () * Ratio); 09393 09394 BlendedProfile.SetBias (BlendedBias); 09395 BlendedProfile.SetGain (BlendedGain); 09396 09397 pNewAttr->SetProfile (BlendedProfile); 09398 } 09399 09400 // CGS: don't worry if pNewAttr->GetColourRamp () is NULL, this is handled internally by pNewAttr->GetColourRamp ()->Blend () 09401 // (even if it is NULL, this code is still perfectly valid: it means blend a no0n-multi-stage fill to something ....) 09402 pNewAttr->GetColourRamp ()->Blend (pNewAttr, pBlendParam, OtherFill/*->GetColourRamp ()*/); 09403 09404 // Blend the Start and End Colours 09405 DocColour BlendColour; 09406 09407 DocColour* StartCol = GetStartColour(); 09408 DocColour* OtherStartCol = OtherFill->GetStartColour(); 09409 DocColour* EndCol = GetEndColour(); 09410 DocColour* OtherEndCol = OtherFill->GetEndColour(); 09411 DocColour* EndCol2 = GetEndColour2(); 09412 DocColour* OtherEndCol2 = OtherFill->GetEndColour2(); 09413 DocColour* EndCol3 = GetEndColour3(); 09414 DocColour* OtherEndCol3 = OtherFill->GetEndColour3(); 09415 DocColour* NonNullCol = NULL; 09416 DocColour* OtherNonNullCol = NULL; 09417 09418 DocColour TempStartCol; 09419 DocColour TempEndCol; 09420 DocColour TempOtherStartCol; 09421 DocColour TempOtherEndCol; 09422 09423 // Check for a Greyscale Bitmap fill with no start or end colours 09424 // and use Black and White instead of 'No Colour' 09425 if (IsABitmapFill() && StartCol == NULL && EndCol == NULL) 09426 { 09427 if (GetBitmapRef() != NULL) 09428 { 09429 if (CheckForGreyscaleBitmapBlend(GetBitmapRef()->GetBitmap(), &TempStartCol, &TempEndCol)) 09430 { 09431 StartCol = &TempStartCol; 09432 EndCol = &TempEndCol; 09433 } 09434 } 09435 } 09436 09437 // Same as above, but for the 'Other Fill' 09438 if (OtherFill->IsABitmapFill() && OtherStartCol == NULL && OtherEndCol == NULL) 09439 { 09440 if (OtherFill->GetBitmapRef() != NULL) 09441 { 09442 if (CheckForGreyscaleBitmapBlend(OtherFill->GetBitmapRef()->GetBitmap(), &TempOtherStartCol, &TempOtherEndCol)) 09443 { 09444 OtherStartCol = &TempOtherStartCol; 09445 OtherEndCol = &TempOtherEndCol; 09446 } 09447 } 09448 } 09449 09450 // Handle blending of non bitmap fill colours 09451 if (BlendFillColours(StartCol, OtherStartCol, &BlendColour, Ratio, pBlendParam)) 09452 pNewAttr->SetStartColour(&BlendColour); 09453 09454 if (EndCol == NULL) 09455 NonNullCol = StartCol; 09456 else 09457 NonNullCol = EndCol; 09458 09459 if (OtherEndCol == NULL) 09460 { 09461 OtherNonNullCol = OtherStartCol; 09462 09463 if (BlendFillColours(EndCol, OtherStartCol, &BlendColour, Ratio, pBlendParam)) 09464 pNewAttr->SetEndColour(&BlendColour); 09465 } 09466 else 09467 { 09468 OtherNonNullCol = OtherEndCol; 09469 09470 if (BlendFillColours(EndCol, OtherEndCol, &BlendColour, Ratio, pBlendParam)) 09471 pNewAttr->SetEndColour(&BlendColour); 09472 } 09473 09474 if ((EndCol2 != NULL) || (OtherEndCol2 != NULL) || (EndCol3 != NULL) || (OtherEndCol3 != NULL)) 09475 { 09476 if (EndCol2 == NULL) 09477 EndCol2 = NonNullCol; 09478 if (OtherEndCol2 == NULL) 09479 OtherEndCol2 = OtherNonNullCol; 09480 if (EndCol3 == NULL) 09481 EndCol3 = NonNullCol; 09482 if (OtherEndCol3 == NULL) 09483 OtherEndCol3 = OtherNonNullCol; 09484 09485 if (BlendFillColours(EndCol2, OtherEndCol2, &BlendColour, Ratio, pBlendParam)) 09486 pNewAttr->SetEndColour2(&BlendColour); 09487 09488 if (BlendFillColours(EndCol3, OtherEndCol3, &BlendColour, Ratio, pBlendParam)) 09489 pNewAttr->SetEndColour3(&BlendColour); 09490 } 09491 09492 // Blend the Start and End Transparencies 09493 UINT32 BlendTransp; 09494 09495 if (BlendFillTransp(GetStartTransp(), OtherFill->GetStartTransp(), &BlendTransp, Ratio, pBlendParam)) 09496 pNewAttr->SetStartTransp(&BlendTransp); 09497 09498 if (BlendFillTransp(GetEndTransp(), OtherFill->GetEndTransp(), &BlendTransp, Ratio, pBlendParam)) 09499 pNewAttr->SetEndTransp(&BlendTransp); 09500 09501 if (BlendFillTransp(GetEndTransp2(), OtherFill->GetEndTransp2(), &BlendTransp, Ratio, pBlendParam)) 09502 pNewAttr->SetEndTransp2(&BlendTransp); 09503 09504 if (BlendFillTransp(GetEndTransp3(), OtherFill->GetEndTransp3(), &BlendTransp, Ratio, pBlendParam)) 09505 pNewAttr->SetEndTransp3(&BlendTransp); 09506 09507 // Blend the Control Points 09508 DocCoord BlendPoint; 09509 09510 if (!pBlendParam->GetObjectProfileProcessing ()) 09511 { 09512 // were not doing object processing - fill positions are affected by attribute ratio .... 09513 if (BlendControlPoints(GetStartPoint(), OtherFill->GetStartPoint(), &BlendPoint, Ratio, pBlendParam)) 09514 pNewAttr->SetStartPoint(&BlendPoint); 09515 09516 if (BlendControlPoints(GetEndPoint(), OtherFill->GetEndPoint(), &BlendPoint, Ratio, pBlendParam)) 09517 pNewAttr->SetEndPoint(&BlendPoint); 09518 09519 if (BlendControlPoints(GetEndPoint2(), OtherFill->GetEndPoint2(), &BlendPoint, Ratio, pBlendParam)) 09520 pNewAttr->SetEndPoint2(&BlendPoint); 09521 } 09522 else 09523 { 09524 // were are doing object processing - fill positions are affected by object ratio .... 09525 if (BlendControlPoints(GetStartPoint(), OtherFill->GetStartPoint(), &BlendPoint, objectRatio, pBlendParam)) 09526 pNewAttr->SetStartPoint(&BlendPoint); 09527 09528 if (BlendControlPoints(GetEndPoint(), OtherFill->GetEndPoint(), &BlendPoint, objectRatio, pBlendParam)) 09529 pNewAttr->SetEndPoint(&BlendPoint); 09530 09531 if (BlendControlPoints(GetEndPoint2(), OtherFill->GetEndPoint2(), &BlendPoint, objectRatio, pBlendParam)) 09532 pNewAttr->SetEndPoint2(&BlendPoint); 09533 } 09534 09535 // Make sure that any BitmapRefs in the Blended attributes, 09536 // are Tempory ones, so we don't try to detach the bitmap 09537 // when the Blend Attrs are destroyed. 09538 09539 // **************************************************** 09540 // 09541 // Temporarily removed to fix problem with saving Blended bitmaps. 09542 // May re-intruduce problems with deleting bitmaps within blends, 09543 // but the saving problem is more important at the moment .... 09544 // .... Will, 15/12/95 09545 09546 // if (GetBitmapRef() != NULL) 09547 // GetBitmapRef()->TempRef = TRUE; 09548 09549 // if (OtherFill->GetBitmapRef() != NULL) 09550 // OtherFill->GetBitmapRef()->TempRef = TRUE; 09551 09552 // **************************************************** 09553 09554 // if (pNewAttr->GetBitmapRef() != NULL) 09555 // pNewAttr->GetBitmapRef()->TempRef = TRUE; 09556 09557 // Set the new fill as the blended attribute 09558 pBlendParam->SetBlendedAttrVal(pNewAttr); 09559 09560 return TRUE; 09561 }
|
|
Definition at line 10031 of file fillval.cpp. 10033 { 10034 if (Start == NULL) 10035 { 10036 return FALSE; 10037 } 10038 10039 if (End == NULL) 10040 { 10041 NodeRenderableBounded* pStartNode = NULL; 10042 NodeRenderableBounded* pEndNode = NULL; 10043 10044 double origRatio = Ratio; 10045 10046 if (!swapOrder) 10047 { 10048 if ((NodeRenderableBounded*) pBlendParam->GetStartAttrMap ()) 10049 { 10050 pStartNode = (NodeRenderableBounded*) pBlendParam->GetStartAttrMap ()->attrMapCreator; 10051 } 10052 10053 if ((NodeRenderableBounded*) pBlendParam->GetEndAttrMap ()) 10054 { 10055 pEndNode = (NodeRenderableBounded*) pBlendParam->GetEndAttrMap ()->attrMapCreator; 10056 } 10057 } 10058 else 10059 { 10060 Ratio = 1 - Ratio; 10061 10062 if ((NodeRenderableBounded*) pBlendParam->GetEndAttrMap ()) 10063 { 10064 pStartNode = (NodeRenderableBounded*) pBlendParam->GetEndAttrMap ()->attrMapCreator; 10065 } 10066 10067 if ((NodeRenderableBounded*) pBlendParam->GetStartAttrMap ()) 10068 { 10069 pEndNode = (NodeRenderableBounded*) pBlendParam->GetStartAttrMap ()->attrMapCreator; 10070 } 10071 } 10072 10073 // ERROR3IF (((pStartNode == NULL) && (pEndNode == NULL)), "Somethings wrong!"); // this should NOT be so 10074 10075 if (!pEndNode) 10076 { 10077 *Blend = *Start; 10078 if (swapOrder) 10079 { 10080 Ratio = origRatio; 10081 } 10082 return TRUE; 10083 } 10084 else 10085 { 10086 // we are blending from something to nothing 10087 // previously will just made *Blend equal to *start and returned TRUE. 10088 // this causes problems when blending (e.g.) a linear transparency to a flat fill 10089 // (i.e. all intermediate blend steps have EXACTLY the same fill geometry as the start) 10090 // this has now been changed. In a case such as this, we create a temporary estimated 'fill 10091 // handle' point - and blend to that .... This solution is NOT rotation independant (owing to 10092 // limitations of bounding boxs, but at least what we render on-screen is of a higher quality. 10093 10094 if (pStartNode) 10095 { 10096 DocRect rectStart (pStartNode->GetBoundingRect (TRUE)); 10097 DocRect rectEnd (pEndNode->GetBoundingRect (TRUE)); 10098 10099 INT32 dx = static_cast<INT32> ( (rectEnd.Centre ().x - rectStart.Centre ().x) * Ratio ); 10100 INT32 dy = static_cast<INT32> ( (rectEnd.Centre ().y - rectStart.Centre ().y) * Ratio ); 10101 10102 *Blend = DocCoord((*Start).x + dx, (*Start).y + dy); 10103 10104 if (swapOrder) 10105 { 10106 Ratio = origRatio; 10107 } 10108 10109 return TRUE; 10110 } 10111 else 10112 { 10113 if (swapOrder) 10114 { 10115 Ratio = origRatio; 10116 } 10117 return (FALSE); 10118 } 10119 } 10120 } 10121 10122 // process as normal .... 10123 10124 INT32 dx = INT32(double((*End).x - (*Start).x) * Ratio); 10125 INT32 dy = INT32(double((*End).y - (*Start).y) * Ratio); 10126 10127 *Blend = DocCoord((*Start).x + dx, (*Start).y + dy); 10128 10129 return TRUE; 10130 }
|
|
Definition at line 9929 of file fillval.cpp. 09931 { 09932 ERROR3IF(Blend == NULL || pBlendParam == NULL, "Illegal NULL param"); 09933 09934 if (Start == NULL) 09935 return FALSE; 09936 09937 if (End == NULL) 09938 { 09939 *Blend = *Start; 09940 return TRUE; 09941 } 09942 09943 ColourContext *BlendContext; 09944 ColourContext *OutputContext = NULL; 09945 09946 // Find the ouptut ColourContext, if there is one available to us 09947 // This allows the blend to take advantage of the output context to do the best 09948 // job it can of colour-separating tints 09949 if (pBlendParam->GetRenderRegion() != NULL) 09950 { 09951 ERROR3IF(pBlendParam->GetRenderRegion()->GetRenderView() == NULL, "No render view"); 09952 if (pBlendParam->GetRenderRegion()->GetRenderView() != NULL) 09953 OutputContext = pBlendParam->GetRenderRegion()->GetRenderView()->GetColourContext(COLOURMODEL_RGBT); 09954 } 09955 09956 switch (pBlendParam->GetColourBlend()) 09957 { 09958 case COLOURBLEND_FADE: 09959 BlendContext = ColourManager::GetColourContext(COLOURMODEL_RGBT); 09960 Blend->Mix(Start, End, Ratio, BlendContext, FALSE, OutputContext); 09961 break; 09962 09963 case COLOURBLEND_RAINBOW: 09964 BlendContext = ColourManager::GetColourContext(COLOURMODEL_HSVT); 09965 Blend->Mix(Start, End, Ratio, BlendContext, FALSE, OutputContext); 09966 break; 09967 09968 case COLOURBLEND_ALTRAINBOW: 09969 BlendContext = ColourManager::GetColourContext(COLOURMODEL_HSVT); 09970 Blend->Mix(Start, End, Ratio, BlendContext, TRUE, OutputContext); 09971 break; 09972 09973 default: 09974 ERROR3("Unknown colour blend type"); 09975 return(FALSE); 09976 } 09977 09978 return TRUE; 09979 }
|
|
Definition at line 9997 of file fillval.cpp. 09999 { 10000 if (Start == NULL) 10001 return FALSE; 10002 10003 if (End == NULL) 10004 { 10005 *Blend = *Start; 10006 return TRUE; 10007 } 10008 10009 INT32 dt = *End - *Start; 10010 *Blend = UINT32(double(*Start) + (double(dt) * Ratio)); 10011 10012 return TRUE; 10013 }
|
|
Copies any data from this FractalFillAttribute into the cached fractal pointed to on entry. This data is then checked via IsSameAsCachedFractal.
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 633 of file fillval.cpp. 00634 { 00635 ERROR3("FillGeometryAttribute::CacheFractalData() should not have been called"); 00636 }
|
|
Checks for a blend using a Greyscale bitmap, and set the Start and End Cols provided to suitable default Black and White colours.
Definition at line 10146 of file fillval.cpp. 10148 { 10149 PORTNOTETRACE("other","FillGeometryAttribute::CheckForGreyscaleBitmapBlend - do nothing"); 10150 #ifndef EXCLUDE_FROM_XARALX 10151 #ifndef WEBSTER 10152 if (pBitmap != NULL) 10153 { 10154 if (BfxALU::IsGreyscaleBitmap(pBitmap)) // WEBSTER-Martin-14/01/97 we prob do need this 10155 { 10156 // The bitmap is Greyscale, with NULL start and end colours, 10157 // so we will use Black and White colours in the blend 10158 10159 AttributeManager::FindDefaultColour(ColourManager::GetCurrentColourList(), 10160 _R(IDS_BLACKNAME), StartCol); 10161 10162 AttributeManager::FindDefaultColour(ColourManager::GetCurrentColourList(), 10163 _R(IDS_WHITENAME), EndCol); 10164 10165 return TRUE; 10166 } 10167 } 10168 #endif //WEBSTER */ 10169 #endif 10170 return FALSE; 10171 }
|
|
Reimplemented in BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 279 of file fillval.h. 00279 { return FALSE; }
|
|
Reimplemented in BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 277 of file fillval.h. 00277 { return FALSE; }
|
|
Definition at line 389 of file fillval.cpp. 00392 { 00393 BOOL Tile = GetTileable(); 00394 00395 /* 00396 switch (GetTesselation()) 00397 { 00398 case RT_Simple: 00399 Tile = FALSE; 00400 break; 00401 00402 case RT_Repeating: 00403 Tile = TRUE; 00404 break; 00405 00406 case RT_RepeatInverted: 00407 Tile = FALSE; 00408 break; 00409 00410 default: 00411 Tile = TRUE; 00412 break; 00413 } 00414 00415 SetTileable(Tile); 00416 */ 00417 00418 TRACEUSER( "Mike", _T("Seed = %d\n"),Seed); 00419 TRACEUSER( "Mike", _T("Graininess = %f\n"),Graininess); 00420 TRACEUSER( "Mike", _T("Gravity = %f\n"),Gravity); 00421 TRACEUSER( "Mike", _T("Squash = %f\n"),Squash); 00422 TRACEUSER( "Mike", _T("Dpi = %d\n"),Dpi); 00423 00424 // First make a fractal from the variables stored in the fill. 00425 PlasmaFractalFill TheFractal(Seed, Tile, Squash, Graininess, Gravity); 00426 00427 // Get the fill control points 00428 DocCoord Start = *GetStartPoint(); 00429 DocCoord End = *GetEndPoint(); 00430 DocCoord End2 = *GetEndPoint2(); 00431 00432 if (Dpi == 0) 00433 Dpi = AttrFillGeometry::FractalDPI; 00434 00435 if (Dpi > 72000) 00436 Dpi = 72000; 00437 00438 // Find the size of a pixel. Note: This assumes pixels are square at the moment. 00439 MILLIPOINT PixelWidth = 72000/Dpi; 00440 00441 INT32 FracWidth = INT32(Start.Distance(End)); 00442 INT32 FracHeight = INT32(Start.Distance(End2)); 00443 00444 TRACEUSER( "Mike", _T("PixelWidth = %d\n"),PixelWidth); 00445 TRACEUSER( "Mike", _T("Frac Width = %d\n"),FracWidth); 00446 TRACEUSER( "Mike", _T("Frac Height = %d\n"),FracHeight); 00447 00448 // Calculate the size of the fractal (in Pixels) from the control points 00449 INT32 FracPixWidth = FracWidth / PixelWidth; 00450 INT32 FracPixHeight = FracHeight/ PixelWidth; 00451 00452 TRACEUSER( "Mike", _T("Pix Width = %d\n"),FracPixWidth); 00453 TRACEUSER( "Mike", _T("Pix Height = %d\n"),FracPixHeight); 00454 00455 if (FracPixWidth == 0) 00456 FracPixWidth = 2; 00457 00458 if (FracPixHeight == 0) 00459 FracPixHeight = 2; 00460 00461 // The 'actual' dimensions of a fractal must be square and a power of 2. 00462 // 'GetDimension' finds an appropriate value for this dimension. 00463 // It will be the next power of 2 higher than Width or Height (whichever is biggest). 00464 INT32 FracPixDim = TheFractal.GetDimension(FracPixWidth, FracPixHeight); 00465 00466 if (FracPixDim > AttrFillGeometry::MaxFractalSize) 00467 FracPixDim = AttrFillGeometry::MaxFractalSize; 00468 00469 // Set the fractal dimensions so we can see if a match is available 00470 // in the fractal cache 00471 SetFractalDim(FracPixDim); 00472 00473 TRACEUSER( "Mike", _T("Fractal Dim = %d\n"),FracPixDim); 00474 00475 CachedFractal* ExistingFrac = 00476 GetApplication()->GetGlobalFractalList()->CheckFractalBitmap(this); 00477 00478 if (ExistingFrac != NULL) 00479 { 00480 // This fractal already exist, so lets re-use it 00481 OILBitmap* ExistingBmp = ExistingFrac->GetCachedFractal()->GetBitmap()->ActualBitmap; 00482 KernelBitmap* ExistingFractal = new KernelBitmap(ExistingBmp, TRUE); 00483 return ExistingFractal; 00484 } 00485 00486 String_64 FracText(_R(IDS_K_FILLVAL_GENFRACT)); 00487 BeginSlowJob(-1, FALSE, &FracText); 00488 00489 Dpi = (FracPixDim * 72000)/(FracWidth >= FracHeight ? FracWidth : FracHeight); 00490 00491 // Create the Bitmap !! 00492 KernelBitmap* Bitmap = new KernelBitmap(FracPixDim, FracPixDim, 8, Dpi, TRUE); 00493 00494 if (Bitmap == NULL) 00495 { 00496 EndSlowJob(); 00497 ERROR1(NULL, _R(IDE_FRACTMEM)); 00498 } 00499 00500 // Make this into a fractal bitmap 00501 Bitmap->SetAsFractal(); 00502 00503 // Render the Fractal into the bitmap 00504 BOOL ok = TheFractal.DoFill(Bitmap, FracPixDim, 0, 0); 00505 00506 EndSlowJob(); 00507 00508 if (!ok) TRACEUSER( "Mike", _T("DoFill Failed\n")); 00509 ERROR1IF(!ok, Bitmap, _R(IDE_FRACTFAILED)); 00510 00511 return Bitmap; 00512 }
|
|
Recalculates the Fractal at a new Dpi.
Definition at line 539 of file fillval.cpp. 00540 { 00541 NoiseFractalFill TheFractal; 00542 00543 // Get the fill control points 00544 DocCoord Start = *GetStartPoint(); 00545 DocCoord End = *GetEndPoint(); 00546 DocCoord End2 = *GetEndPoint2(); 00547 00548 INT32 UAxisLength = INT32(Start.Distance(End)); 00549 INT32 VAxisLength = INT32(Start.Distance(End2)); 00550 00551 INT32 Dpi = 0; 00552 if (Dpi == 0) 00553 Dpi = AttrFillGeometry::FractalDPI; 00554 00555 /* 00556 // Find the size of a pixel. Note: This assumes pixels are square at the moment. 00557 MILLIPOINT SizeOfPixel = 72000/Dpi; 00558 00559 // Calculate the size of the fractal (in Pixels) from the control points 00560 INT32 NumPixelsX = UAxisLength / SizeOfPixel; 00561 INT32 NumPixelsY = VAxisLength / SizeOfPixel; 00562 00563 if (NumPixelsX <= 0) NumPixelsX = 2; 00564 if (NumPixelsY <= 0) NumPixelsY = 2; 00565 00566 // Make this a square 00567 INT32 FracPixDim = LMax(NumPixelsX, NumPixelsY); 00568 00569 if (FracPixDim > AttrFillGeometry::MaxFractalSize) 00570 FracPixDim = AttrFillGeometry::MaxFractalSize; 00571 */ 00572 INT32 FracPixDim = 256; 00573 00574 // save this size, we'll use it for caching! 00575 SetFractalDim(FracPixDim); 00576 00577 // try to find a cached fractal 00578 CachedFractal* ExistingFrac = 00579 GetApplication()->GetGlobalFractalList()->CheckFractalBitmap(this); 00580 00581 if (ExistingFrac != NULL) 00582 { 00583 // This fractal already exist, so lets re-use it 00584 OILBitmap* ExistingBmp = ExistingFrac->GetCachedFractal()->GetBitmap()->ActualBitmap; 00585 KernelBitmap* ExistingFractal = new KernelBitmap(ExistingBmp, TRUE); 00586 return ExistingFractal; 00587 } 00588 00589 String_64 FracText(_R(IDS_K_FILLVAL_GENFRACT)); 00590 BeginSlowJob(-1, FALSE, &FracText); 00591 00592 // calc the dpi of the image 00593 Dpi = (FracPixDim * 72000) / ( LMax( UAxisLength , VAxisLength) ); 00594 00595 // Create the Bitmap 00596 KernelBitmap* Bitmap = new KernelBitmap(FracPixDim, FracPixDim, 8, Dpi, TRUE); 00597 00598 if (Bitmap == NULL) 00599 { 00600 EndSlowJob(); 00601 ERROR1(NULL, _R(IDE_FRACTMEM)); 00602 } 00603 00604 // Make this into a fractal bitmap 00605 Bitmap->SetAsFractal(); 00606 00607 // Render the Fractal into the bitmap 00608 double scale = grain.MakeDouble(); 00609 BOOL ok = TheFractal.DoFill(scale, seed, Bitmap); 00610 00611 EndSlowJob(); 00612 00613 if (!ok) TRACEUSER( "Mike", _T("DoFill Failed\n")); 00614 // ERROR1IF(!ok, Bitmap, _R(IDE_FRACTFAILED)); 00615 00616 return Bitmap; 00617 }
|
|
Reimplemented in BitmapFillAttribute, and BitmapTranspFillAttribute. Definition at line 278 of file fillval.h. 00278 { return NULL; }
|
|
Reimplemented in BitmapFillAttribute, and BitmapTranspFillAttribute. Definition at line 281 of file fillval.h. 00281 { return NULL; }
|
|
Reimplemented in GradFillAttribute. Definition at line 321 of file fillval.h. 00321 { return NULL; }
|
|
Reimplemented in BitmapFillAttribute, and BitmapTranspFillAttribute. Definition at line 248 of file fillval.h.
|
|
Reimplemented in GradFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 228 of file fillval.h. 00228 { return NULL; }
|
|
Reimplemented in ThreeColFillAttribute. Definition at line 229 of file fillval.h. 00229 { return NULL; }
|
|
Reimplemented in FourColFillAttribute. Definition at line 230 of file fillval.h. 00230 { return NULL; }
|
|
Reimplemented in GradFillAttribute, BitmapFillAttribute, GradTranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 219 of file fillval.h. 00219 { return NULL; }
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 220 of file fillval.h. 00220 { return NULL; }
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 221 of file fillval.h. 00221 { return NULL; }
|
|
Reimplemented in GradTranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 237 of file fillval.h. 00237 { return NULL; }
|
|
Reimplemented in ThreeColTranspFillAttribute. Definition at line 238 of file fillval.h. 00238 { return NULL; }
|
|
Reimplemented in FourColTranspFillAttribute. Definition at line 239 of file fillval.h. 00239 { return NULL; }
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 254 of file fillval.h.
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 251 of file fillval.h.
|
|
Reimplemented in GradFillAttribute, ConicalFillAttribute, GradTranspFillAttribute, and ConicalTranspFillAttribute. Definition at line 326 of file fillval.h. 00326 { return DocCoord(0,0); }
|
|
Reimplemented in GradFillAttribute, ConicalFillAttribute, GradTranspFillAttribute, and ConicalTranspFillAttribute. Definition at line 327 of file fillval.h.
|
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 514 of file fillval.cpp. 00515 { 00516 return AttrFillGeometry::FractalGraininess; 00517 }
|
|
Reimplemented in FractalFillAttribute, and FractalTranspFillAttribute. Definition at line 519 of file fillval.cpp. 00520 { 00521 return AttrFillGeometry::FractalGravity; 00522 }
|
|
Definition at line 269 of file fillval.h.
|
|
Definition at line 219 of file fillval.cpp. 00220 { 00221 return (DiagramMapper); 00222 }
|
|
Definition at line 224 of file fillval.cpp. 00225 { 00226 return (&DiagramMapper); 00227 }
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 257 of file fillval.h.
|
|
Reimplemented in FractalFillAttribute, and FractalTranspFillAttribute. Definition at line 260 of file fillval.h.
|
|
Reimplemented in ColourFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 227 of file fillval.h. 00227 { return NULL; }
|
|
Reimplemented in GradFillAttribute, BitmapFillAttribute, GradTranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 218 of file fillval.h. 00218 { return NULL; }
|
|
Reimplemented in TranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 236 of file fillval.h. 00236 { return NULL; }
|
|
Reimplemented in BitmapFillAttribute, and BitmapTranspFillAttribute. Definition at line 283 of file fillval.h. 00283 { return RT_NoRepeatType; }
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 261 of file fillval.h. 00261 { return FALSE; }
|
|
Reimplemented in GradTranspFillAttribute. Definition at line 322 of file fillval.h. 00322 { return NULL; }
|
|
Reimplemented in TranspFillAttribute. Definition at line 245 of file fillval.h. 00245 { return TT_NoTranspType; }
|
|
Reimplemented in BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 307 of file fillval.h. 00307 { return FALSE; }
|
|
Reimplemented in ColourFillAttribute. Definition at line 298 of file fillval.h. 00298 { return FALSE; }
|
|
Reimplemented in ConicalFillAttribute, and ConicalTranspFillAttribute. Definition at line 306 of file fillval.h. 00306 { return FALSE; }
|
|
Reimplemented in FlatFillAttribute, and FlatTranspFillAttribute. Definition at line 301 of file fillval.h. 00301 { return FALSE; }
|
|
Reimplemented in FourColFillAttribute, and FourColTranspFillAttribute. Definition at line 311 of file fillval.h. 00311 { return FALSE; }
|
|
Reimplemented in FractalFillAttribute, and FractalTranspFillAttribute. Definition at line 314 of file fillval.h. 00314 { return FALSE; }
|
|
Reimplemented in GradFillAttribute, and GradTranspFillAttribute. Definition at line 302 of file fillval.h. 00302 { return FALSE; }
|
|
Reimplemented in BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 308 of file fillval.h. 00308 { return FALSE; }
|
|
Reimplemented in LinearFillAttribute, and LinearTranspFillAttribute. Definition at line 304 of file fillval.h. 00304 { return FALSE; }
|
|
Reimplemented in NoiseFillAttribute. Definition at line 315 of file fillval.h. 00315 { return FALSE; }
|
|
Reimplemented in RadialFillAttribute, and RadialTranspFillAttribute. Definition at line 305 of file fillval.h. 00305 { return FALSE; }
|
|
Reimplemented in RadialFillAttribute, and RadialTranspFillAttribute. Definition at line 211 of file fillval.h. 00211 { return FALSE; }
|
|
Reimplemented in SquareFillAttribute, and SquareTranspFillAttribute. Definition at line 309 of file fillval.h. 00309 { return FALSE; }
|
|
Reimplemented in NoiseFillAttribute, and FractalFillAttribute. Definition at line 313 of file fillval.h. 00313 { return FALSE; }
|
|
Reimplemented in ThreeColFillAttribute, and ThreeColTranspFillAttribute. Definition at line 310 of file fillval.h. 00310 { return FALSE; }
|
|
Reimplemented in TranspFillAttribute. Definition at line 299 of file fillval.h. 00299 { return FALSE; }
|
|
See base class version.
Reimplemented from AttributeValue. Definition at line 366 of file fillval.cpp. 00367 { 00368 // This must be at least a FillGeometryAttribute... 00369 ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(FillGeometryAttribute)), 00370 "Different attribute types in AttributeValue::IsDifferent()"); 00371 00372 // Check they are NOT the same. 00373 return ( !(*((FillGeometryAttribute *)pAttr) == *this) ); 00374 }
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 214 of file fillval.h. 00214 { return FALSE; }
|
|
A virtual comparison operator used by the fractal cache to check for a matching fractal.
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 652 of file fillval.cpp. 00653 { 00654 return FALSE; 00655 }
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 215 of file fillval.h.
|
|
Moulds a Fill attribute.
Definition at line 8864 of file fillval.cpp. 08867 { 08868 if (pMouldAttr == NULL || pMouldAttr->GetMouldShape() == NULL) 08869 return 0; 08870 08871 if (pMouldAttr->IsPerspective() && NumCoords >= 4) // Is it a perspective mould ? 08872 { 08873 // Yes, so we'll need to make a fourth control point 08874 INT32 dx1 = SourcePoints[1].x - SourcePoints[0].x; 08875 INT32 dx2 = SourcePoints[2].x - SourcePoints[0].x; 08876 08877 INT32 dy1 = SourcePoints[1].y - SourcePoints[0].y; 08878 INT32 dy2 = SourcePoints[2].y - SourcePoints[0].y; 08879 08880 SourcePoints[3] = SourcePoints[2]; 08881 08882 SourcePoints[2].x = SourcePoints[0].x + dx1 + dx2; 08883 SourcePoints[2].y = SourcePoints[0].y + dy1 + dy2; 08884 } 08885 08886 // Lets get the mould geometry 08887 MouldGeometry* pMould = pMouldAttr->GetMouldShape(); 08888 if (pMould == NULL) 08889 return 0; 08890 08891 // If it's a perspective mould, then we need 4 Control points, 08892 // otherwise just 3 are needed. 08893 INT32 MouldPoints = pMouldAttr->IsPerspective() ? 4 : 3; 08894 08895 // Ensure we don't overrun the output array 08896 if (MouldPoints > NumCoords) 08897 MouldPoints = NumCoords; 08898 08899 // It is possible for a point to fail to Mould, 08900 // (eg if it's outside the Mould Bounds), 08901 // so we'll keep an array of BOOL's to say whether 08902 // each point moulded ok or not. 08903 BOOL* PointOK = new BOOL[MouldPoints]; 08904 08905 Node* MouldParent = pMouldAttr->GetParentMould(); 08906 while (pMould != NULL) 08907 { 08908 BOOL AllPointsOK = TRUE; 08909 08910 for ( INT32 point = 0; point < MouldPoints; point++) 08911 { 08912 // Mould each points in turn 08913 if (pMould->MouldPoint(SourcePoints[point], OutputCoords[point])) 08914 { 08915 // The point moulded ok 08916 PointOK[point] = TRUE; 08917 } 08918 else 08919 { 08920 // The point failed to mould 08921 PointOK[point] = FALSE; 08922 AllPointsOK = FALSE; 08923 } 08924 } 08925 08926 if (!AllPointsOK) 08927 { 08928 // One or more of the control points failed to mould, 08929 // (probably because it is outside the bounds of the mould) 08930 // so we will make sure it is sensible. 08931 TidyMouldPoints(SourcePoints, OutputCoords, PointOK, MouldPoints); 08932 } 08933 08934 // Now lets have a look at the parent of the Mould 08935 MouldParent = MouldParent->FindParent(); 08936 08937 while (MouldParent != NULL) 08938 { 08939 if ( IS_A(MouldParent,NodeMould) ) // Is the Parent another Mould ? 08940 { 08941 // This mould has been moulded itself, so get the parent 08942 // mould geometry, and transform all the points again 08943 pMould = ((NodeMould*)MouldParent)->GetGeometry(); 08944 08945 // We're going to transform the transformed points 08946 for ( INT32 point = 0; point < MouldPoints; point++) 08947 { 08948 SourcePoints[point] = OutputCoords[point]; 08949 } 08950 08951 break; // Get out of this loop 08952 } 08953 08954 if (MouldParent->IsLayer()) // Have we reached the parent Layer yet ? 08955 { 08956 // There can't be any more Moulds now ! 08957 pMould = NULL; 08958 break; 08959 } 08960 else 08961 { 08962 // Try the next parent 08963 MouldParent = MouldParent->FindParent(); 08964 } 08965 } 08966 } 08967 08968 delete PointOK; // Delete the array of BOOL's 08969 08970 return MouldPoints; // Return the number of Points Moulded 08971 }
|
|
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path.
Reimplemented from AttributeValue. Reimplemented in FlatFillAttribute, LinearFillAttribute, RadialFillAttribute, LinearTranspFillAttribute, and RadialTranspFillAttribute. Definition at line 9005 of file fillval.cpp. 09006 { 09007 // Taken out of WEBSTER Neville 6/8/97 09008 // Taken out by vector stroking code Neville 2/10/97 09009 #ifdef VECTOR_STROKING 09010 FillGeometryAttribute *pCopy = (FillGeometryAttribute *) GetRuntimeClass()->CreateObject(); 09011 if (pCopy != NULL) 09012 { 09013 // Copy this object's values across 09014 *pCopy = *this; 09015 09016 // And mould all of the geometry points across 09017 if (pMoulder != NULL) 09018 { 09019 JCW_MOULDPOINT(pCopy, StartPoint); 09020 JCW_MOULDPOINT(pCopy, EndPoint); 09021 JCW_MOULDPOINT(pCopy, EndPoint2); 09022 JCW_MOULDPOINT(pCopy, EndPoint3); 09023 } 09024 09025 ERROR3IF(TransScale < 0.0 || TransScale > 1.0, "Out of range TransScale parameter"); 09026 if (TransScale >= 0.0 && TransScale < 1.0) 09027 { 09028 JCW_MOULDTRANS(pCopy, StartTransp); 09029 JCW_MOULDTRANS(pCopy, EndTransp); 09030 JCW_MOULDTRANS(pCopy, EndTransp2); 09031 JCW_MOULDTRANS(pCopy, EndTransp3); 09032 } 09033 } 09034 09035 return(pCopy); 09036 #else 09037 return NULL; 09038 #endif // VECTOR_STROKING 09039 }
|
|
Make the Attribute the same as the other.
Reimplemented in ColourFillAttribute, GradFillAttribute, RadialFillAttribute, BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, TranspFillAttribute, GradTranspFillAttribute, RadialTranspFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 289 of file fillval.cpp. 00290 { 00291 SetStartColour(FillAttrib.GetStartColour()); 00292 SetEndColour(FillAttrib.GetEndColour()); 00293 00294 SetStartTransp(FillAttrib.GetStartTransp()); 00295 SetEndTransp(FillAttrib.GetEndTransp()); 00296 00297 // Copy the profile (CGS) 00298 SetProfile (FillAttrib.GetProfile ()); 00299 00300 // Copy the control points 00301 SetStartPoint(FillAttrib.GetStartPoint()); 00302 SetEndPoint(FillAttrib.GetEndPoint()); 00303 SetEndPoint2(FillAttrib.GetEndPoint2()); 00304 00305 CopyBitmap(FillAttrib.GetBitmap()); 00306 SetAspectLock(FillAttrib.IsAspectLocked()); 00307 SetColourRamp(FillAttrib.GetColourRamp()); 00308 00309 return *this; 00310 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented in ColourFillAttribute, GradFillAttribute, RadialFillAttribute, ThreeColFillAttribute, FourColFillAttribute, BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, TranspFillAttribute, GradTranspFillAttribute, RadialTranspFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, FractalTranspFillAttribute, ThreeColTranspFillAttribute, and FourColTranspFillAttribute. Definition at line 328 of file fillval.cpp. 00329 { 00330 return FALSE; 00331 }
|
|
Reimplemented in FractalFillAttribute, and FractalTranspFillAttribute. Definition at line 273 of file fillval.h. 00273 { return FALSE; }
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 274 of file fillval.h. 00274 { return FALSE; }
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 216 of file fillval.h.
|
|
Implements AttributeValue. Implemented in ColourFillAttribute, BitmapFillAttribute, TranspFillAttribute, BitmapTranspFillAttribute, StrokeColourAttribute, and StrokeTranspAttribute. |
|
Reimplemented in GradFillAttribute, and BitmapFillAttribute. Definition at line 209 of file fillval.h. 00209 { return FALSE; }
|
|
Implements AttributeValue. Implemented in ColourFillAttribute, BitmapFillAttribute, TranspFillAttribute, BitmapTranspFillAttribute, StrokeColourAttribute, and StrokeTranspAttribute. |
|
Reimplemented in RadialFillAttribute, and RadialTranspFillAttribute. Definition at line 212 of file fillval.h.
|
|
Reimplemented in GradFillAttribute. Definition at line 323 of file fillval.h. 00323 { return FALSE; }
|
|
Reimplemented in BitmapFillAttribute, and BitmapTranspFillAttribute. Definition at line 249 of file fillval.h. 00249 { return FALSE; }
|
|
Reimplemented in GradFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 232 of file fillval.h.
|
|
Reimplemented in ThreeColFillAttribute. Definition at line 233 of file fillval.h.
|
|
Reimplemented in FourColFillAttribute. Definition at line 234 of file fillval.h.
|
|
Reimplemented in GradFillAttribute, BitmapFillAttribute, GradTranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 223 of file fillval.h.
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 224 of file fillval.h.
|
|
Reimplemented in LinearFillAttribute, RadialFillAttribute, SquareFillAttribute, ThreeColFillAttribute, BitmapFillAttribute, LinearTranspFillAttribute, RadialTranspFillAttribute, SquareTranspFillAttribute, BitmapTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 225 of file fillval.h.
|
|
Reimplemented in GradTranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 241 of file fillval.h.
|
|
Reimplemented in ThreeColTranspFillAttribute. Definition at line 242 of file fillval.h.
|
|
Reimplemented in FourColTranspFillAttribute. Definition at line 243 of file fillval.h.
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 255 of file fillval.h.
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 252 of file fillval.h. 00252 { return FALSE; }
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 264 of file fillval.h. 00264 { return FALSE; }
|
|
Reimplemented in FractalFillAttribute, and FractalTranspFillAttribute. Definition at line 265 of file fillval.h. 00265 { return FALSE; }
|
|
Definition at line 271 of file fillval.h. 00271 { return FALSE; }
|
|
Definition at line 213 of file fillval.cpp. 00214 { 00215 DiagramMapper = SetWith; 00216 }
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 263 of file fillval.h. 00263 { return FALSE; }
|
|
Reimplemented in FractalFillAttribute, and FractalTranspFillAttribute. Definition at line 266 of file fillval.h. 00266 { return FALSE; }
|
|
Reimplemented in ColourFillAttribute, FlatFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 231 of file fillval.h.
|
|
Reimplemented in GradFillAttribute, BitmapFillAttribute, GradTranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 222 of file fillval.h.
|
|
Reimplemented in TranspFillAttribute, and BitmapTranspFillAttribute. Definition at line 240 of file fillval.h.
|
|
Reimplemented in BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 284 of file fillval.h.
|
|
Reimplemented in NoiseFillAttribute, FractalFillAttribute, NoiseTranspFillAttribute, and FractalTranspFillAttribute. Definition at line 267 of file fillval.h. 00267 { return FALSE; }
|
|
Reimplemented in GradTranspFillAttribute. Definition at line 324 of file fillval.h. 00324 { return FALSE; }
|
|
Reimplemented in TranspFillAttribute. Definition at line 246 of file fillval.h.
|
|
See AttributeValue::SimpleCopy.
Implements AttributeValue. Reimplemented in GradFillAttribute, RadialFillAttribute, BitmapFillAttribute, NoiseFillAttribute, FractalFillAttribute, GradTranspFillAttribute, RadialTranspFillAttribute, BitmapTranspFillAttribute, NoiseTranspFillAttribute, FractalTranspFillAttribute, StrokeColourAttribute, and StrokeTranspAttribute. Definition at line 347 of file fillval.cpp. 00348 { 00349 // We may as well just use our assignment operator. 00350 *this = *((FillGeometryAttribute*)pValue); 00351 }
|
|
Reimplemented in GradFillAttribute, ThreeColFillAttribute, GradTranspFillAttribute, and ThreeColTranspFillAttribute. Definition at line 320 of file fillval.h. 00320 { return FALSE; }
|
|
Definition at line 9053 of file fillval.cpp. 09055 { 09056 if (!PointOK[0]) // Did the Start Point transform ? 09057 { 09058 if (PointOK[1]) // So, did the End Point transform ? 09059 { 09060 // Work out how the End Point moved 09061 INT32 dx = DestPoints[1].x - SrcPoints[1].x; 09062 INT32 dy = DestPoints[1].y - SrcPoints[1].y; 09063 09064 // and move the start point the same amount 09065 DestPoints[0] = SrcPoints[0]; 09066 DestPoints[0].translate(dx,dy); 09067 } 09068 else if (PointOK[2]) 09069 { 09070 // Work out how the End2 Point moved 09071 INT32 dx = DestPoints[2].x - SrcPoints[2].x; 09072 INT32 dy = DestPoints[2].y - SrcPoints[2].y; 09073 09074 // and move the start point the same amount 09075 DestPoints[0] = SrcPoints[0]; 09076 DestPoints[0].translate(dx,dy); 09077 } 09078 } 09079 09080 if (!PointOK[1]) 09081 { 09082 if (PointOK[0]) // So, did the Start Point transform ? 09083 { 09084 // Work out how the Start Point moved 09085 INT32 dx = DestPoints[0].x - SrcPoints[0].x; 09086 INT32 dy = DestPoints[0].y - SrcPoints[0].y; 09087 09088 // and move the end point the same amount 09089 DestPoints[1] = SrcPoints[1]; 09090 DestPoints[1].translate(dx,dy); 09091 } 09092 else if (PointOK[2]) 09093 { 09094 // Work out how the End2 Point moved 09095 INT32 dx = DestPoints[2].x - SrcPoints[2].x; 09096 INT32 dy = DestPoints[2].y - SrcPoints[2].y; 09097 09098 // and move the end point the same amount 09099 DestPoints[1] = SrcPoints[1]; 09100 DestPoints[1].translate(dx,dy); 09101 } 09102 } 09103 09104 if (!PointOK[2]) 09105 { 09106 if (PointOK[0]) // So, did the Start Point transform ? 09107 { 09108 // Work out how the Start Point moved 09109 INT32 dx = DestPoints[0].x - SrcPoints[0].x; 09110 INT32 dy = DestPoints[0].y - SrcPoints[0].y; 09111 09112 // and move the end2 point the same amount 09113 DestPoints[2] = SrcPoints[2]; 09114 DestPoints[2].translate(dx,dy); 09115 } 09116 else if (PointOK[1]) 09117 { 09118 // Work out how the End Point moved 09119 INT32 dx = DestPoints[1].x - SrcPoints[1].x; 09120 INT32 dy = DestPoints[1].y - SrcPoints[1].y; 09121 09122 // and move the end2 point the same amount 09123 DestPoints[2] = SrcPoints[2]; 09124 DestPoints[2].translate(dx,dy); 09125 } 09126 } 09127 09128 if (MouldPoints>3 && !PointOK[3]) 09129 { 09130 TRACEUSER( "Mike", _T("Perspective Point failed to mould\n")); 09131 } 09132 }
|
|
|