Measure.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/object_ext.h>
5 #include <system/enum.h>
6 #include <cstdint>
7 
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Pdf
13 {
14 namespace Annotations
15 {
16 class Annotation;
17 class LineAnnotation;
18 class PolyAnnotation;
19 } // namespace Annotations
20 namespace Engine
21 {
22 namespace Data
23 {
24 class IPdfArray;
25 class IPdfDictionary;
26 } // namespace Data
27 } // namespace Engine
28 class Point;
29 } // namespace Pdf
30 } // namespace Aspose
31 namespace System
32 {
33 namespace Xml
34 {
35 class XmlReader;
36 class XmlWriter;
37 } // namespace Xml
38 } // namespace System
39 
40 namespace Aspose {
41 
42 namespace Pdf {
43 
44 namespace Annotations {
45 
49 class ASPOSE_PDF_SHARED_CLASS Measure : public System::Object
50 {
51  typedef Measure ThisType;
52  typedef System::Object BaseType;
53 
54  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
56 
57 public:
58 
60 
61 private:
64 
65 public:
66 
70  class ASPOSE_PDF_SHARED_CLASS NumberFormat : public System::Object
71  {
72  typedef NumberFormat ThisType;
73  typedef System::Object BaseType;
74 
75  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
76  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
77 
79 
80  public:
81 
85  enum class FractionStyle
86  {
90  ShowAsDecimal,
94  ShowAsFraction,
98  Round,
102  Truncate
103  };
104 
105 
106  public:
107 
111  ASPOSE_PDF_SHARED_API System::String get_UnitLabel();
115  ASPOSE_PDF_SHARED_API void set_UnitLabel(System::String value);
119  ASPOSE_PDF_SHARED_API double get_ConvresionFactor();
123  ASPOSE_PDF_SHARED_API void set_ConvresionFactor(double value);
127  ASPOSE_PDF_SHARED_API Measure::NumberFormat::FractionStyle get_FractionDisplayment();
131  ASPOSE_PDF_SHARED_API void set_FractionDisplayment(Measure::NumberFormat::FractionStyle value);
135  ASPOSE_PDF_SHARED_API int32_t get_Precision();
139  ASPOSE_PDF_SHARED_API void set_Precision(int32_t value);
143  ASPOSE_PDF_SHARED_API int32_t get_Denominator();
147  ASPOSE_PDF_SHARED_API void set_Denominator(int32_t value);
151  ASPOSE_PDF_SHARED_API bool get_ForceDenominator();
155  ASPOSE_PDF_SHARED_API void set_ForceDenominator(bool value);
159  ASPOSE_PDF_SHARED_API System::String get_ThousandsSeparator();
163  ASPOSE_PDF_SHARED_API void set_ThousandsSeparator(System::String value);
167  ASPOSE_PDF_SHARED_API System::String get_FractionSeparator();
171  ASPOSE_PDF_SHARED_API void set_FractionSeparator(System::String value);
175  ASPOSE_PDF_SHARED_API System::String get_BeforeText();
179  ASPOSE_PDF_SHARED_API void set_BeforeText(System::String value);
183  ASPOSE_PDF_SHARED_API System::String get_AfterText();
187  ASPOSE_PDF_SHARED_API void set_AfterText(System::String value);
188 
193  ASPOSE_PDF_SHARED_API NumberFormat(System::SharedPtr<Measure> measure);
194 
195  protected:
196 
198 
200 
201  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(NumberFormat, CODEPORTING_ARGS(System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfDictionary> dictionary));
202  Measure::NumberFormat::FractionStyle TranslateFractionStyle(System::String fractionStyle);
203  void WriteXfdfAttributes(System::SharedPtr<System::Xml::XmlWriter> writer);
204  void ReadXfdf(System::SharedPtr<System::Xml::XmlReader> reader);
205 
206  private:
207 
209 
210  System::String getString(System::String key);
211 
212  };
213 
217  class ASPOSE_PDF_SHARED_CLASS NumberFormatList : public System::Object
218  {
219  typedef NumberFormatList ThisType;
220  typedef System::Object BaseType;
221 
222  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
223  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
224 
226 
227  public:
228 
232  ASPOSE_PDF_SHARED_API int32_t get_Count();
233 
238  ASPOSE_PDF_SHARED_API NumberFormatList(System::SharedPtr<Measure> measure);
239 
244  ASPOSE_PDF_SHARED_API void Add(System::SharedPtr<Measure::NumberFormat> value);
250  ASPOSE_PDF_SHARED_API void Insert(int32_t index, System::SharedPtr<Measure::NumberFormat> value);
255  ASPOSE_PDF_SHARED_API void RemoveAt(int32_t index);
256 
262  ASPOSE_PDF_SHARED_API System::SharedPtr<Measure::NumberFormat> idx_get(int32_t index);
268  ASPOSE_PDF_SHARED_API void idx_set(int32_t index, System::SharedPtr<Measure::NumberFormat> value);
269 
270  protected:
271 
273 
275 
277  void WriteXfdfAtributes(System::SharedPtr<System::Xml::XmlWriter> writer);
279 
280  private:
281 
283 
284  };
285 
286 
287 public:
288 
292  ASPOSE_PDF_SHARED_API System::String get_ScaleRatio();
296  ASPOSE_PDF_SHARED_API void set_ScaleRatio(System::String value);
304  ASPOSE_PDF_SHARED_API void set_XFormat(System::SharedPtr<Measure::NumberFormatList> value);
312  ASPOSE_PDF_SHARED_API void set_YFormat(System::SharedPtr<Measure::NumberFormatList> value);
320  ASPOSE_PDF_SHARED_API void set_DistanceFormat(System::SharedPtr<Measure::NumberFormatList> value);
328  ASPOSE_PDF_SHARED_API void set_AreaFormat(System::SharedPtr<Measure::NumberFormatList> value);
336  ASPOSE_PDF_SHARED_API void set_AngleFormat(System::SharedPtr<Measure::NumberFormatList> value);
344  ASPOSE_PDF_SHARED_API void set_SlopeFormat(System::SharedPtr<Measure::NumberFormatList> value);
348  ASPOSE_PDF_SHARED_API System::SharedPtr<Point> get_Origin();
352  ASPOSE_PDF_SHARED_API void set_Origin(System::SharedPtr<Point> value);
356  ASPOSE_PDF_SHARED_API double get_XYFactor();
360  ASPOSE_PDF_SHARED_API void set_XYFactor(double value);
361 
366  ASPOSE_PDF_SHARED_API Measure(System::SharedPtr<Annotation> annotation);
367 
368 protected:
369 
371 
373 
377 
378  virtual ASPOSE_PDF_SHARED_API ~Measure();
379 
380 private:
381 
383 
384  void assertObject();
386  void setNumberFormatList(System::String key, System::SharedPtr<Measure::NumberFormatList> value);
387 
388 };
389 
390 } // namespace Annotations
391 } // namespace Pdf
392 } // namespace Aspose
393 
394 template<>
396 {
397  static const ASPOSE_PDF_SHARED_API std::array<std::pair<Aspose::Pdf::Annotations::Measure::NumberFormat::FractionStyle, const char_t*>, 4>& values();
398 };
399 
400 
401 
Represents list of number formats.
Definition: Measure.h:217
Abstract base class for poly- annotations.
Definition: PolyAnnotation.h:65
ASPOSE_PDF_SHARED_API System::SharedPtr< Measure::NumberFormatList > get_SlopeFormat()
A number format array for measurement of the slope of a line.
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Class representing line annotation.
Definition: LineAnnotation.h:74
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
ASPOSE_PDF_SHARED_API System::SharedPtr< Point > get_Origin()
Point that shall specify the origin of the measurement coordinate system in default user space coordi...
ASPOSE_PDF_SHARED_API System::SharedPtr< Measure::NumberFormatList > get_XFormat()
A number format array for measurement of change along the xaxis and, if Y is not present, along the y axis as well
ASPOSE_PDF_SHARED_API Measure(System::SharedPtr< Annotation > annotation)
Creates Measure object for measure annotations.
ASPOSE_PDF_SHARED_API System::SharedPtr< Measure::NumberFormatList > get_YFormat()
A number format array for measurement of change along the y axis.
virtual ASPOSE_PDF_SHARED_API ~Measure()
ASPOSE_PDF_SHARED_API System::String get_ScaleRatio()
A text string expressing the scale ratio of the drawing.
ASPOSE_PDF_SHARED_API void set_ScaleRatio(System::String value)
A text string expressing the scale ratio of the drawing.
ASPOSE_PDF_SHARED_API void set_AngleFormat(System::SharedPtr< Measure::NumberFormatList > value)
A number format array for measurement of angles.
FractionStyle
Value which indicates in which manner fraction values are displayed.
Definition: Measure.h:85
ASPOSE_PDF_SHARED_API System::SharedPtr< Measure::NumberFormatList > get_AreaFormat()
A number format array for measurement of area.
ASPOSE_PDF_SHARED_API void set_Origin(System::SharedPtr< Point > value)
Point that shall specify the origin of the measurement coordinate system in default user space coordi...
ASPOSE_PDF_SHARED_API void set_DistanceFormat(System::SharedPtr< Measure::NumberFormatList > value)
A number format array for measurement of distance in any direction.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
means saving in XML format
ASPOSE_PDF_SHARED_API double get_XYFactor()
A factor that shall be used to convert the largest units along the y axis to the largest units along ...
void WriteXfdfAttributes(System::SharedPtr< System::Xml::XmlWriter > writer)
Definition: AFRelationship.h:4
Class which describes Measure coordinate system.
Definition: Measure.h:49
ASPOSE_PDF_SHARED_API System::SharedPtr< Measure::NumberFormatList > get_AngleFormat()
A number format array for measurement of angles.
System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > get_EngineDict() const
A printer&#39;s point (1/72 of an inch).
ASPOSE_PDF_SHARED_API System::SharedPtr< Measure::NumberFormatList > get_DistanceFormat()
A number format array for measurement of distance in any direction.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Measure, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > dictionary))
void ReadXfdf(System::SharedPtr< System::Xml::XmlReader > reader)
ASPOSE_PDF_SHARED_API void set_SlopeFormat(System::SharedPtr< Measure::NumberFormatList > value)
A number format array for measurement of the slope of a line.
ASPOSE_PDF_SHARED_API void set_AreaFormat(System::SharedPtr< Measure::NumberFormatList > value)
A number format array for measurement of area.
ASPOSE_PDF_SHARED_API void set_XYFactor(double value)
A factor that shall be used to convert the largest units along the y axis to the largest units along ...
ASPOSE_PDF_SHARED_API void set_XFormat(System::SharedPtr< Measure::NumberFormatList > value)
A number format array for measurement of change along the xaxis and, if Y is not present, along the y axis as well
Number format for measure.
Definition: Measure.h:70
Whole PDF file will be submitted.
ASPOSE_PDF_SHARED_API void set_YFormat(System::SharedPtr< Measure::NumberFormatList > value)
A number format array for measurement of change along the y axis.