ImageDevice.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/shared_ptr.h>
5 #include <drawing/rectangle.h>
6 #include <cstdint>
7 
8 #include "Aspose.PDF.Cpp/Devices/PageDevice.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace Devices
16 {
17 enum class FormPresentationMode;
18 class GraphicsDevice;
19 class Resolution;
20 } // namespace Devices
21 namespace Engine
22 {
23 namespace IO
24 {
25 namespace ConvertStrategies
26 {
27 class SearchablePdfConvertStrategy;
28 } // namespace ConvertStrategies
29 } // namespace IO
30 namespace Presentation
31 {
32 class IPresenter;
33 } // namespace Presentation
34 } // namespace Engine
35 enum class HorizontalAlignment;
36 class Page;
37 enum class PageCoordinateType;
38 class PageSize;
39 class Point;
40 class RenderingOptions;
41 enum class VerticalAlignment;
42 } // namespace Pdf
43 } // namespace Aspose
44 namespace System
45 {
46 namespace Drawing
47 {
48 class Graphics;
49 } // namespace Drawing
50 } // namespace System
51 
52 namespace Aspose {
53 
54 namespace Pdf {
55 
56 namespace Devices {
57 
61 class ASPOSE_PDF_SHARED_CLASS ImageDevice : public Aspose::Pdf::Devices::PageDevice
62 {
63  typedef ImageDevice ThisType;
65 
66  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
67  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
68 
69  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::SearchablePdfConvertStrategy;
70  friend class Aspose::Pdf::Devices::GraphicsDevice;
71 
72 public:
73 
77  ASPOSE_PDF_SHARED_API PageCoordinateType get_CoordinateType() const;
81  ASPOSE_PDF_SHARED_API void set_CoordinateType(PageCoordinateType value);
85  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::RenderingOptions> get_RenderingOptions() const;
89  ASPOSE_PDF_SHARED_API void set_RenderingOptions(System::SharedPtr<Aspose::Pdf::RenderingOptions> value);
93  ASPOSE_PDF_SHARED_API Aspose::Pdf::Devices::FormPresentationMode get_FormPresentationMode() const;
97  ASPOSE_PDF_SHARED_API void set_FormPresentationMode(Aspose::Pdf::Devices::FormPresentationMode value);
101  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Devices::Resolution> get_Resolution() const;
105  ASPOSE_PDF_SHARED_API int32_t get_Width() const;
109  ASPOSE_PDF_SHARED_API int32_t get_Height() const;
110 
114  ASPOSE_PDF_SHARED_API ImageDevice();
121  ASPOSE_PDF_SHARED_API ImageDevice(System::SharedPtr<Aspose::Pdf::Devices::Resolution> resolution);
131  ASPOSE_PDF_SHARED_API ImageDevice(int32_t width, int32_t height);
138  ASPOSE_PDF_SHARED_API ImageDevice(System::SharedPtr<PageSize> pageSize);
151  ASPOSE_PDF_SHARED_API ImageDevice(int32_t width, int32_t height, System::SharedPtr<Aspose::Pdf::Devices::Resolution> resolution);
162 
163 protected:
164 
165  ImageDevice(System::SharedPtr<Point> origin, int32_t paperWidth, int32_t paperHeight, System::Drawing::Rectangle marginBounds, float scaleFactor, System::SharedPtr<Aspose::Pdf::Devices::Resolution> resolution, int32_t rotateDegrees, bool autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, bool isIsXpsPrinting);
166 
179 
180 private:
181 
182  int32_t width;
183  int32_t height;
184  bool autoSize;
187  float scaleFactor;
188  int32_t paperWidth;
189  int32_t paperHeight;
190  int32_t rotateDegrees;
191  System::Drawing::Rectangle marginBounds;
192  bool isXpsPrinting;
193  VerticalAlignment verticalAlignment;
194  HorizontalAlignment horizontalAlignment;
195  Aspose::Pdf::Devices::FormPresentationMode formPresentationMode;
197  PageCoordinateType coordinateType;
198 
199 };
200 
201 } // namespace Devices
202 } // namespace Pdf
203 } // namespace Aspose
204 
205 
VerticalAlignment
Enumeration of possible vertical alignment values.
Definition: VerticalAlignment.h:16
An abstract class for image devices.
Definition: ImageDevice.h:61
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Definition: Artifact.h:67
Represents a rectangular area of an image defined as integer X and Y coordinates of its upper left co...
Definition: rectangle.h:18
PageCoordinateType
Describes page coordinate type.
Definition: PageCoordinateType.h:11
HorizontalAlignment
Describes horizontal alignment.
Definition: HorizontalAlignment.h:16
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Abstract class for all types of devices. Device is used to represent pdf document in some format...
Definition: Device.h:26
FormPresentationMode
Used to specify the form presentation mode when printing or converting to image pdf documents...
Definition: FormPresentationMode.h:13
Abstract class for all devices which is used to process certain page the pdf document.
Definition: PageDevice.h:40
Definition: AFRelationship.h:4
A printer&#39;s point (1/72 of an inch).
The coordinates are in the page coordinate context.
Whole PDF file will be submitted.