AddPageMeasureViewport
ページプロパティ、測定と座標単位
説明
ISO 32000-1 §12.9 に従い、/Subtype /RL 測定辞書を備えた直線測定ビューポート(/VP)を選択ページへ追加します
構文
Delphi
Function AddPageMeasureViewport(Left, Bottom, Right, Top, ScaleRatio: Double; Const UnitLabel, Name: WideString): Integer;ActiveX
Function PDFlib::AddPageMeasureViewport(Left As Double, Bottom As Double, Width As Double, Height As Double, ScaleRatio As Double, UnitLabel As String, Name As String) As LongDLL
int DLAddPageMeasureViewport(int InstanceID, double Left, double Bottom, double Width, double Height, double ScaleRatio, const wchar_t* UnitLabel, const wchar_t* Name);
int DLAddPageMeasureViewportA(int InstanceID, double Left, double Bottom, double Width, double Height, double ScaleRatio, const char* UnitLabel, const char* Name);パラメータ
| Left | ビューポート外接ボックスの水平座標 |
|---|---|
| Bottom | ビューポート外接ボックスの垂直座標 |
| Right | PDF ユーザー空間におけるビューポート外接ボックスの絶対的な右側座標。レガシーファサードのパラメータ名は Width |
| Top | PDF ユーザー空間におけるビューポート外接ボックスの絶対的な上端座標。レガシーファサードのパラメータ名は Height |
| ScaleRatio | PDF ユーザー空間 1 単位あたりのワールド単位数(正の値) |
| UnitLabel | 測定単位ラベル(空なら m) |
| Name | /Name に書き込まれる、省略可能なビューポート名 |
戻り値
ビューポートを追加できたら非ゼロのビューポートハンドル。ページが利用できない、または ScaleRatio が正でない場合は 0
備考
DLL と ActiveX の Width、Height というラベルは互換性のため残っていますが、その値は絶対的な Right、Top 座標であって大きさではありません。寸法はこのメソッドでは検証されません
/BBox を持つ /Type /Viewport 辞書と、/R、/X、/D、/A の数値形式配列を含む /Subtype /RL の /Measure 辞書を作成します
文書バージョンが少なくとも PDF 1.6 になるよう自動的に調整します