PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
measure.h
Go to the documentation of this file.
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_CORE_MEASURE_H_INCLUDED_
4#define PDFSDK_CORE_MEASURE_H_INCLUDED_
5
11#include <pdfsdk/core/api_macro.h>
12#include <pdfsdk/core/atoms.h>
13#include <pdfsdk/core/objects.h>
14#include <pdfsdk/errors.h>
15#include <pdfsdk/math_types.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21typedef PDObject PDMeasure;
22
23typedef struct {
24 const wchar_t* units;
25 float conversionFactor;
26 PDAtom fractionalFormat; // D F R T
27 int64_t fractionalDenominator;
28 bool fractionalKeepLowZeros;
29 const wchar_t* thousandsSeparator;
30 const wchar_t* decimalSeparator;
31 const wchar_t* prefix;
32 const wchar_t* suffix;
33 PDAtom unitsPosition; // S P
35
36typedef struct {
37 const wchar_t* ratioString;
38 PDNumberFormatParams* xFormat;
39 size_t xFormatSize;
40 PDNumberFormatParams* yFormat;
41 size_t yFormatSize;
42 PDNumberFormatParams* distanceFormat;
43 size_t distanceFormatSize;
44 PDNumberFormatParams* areaFormat;
45 size_t areaFormatSize;
46 PDNumberFormatParams* angleFormat;
47 size_t angleFormatSize;
48 PDNumberFormatParams* slopeFormat;
49 size_t slopeFormatSize;
50 PDPointF origin;
51 float cyx;
53
54PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureFormat(PDObject numberFormatArray, float initialValue, wchar_t* buffer, size_t bufSize, size_t* pSize);
55PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureGetSubtype(PDMeasure measure, PDAtom* pSubtype);
56PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLCreate(PDDoc doc, const PDMeasureRLParams* params, PDMeasure* pMeasure);
57PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLGetRatio(PDMeasure measure, wchar_t* buffer, size_t bufSize, size_t* pSize);
58PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLFormatX(PDMeasure measure, float x, wchar_t* buffer, size_t bufSize, size_t* pSize);
59PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLFormatY(PDMeasure measure, float y, wchar_t* buffer, size_t bufSize, size_t* pSize);
60PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLFormatDistance(PDMeasure measure, const PDPointF* points, size_t npoints, wchar_t* buffer, size_t bufSize, size_t* pSize);
61PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLFormatArea(PDMeasure measure, const PDPointF* points, size_t npoints, wchar_t* buffer, size_t bufSize, size_t* pSize);
62PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMeasureRLFormatAngle(PDMeasure measure, float degrees, wchar_t* buffer, size_t bufSize, size_t* pSize);
63
64PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDPageGetNumVPs(PDPage page, size_t* count);
65PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDPageAddVP(PDPage page, size_t index, PDRectF vpBBox, const wchar_t* buffer, size_t bufSize, PDMeasure measure);
66PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDPageRemoveVPByIndex(PDPage page, size_t index);
67PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDPageGetVPBBox(PDPage page, size_t index, PDRectF* pVPBBox);
68PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDPageGetVPName(PDPage page, size_t index, wchar_t* buffer, size_t bufSize, size_t* pSize);
69PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDPageGetVPMeasure(PDPage page, size_t index, PDMeasure* pMeasure);
70
71// Measurement Line / Polygon / PolyLine
72PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMarkupAnnotSetMeasure(PDAnnot annot, PDMeasure pMeasure);
73PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDMarkupAnnotGetMeasure(PDAnnot annot, PDMeasure* pMeasure);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif // PDFSDK_CORE_MEASURE_H_INCLUDED_
Atom API.
Error codes.
int32_t PDErrCode
Definition errors.h:44
Math types.
Objects API.
Definition measure.h:36
Definition measure.h:23
Definition objects.h:80
Definition math_types.h:12
Definition math_types.h:30