Foxit PDF SDK
fs_pdfgraphicsobject.h
Go to the documentation of this file.
1 
15 #ifndef FS_PDFGRAPHICSOBJECT_H_
16 #define FS_PDFGRAPHICSOBJECT_H_
17 
18 #include "common/fs_common.h"
19 #include "common/file/fs_file.h"
20 #include "common/fs_image.h"
22 
28 namespace foxit {
29 namespace pdf {
30 namespace graphics {
31 class TextObject;
32 class FormXObject;
33 class ImageObject;
34 class PathObject;
35 class ShadingObject;
36 } // namespace graphics
37 class PDFPage;
38 class GraphicsObjects;
39 class LayerNodeArray;
40 class LayerTree;
41 } // namespace pdf
42 
46 namespace pdf {
50 namespace graphics {
52 class ColorState FS_FINAL : public Base {
53  public:
54  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
55  explicit ColorState(FS_HANDLE handle);
56 
58  ~ColorState();
59 
65  ColorState(const ColorState& other);
66 
74  ColorState& operator=(const ColorState& other);
75 
84  bool operator==(const ColorState& other) const;
85 
94  bool operator!=(const ColorState& other) const;
95 
103  bool IsEmpty() const;
104 
111 
119  void SetFillColor(const common::Color& color);
120 
127 
135  void SetStrokeColor(const common::Color& color);
136 };
137 
146 class MarkedContent FS_FINAL : public Object {
147  public:
150 
159  bool HasTag(const char* tag_name);
168  int GetItemCount() const;
180  String GetItemTagName(int index) const;
189  int GetItemMCID(int index) const;
212  int AddItem(const char* tag_name, objects::PDFDictionary* property_dict = NULL);
220  bool RemoveItem(const char* tag_name);
221 
222  private:
223  MarkedContent(const MarkedContent& markedcontent);
224  MarkedContent &operator = (const MarkedContent& markedcontent);
225 };
226 
241 class GraphicsObject : public Object {
242  public:
248  typedef enum _BlendMode {
371  } BlendMode;
372 
378  typedef enum _Type {
395  } Type;
396 
397 
398 #if !defined(_SWIG_IOS_) && !defined(_SWIG_MACOC_)
399 
405  void Release();
406 #endif
407 
414  Type GetType() const;
415 
422  RectF GetRect() const;
423 
429  bool HasTransparency();
430 
439  ARGB GetStrokeColor() const;
440 
449  ARGB GetFillColor() const;
450 
468  void SetStrokeColor(ARGB color);
469 
488  void SetFillColor(ARGB color);
489 
497  ColorState GetColorState() const;
498 
512  void SetColorState(const ColorState& color_state);
513 
525  void SetFillOpacity(float opacity);
526 
538  void SetStrokeOpacity(float opacity);
539 
546  float GetFillOpacity() const;
547 
554  float GetStrokeOpacity()const;
555 
562  Matrix GetMatrix() const;
563 
574  void SetMatrix(const Matrix& matrix);
575 
588  bool Transform(const Matrix& matrix, bool need_transform_clippath);
589 
601 
616  GraphicsObject* Clone(foxit::pdf::GraphicsObjects src_graphicsobjects, foxit::pdf::GraphicsObjects dest_graphicsobjects);
617 
626 
643  void SetGraphState(const common::GraphState& graph_state);
644 
651  BlendMode GetBlendMode() const;
652 
664  void SetBlendMode(BlendMode blend_mode);
665 
671  int GetClipPathCount() const;
672 
682  common::Path GetClipPath(int index) const;
683 
693  common::FillMode GetClipPathFillMode(int index) const;
694 
707  bool AddClipPath(const common::Path& path, common::FillMode fill_mode);
708 
720  bool RemoveClipPath(int index);
721 
727  int GetClipTextObjectCount() const;
728 
737  TextObject* GetClipTextObject(int index) const;
738 
749  bool AddClipTextObject(TextObject* textobject);
750 
762  bool RemoveClipTextObject(int index);
763 
769  RectF GetClipRect() const;
770 
783  void SetClipRect(const RectF& clip_rect);
784 
793  bool ClearClips();
794 
801 
810  LayerNodeArray GetLayers(const LayerTree& layer_tree);
811 
818  TextObject* GetTextObject() const;
819 
826  FormXObject* GetFormXObject() const;
827 
834  ImageObject* GetImageObject() const;
835 
842  PathObject* GetPathObject() const;
843 
851 
864  void Rotate(int angle);
865  protected:
866  ~GraphicsObject() {}
867 
868  private:
869  GraphicsObject(const GraphicsObject& graphicsobject);
870  GraphicsObject &operator = (const GraphicsObject& graphicsobject);
871 };
872 
875 
877 class TextState FS_FINAL : public Object {
878  public:
884  typedef enum _Mode {
901  } Mode;
902 
903 
921  const PointF& origin_position, float textmatrix[4]) {
922  this->version = version;
923  this->font = font;
924  this->font_size = font_size;
927  this->charspace = charspace;
928  this->wordspace = wordspace;
929  this->textmode = textmode;
930  this->origin_position = origin_position;
931  for (int i=0; i < 4; i++)
932  this->textmatrix[i] = textmatrix[i];
933  }
934 
937  :version(1)
938  , font_size(0.0f)
939  , font_vertical_size(0.0f)
940  , font_horizontal_size(0.0f)
941  , charspace(0.0f)
942  , wordspace(0.0f)
945  this->textmatrix[0] = 1;
946  this->textmatrix[1] = 0;
947  this->textmatrix[2] = 0;
948  this->textmatrix[3] = 1;
949  }
950 
956  TextState(const TextState& state) {
957  version = state.version;
958  font = state.font;
959  font_size = state.font_size;
962  charspace = state.charspace;
963  wordspace = state.wordspace;
964  textmode = state.textmode;
966  for (int i=0; i < 4; i++)
967  textmatrix[i] = state.textmatrix[i];
968  }
969 
977  TextState &operator = (const TextState& state) {
978  version = state.version;
979  font = state.font;
980  font_size = state.font_size;
983  charspace = state.charspace;
984  wordspace = state.wordspace;
985  textmode = state.textmode;
987  for (int i=0; i < 4; i++)
988  textmatrix[i] = state.textmatrix[i];
989  return (*this);
990  }
991 
1008  void Set(uint32 version, const common::Font& font, float font_size, float charspace, float wordspace,
1009  Mode textmode, const PointF& origin_position, float textmatrix[4]) {
1010  this->version = version;
1011  this->font = font;
1012  this->font_size = font_size;
1013  this->font_vertical_size = font_size;
1015  this->charspace = charspace;
1016  this->wordspace = wordspace;
1017  this->textmode = textmode;
1018  this->origin_position = origin_position;
1019  for (int i=0; i < 4; i++)
1020  this->textmatrix[i] = textmatrix[i];
1021  }
1022 
1032 
1039 
1045  float font_size;
1046 
1053 
1060 
1069  float charspace;
1070 
1081  float wordspace;
1082 
1090 
1097 
1107  float textmatrix[4];
1108 };
1109 
1118 class ImageObject FS_FINAL : public GraphicsObject {
1119  public:
1133  static ImageObject* Create(const PDFDoc& document);
1134 
1149  void SetBitmap(const common::Bitmap& bitmap, const common::Bitmap& mask = common::Bitmap());
1150 
1168  void SetImage(const common::Image& image, int frame_index);
1169 
1189  common::Bitmap CloneBitmap(const GraphicsObjects& graphics_objects);
1190 
1209  common::Bitmap CloneBitmap(const PDFPage& page, const GraphicsObjects& graphics_objects);
1210 
1222  static ImageObject* CreateFromType3TextObject(const PDFPage& page, TextObject* text_obj);
1223 
1231 
1238  objects::PDFStream* GetStream() const;
1239 
1245  bool IsImageMask() const;
1246 
1260  objects::PDFObject* GetMask() const;
1261 
1262  private:
1263  ~ImageObject() {}
1264 
1265  private:
1266  ImageObject(const ImageObject& imageobject);
1267  ImageObject &operator = (const ImageObject& imageobject);
1268 };
1269 
1278 class TextObject FS_FINAL : public GraphicsObject {
1279  public:
1290  static TextObject* Create();
1291 
1297  WString GetText() const;
1298 
1312  void SetText(const wchar_t* text);
1313 
1327  void SetText(const WString& text);
1328 
1336  TextState GetTextState(const PDFPage& page) const;
1337 
1352  void SetTextState(const PDFPage& page, const TextState& text_state, bool is_italic, int weight);
1353 
1359  int GetCharCount() const;
1360 
1369  PointF GetCharPos(int index) const;
1370 
1379  float GetCharWidthByIndex(int index) const;
1380 
1389  float GetCharHeightByIndex(int index) const;
1390 
1391  private:
1392  ~TextObject() {}
1393 
1394  private:
1395  TextObject(const TextObject& textobject);
1396  TextObject &operator = (const TextObject& textobject);
1397 };
1398 
1401 
1412 class PathObject FS_FINAL : public GraphicsObject {
1413  public:
1424  static PathObject* Create();
1425 
1438  static PathObject* CreateFromTextObject(const PDFPage& page, TextObject* text_obj);
1439 
1446  common::FillMode GetFillMode() const;
1458  void SetFillMode(common::FillMode fill_mode);
1465  bool GetStrokeState() const;
1477  void SetStrokeState(bool is_stroke);
1484  common::Path GetPathData() const;
1485 
1496  void SetPathData(const common::Path& path_data);
1497 
1498  private:
1499  ~PathObject() {}
1500 
1501  private:
1502  PathObject(const PathObject& pathobject);
1503  PathObject &operator = (const PathObject& pathobject);
1504 };
1505 
1517 class FormXObject FS_FINAL : public GraphicsObject {
1518  public:
1532  static FormXObject* Create(const PDFDoc& document);
1533 
1540  objects::PDFStream* GetStream() const;
1541 
1548 
1566  bool ImportPageContent(const PDFPage& source_page, bool is_annots_included);
1567 
1568  private:
1569  ~FormXObject() {}
1570 
1571  private:
1572  FormXObject(const FormXObject& formxobject);
1573  FormXObject &operator = (const FormXObject& formxobject);
1574 };
1575 
1582 class ShadingObject FS_FINAL : public GraphicsObject {
1583  public:
1591 
1592  private:
1593  ~ShadingObject() {}
1594 
1595  private:
1596  ShadingObject(const ShadingObject& shadingobject);
1597  ShadingObject &operator = (const ShadingObject& shadingobject);
1598 };
1599 } // namespace graphics
1600 } // namespace pdf
1601 } // namespace foxit
1602 #endif // FS_PDFGRAPHICSOBJECT_H_
1603 
foxit::pdf::graphics::MarkedContent
Definition: fs_pdfgraphicsobject.h:146
foxit::pdf::graphics::GraphicsObject::GetFillOpacity
float GetFillOpacity() const
Get the opacity value for painting operations other than stroking.
foxit::pdf::graphics::FormXObject
Definition: fs_pdfgraphicsobject.h:1517
foxit::pdf::graphics::TextState::textmatrix
float textmatrix[4]
Text transformation matrix.
Definition: fs_pdfgraphicsobject.h:1107
foxit::pdf::LayerNodeArray
Definition: fs_pdflayer.h:41
foxit::pdf::graphics::GraphicsObject::Release
void Release()
Release a cloned or newly created PDF graphics object which has not been inserted into any PDF page o...
foxit::pdf::graphics::MarkedContent::GetItemCount
int GetItemCount() const
Get the count of marked content items.
foxit::pdf::graphics::GraphicsObject::RemoveClipTextObject
bool RemoveClipTextObject(int index)
Remove a text clip by index for clipping.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
foxit::pdf::graphics::GraphicsObject::GetClipRect
RectF GetClipRect() const
Get clip rectangle.
foxit::pdf::graphics::GraphicsObject::GetTextObject
TextObject * GetTextObject() const
Get the text graphics object if current graphics object represents a text object.
foxit::pdf::graphics::TextState::TextState
TextState(uint32 version, const common::Font &font, float font_size, float charspace, float wordspace, Mode textmode, const PointF &origin_position, float textmatrix[4])
Constructor, with parameters.
Definition: fs_pdfgraphicsobject.h:920
foxit::pdf::graphics::MarkedContent::HasTag
bool HasTag(const char *tag_name)
Check whether current marked content object has a specified marked content item or not.
foxit::common::Color
Definition: fs_common.h:2544
foxit::pdf::graphics::GraphicsObject::e_BlendColorBurn
Darkens backdrop color to reflect the source color.
Definition: fs_pdfgraphicsobject.h:306
foxit::pdf::graphics::GraphicsObject::e_BlendDarken
Select darker one of backdrop and source colors.
Definition: fs_pdfgraphicsobject.h:278
foxit::pdf::graphics::MarkedContent::GetItemPropertyDict
objects::PDFDictionary * GetItemPropertyDict(int index) const
Get the property dictionary of a marked content item specified by index.
foxit::pdf::graphics::TextObject::GetText
WString GetText() const
Get text string.
foxit::pdf::graphics::GraphicsObject::GetClipPathCount
int GetClipPathCount() const
Get the count of path clip.
foxit::pdf::graphics::MarkedContent::RemoveItem
bool RemoveItem(const char *tag_name)
Remove a marked content item by tag name.
foxit::pdf::graphics::GraphicsObject::e_BlendHue
Creates a color with the hue of the source color, and the saturation and luminosity of the backdrop c...
Definition: fs_pdfgraphicsobject.h:349
foxit::pdf::graphics::GraphicsObject::SetColorState
void SetColorState(const ColorState &color_state)
Set color state.
foxit::pdf::graphics::PathObject::SetFillMode
void SetFillMode(common::FillMode fill_mode)
Set fill mode.
foxit::pdf::graphics::FormXObject::Create
static FormXObject * Create(const PDFDoc &document)
Create a new form XObject graphics object.
foxit::pdf::graphics::TextObjectArray
CFX_ArrayTemplate< TextObject * > TextObjectArray
Definition: fs_pdfgraphicsobject.h:1400
foxit::pdf::graphics::GraphicsObject::e_BlendSoftlight
Darkens or lightens colors, depending on source color value.
Definition: fs_pdfgraphicsobject.h:329
foxit::pdf::graphics::GraphicsObject::e_TypeShading
Shading graphics object.
Definition: fs_pdfgraphicsobject.h:388
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:221
foxit::common::GraphState
Definition: fs_common.h:1084
foxit::pdf::graphics::TextState::textmode
Mode textmode
Text rendering mode. Please refer to values starting from TextState::e_ModeFill and this should be on...
Definition: fs_pdfgraphicsobject.h:1089
foxit::pdf::graphics::GraphicsObject::GetImageObject
ImageObject * GetImageObject() const
Get the image graphics object if current graphics object represents an image object.
foxit::pdf::graphics::GraphicsObject::HasTransparency
bool HasTransparency()
Check whether current graphics object has transparency or not.
foxit::pdf::graphics::PathObject::Create
static PathObject * Create()
Create a new path graphics object.
foxit::pdf::graphics::GraphicsObject::Type
Type
Enumeration for PDF graphics object type.
Definition: fs_pdfgraphicsobject.h:378
foxit::pdf::graphics::TextState::Set
void Set(uint32 version, const common::Font &font, float font_size, float charspace, float wordspace, Mode textmode, const PointF &origin_position, float textmatrix[4])
Set value.
Definition: fs_pdfgraphicsobject.h:1008
foxit::pdf::graphics::TextState::TextState
TextState(const TextState &state)
Constructor, with another text state object.
Definition: fs_pdfgraphicsobject.h:956
foxit::pdf::graphics::TextState::charspace
float charspace
Character spacing.
Definition: fs_pdfgraphicsobject.h:1069
foxit::pdf::graphics::TextState::origin_position
PointF origin_position
The origin point, in PDF coordinate system.
Definition: fs_pdfgraphicsobject.h:1096
fs_common.h
Header file for common definitions and classes.
foxit::pdf::graphics::TextObject::GetCharHeightByIndex
float GetCharHeightByIndex(int index) const
Get the height of a character specified by index in current text object.
foxit::pdf::graphics::PathObject
Definition: fs_pdfgraphicsobject.h:1412
CFX_ArrayTemplate
Definition: fx_basic.h:1297
foxit::pdf::graphics::TextObject::Create
static TextObject * Create()
Create a new text graphics object.
foxit::pdf::graphics::GraphicsObject::GetClipPath
common::Path GetClipPath(int index) const
Get a path clip by index.
foxit::pdf::graphics::PathObject::GetStrokeState
bool GetStrokeState() const
Get stroke state.
foxit::pdf::graphics::TextState::e_ModeFillStroke
Text mode: fill and stroke text.
Definition: fs_pdfgraphicsobject.h:890
foxit::pdf::graphics::TextState::operator=
TextState & operator=(const TextState &state)
Assign operator.
Definition: fs_pdfgraphicsobject.h:977
foxit::pdf::graphics::ColorState::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
fs_file.h
Header file for file operation related definitions and functions.
foxit::pdf::graphics::ColorState::SetFillColor
void SetFillColor(const common::Color &color)
Set fill color.
foxit::pdf::graphics::ColorState::GetStrokeColor
common::Color GetStrokeColor()
Get stroke color.
foxit::pdf::graphics::MarkedContent::~MarkedContent
~MarkedContent()
Destructor.
Definition: fs_pdfgraphicsobject.h:149
foxit::ARGB
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:210
foxit::pdf::graphics::ShadingObject
Definition: fs_pdfgraphicsobject.h:1582
foxit::pdf::graphics::GraphicsObject::e_BlendColorDodge
Brightens backdrop color to reflect source colors.
Definition: fs_pdfgraphicsobject.h:295
foxit::pdf::graphics::TextState::e_ModeClip
Text mode: add text to path for clipping.
Definition: fs_pdfgraphicsobject.h:900
foxit::pdf::objects::PDFObject
Definition: fs_pdfobject.h:55
foxit::pdf::graphics::TextObject::GetCharPos
PointF GetCharPos(int index) const
Get the position of a character specified by index in current text object.
foxit::pdf::graphics::GraphicsObject::GetColorState
ColorState GetColorState() const
Get color state.
foxit::pdf::graphics::TextObject::GetCharWidthByIndex
float GetCharWidthByIndex(int index) const
Get the width of a character specified by index in current text object.
foxit::pdf::graphics::ImageObject::CloneBitmap
common::Bitmap CloneBitmap(const GraphicsObjects &graphics_objects)
Clone the bitmap from current image graphics object.
foxit::pdf::graphics::GraphicsObject::e_BlendNormal
Selecting source color and ignoring backdrop color.
Definition: fs_pdfgraphicsobject.h:254
foxit::pdf::graphics::ImageObject::SetImage
void SetImage(const common::Image &image, int frame_index)
Set one frame of an image to current image graphics object.
foxit::pdf::graphics::GraphicsObject::Transform
bool Transform(const Matrix &matrix, bool need_transform_clippath)
Transform current graphics object.
foxit::common::Path
Definition: fs_common.h:2143
foxit::pdf::graphics::GraphicsObject::GetBlendMode
BlendMode GetBlendMode() const
Get the blend mode for transparent imaging model.
foxit::pdf::graphics::GraphicsObject::SetClipRect
void SetClipRect(const RectF &clip_rect)
Set clip rectangle.
foxit::pdf::graphics::GraphicsObject::e_BlendOverlay
Multiply or screens colors, depending on backdrop color value.
Definition: fs_pdfgraphicsobject.h:272
foxit::pdf::LayerTree
Definition: fs_pdflayer.h:124
foxit::pdf::graphics::GraphicsObject::GetRect
RectF GetRect() const
Get the rectangle of current graphics object.
foxit::pdf::graphics::GraphicsObject::e_TypeFormXObject
Form XObject graphics object.
Definition: fs_pdfgraphicsobject.h:390
foxit::pdf::graphics::ColorState::operator=
ColorState & operator=(const ColorState &other)
Assign operator.
foxit::pdf::graphics::GraphicsObject::GetFormXObject
FormXObject * GetFormXObject() const
Get the form XObject graphics object if current graphics object represents a form XObject object.
foxit::pdf::graphics::TextState::e_ModeStroke
Text mode: stroke text.
Definition: fs_pdfgraphicsobject.h:888
foxit::common::ColorSpaceType
ColorSpaceType
Enumeration for color space.
Definition: fs_common.h:200
foxit::pdf::graphics::ImageObject::GetStream
objects::PDFStream * GetStream() const
Get image stream.
foxit::pdf::graphics::GraphicsObject::SetStrokeColor
void SetStrokeColor(ARGB color)
Set the stroke color.
foxit::pdf::graphics::GraphicsObject::GetMatrix
Matrix GetMatrix() const
Get matrix.
foxit::pdf::graphics::GraphicsObject::e_TypeImage
Image graphics object.
Definition: fs_pdfgraphicsobject.h:386
foxit::pdf::graphics::GraphicsObject::e_BlendDifference
Subtracts the darker of the two constituent colors from lighter colors.
Definition: fs_pdfgraphicsobject.h:335
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::pdf::graphics::ImageObject::Create
static ImageObject * Create(const PDFDoc &document)
Create a new image graphics object.
foxit::pdf::graphics::GraphicsObject::e_BlendMultiply
Multiply backdrop by source color values.
Definition: fs_pdfgraphicsobject.h:260
foxit::pdf::graphics::ColorState
Definition: fs_pdfgraphicsobject.h:52
foxit::pdf::graphics::GraphicsObject::e_BlendLuminosity
Creates a color with the luminosity of the source color, and the hue and saturation of the backdrop c...
Definition: fs_pdfgraphicsobject.h:370
foxit::pdf::graphics::TextState::e_ModeFill
Text mode: fill text.
Definition: fs_pdfgraphicsobject.h:886
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::pdf::graphics::TextState::e_ModeInvisible
Text mode: neither fill nor stroke text, to make it invisible.
Definition: fs_pdfgraphicsobject.h:892
foxit::pdf::graphics::ImageObject::SetBitmap
void SetBitmap(const common::Bitmap &bitmap, const common::Bitmap &mask=common::Bitmap())
Set a bitmap to current image graphics object.
foxit::pdf::graphics::GraphicsObject::e_BlendScreen
Multiply complements of backdrop by source color values, and then complement the result.
Definition: fs_pdfgraphicsobject.h:266
foxit::pdf::graphics::TextObject::GetTextState
TextState GetTextState(const PDFPage &page) const
Get text state information.
foxit::pdf::graphics::TextState::Mode
Mode
Enumeration for text mode.
Definition: fs_pdfgraphicsobject.h:884
foxit::pdf::graphics::TextObject
Definition: fs_pdfgraphicsobject.h:1278
foxit::pdf::graphics::GraphicsObject
Definition: fs_pdfgraphicsobject.h:241
foxit::pdf::graphics::GraphicsObject::e_TypeText
Text graphics object.
Definition: fs_pdfgraphicsobject.h:382
foxit::pdf::graphics::GraphicsObject::e_BlendColor
Creates a color with the hue and saturation of the source color, and the luminosity of the backdrop c...
Definition: fs_pdfgraphicsobject.h:363
foxit::pdf::graphics::GraphicsObject::SetFillColor
void SetFillColor(ARGB color)
Set the fill color.
foxit::common::FillMode
FillMode
Enumeration for filling mode type, mainly for path graphics object.
Definition: fs_common.h:108
foxit::pdf::graphics::ImageObject::CreateFromType3TextObject
static ImageObject * CreateFromType3TextObject(const PDFPage &page, TextObject *text_obj)
Create an image graphics object from a type3 text object.
fs_pdfobject.h
Header file for PDF object related definitions and classes.
foxit::pdf::graphics::GraphicsObject::RemoveClipPath
bool RemoveClipPath(int index)
Remove a path clip by index.
foxit::pdf::graphics::ColorState::GetFillColor
common::Color GetFillColor()
Get fill color.
foxit::pdf::graphics::GraphicsObject::AddClipPath
bool AddClipPath(const common::Path &path, common::FillMode fill_mode)
Add a path for clipping.
foxit::pdf::graphics::GraphicsObject::e_TypeAll
Represents all graphics object types, only used as filter.
Definition: fs_pdfgraphicsobject.h:380
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::graphics::ColorState::~ColorState
~ColorState()
Destructor.
foxit::pdf::graphics::TextState::TextState
TextState()
Constructor.
Definition: fs_pdfgraphicsobject.h:936
foxit::pdf::graphics::GraphicsObject::GetClipTextObjectCount
int GetClipTextObjectCount() const
Get the count of text clip.
foxit::pdf::graphics::GraphicsObjectArray
CFX_ArrayTemplate< GraphicsObject * > GraphicsObjectArray
Definition: fs_pdfgraphicsobject.h:874
foxit::pdf::graphics::PathObject::SetStrokeState
void SetStrokeState(bool is_stroke)
Set stroke state.
foxit::pdf::graphics::GraphicsObject::GetType
Type GetType() const
Get the type of current graphics object.
foxit::pdf::graphics::FormXObject::ImportPageContent
bool ImportPageContent(const PDFPage &source_page, bool is_annots_included)
Import page content from a specified PDF page to current form XObject.
foxit::pdf::graphics::TextState::font
common::Font font
A font object.
Definition: fs_pdfgraphicsobject.h:1038
foxit::pdf::graphics::PathObject::GetPathData
common::Path GetPathData() const
Get the path data.
foxit::pdf::graphics::GraphicsObject::e_BlendHardlight
Multiply or screens colors, depending on source color value.
Definition: fs_pdfgraphicsobject.h:316
fs_image.h
Header file for image and bitmap related definitions and classes.
foxit::pdf::graphics::ColorState::SetStrokeColor
void SetStrokeColor(const common::Color &color)
Set stroke color.
foxit::pdf::objects::PDFDictionary
Definition: fs_pdfobject.h:850
foxit::pdf::graphics::GraphicsObject::GetPathObject
PathObject * GetPathObject() const
Get the path graphics object if current graphics object represents a path object.
foxit::pdf::graphics::GraphicsObject::GetStrokeColor
ARGB GetStrokeColor() const
Get the stroke color.
foxit::pdf::graphics::MarkedContent::AddItem
int AddItem(const char *tag_name, objects::PDFDictionary *property_dict=0)
Add a new marked content item.
foxit::pdf::graphics::GraphicsObject::GetLayers
LayerNodeArray GetLayers(const LayerTree &layer_tree)
Get all the layers which are associated with current graphics object.
foxit::pdf::graphics::GraphicsObject::Rotate
void Rotate(int angle)
Rotate current graphics object from current state with specified angle degree in clockwise.
foxit::pdf::graphics::GraphicsObject::AddClipTextObject
bool AddClipTextObject(TextObject *textobject)
Add text object for clipping.
foxit::pdf::graphics::GraphicsObject::SetMatrix
void SetMatrix(const Matrix &matrix)
Set matrix.
foxit::pdf::graphics::GraphicsObject::GetMarkedContent
MarkedContent * GetMarkedContent() const
Get marked content object.
foxit::pdf::graphics::ImageObject
Definition: fs_pdfgraphicsobject.h:1118
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::graphics::GraphicsObject::e_TypeInlines
Inline graphics object.
Definition: fs_pdfgraphicsobject.h:392
foxit::pdf::graphics::GraphicsObject::e_BlendExclusion
Creates a color with the hue of the source color, and the saturation and luminosity of the backdrop c...
Definition: fs_pdfgraphicsobject.h:342
foxit::pdf::graphics::GraphicsObject::e_TypeEmptyMarkedContent
Empty marked-content object.
Definition: fs_pdfgraphicsobject.h:394
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::pdf::graphics::MarkedContent::GetItemMCID
int GetItemMCID(int index) const
Get marked-content identifier (MCID) of a marked content item specified by index.
foxit::pdf::graphics::MarkedContent::GetItemTagName
String GetItemTagName(int index) const
Get the tag name of a marked content item specified by index.
foxit::pdf::graphics::GraphicsObject::e_BlendSaturation
Creates a color with the saturation of the source color, and the hue and luminosity of the backdrop c...
Definition: fs_pdfgraphicsobject.h:356
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:772
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::graphics::TextState::e_ModeFillClip
Text mode: fill text and add to path for clipping.
Definition: fs_pdfgraphicsobject.h:894
foxit::pdf::graphics::TextObject::GetCharCount
int GetCharCount() const
Get character count in current text object.
foxit::pdf::graphics::GraphicsObject::GetStrokeOpacity
float GetStrokeOpacity() const
Get opacity value for stroke painting operations for paths and glyph outlines.
foxit::pdf::graphics::TextState::e_ModeFillStrokeClip
Text mode: fill and stroke text, and add to path for clipping.
Definition: fs_pdfgraphicsobject.h:898
foxit::pdf::graphics::TextState::font_size
float font_size
The font size in "Tf". If valid, it should be above 0.
Definition: fs_pdfgraphicsobject.h:1045
foxit::pdf::graphics::TextState::font_horizontal_size
float font_horizontal_size
Font horizontal size in device units (read-only). If valid, it would be above 0.
Definition: fs_pdfgraphicsobject.h:1059
foxit::pdf::graphics::TextState::font_vertical_size
float font_vertical_size
Font vertical size in device units (read-only). If valid, it would be above 0.
Definition: fs_pdfgraphicsobject.h:1052
foxit::pdf::graphics::PathObject::CreateFromTextObject
static PathObject * CreateFromTextObject(const PDFPage &page, TextObject *text_obj)
Create a path graphics object from a text object.
foxit::common::Image
Definition: fs_image.h:460
foxit::pdf::graphics::ColorState::operator==
bool operator==(const ColorState &other) const
Equal operator.
foxit::pdf::graphics::GraphicsObject::GetClipPathFillMode
common::FillMode GetClipPathFillMode(int index) const
Get the fill mode of a path clip by index.
foxit::pdf::graphics::GraphicsObject::GetGraphState
common::GraphState GetGraphState() const
Get graph state.
foxit::pdf::graphics::TextState::wordspace
float wordspace
Word spacing (only apply to space character).
Definition: fs_pdfgraphicsobject.h:1081
foxit::pdf::graphics::FormXObject::GetGraphicsObjects
GraphicsObjects GetGraphicsObjects() const
Get graphics objects that associated with current form XObject.
foxit::PointF
CFX_PointF PointF
Point information, in float.
Definition: fs_basictypes.h:469
foxit::pdf::graphics::TextState::version
uint32 version
Version of this class.
Definition: fs_pdfgraphicsobject.h:1031
foxit::pdf::graphics::TextState::e_ModeStrokeClip
Text mode: stroke text and add to path for clipping.
Definition: fs_pdfgraphicsobject.h:896
foxit::common::Font
Definition: fs_common.h:1503
CFX_Matrix
Definition: fx_coordinates.h:1076
foxit::pdf::graphics::GraphicsObject::SetFillOpacity
void SetFillOpacity(float opacity)
Set the opacity value for painting operations other than stroking.
foxit::pdf::graphics::ShadingObject::GetPDFObject
objects::PDFObject * GetPDFObject() const
Get the PDF object which represents the shading graphics object in PDF file.
foxit::pdf::graphics::GraphicsObject::GetShadingObject
ShadingObject * GetShadingObject() const
Get the shading graphics object if current graphics object represents a shading object.
foxit::pdf::graphics::PathObject::GetFillMode
common::FillMode GetFillMode() const
Get fill mode.
foxit::pdf::graphics::GraphicsObject::SetGraphState
void SetGraphState(const common::GraphState &graph_state)
Set graph state.
foxit::pdf::graphics::GraphicsObject::ClearClips
bool ClearClips()
Clear all clips.
foxit::pdf::graphics::TextObject::SetText
void SetText(const wchar_t *text)
Set text string.
foxit::pdf::graphics::GraphicsObject::SetStrokeOpacity
void SetStrokeOpacity(float opacity)
Set opacity value for stroke painting operations for paths and glyph outlines.
foxit::pdf::objects::PDFStream
Definition: fs_pdfobject.h:448
foxit::pdf::graphics::TextObject::SetTextState
void SetTextState(const PDFPage &page, const TextState &text_state, bool is_italic, int weight)
Set text state information.
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::pdf::graphics::ImageObject::GetColorSpace
common::ColorSpaceType GetColorSpace() const
Get color space.
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::pdf::graphics::PathObject::SetPathData
void SetPathData(const common::Path &path_data)
Set the path data.
foxit::pdf::graphics::TextState
Definition: fs_pdfgraphicsobject.h:877
foxit::pdf::graphics::GraphicsObject::e_TypePath
Path graphics object.
Definition: fs_pdfgraphicsobject.h:384
foxit::pdf::graphics::FormXObject::GetStream
objects::PDFStream * GetStream() const
Get stream.
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:196
foxit::pdf::graphics::GraphicsObject::e_BlendLighten
Select lighter one of backdrop and source colors.
Definition: fs_pdfgraphicsobject.h:284
foxit::pdf::graphics::ColorState::operator!=
bool operator!=(const ColorState &other) const
Not equal operator.
foxit::pdf::graphics::GraphicsObject::SetBlendMode
void SetBlendMode(BlendMode blend_mode)
Set the blend mode for transparent imaging model.
foxit::Base
Definition: fs_basictypes.h:449
foxit::pdf::graphics::GraphicsObject::GetFillColor
ARGB GetFillColor() const
Get the fill color.
foxit::pdf::graphics::GraphicsObject::BlendMode
BlendMode
Enumeration for render blend mode.
Definition: fs_pdfgraphicsobject.h:248
foxit::pdf::graphics::GraphicsObject::Clone
GraphicsObject * Clone()
Clone a new graphics object.
foxit::pdf::graphics::ImageObject::GetMask
objects::PDFObject * GetMask() const
Get the PDF object that represents the mask of current image graphics object.
foxit::pdf::GraphicsObjects
Definition: fs_pdfpage.h:64
foxit::pdf::graphics::ImageObject::IsImageMask
bool IsImageMask() const
Check if current image object is treated as mask.
foxit::pdf::graphics::GraphicsObject::GetClipTextObject
TextObject * GetClipTextObject(int index) const
Get the text object of a text clip by index.