InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IWaxRenderData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Zak_Williamson
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IWaxRenderData__
25 #define __IWaxRenderData__
26 
27 #include "IPMUnknown.h"
28 #include "IFontMgr.h"
29 #include "IDrawingStyle.h"
30 #include "TextID.h"
31 #include "CTextEnum.h"
32 
33 class PMMatrix;
34 class PMString;
35 class IPMFont;
36 
40 class IWaxRenderData : public IPMUnknown
41 {
42 public:
43  enum { kDefaultIID = IID_IWAXRENDERDATA };
44 
45  typedef enum { kNone, kStrokeOnly, kFillOnly, kFillStroke } RenderMethod;
46 
48  virtual IPMFont* QueryFont() const = 0;
49 
50  virtual void SetFontName(const PMString & name, bool16 missingFace = kFalse) = 0;
51  virtual const PMString& GetFontName() const = 0;
52  virtual bool16 FontFaceMissing() const = 0;
53  virtual void SetFontWritingScript(int32 script) = 0;
54 
55  virtual Text::GlyphID GetSpaceGlyphID(Text::GlyphID* ideographicSpace = nil) const = 0;
56  virtual Text::GlyphID GetHyphenGlyphID() const = 0;
57 
58  virtual const Fixed* GetDesignAxes(int32 * pNumAxes) const = 0;
59  virtual void SetDesignAxes(int32 num, const Fixed* axes) = 0;
60 
61  virtual const PMMatrix& GetFontMatrix() const = 0;
62  virtual void SetFontMatrix(const PMMatrix& matrix) = 0;
63  virtual void SetJustificationGlyphScale(PMReal scale) = 0;
64  virtual PMReal GetJustificationGlyphScale() const = 0;
65 
66  virtual PMReal GetLeading() const = 0;
67  virtual void SetLeading(PMReal leading) = 0;
68 
69  virtual UID GetColorUID(bool16 stroke) const = 0;
70  virtual void SetColorUID(bool16 stroke, UID newColor) = 0;
71  virtual void SetTint(bool16 stroke, PMReal tint) = 0;
72  virtual PMReal GetTint(bool16 stroke) const = 0;
73  virtual void SetOverprint(bool16 stroke, bool16 over) = 0;
74  virtual bool16 GetOverprint(bool16 stroke) const = 0;
75 
76  virtual void SetGradientAngle(bool16 stroke, PMReal angle) = 0;
77  virtual PMReal GetGradientAngle(bool16 stroke) const = 0;
78  virtual void SetGradientLength(bool16 stroke, PMReal length) = 0;
79  virtual PMReal GetGradientLength(bool16 stroke) const = 0;
80  virtual void SetGradientCenter(bool16 stroke, const PMPoint& center) = 0;
81  virtual const PMPoint& GetGradientCenter(bool16 stroke) const = 0;
82 
83  virtual void SetOutlineWidth(PMReal width) = 0;
84  virtual PMReal GetOutlineWidth() const = 0;
85 
86  virtual void SetMiterLimit(PMReal miterLimit) = 0;
87  virtual PMReal GetMiterLimit() const = 0;
88 
89  virtual void SetStrokeAlignment(int32 align) = 0;
90  virtual int32 GetStrokeAlignment() const = 0;
91 
92  virtual void SetOutlineJoin(int32 join) = 0;
93  virtual int32 GetOutlineJoin() const = 0;
94 
95  // GetRenderMethod will return a RenderMethod of kNone if stroke or fill color is the none rendering UID
96  // An an optimization client can pass in the noneRenderingUID if known. If a value other than kInvalidUID
97  // is passed in then the database parameter may be nil.
98  virtual RenderMethod GetRenderMethod(IDataBase* database, const UID noneRenderingUID = kInvalidUID) const = 0;
99 
100  virtual void SetFauxSmallCap(bool16 fakeSmallCaps, PMReal smallcapfactor = 1.0) = 0;
101  virtual bool16 GetFauxSmallCap(PMReal *smallcapfactor = nil) const = 0;
102 
104  virtual bool16 CopyInto( IWaxRenderData* other ) const = 0 ;
105 
106  virtual bool16 IsColorInfoSame(const IWaxRenderData* other, IDataBase* db, UID noneRenderUID) const = 0;
107  virtual bool16 IsFontInfoSame(const IWaxRenderData* other) const = 0;
108 };
109 
110 #endif