#include <fillval.h>
Inheritance diagram for RadialTranspFillAttribute:
Public Member Functions | |
RadialTranspFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual void | SimpleCopy (AttributeValue *) |
See AttributeValue::SimpleCopy. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrRadialFill node from this graduated fill attribute. | |
virtual FillGeometryAttribute & | operator= (FillGeometryAttribute &Attrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual INT32 | operator== (const FillGeometryAttribute &Attrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual BOOL | IsAspectLocked () |
virtual void | SetAspectLock (BOOL Locked) |
void | MakeCircular () |
Forces this radial fill into a circular one. | |
void | MakeElliptical () |
Forces this radial fill into an elliptical one. | |
BOOL | IsCircular () |
BOOL | IsElliptical () |
virtual DocCoord * | GetEndPoint2 () |
virtual void | SetEndPoint2 (DocCoord *Pos) |
Sets the End Point of this fill. | |
virtual DocCoord * | GetEndPoint3 () |
virtual void | SetEndPoint3 (DocCoord *Pos) |
Sets the End Point of this fill. | |
virtual BOOL | IsPerspective () |
virtual void | MakePerspective () |
Make the fill perspectived. This should be called just before it is transformed by the moulder, so it can validate the 4th control point. | |
virtual void | RemovePerspective () |
Removes perspective from this fill. | |
virtual BOOL | IsARadialFill () |
virtual ColourFillAttribute * | MakeSimilarNonTranspFillGeometry (double TransparencyScale) |
Creates a non-transparent version of this transparent fill attribute. (The original use of this was so airbrushes could maintain their fill's transparency geometry). | |
virtual INT32 | GetGeometryShape () |
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 | |
DocCoord | EndPoint2 |
DocCoord | EndPoint3 |
BOOL | IsPersp |
Private Attributes | |
BOOL | Circular |
Definition at line 1178 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 5092 of file fillval.cpp. 05093 { 05094 Circular = FALSE; 05095 IsPersp = FALSE; 05096 05097 EndPoint2 = DocCoord(0,0); 05098 }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1200 of file fillval.h. 01200 { return &EndPoint2; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1202 of file fillval.h. 01202 { return &EndPoint3; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1213 of file fillval.h. 01213 { return(Circular ? FILLSHAPE_CIRCULAR : FILLSHAPE_ELLIPTICAL); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1209 of file fillval.h. 01209 { return TRUE; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1189 of file fillval.h. 01189 { return Circular; }
|
|
Definition at line 1197 of file fillval.h. 01197 { return Circular; }
|
|
Definition at line 1198 of file fillval.h. 01198 { return !Circular; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1205 of file fillval.h. 01205 { return IsPersp; }
|
|
Forces this radial fill into a circular one.
Definition at line 5250 of file fillval.cpp. 05251 { 05252 // Set a flag so we can tell we're circular 05253 Circular = TRUE; 05254 05255 // Make sure the second end point is on the same radius as the other 05256 EndPoint2 = MakeLineAtAngle(StartPoint, EndPoint, 90); 05257 }
|
|
Forces this radial fill into an elliptical one.
Definition at line 5269 of file fillval.cpp. 05270 { 05271 // Just clear the flag, so we don't try and lock the secondary point 05272 Circular = FALSE; 05273 }
|
|
Make a AttrRadialFill node from this graduated fill attribute.
Reimplemented from AttributeValue. Definition at line 5205 of file fillval.cpp. 05206 { 05207 // Create new attribute node 05208 AttrRadialTranspFill *pAttr = new AttrRadialTranspFill; 05209 if (pAttr==NULL) 05210 // error message has already been set by new 05211 return NULL; 05212 05213 // Copy attribute value into the new node. 05214 pAttr->GetAttributeValue()->SimpleCopy(this); 05215 05216 // Return the new node 05217 return pAttr; 05218 }
|
|
Make the fill perspectived. This should be called just before it is transformed by the moulder, so it can validate the 4th control point.
Reimplemented from FillGeometryAttribute. Definition at line 5308 of file fillval.cpp. 05309 { 05310 IsPersp = TRUE; 05311 05312 INT32 dx1 = EndPoint.x - StartPoint.x; 05313 INT32 dx2 = EndPoint2.x - StartPoint.x; 05314 05315 INT32 dy1 = EndPoint.y - StartPoint.y; 05316 INT32 dy2 = EndPoint2.y - StartPoint.y; 05317 05318 DocCoord Pos3(StartPoint.x + dx1 + dx2, StartPoint.y + dy1 + dy2); 05319 SetEndPoint3(&Pos3); 05320 }
|
|
Creates a non-transparent version of this transparent fill attribute. (The original use of this was so airbrushes could maintain their fill's transparency geometry).
Reimplemented from GradTranspFillAttribute. Definition at line 5358 of file fillval.cpp. 05359 { 05360 UINT32 *pStartTransp = GetStartTransp(); 05361 UINT32 *pEndTransp = GetEndTransp(); 05362 05363 if(pStartTransp == NULL || pEndTransp == NULL) 05364 return NULL; 05365 05366 RadialFillAttribute *pNewAttr = new RadialFillAttribute; 05367 if (pNewAttr != NULL) 05368 { 05369 pNewAttr->SetStartPoint(GetStartPoint()); 05370 pNewAttr->SetEndPoint(GetEndPoint()); 05371 pNewAttr->SetEndPoint2(GetEndPoint2()); 05372 pNewAttr->SetEndPoint3(GetEndPoint3()); 05373 05374 if(IsCircular()) 05375 pNewAttr->MakeCircular(); 05376 else 05377 pNewAttr->MakeElliptical(); 05378 05379 if(IsPerspective()) 05380 pNewAttr->MakePerspective(); 05381 05382 INT32 StartTransparency = 255 - (INT32)(((double)(255 - *pStartTransp)) * TransparencyScale); 05383 INT32 EndTransparency = 255 - (INT32)(((double)(255 - *pEndTransp)) * TransparencyScale); 05384 05385 DocColour colorStart(StartTransparency, StartTransparency, StartTransparency); 05386 DocColour colorEnd1(EndTransparency, EndTransparency, EndTransparency); 05387 pNewAttr->SetStartColour(&colorStart); 05388 pNewAttr->SetEndColour(&colorEnd1); 05389 } 05390 05391 return(pNewAttr); 05392 }
|
|
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path.
Reimplemented from FillGeometryAttribute. Definition at line 5426 of file fillval.cpp. 05427 { 05428 // Taken out of WEBSTER Neville 6/8/97 05429 // Taken out by vector stroking code Neville 2/10/97 05430 #ifdef VECTOR_STROKING 05431 if (pMoulder == NULL) 05432 return(NULL); 05433 05434 RadialFillAttribute *pCopy = (RadialFillAttribute *) GetRuntimeClass()->CreateObject(); 05435 if (pCopy != NULL) 05436 { 05437 // Copy this object's values across 05438 *pCopy = *this; 05439 05440 // Make sure it's defined as an elliptical fill, to ensure all points are set up correctly 05441 pCopy->MakeElliptical(); 05442 05443 // And mould all of the geometry points across 05444 JCW_MOULDPOINT(pCopy, StartPoint); 05445 JCW_MOULDPOINT(pCopy, EndPoint); 05446 JCW_MOULDPOINT(pCopy, EndPoint2); 05447 JCW_MOULDPOINT(pCopy, EndPoint3); 05448 05449 ERROR3IF(TransScale < 0.0 || TransScale > 1.0, "Out of range TransScale parameter"); 05450 if (TransScale >= 0.0 && TransScale < 1.0) 05451 { 05452 JCW_MOULDTRANS(pCopy, StartTransp); 05453 JCW_MOULDTRANS(pCopy, EndTransp); 05454 } 05455 } 05456 return(pCopy); 05457 #else 05458 return NULL; 05459 #endif // VECTOR_STROKING 05460 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from GradTranspFillAttribute. Definition at line 5135 of file fillval.cpp. 05136 { 05137 return GradTranspFillAttribute::operator=(Attrib); 05138 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from GradTranspFillAttribute. Definition at line 5156 of file fillval.cpp. 05157 { 05158 if (GetRuntimeClass() != Attrib.GetRuntimeClass()) 05159 return FALSE; 05160 05161 RadialTranspFillAttribute* pAttrib = (RadialTranspFillAttribute*)&Attrib; 05162 05163 if (IsPerspective()) 05164 { 05165 if (!pAttrib->IsPerspective()) 05166 return FALSE; 05167 05168 if (*GetEndPoint3() != *pAttrib->GetEndPoint3()) 05169 return FALSE; 05170 } 05171 05172 // check the transparency ramp matches 05173 if (!SameTransparencyRampAs(pAttrib->GetTranspRamp())) 05174 return FALSE; 05175 05176 // Are the Colours and Control points all the same ? 05177 return ( 05178 05179 Transp == pAttrib->Transp && 05180 EndTransp == pAttrib->EndTransp && 05181 05182 TranspType == pAttrib->TranspType && 05183 05184 StartPoint == pAttrib->StartPoint && 05185 EndPoint == pAttrib->EndPoint && 05186 EndPoint2 == pAttrib->EndPoint2 && 05187 05188 Circular == pAttrib->Circular 05189 ); 05190 }
|
|
Removes perspective from this fill.
Reimplemented from FillGeometryAttribute. Definition at line 5333 of file fillval.cpp.
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1190 of file fillval.h. 01190 { Circular = Locked; }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 5111 of file fillval.cpp. 05112 { 05113 if (Pos == NULL) 05114 EndPoint2 = DocCoord(0,0); 05115 else 05116 EndPoint2 = *Pos; 05117 }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 5286 of file fillval.cpp. 05287 { 05288 if (Pos == NULL) 05289 EndPoint3 = MakeLineAtAngle(*GetEndPoint(), *GetEndPoint2(), 90); 05290 else 05291 EndPoint3 = *Pos; 05292 }
|
|
See AttributeValue::SimpleCopy.
Reimplemented from GradTranspFillAttribute. Definition at line 5234 of file fillval.cpp. 05235 { 05236 // Base class does most of the work... 05237 GradTranspFillAttribute::SimpleCopy(pValue); 05238 }
|
|
|
|
|
|
|
|
|