ImageStamp.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/string.h>
5 #include <cstdint>
6 
7 #include "Aspose.PDF.Cpp/Stamp.h"
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Pdf
13 {
14 namespace Engine
15 {
16 namespace Data
17 {
18 class IPdfObject;
19 } // namespace Data
20 } // namespace Engine
21 class Matrix;
22 class Page;
23 class Rectangle;
24 } // namespace Pdf
25 } // namespace Aspose
26 namespace System
27 {
28 namespace IO
29 {
30 class Stream;
31 } // namespace IO
32 } // namespace System
33 
34 namespace Aspose {
35 
36 namespace Pdf {
37 
41 class ASPOSE_PDF_SHARED_CLASS ImageStamp final : public Aspose::Pdf::Stamp
42 {
43  typedef ImageStamp ThisType;
45 
46  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
47  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
48 
49 public:
50 
54  ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> get_Image() const;
58  ASPOSE_PDF_SHARED_API double get_Width() override;
62  ASPOSE_PDF_SHARED_API void set_Width(double value) override;
66  ASPOSE_PDF_SHARED_API double get_Height() override;
70  ASPOSE_PDF_SHARED_API void set_Height(double value) override;
74  ASPOSE_PDF_SHARED_API int32_t get_Quality() const;
78  ASPOSE_PDF_SHARED_API void set_Quality(int32_t value);
82  ASPOSE_PDF_SHARED_API System::String get_AlternativeText() const;
86  ASPOSE_PDF_SHARED_API void set_AlternativeText(System::String value);
87 
94  ASPOSE_PDF_SHARED_API ImageStamp(System::SharedPtr<System::IO::Stream> image);
95 
102  ASPOSE_PDF_SHARED_API void Put(System::SharedPtr<Page> page) override;
103 
108  ASPOSE_PDF_SHARED_API ImageStamp(System::String fileName);
109 
110 protected:
111 
112  ASPOSE_PDF_SHARED_API void ClearCache() override;
117  ASPOSE_PDF_SHARED_API System::SharedPtr<Rectangle> getRect() override;
122  ASPOSE_PDF_SHARED_API System::SharedPtr<Matrix> getSizeMatrix() override;
123 
124 private:
125 
127  System::String _imageName;
129  double _width;
130  double _height;
131  int32_t _quality;
132  System::String _alternativeText;
133 
134  void AddAlternativeText(System::SharedPtr<Page> page);
135 
136 };
137 
138 } // namespace Pdf
139 } // namespace Aspose
140 
141 
Reresents graphic stamp.
Definition: ImageStamp.h:41
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
An abstract class for various kinds of stamps which come as descendants.
Definition: Stamp.h:48
Definition: Artifact.h:67
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Definition: AFRelationship.h:4
The coordinates are in the page coordinate context.
Whole PDF file will be submitted.