00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 #ifndef INC_FILLVAL
00103 #define INC_FILLVAL
00104
00105 #include "attrval.h"
00106 #include "nodeattr.h"
00107 #include "bitmap.h"
00108 #include "biasgain.h"
00109 #include "gconsts.h"
00110
00111 class MouldGeometry;
00112 class NodeMould;
00113 class MouldAttribute;
00114 class PathStrokerVector;
00115 class ColourRamp;
00116 class TransparencyRamp;
00117
00118
00119 #define FILLSHAPE_UNKNOWN -1
00120 #define FILLSHAPE_FLAT 0
00121 #define FILLSHAPE_LINEAR 1
00122 #define FILLSHAPE_CIRCULAR 2
00123 #define FILLSHAPE_ELLIPTICAL 3
00124 #define FILLSHAPE_CONICAL 4
00125 #define FILLSHAPE_DIAMOND 5
00126 #define FILLSHAPE_3POINT 6
00127 #define FILLSHAPE_4POINT 7
00128 #define FILLSHAPE_BITMAP 8
00129 #define FILLSHAPE_CLOUDS 9
00130 #define FILLSHAPE_PLASMA 10
00131
00132 enum RepeatType
00133 {
00134 RT_NoRepeatType = 0,
00135 RT_Simple,
00136 RT_Repeating,
00137 RT_RepeatInverted
00138 };
00139
00140
00141
00142
00143
00144 enum TranspType
00145 {
00146 TT_NoTranspType = 0,
00147 TT_Mix,
00148 TT_StainGlass,
00149 TT_Bleach,
00150
00151
00152
00153
00154
00155
00156
00157
00158 TT_SPECIAL_1 = T_SPECIAL_1,
00159 TT_SPECIAL_2,
00160 TT_SPECIAL_3,
00161
00162
00163
00164
00165 TT_CONTRAST, TT_FLAT_CONTRAST, TT_GRAD_CONTRAST,
00166 TT_SATURATION, TT_FLAT_SATURATION, TT_GRAD_SATURATION,
00167 TT_DARKEN, TT_FLAT_DARKEN, TT_GRAD_DARKEN,
00168 TT_LIGHTEN, TT_FLAT_LIGHTEN, TT_GRAD_LIGHTEN,
00169 TT_BRIGHTNESS, TT_FLAT_BRIGHTNESS, TT_GRAD_BRIGHTNESS,
00170 TT_LUMINOSITY, TT_FLAT_LUMINOSITY, TT_GRAD_LUMINOSITY,
00171 TT_HUE, TT_FLAT_HUE, TT_GRAD_HUE,
00172 TT_BEVEL, TT_FLAT_BEVEL, TT_GRAD_BEVEL,
00173
00174
00175
00176 TT_MAX
00177 };
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193 class FillGeometryAttribute : public AttributeValue
00194 {
00195 CC_DECLARE_DYNCREATE(FillGeometryAttribute)
00196
00197 public:
00198 FillGeometryAttribute();
00199
00200 virtual void Restore(RenderRegion *, BOOL) = 0;
00201 virtual void Render(RenderRegion *, BOOL Temp = FALSE) = 0;
00202 virtual void SimpleCopy(AttributeValue *);
00203 virtual BOOL IsDifferent(AttributeValue*);
00204
00205 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00206 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00207
00208
00209 virtual BOOL RenderFill(RenderRegion *, Path *) { return FALSE; }
00210
00211 virtual BOOL IsAspectLocked() { return FALSE; }
00212 virtual void SetAspectLock(BOOL) {}
00213
00214 virtual BOOL IsPerspective() { return FALSE; }
00215 virtual void MakePerspective() {}
00216 virtual void RemovePerspective() {}
00217
00218 virtual DocCoord* GetStartPoint() { return NULL; }
00219 virtual DocCoord* GetEndPoint() { return NULL; }
00220 virtual DocCoord* GetEndPoint2() { return NULL; }
00221 virtual DocCoord* GetEndPoint3() { return NULL; }
00222 virtual void SetStartPoint(DocCoord*) {}
00223 virtual void SetEndPoint(DocCoord*) {}
00224 virtual void SetEndPoint2(DocCoord*) {}
00225 virtual void SetEndPoint3(DocCoord*) {}
00226
00227 virtual DocColour* GetStartColour() { return NULL; }
00228 virtual DocColour* GetEndColour() { return NULL; }
00229 virtual DocColour* GetEndColour2() { return NULL; }
00230 virtual DocColour* GetEndColour3() { return NULL; }
00231 virtual void SetStartColour(DocColour*) {}
00232 virtual void SetEndColour(DocColour*) {}
00233 virtual void SetEndColour2(DocColour*) {}
00234 virtual void SetEndColour3(DocColour*) {}
00235
00236 virtual UINT32* GetStartTransp() { return NULL; }
00237 virtual UINT32* GetEndTransp() { return NULL; }
00238 virtual UINT32* GetEndTransp2() { return NULL; }
00239 virtual UINT32* GetEndTransp3() { return NULL; }
00240 virtual void SetStartTransp(UINT32*) {}
00241 virtual void SetEndTransp(UINT32*) {}
00242 virtual void SetEndTransp2(UINT32*) {}
00243 virtual void SetEndTransp3(UINT32*) {}
00244
00245 virtual UINT32 GetTranspType() { return TT_NoTranspType; }
00246 virtual void SetTranspType(UINT32 NewType) {}
00247
00248 virtual UINT32 GetDPI() { return 0; }
00249 virtual BOOL SetDPI(UINT32 NewDpi) { return FALSE; }
00250
00251 virtual UINT32 GetFractalDPI() { return 0; }
00252 virtual BOOL SetFractalDPI(UINT32 NewDpi) { return FALSE; }
00253
00254 virtual UINT32 GetFractalDim() { return 0; }
00255 virtual void SetFractalDim(UINT32 NewDim) {}
00256
00257 virtual INT32 GetSeed() { return 0; }
00258 virtual FIXED16 GetGraininess();
00259 virtual FIXED16 GetGravity();
00260 virtual FIXED16 GetSquash() { return 0; }
00261 virtual BOOL GetTileable() { return FALSE; }
00262
00263 virtual BOOL SetSeed(INT32 NewSeed) { return FALSE; }
00264 virtual BOOL SetGraininess(FIXED16 NewGrain) { return FALSE; }
00265 virtual BOOL SetGravity(FIXED16 NewGrav) { return FALSE; }
00266 virtual BOOL SetSquash(FIXED16 NewSquash) { return FALSE; }
00267 virtual BOOL SetTileable(BOOL NewTile) { return FALSE; }
00268
00269 virtual double GetNoiseScale() { return 0; }
00270
00271 virtual BOOL SetNoiseScale(double) { return FALSE; }
00272
00273 virtual BOOL Randomise() { return FALSE; }
00274 virtual BOOL RecalcFractal() { return FALSE; }
00275
00276 virtual BOOL AttachBitmap(KernelBitmap* pBitmap) { return FALSE; }
00277 virtual BOOL DetachBitmap() { return FALSE; }
00278 virtual KernelBitmap* GetBitmap() { return NULL; }
00279 virtual BOOL CopyBitmap(KernelBitmap* pBitmap) { return FALSE; }
00280
00281 virtual KernelBitmapRef* GetBitmapRef() { return NULL; }
00282
00283 virtual INT32 GetTesselation() { return RT_NoRepeatType; }
00284 virtual void SetTesselation(INT32) {}
00285
00286 virtual BOOL Blend(BlendAttrParam* pBlendParam);
00287 virtual BOOL BlendFillColours(DocColour* Start, DocColour* End, DocColour* Blend,
00288 double& Ratio, BlendAttrParam* pBlendParam);
00289 virtual BOOL BlendFillTransp(UINT32* Start, UINT32* End, UINT32* Blend,
00290 double& Ratio, BlendAttrParam* pBlendParam);
00291 virtual BOOL BlendControlPoints(DocCoord* Start, DocCoord* End, DocCoord* Blend,
00292 double& Ratio, BlendAttrParam* pBlendParam, BOOL swapOrder = FALSE);
00293 virtual BOOL CheckForGreyscaleBitmapBlend(KernelBitmap* pBitmap,
00294 DocColour* StartCol, DocColour* EndCol);
00295
00296 virtual INT32 Mould(MouldAttribute*, DocCoord*, INT32, DocCoord*);
00297
00298 virtual BOOL IsAColourFill() { return FALSE; }
00299 virtual BOOL IsATranspFill() { return FALSE; }
00300
00301 virtual BOOL IsAFlatFill() { return FALSE; }
00302 virtual BOOL IsAGradFill() { return FALSE; }
00303
00304 virtual BOOL IsALinearFill() { return FALSE; }
00305 virtual BOOL IsARadialFill() { return FALSE; }
00306 virtual BOOL IsAConicalFill() { return FALSE; }
00307 virtual BOOL IsABitmapFill() { return FALSE; }
00308 virtual BOOL IsAKindOfBitmapFill() { return FALSE; }
00309 virtual BOOL IsASquareFill() { return FALSE; }
00310 virtual BOOL IsAThreeColFill() { return FALSE; }
00311 virtual BOOL IsAFourColFill() { return FALSE; }
00312
00313 virtual BOOL IsATextureFill() { return FALSE; }
00314 virtual BOOL IsAFractalFill() { return FALSE; }
00315 virtual BOOL IsANoiseFill() { return FALSE; }
00316
00317 virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
00318 virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
00319
00320 virtual BOOL SupportsFillRamps() { return FALSE; }
00321 virtual ColourRamp* GetColourRamp() { return NULL; }
00322 virtual TransparencyRamp* GetTranspRamp() { return NULL; }
00323 virtual BOOL SetColourRamp(ColourRamp* pRamp) { return FALSE; }
00324 virtual BOOL SetTranspRamp(TransparencyRamp* pRamp) { return FALSE; }
00325
00326 virtual DocCoord GetGeometryCoord(float pos) const { return DocCoord(0,0); }
00327 virtual float GetGeometryParam(const DocCoord& c) const { return 0.0f; }
00328
00329 virtual INT32 GetGeometryShape() { return(FILLSHAPE_UNKNOWN); }
00330
00331 public:
00332
00333 CProfileBiasGain DiagramMapper;
00334 void SetProfile (CProfileBiasGain& SetWith);
00335 CProfileBiasGain& GetProfile ();
00336 CProfileBiasGain* GetProfilePtr ();
00337
00338 public:
00339 virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00340
00341
00342
00343 protected:
00344 virtual void TidyMouldPoints(DocCoord*, DocCoord*, BOOL*, INT32);
00345
00346 protected:
00347 KernelBitmap* GenerateFractalBitmap(INT32, double, double, double, UINT32);
00348 KernelBitmap* GenerateNoiseBitmap(FIXED16 grain, INT32 seed);
00349 };
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366 class ColourFillAttribute : public FillGeometryAttribute
00367 {
00368 CC_DECLARE_DYNCREATE(ColourFillAttribute)
00369
00370 public:
00371 ColourFillAttribute();
00372
00373 static BOOL Init();
00374
00375 virtual void Restore(RenderRegion *, BOOL);
00376 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
00377
00378 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00379 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00380
00381 virtual DocColour* GetStartColour() { return &Colour; }
00382 virtual void SetStartColour(DocColour* NewCol);
00383
00384 virtual BOOL IsAColourFill() { return TRUE; }
00385 virtual BOOL ContainsNamedColour();
00386
00387 public:
00388 DocColour Colour;
00389 };
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405 class FlatFillAttribute : public ColourFillAttribute
00406 {
00407 CC_DECLARE_DYNCREATE(FlatFillAttribute)
00408 public:
00409 FlatFillAttribute();
00410 FlatFillAttribute(DocColour& NewColour) { SetStartColour(&NewColour); }
00411
00412 virtual BOOL Blend(BlendAttrParam* pBlendParam);
00413
00414 virtual NodeAttribute *MakeNode();
00415 virtual void SetStartColour(DocColour* NewCol);
00416
00417 virtual BOOL IsAFlatFill() { return TRUE; }
00418
00419 virtual INT32 GetGeometryShape() { return(FILLSHAPE_FLAT); }
00420
00421 public:
00422 virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00423
00424
00425 };
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442 class GradFillAttribute : public ColourFillAttribute
00443 {
00444 CC_DECLARE_DYNCREATE(GradFillAttribute)
00445 public:
00446 GradFillAttribute();
00447 ~GradFillAttribute();
00448
00449 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00450 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00451
00452 virtual void SimpleCopy(AttributeValue *);
00453
00454 virtual BOOL RenderFill(RenderRegion *, Path *);
00455
00456 virtual DocCoord* GetStartPoint() { return &StartPoint; }
00457 virtual DocCoord* GetEndPoint() { return &EndPoint; }
00458 virtual DocColour* GetEndColour() { return &EndColour; }
00459
00460 virtual void SetStartPoint(DocCoord* Pos);
00461 virtual void SetEndPoint(DocCoord* Pos);
00462 virtual void SetEndColour(DocColour* NewCol);
00463
00464 virtual BOOL Blend(BlendAttrParam* pBlendParam);
00465
00466 virtual BOOL IsAGradFill() { return TRUE; }
00467 virtual DocCoord GetGeometryCoord(float pos) const;
00468 virtual float GetGeometryParam(const DocCoord& c) const;
00469
00470 ColourRamp *GetColourRamp() { return m_pColourRamp; }
00471
00472 public:
00473
00474 DocColour EndColour;
00475 DocCoord StartPoint;
00476 DocCoord EndPoint;
00477
00478 public:
00479
00480 virtual BOOL SupportsFillRamps() { return TRUE; }
00481 virtual BOOL SetColourRamp(ColourRamp* pRamp);
00482
00483 ColourRamp* MakeNewColourRamp();
00484 BOOL SameColourRampAs(ColourRamp *pOtherRamp);
00485 void DeleteColourRamp();
00486
00487 protected:
00488 ColourRamp *m_pColourRamp;
00489 };
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503 class LinearFillAttribute : public GradFillAttribute
00504 {
00505 CC_DECLARE_DYNCREATE(LinearFillAttribute)
00506 public:
00507 LinearFillAttribute();
00508 virtual NodeAttribute *MakeNode();
00509
00510
00511 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00512 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00513 virtual void SetEndPoint2(DocCoord* Pos);
00514 virtual void SetEndPoint3(DocCoord* Pos);
00515
00516 virtual BOOL IsPerspective() { return IsPersp; }
00517 virtual void MakePerspective();
00518 virtual void RemovePerspective();
00519
00520 virtual BOOL IsALinearFill() { return TRUE; }
00521 virtual INT32 GetGeometryShape() { return(FILLSHAPE_LINEAR); }
00522
00523 public:
00524 virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00525
00526
00527
00528 public:
00529 DocCoord EndPoint2;
00530 DocCoord EndPoint3;
00531
00532 BOOL IsPersp;
00533 };
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547 class RadialFillAttribute : public GradFillAttribute
00548 {
00549 CC_DECLARE_DYNCREATE(RadialFillAttribute)
00550 public:
00551 RadialFillAttribute();
00552 virtual void SimpleCopy(AttributeValue *);
00553 virtual NodeAttribute *MakeNode();
00554
00555
00556 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00557 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00558
00559 virtual BOOL IsAspectLocked() { return Circular; }
00560 virtual void SetAspectLock(BOOL Locked) { Circular = Locked; }
00561
00562
00563
00564 void MakeCircular();
00565 void MakeElliptical();
00566
00567 BOOL IsCircular() { return Circular; }
00568 BOOL IsElliptical() { return !Circular; }
00569
00570 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00571 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00572 virtual void SetEndPoint2(DocCoord* Pos);
00573 virtual void SetEndPoint3(DocCoord* Pos);
00574
00575 virtual BOOL IsPerspective() { return IsPersp; }
00576 virtual void MakePerspective();
00577 virtual void RemovePerspective();
00578
00579 virtual BOOL IsARadialFill() { return TRUE; }
00580 virtual INT32 GetGeometryShape() { return(Circular ? FILLSHAPE_CIRCULAR : FILLSHAPE_ELLIPTICAL); }
00581
00582 public:
00583 virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00584
00585
00586
00587 public:
00588 DocCoord EndPoint2;
00589 DocCoord EndPoint3;
00590 BOOL IsPersp;
00591
00592 private:
00593 BOOL Circular;
00594 };
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608 class ConicalFillAttribute : public GradFillAttribute
00609 {
00610 CC_DECLARE_DYNCREATE(ConicalFillAttribute)
00611 public:
00612 ConicalFillAttribute();
00613 virtual NodeAttribute *MakeNode();
00614
00615 virtual DocCoord GetGeometryCoord(float pos) const;
00616 virtual float GetGeometryParam(const DocCoord& c) const;
00617
00618 virtual BOOL IsAConicalFill() { return TRUE; }
00619 virtual INT32 GetGeometryShape() { return(FILLSHAPE_CONICAL); }
00620 };
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635 class SquareFillAttribute : public GradFillAttribute
00636 {
00637 CC_DECLARE_DYNCREATE(SquareFillAttribute)
00638 public:
00639 SquareFillAttribute();
00640 virtual NodeAttribute *MakeNode();
00641
00642
00643 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00644 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00645 virtual void SetEndPoint2(DocCoord* Pos);
00646 virtual void SetEndPoint3(DocCoord* Pos);
00647
00648 virtual BOOL IsPerspective() { return IsPersp; }
00649 virtual void MakePerspective();
00650 virtual void RemovePerspective();
00651
00652 virtual BOOL IsASquareFill() { return TRUE; }
00653 virtual INT32 GetGeometryShape() { return(FILLSHAPE_DIAMOND); }
00654
00655 public:
00656 DocCoord EndPoint2;
00657 DocCoord EndPoint3;
00658
00659 BOOL IsPersp;
00660 };
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674 class ThreeColFillAttribute : public GradFillAttribute
00675 {
00676 CC_DECLARE_DYNCREATE(ThreeColFillAttribute)
00677 public:
00678 ThreeColFillAttribute();
00679
00680 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00681
00682 virtual NodeAttribute *MakeNode();
00683
00684 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00685 virtual void SetEndPoint2(DocCoord* Pos);
00686 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00687 virtual void SetEndPoint3(DocCoord* Pos);
00688
00689 virtual DocColour* GetEndColour2() { return &EndColour2; }
00690 virtual void SetEndColour2(DocColour* NewCol);
00691
00692 virtual BOOL IsPerspective() { return IsPersp; }
00693 virtual void MakePerspective();
00694 virtual void RemovePerspective();
00695
00696 virtual BOOL IsAThreeColFill() { return TRUE; }
00697 virtual BOOL SupportsFillRamps() { return FALSE; }
00698 virtual INT32 GetGeometryShape() { return(FILLSHAPE_3POINT); }
00699
00700 public:
00701 DocCoord EndPoint2;
00702 DocCoord EndPoint3;
00703
00704 BOOL IsPersp;
00705
00706 DocColour EndColour2;
00707 };
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720 class FourColFillAttribute : public ThreeColFillAttribute
00721 {
00722 CC_DECLARE_DYNCREATE(FourColFillAttribute)
00723 public:
00724 FourColFillAttribute();
00725
00726 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00727
00728 virtual NodeAttribute *MakeNode();
00729
00730 virtual DocColour* GetEndColour3() { return &EndColour3; }
00731 virtual void SetEndColour3(DocColour* NewCol);
00732
00733 virtual BOOL IsAFourColFill() { return TRUE; }
00734 virtual INT32 GetGeometryShape() { return(FILLSHAPE_4POINT); }
00735
00736 public:
00737 DocColour EndColour3;
00738 };
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755 class BitmapFillAttribute : public GradFillAttribute
00756 {
00757 CC_DECLARE_DYNCREATE(BitmapFillAttribute)
00758 public:
00759 BitmapFillAttribute();
00760 ~BitmapFillAttribute();
00761
00762 virtual void Restore(RenderRegion *, BOOL);
00763 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
00764
00765 virtual NodeAttribute *MakeNode();
00766 virtual BOOL RenderFill(RenderRegion *, Path *);
00767 virtual void SimpleCopy(AttributeValue *);
00768
00769 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00770 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00771
00772 KernelBitmapRef BitmapRef;
00773
00774 virtual KernelBitmapRef* GetBitmapRef();
00775
00776 virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
00777 virtual BOOL DetachBitmap();
00778 virtual KernelBitmap* GetBitmap();
00779 virtual BOOL CopyBitmap(KernelBitmap*);
00780
00781 virtual DocCoord* GetStartPoint() { return &StartPoint; }
00782 virtual DocCoord* GetEndPoint() { return &EndPoint; }
00783 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00784 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00785 virtual void SetStartPoint(DocCoord* Pos);
00786 virtual void SetEndPoint(DocCoord* Pos);
00787 virtual void SetEndPoint2(DocCoord* Pos);
00788 virtual void SetEndPoint3(DocCoord* Pos);
00789
00790 virtual void SetStartColour(DocColour*);
00791 virtual void SetEndColour(DocColour*);
00792
00793 virtual DocColour* GetStartColour();
00794 virtual DocColour* GetEndColour();
00795
00796 virtual INT32 GetTesselation() { return Tesselation; }
00797 virtual void SetTesselation(INT32 NewTess);
00798
00799 virtual BOOL SetDPI(UINT32 NewDpi);
00800 virtual UINT32 GetDPI();
00801
00802 virtual BOOL IsPerspective() { return IsPersp; }
00803 virtual void MakePerspective();
00804 virtual void RemovePerspective();
00805
00806 virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
00807 virtual BOOL IsABitmapFill() { return TRUE; }
00808
00809
00810
00811 BOOL CanBlurRenderBitmap() { return m_CanBlurRender; }
00812 void SetCanBlurRenderBitmap(BOOL b) { m_CanBlurRender = b; }
00813
00814 virtual INT32 GetGeometryShape() { return(FILLSHAPE_BITMAP); }
00815
00816 public:
00817 DocCoord EndPoint2;
00818 DocCoord EndPoint3;
00819
00820 INT32 Tesselation;
00821
00822 BOOL IsPersp;
00823
00824 BOOL m_CanBlurRender;
00825
00826 static BOOL m_doBitmapSmoothing;
00827 };
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841 class NoiseFillAttribute : public BitmapFillAttribute
00842 {
00843 CC_DECLARE_DYNCREATE(NoiseFillAttribute)
00844
00845 public:
00846 NoiseFillAttribute();
00847 ~NoiseFillAttribute();
00848
00849 virtual NodeAttribute *MakeNode();
00850 virtual void SimpleCopy(AttributeValue *);
00851
00852 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00853 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00854
00855 virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
00856 virtual BOOL DetachBitmap();
00857 virtual BOOL CopyBitmap(KernelBitmap*);
00858
00859 virtual BOOL RecalcFractal();
00860
00861 virtual UINT32 GetFractalDim() { return dim; }
00862 virtual BOOL GetTileable() { return tileable; }
00863 virtual UINT32 GetFractalDPI() { return dpi; }
00864 virtual DocColour* GetStartColour() { return &Colour; }
00865 virtual DocColour* GetEndColour() { return &EndColour; }
00866
00867 virtual INT32 GetSeed() { return seed; }
00868 virtual FIXED16 GetGraininess() { return grain; }
00869
00870 virtual void SetTesselation(INT32 NewTess);
00871 virtual void SetFractalDim(UINT32 NewDim);
00872 virtual BOOL SetTileable(BOOL NewTile);
00873 virtual BOOL SetFractalDPI(UINT32 NewDpi);
00874
00875 virtual void SetStartColour(DocColour*);
00876 virtual void SetEndColour(DocColour*);
00877
00878 virtual BOOL SetSeed(INT32 NewSeed);
00879 virtual BOOL SetGraininess(FIXED16 NewGrain);
00880
00881 virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
00882 virtual BOOL IsABitmapFill() { return FALSE; }
00883 virtual BOOL IsATextureFill() { return TRUE; }
00884 virtual BOOL IsANoiseFill() { return TRUE; }
00885
00886 virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
00887 virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
00888
00889 virtual INT32 GetGeometryShape() { return(FILLSHAPE_PLASMA); }
00890
00891 private:
00892 INT32 seed;
00893 UINT32 dpi;
00894 BOOL tileable;
00895 UINT32 dim;
00896
00897 private:
00898 FIXED16 grain;
00899 };
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913 class FractalFillAttribute : public BitmapFillAttribute
00914 {
00915 CC_DECLARE_DYNCREATE(FractalFillAttribute)
00916 public:
00917 FractalFillAttribute();
00918 ~FractalFillAttribute();
00919
00920 virtual NodeAttribute *MakeNode();
00921 virtual void SimpleCopy(AttributeValue *);
00922
00923 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00924 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00925
00926 virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
00927 virtual BOOL DetachBitmap();
00928 virtual BOOL CopyBitmap(KernelBitmap*);
00929
00930 virtual BOOL Randomise();
00931 virtual BOOL RecalcFractal();
00932
00933 virtual UINT32 GetFractalDim() { return Dim; }
00934 virtual BOOL GetTileable() { return Tileable; }
00935 virtual UINT32 GetFractalDPI() { return Dpi; }
00936
00937 virtual DocColour* GetStartColour() { return &Colour; }
00938 virtual DocColour* GetEndColour() { return &EndColour; }
00939
00940 virtual INT32 GetSeed() { return Seed; }
00941 virtual FIXED16 GetGraininess() { return Graininess; }
00942 virtual FIXED16 GetGravity() { return Gravity; }
00943 virtual FIXED16 GetSquash() { return Squash; }
00944
00945 virtual void SetTesselation(INT32 NewTess);
00946 virtual void SetFractalDim(UINT32 NewDim);
00947 virtual BOOL SetTileable(BOOL NewTile);
00948 virtual BOOL SetFractalDPI(UINT32 NewDpi);
00949
00950 virtual void SetStartColour(DocColour*);
00951 virtual void SetEndColour(DocColour*);
00952
00953 virtual BOOL SetSeed(INT32 NewSeed);
00954 virtual BOOL SetGraininess(FIXED16 NewGrain);
00955 virtual BOOL SetGravity(FIXED16 NewGrav);
00956 virtual BOOL SetSquash(FIXED16 NewSquash);
00957
00958 virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
00959 virtual BOOL IsABitmapFill() { return FALSE; }
00960 virtual BOOL IsATextureFill() { return TRUE; }
00961 virtual BOOL IsAFractalFill() { return TRUE; }
00962
00963
00964 virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
00965 virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
00966
00967 virtual INT32 GetGeometryShape() { return(FILLSHAPE_CLOUDS); }
00968
00969 public:
00970 INT32 Seed;
00971 FIXED16 Graininess;
00972 FIXED16 Gravity;
00973 FIXED16 Squash;
00974 INT32 Dpi;
00975 BOOL Tileable;
00976
00977 protected:
00978 INT32 Dim;
00979 };
00980
00981
00982
00983
00984
00985
00986
00987
00988
00989
00990
00991
00992
00993
00994
00995
00996
00997
00998 class TranspFillAttribute : public FillGeometryAttribute
00999 {
01000 CC_DECLARE_DYNCREATE(TranspFillAttribute)
01001
01002 public:
01003 TranspFillAttribute();
01004
01005 static BOOL Init();
01006
01007 virtual void Restore(RenderRegion *, BOOL);
01008 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01009
01010 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01011 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01012
01013 virtual UINT32* GetStartTransp() { return &Transp; }
01014 virtual void SetStartTransp(UINT32* NewTransp);
01015
01016 UINT32 GetTranspType() { return TranspType; }
01017 void SetTranspType(UINT32 NewType);
01018
01019 virtual BOOL IsATranspFill() { return TRUE; }
01020 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale) {return NULL;}
01021
01022 public:
01023 UINT32 TranspType;
01024 UINT32 Transp;
01025 };
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039 class FlatTranspFillAttribute : public TranspFillAttribute
01040 {
01041 CC_DECLARE_DYNCREATE(FlatTranspFillAttribute)
01042 public:
01043 FlatTranspFillAttribute();
01044 FlatTranspFillAttribute(UINT32 NewTransp) { SetStartTransp(&NewTransp); }
01045
01046 virtual BOOL Blend(BlendAttrParam* pBlendParam);
01047
01048 virtual NodeAttribute *MakeNode();
01049
01050 virtual BOOL IsAFlatFill() { return TRUE; }
01051
01052 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01053
01054 virtual INT32 GetGeometryShape() { return(FILLSHAPE_FLAT); }
01055 };
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071 class GradTranspFillAttribute : public TranspFillAttribute
01072 {
01073 CC_DECLARE_DYNCREATE(GradTranspFillAttribute)
01074 public:
01075 GradTranspFillAttribute();
01076 ~GradTranspFillAttribute();
01077
01078 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01079 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01080
01081 virtual void SimpleCopy(AttributeValue *);
01082
01083 virtual DocCoord* GetStartPoint() { return &StartPoint; }
01084 virtual DocCoord* GetEndPoint() { return &EndPoint; }
01085 virtual UINT32* GetEndTransp() { return &EndTransp; }
01086
01087 virtual void SetStartPoint(DocCoord* Pos);
01088 virtual void SetEndPoint(DocCoord* Pos);
01089 virtual void SetEndTransp(UINT32* NewTransp);
01090
01091 virtual BOOL Blend(BlendAttrParam* pBlendParam);
01092 virtual BOOL IsAGradFill() { return TRUE; }
01093 virtual DocCoord GetGeometryCoord(float pos) const;
01094 virtual float GetGeometryParam(const DocCoord& c) const;
01095
01096 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01097
01098 public:
01099 DocCoord StartPoint;
01100 DocCoord EndPoint;
01101 UINT32 EndTransp;
01102
01103 public:
01104
01105 virtual BOOL SupportsFillRamps() { return TRUE; }
01106 virtual BOOL SetTranspRamp(TransparencyRamp *pRamp);
01107 virtual TransparencyRamp* GetTranspRamp() { return m_pTranspRamp; }
01108
01109 TransparencyRamp* MakeNewTranspRamp();
01110 BOOL SameTransparencyRampAs(TransparencyRamp *pOtherRamp);
01111 void DeleteTranspRamp();
01112
01113 protected:
01114 TransparencyRamp *m_pTranspRamp;
01115 };
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132 class LinearTranspFillAttribute : public GradTranspFillAttribute
01133 {
01134 CC_DECLARE_DYNCREATE(LinearTranspFillAttribute)
01135 public:
01136 LinearTranspFillAttribute();
01137 virtual NodeAttribute *MakeNode();
01138
01139 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01140 virtual void SetEndPoint2(DocCoord* Pos);
01141 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01142 virtual void SetEndPoint3(DocCoord* Pos);
01143
01144 virtual BOOL IsPerspective() { return IsPersp; }
01145 virtual void MakePerspective();
01146 virtual void RemovePerspective();
01147
01148 virtual BOOL IsALinearFill() { return TRUE; }
01149
01150 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01151
01152 virtual INT32 GetGeometryShape() { return(FILLSHAPE_LINEAR); }
01153
01154 public:
01155 virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
01156
01157
01158
01159 public:
01160 DocCoord EndPoint2;
01161 DocCoord EndPoint3;
01162
01163 BOOL IsPersp;
01164 };
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178 class RadialTranspFillAttribute : public GradTranspFillAttribute
01179 {
01180 CC_DECLARE_DYNCREATE(RadialTranspFillAttribute)
01181 public:
01182 RadialTranspFillAttribute();
01183 virtual void SimpleCopy(AttributeValue *);
01184 virtual NodeAttribute *MakeNode();
01185
01186 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01187 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01188
01189 virtual BOOL IsAspectLocked() { return Circular; }
01190 virtual void SetAspectLock(BOOL Locked) { Circular = Locked; }
01191
01192
01193
01194 void MakeCircular();
01195 void MakeElliptical();
01196
01197 BOOL IsCircular() { return Circular; }
01198 BOOL IsElliptical() { return !Circular; }
01199
01200 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01201 virtual void SetEndPoint2(DocCoord* Pos);
01202 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01203 virtual void SetEndPoint3(DocCoord* Pos);
01204
01205 virtual BOOL IsPerspective() { return IsPersp; }
01206 virtual void MakePerspective();
01207 virtual void RemovePerspective();
01208
01209 virtual BOOL IsARadialFill() { return TRUE; }
01210
01211 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01212
01213 virtual INT32 GetGeometryShape() { return(Circular ? FILLSHAPE_CIRCULAR : FILLSHAPE_ELLIPTICAL); }
01214
01215 public:
01216 virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
01217
01218
01219
01220 public:
01221 DocCoord EndPoint2;
01222 DocCoord EndPoint3;
01223 BOOL IsPersp;
01224
01225 private:
01226 BOOL Circular;
01227 };
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241 class ConicalTranspFillAttribute : public GradTranspFillAttribute
01242 {
01243 CC_DECLARE_DYNCREATE(ConicalTranspFillAttribute)
01244 public:
01245 ConicalTranspFillAttribute();
01246 virtual NodeAttribute *MakeNode();
01247
01248 virtual BOOL IsAConicalFill() { return TRUE; }
01249 virtual DocCoord GetGeometryCoord(float pos) const;
01250 virtual float GetGeometryParam(const DocCoord& c) const;
01251
01252 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01253
01254 virtual INT32 GetGeometryShape() { return(FILLSHAPE_CONICAL); }
01255 };
01256
01257
01258
01259
01260
01261
01262
01263
01264
01265
01266
01267
01268
01269
01270 class SquareTranspFillAttribute : public GradTranspFillAttribute
01271 {
01272 CC_DECLARE_DYNCREATE(SquareTranspFillAttribute)
01273 public:
01274 SquareTranspFillAttribute();
01275 virtual NodeAttribute *MakeNode();
01276
01277 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01278 virtual void SetEndPoint2(DocCoord* Pos);
01279 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01280 virtual void SetEndPoint3(DocCoord* Pos);
01281
01282 virtual BOOL IsPerspective() { return IsPersp; }
01283 virtual void MakePerspective();
01284 virtual void RemovePerspective();
01285
01286 virtual BOOL IsASquareFill() { return TRUE; }
01287
01288 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01289
01290 virtual INT32 GetGeometryShape() { return(FILLSHAPE_DIAMOND); }
01291
01292 public:
01293 DocCoord EndPoint2;
01294 DocCoord EndPoint3;
01295
01296 BOOL IsPersp;
01297 };
01298
01299
01300
01301
01302
01303
01304
01305
01306
01307
01308
01309
01310
01311
01312 class BitmapTranspFillAttribute : public GradTranspFillAttribute
01313 {
01314 CC_DECLARE_DYNCREATE(BitmapTranspFillAttribute)
01315 public:
01316 BitmapTranspFillAttribute();
01317 ~BitmapTranspFillAttribute();
01318
01319 virtual void Restore(RenderRegion *, BOOL);
01320 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01321
01322 virtual NodeAttribute *MakeNode();
01323 virtual void SimpleCopy(AttributeValue *);
01324
01325 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01326 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01327
01328 KernelBitmapRef BitmapRef;
01329
01330 virtual KernelBitmapRef* GetBitmapRef() { return &BitmapRef; }
01331
01332 virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
01333 virtual BOOL DetachBitmap();
01334 virtual KernelBitmap* GetBitmap();
01335 virtual BOOL CopyBitmap(KernelBitmap*);
01336
01337 virtual DocCoord* GetStartPoint() { return &StartPoint; }
01338 virtual DocCoord* GetEndPoint() { return &EndPoint; }
01339 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01340 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01341 virtual void SetStartPoint(DocCoord* Pos);
01342 virtual void SetEndPoint(DocCoord* Pos);
01343 virtual void SetEndPoint2(DocCoord* Pos);
01344 virtual void SetEndPoint3(DocCoord* Pos);
01345
01346 virtual INT32 GetTesselation() { return Tesselation; }
01347 virtual void SetTesselation(INT32 NewTess);
01348
01349 virtual UINT32 GetDPI();
01350 virtual BOOL SetDPI(UINT32 NewDpi);
01351
01352 virtual UINT32* GetStartTransp();
01353 virtual void SetStartTransp(UINT32* NewTransp);
01354 virtual UINT32* GetEndTransp();
01355 virtual void SetEndTransp(UINT32* NewTransp);
01356
01357 virtual BOOL IsPerspective() { return IsPersp; }
01358 virtual void MakePerspective();
01359 virtual void RemovePerspective();
01360
01361 virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
01362 virtual BOOL IsABitmapFill() { return TRUE; }
01363
01364 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01365
01366 virtual INT32 GetGeometryShape() { return(FILLSHAPE_BITMAP); }
01367
01368 public:
01369 DocCoord EndPoint2;
01370 DocCoord EndPoint3;
01371
01372 INT32 Tesselation;
01373
01374 BOOL IsPersp;
01375
01376 static BOOL m_doBitmapSmoothing;
01377 };
01378
01379
01380
01381
01382
01383
01384
01385
01386
01387
01388
01389
01390
01391 class NoiseTranspFillAttribute : public BitmapTranspFillAttribute
01392 {
01393 CC_DECLARE_DYNCREATE(NoiseTranspFillAttribute)
01394
01395 public:
01396 NoiseTranspFillAttribute();
01397 ~NoiseTranspFillAttribute();
01398
01399 virtual NodeAttribute *MakeNode();
01400 virtual void SimpleCopy(AttributeValue *);
01401
01402 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01403 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01404
01405 virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
01406 virtual BOOL DetachBitmap();
01407 virtual BOOL CopyBitmap(KernelBitmap*);
01408
01409 virtual BOOL RecalcFractal();
01410
01411 virtual UINT32 GetFractalDim() { return dim; }
01412 virtual BOOL GetTileable() { return tileable; }
01413 virtual UINT32 GetFractalDPI() { return dpi; }
01414 virtual INT32 GetSeed() { return seed; }
01415 virtual FIXED16 GetGraininess() { return grain; }
01416
01417 virtual void SetTesselation(INT32 NewTess);
01418 virtual void SetFractalDim(UINT32 NewDim);
01419 virtual BOOL SetTileable(BOOL NewTile);
01420 virtual BOOL SetFractalDPI(UINT32 NewDpi);
01421
01422 virtual BOOL SetSeed(INT32 NewSeed);
01423 virtual BOOL SetGraininess(FIXED16 NewGrain);
01424
01425 virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
01426 virtual BOOL IsABitmapFill() { return FALSE; }
01427
01428 virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
01429 virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
01430
01431 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01432
01433 virtual INT32 GetGeometryShape() { return(FILLSHAPE_PLASMA); }
01434
01435 private:
01436 UINT32 dpi;
01437 UINT32 dim;
01438 BOOL tileable;
01439 INT32 seed;
01440
01441 private:
01442 FIXED16 grain;
01443 };
01444
01445
01446
01447
01448
01449
01450
01451
01452
01453
01454
01455
01456
01457 class FractalTranspFillAttribute : public BitmapTranspFillAttribute
01458 {
01459 CC_DECLARE_DYNCREATE(FractalTranspFillAttribute)
01460 public:
01461 FractalTranspFillAttribute();
01462 ~FractalTranspFillAttribute();
01463
01464 virtual NodeAttribute *MakeNode();
01465 virtual void SimpleCopy(AttributeValue *);
01466
01467 virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01468 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01469
01470 virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
01471 virtual BOOL DetachBitmap();
01472 virtual BOOL CopyBitmap(KernelBitmap*);
01473
01474 virtual BOOL Randomise();
01475 virtual BOOL RecalcFractal();
01476
01477 virtual UINT32 GetFractalDim() { return Dim; }
01478 virtual BOOL GetTileable() { return Tileable; }
01479 virtual UINT32 GetFractalDPI() { return Dpi; }
01480
01481 virtual INT32 GetSeed() { return Seed; }
01482 virtual FIXED16 GetGraininess() { return Graininess; }
01483 virtual FIXED16 GetGravity() { return Gravity; }
01484 virtual FIXED16 GetSquash() { return Squash; }
01485
01486 virtual void SetTesselation(INT32 NewTess);
01487 virtual void SetFractalDim(UINT32 NewDim);
01488 virtual BOOL SetTileable(BOOL NewTile);
01489 virtual BOOL SetFractalDPI(UINT32 NewDpi);
01490
01491 virtual BOOL SetSeed(INT32 NewSeed);
01492 virtual BOOL SetGraininess(FIXED16 NewGrain);
01493 virtual BOOL SetGravity(FIXED16 NewGrav);
01494 virtual BOOL SetSquash(FIXED16 NewSquash);
01495
01496 virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
01497 virtual BOOL IsABitmapFill() { return FALSE; }
01498 virtual BOOL IsAFractalFill() { return TRUE; }
01499
01500 virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
01501 virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
01502
01503 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01504
01505 virtual INT32 GetGeometryShape() { return(FILLSHAPE_CLOUDS); }
01506
01507 public:
01508 INT32 Seed;
01509 FIXED16 Graininess;
01510 FIXED16 Gravity;
01511 FIXED16 Squash;
01512
01513 INT32 Dpi;
01514 BOOL Tileable;
01515
01516 protected:
01517 INT32 Dim;
01518 };
01519
01520
01521
01522
01523
01524
01525
01526
01527
01528
01529
01530
01531
01532
01533 class ThreeColTranspFillAttribute : public GradTranspFillAttribute
01534 {
01535 CC_DECLARE_DYNCREATE(ThreeColTranspFillAttribute)
01536 public:
01537 ThreeColTranspFillAttribute();
01538
01539 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01540
01541 virtual NodeAttribute *MakeNode();
01542
01543 virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01544 virtual void SetEndPoint2(DocCoord* Pos);
01545 virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01546 virtual void SetEndPoint3(DocCoord* Pos);
01547
01548 virtual UINT32* GetEndTransp2() { return &EndTransp2; }
01549 virtual void SetEndTransp2(UINT32* NewTransp);
01550
01551 virtual BOOL IsPerspective() { return IsPersp; }
01552 virtual void MakePerspective();
01553 virtual void RemovePerspective();
01554
01555 virtual BOOL IsAThreeColFill() { return TRUE; }
01556
01557 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01558 virtual BOOL SupportsFillRamps() { return FALSE; }
01559
01560 virtual INT32 GetGeometryShape() { return(FILLSHAPE_3POINT); }
01561
01562 public:
01563 DocCoord EndPoint2;
01564 DocCoord EndPoint3;
01565
01566 BOOL IsPersp;
01567
01568 UINT32 EndTransp2;
01569 };
01570
01571
01572
01573
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584 class FourColTranspFillAttribute : public ThreeColTranspFillAttribute
01585 {
01586 CC_DECLARE_DYNCREATE(FourColTranspFillAttribute)
01587 public:
01588 FourColTranspFillAttribute();
01589
01590 virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01591
01592 virtual NodeAttribute *MakeNode();
01593
01594 virtual UINT32* GetEndTransp3() { return &EndTransp3; }
01595 virtual void SetEndTransp3(UINT32* NewTransp);
01596
01597 virtual BOOL IsAFourColFill() { return TRUE; }
01598
01599 virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01600
01601 virtual INT32 GetGeometryShape() { return(FILLSHAPE_4POINT); }
01602
01603 public:
01604 UINT32 EndTransp3;
01605 };
01606
01607
01608
01609
01610
01611
01612
01613
01614
01615
01616
01617
01618
01619
01620
01621 class FillMappingAttribute : public AttributeValue
01622 {
01623 CC_DECLARE_DYNCREATE(FillMappingAttribute)
01624 public:
01625 FillMappingAttribute();
01626
01627 virtual void Restore(RenderRegion *, BOOL);
01628 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01629 virtual void SimpleCopy(AttributeValue *);
01630 static BOOL Init();
01631
01632 virtual BOOL IsDifferent(AttributeValue*);
01633 virtual FillMappingAttribute& operator=(FillMappingAttribute& Attrib);
01634 virtual INT32 operator==(const FillMappingAttribute& Attrib);
01635
01636 INT32 Repeat;
01637 };
01638
01639
01640
01641
01642
01643
01644
01645
01646
01647
01648
01649
01650
01651 class FillMappingLinearAttribute : public FillMappingAttribute
01652 {
01653 CC_DECLARE_DYNCREATE(FillMappingLinearAttribute)
01654 public:
01655 FillMappingLinearAttribute() : FillMappingAttribute() {}
01656
01657 virtual NodeAttribute *MakeNode();
01658 };
01659
01660
01661
01662
01663
01664
01665
01666
01667
01668
01669
01670
01671
01672
01673 class FillMappingSinAttribute : public FillMappingAttribute
01674 {
01675 CC_DECLARE_DYNCREATE(FillMappingSinAttribute)
01676 public:
01677 FillMappingSinAttribute() : FillMappingAttribute() {}
01678
01679 virtual NodeAttribute *MakeNode();
01680 };
01681
01682
01683
01684
01685
01686
01687
01688
01689
01690
01691
01692
01693
01694
01695 class FillEffectAttribute : public AttributeValue
01696 {
01697 CC_DECLARE_DYNCREATE(FillEffectAttribute)
01698 public:
01699 virtual void Restore(RenderRegion *, BOOL);
01700 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01701 virtual void SimpleCopy(AttributeValue *);
01702 static BOOL Init();
01703
01704 virtual BOOL IsDifferent(AttributeValue*);
01705 virtual FillEffectAttribute& operator=(FillEffectAttribute& Attrib);
01706 virtual INT32 operator==(const FillEffectAttribute& Attrib);
01707 };
01708
01709
01710
01711
01712
01713
01714
01715
01716
01717
01718
01719
01720
01721 class FillEffectFadeAttribute : public FillEffectAttribute
01722 {
01723 CC_DECLARE_DYNCREATE(FillEffectFadeAttribute)
01724 public:
01725 virtual NodeAttribute *MakeNode();
01726 };
01727
01728
01729
01730
01731
01732
01733
01734
01735
01736
01737
01738
01739
01740
01741 class FillEffectRainbowAttribute : public FillEffectAttribute
01742 {
01743 CC_DECLARE_DYNCREATE(FillEffectRainbowAttribute)
01744 public:
01745 virtual NodeAttribute *MakeNode();
01746 };
01747
01748
01749
01750
01751
01752
01753
01754
01755
01756
01757
01758
01759
01760
01761
01762 class FillEffectAltRainbowAttribute : public FillEffectAttribute
01763 {
01764 CC_DECLARE_DYNCREATE(FillEffectAltRainbowAttribute)
01765 public:
01766 virtual NodeAttribute *MakeNode();
01767 };
01768
01769
01770
01771
01772
01773
01774
01775
01776
01777
01778
01779
01780
01781 class TranspFillMappingAttribute : public AttributeValue
01782 {
01783 CC_DECLARE_DYNCREATE(TranspFillMappingAttribute)
01784 public:
01785 TranspFillMappingAttribute();
01786
01787 virtual void Restore(RenderRegion *, BOOL);
01788 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01789 virtual void SimpleCopy(AttributeValue *);
01790 static BOOL Init();
01791
01792 virtual FillMappingAttribute *MakeSimilarNonTranspFillMapping(void);
01793
01794 virtual BOOL IsDifferent(AttributeValue*);
01795 virtual TranspFillMappingAttribute& operator=(TranspFillMappingAttribute& Attrib);
01796 virtual INT32 operator==(const TranspFillMappingAttribute& Attrib);
01797
01798 INT32 Repeat;
01799 };
01800
01801
01802
01803
01804
01805
01806
01807
01808
01809
01810
01811
01812
01813 class TranspFillMappingLinearAttribute : public TranspFillMappingAttribute
01814 {
01815 CC_DECLARE_DYNCREATE(TranspFillMappingLinearAttribute)
01816 public:
01817 TranspFillMappingLinearAttribute() : TranspFillMappingAttribute() {}
01818
01819 virtual FillMappingAttribute *MakeSimilarNonTranspFillMapping(void);
01820
01821 virtual NodeAttribute *MakeNode();
01822 };
01823
01824
01825
01826
01827
01828
01829
01830
01831
01832
01833
01834
01835
01836
01837 class TranspFillMappingSinAttribute : public TranspFillMappingAttribute
01838 {
01839 CC_DECLARE_DYNCREATE(TranspFillMappingSinAttribute)
01840 public:
01841 TranspFillMappingSinAttribute() : TranspFillMappingAttribute() {}
01842
01843 virtual FillMappingAttribute *MakeSimilarNonTranspFillMapping(void);
01844
01845 virtual NodeAttribute *MakeNode();
01846 };
01847
01848
01849
01850
01851
01852
01853
01854
01855
01856
01857
01858
01859
01860
01861 class StrokeColourAttribute : public ColourFillAttribute
01862 {
01863 CC_DECLARE_DYNCREATE(StrokeColourAttribute)
01864 public:
01865 StrokeColourAttribute() {}
01866 StrokeColourAttribute(DocColour& NewColour);
01867 virtual NodeAttribute *MakeNode();
01868 virtual void Restore(RenderRegion *, BOOL);
01869 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01870 virtual void SimpleCopy(AttributeValue *);
01871
01872 static BOOL Init();
01873 };
01874
01875
01876
01877
01878
01879
01880
01881
01882
01883
01884
01885
01886
01887
01888 class StrokeTranspAttribute : public TranspFillAttribute
01889 {
01890 CC_DECLARE_DYNCREATE(StrokeTranspAttribute)
01891 public:
01892 StrokeTranspAttribute() {}
01893 StrokeTranspAttribute(UINT32 NewTransp);
01894 virtual NodeAttribute *MakeNode();
01895 virtual void Restore(RenderRegion *, BOOL);
01896 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01897 virtual void SimpleCopy(AttributeValue *);
01898
01899 BOOL Blend(BlendAttrParam*);
01900
01901 static BOOL Init();
01902 };
01903
01904
01905
01906
01907
01908
01909
01910
01911
01912
01913
01914
01915 class MouldAttribute : public AttributeValue
01916 {
01917 CC_DECLARE_DYNCREATE(MouldAttribute)
01918 public:
01919 MouldAttribute();
01920 MouldAttribute(NodeMould* pMould, MouldGeometry* pMouldShape);
01921
01922 virtual NodeAttribute *MakeNode();
01923 virtual void Restore(RenderRegion *, BOOL);
01924 virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01925 virtual void SimpleCopy(AttributeValue *);
01926
01927 static BOOL Init();
01928
01929 MouldGeometry* GetMouldShape() { return pMouldShape; }
01930 void SetMouldShape(MouldGeometry*);
01931
01932 BOOL IsPerspective() { return IsPerspectiveMould; }
01933
01934 NodeMould* GetParentMould() { return pParentMould; }
01935 void SetParentMould(NodeMould*);
01936
01937 protected:
01938 MouldGeometry* pMouldShape;
01939 BOOL IsPerspectiveMould : 1;
01940
01941 NodeMould* pParentMould;
01942 };
01943
01944 #endif // INC_FILLVAL