PDFTool 7.0
PtlContent.h
1
2// PtlContent.h
3// Copyright (C) 2013-2020 Antenna House,Inc.
4// All rights reserved.
6#ifndef PDFTK_PTL_CONTENT_H_
7#define PDFTK_PTL_CONTENT_H_
8
9#include "PtlParamString.h"
10
11namespace PdfTk {
12
13class PtlRect;
14class PtlParamFont;
15class PtlColor;
17class PtlTextBox;
22class PtlPage;
23class PtlPoint;
24class PtlParamStream;
25class PtlEditElements;
27
32
33class PDFTK_API PtlContent
34{
35public:
50
55 GET_TEXT = 0x00000001,
56 GET_IMAGE = 0x00000002,
57 GET_PATH = 0x00000004,
58 GET_SHADING = 0x00000008,
59 GET_ALL = 0x0FFFFFFF
60 };
61
62private:
63 int m_dataContent;
64public:
65 int getHandle() const;
66
67public:
73
80
85
86public:
92
93public:
108 void writeString(const PtlRect& rectMM, ALIGN align, const PtlParamString& str, const PtlParamWriteString& paramWriteString);
109
125 void writeString(const PtlRect& rectMM, ALIGN align, float angle, const PtlParamString& str, const PtlParamWriteString& paramWriteString);
126
141 void writeStringV(const PtlRect& rectMM, ALIGN align, const PtlParamString& str, const PtlParamWriteString& paramWriteString);
142
157 PtlTextBox& drawTextBox(const PtlRect& rectMM, ALIGN align, float width, float height);
158
171 void drawImage(const PtlRect& rectMM, ALIGN align, const PtlParamDrawImage& paramDrawImage);
172
185 void drawFitImage(const PtlRect& rectMM, ALIGN align, const PtlParamDrawImage& paramDrawImage);
186
203 void drawForm(const PtlRect& rectMM, ALIGN align, const PtlPage& page);
204
221 void drawForm(const PtlRect& rectMM, ALIGN align, const PtlParamDrawForm& paramDrawForm);
222
241 void drawFitForm(const PtlRect& rectMM, ALIGN align, const PtlParamDrawForm& paramDrawForm);
242
256 void drawLine(const PtlPoint& fromMM, const PtlPoint& toMM, const PtlParamDrawShape& paramDrawShape);
257
268 void drawRect(const PtlRect& rectMM, const PtlParamDrawShape& paramDrawShape);
269
282 void drawRoundRect(const PtlRect& rectMM, float widthRoundMM, float heightRoundMM, const PtlParamDrawShape& paramDrawShape);
283
295 void drawCircle(const PtlRect& rectMM, const PtlParamDrawShape& paramDrawShape);
296
308 void drawCircle(const PtlPoint& centerMM, float radiusMM, const PtlParamDrawShape& paramDrawShape);
309
322 void drawLayer(const PtlRect& rectMM, ALIGN align, const PtlParamDrawLayer& paramDrawLayer);
323
324public:
337
347
348public:
360 PtlParamString extractText(const PtlParamExtractText& ptlParamExtractText);
361};
362
363} // namespace PdfTk
364
365#endif // PDFTK_PTL_CONTENT_H_
PDFの色を表現したクラスです。 すべての色クラスのベースクラスです。
Definition PtlColor.h:19
ALIGN
配置
Definition PtlContent.h:39
@ ALIGN_RIGHT
中央右
Definition PtlContent.h:45
@ ALIGN_BOTTOM_RIGHT
右下
Definition PtlContent.h:48
@ ALIGN_CENTER
中央
Definition PtlContent.h:44
@ ALIGN_TOP
中央上
Definition PtlContent.h:41
@ ALIGN_TOP_LEFT
左上
Definition PtlContent.h:40
@ ALIGN_BOTTOM
中央下
Definition PtlContent.h:47
@ ALIGN_TOP_RIGHT
右上
Definition PtlContent.h:42
@ ALIGN_BOTTOM_LEFT
左下
Definition PtlContent.h:46
@ ALIGN_LEFT
中央左
Definition PtlContent.h:43
void drawCircle(const PtlPoint &centerMM, float radiusMM, const PtlParamDrawShape &paramDrawShape)
円を描画。
void drawForm(const PtlRect &rectMM, ALIGN align, const PtlParamDrawForm &paramDrawForm)
フォームXObjectを描画。
PtlContent()
コンストラクタ
void drawRect(const PtlRect &rectMM, const PtlParamDrawShape &paramDrawShape)
矩形を描画。
void drawRoundRect(const PtlRect &rectMM, float widthRoundMM, float heightRoundMM, const PtlParamDrawShape &paramDrawShape)
丸角矩形を描画。
GET_ELEMENT
エレメント取得タイプ。
Definition PtlContent.h:54
@ GET_TEXT
テキストを取得する。
Definition PtlContent.h:55
@ GET_IMAGE
画像を取得する。
Definition PtlContent.h:56
@ GET_PATH
パスを取得する。
Definition PtlContent.h:57
@ GET_ALL
全てのエレメント(テキスト,画像,パス,シェイディング)を取得する。
Definition PtlContent.h:59
@ GET_SHADING
シェイディングを取得する。
Definition PtlContent.h:58
void drawLine(const PtlPoint &fromMM, const PtlPoint &toMM, const PtlParamDrawShape &paramDrawShape)
線を描画。
void drawCircle(const PtlRect &rectMM, const PtlParamDrawShape &paramDrawShape)
円形を描画。
void drawFitImage(const PtlRect &rectMM, ALIGN align, const PtlParamDrawImage &paramDrawImage)
画像を描画。
void writeString(const PtlRect &rectMM, ALIGN align, const PtlParamString &str, const PtlParamWriteString &paramWriteString)
文字列を出力。
PtlContent(const PtlContent &obj)
コピーコンストラクタ
‾PtlContent()
デストラクタ
void writeString(const PtlRect &rectMM, ALIGN align, float angle, const PtlParamString &str, const PtlParamWriteString &paramWriteString)
文字列を回転出力。
void drawForm(const PtlRect &rectMM, ALIGN align, const PtlPage &page)
フォームXObjectを描画。
void drawLayer(const PtlRect &rectMM, ALIGN align, const PtlParamDrawLayer &paramDrawLayer)
レイヤーを描画。
PtlEditElements & getEditElements()
EditElementコンテナを取得。
void drawFitForm(const PtlRect &rectMM, ALIGN align, const PtlParamDrawForm &paramDrawForm)
フォームXObjectを描画。
void writeStringV(const PtlRect &rectMM, ALIGN align, const PtlParamString &str, const PtlParamWriteString &paramWriteString)
縦書きの文字列を出力。
PtlEditElements & getEditElements(int flag)
EditElementコンテナを取得。
PtlContent & operator=(const PtlContent &obj)
コピーオペレータ
void drawImage(const PtlRect &rectMM, ALIGN align, const PtlParamDrawImage &paramDrawImage)
画像を描画。
PtlParamString extractText(const PtlParamExtractText &ptlParamExtractText)
テキストを抽出。
PtlTextBox & drawTextBox(const PtlRect &rectMM, ALIGN align, float width, float height)
テキストボックスを描画。
EditElementのコンテナを表現するクラスです。
Definition PtlEditElements.h:18
PDFのページオブジェクトを表現したクラスです。
Definition PtlPage.h:30
フォームXObjectの描画に使うパラメータクラスです。
Definition PtlParamDrawForm.h:21
画像の描画に使うパラメータクラスです。
Definition PtlParamDrawImage.h:21
レイヤーの描画に使うパラメータクラスです。
Definition PtlParamDrawLayer.h:21
線の描画に使うパラメータクラスです。
Definition PtlParamDrawShape.h:20
ページコンテントからのテキスト抽出処理のパラメータを表現したクラスです。
Definition PtlParamExtractText.h:20
PtlContent/PtlPramWatermarkTextのフォント指定に使うパラメータクラスです。
Definition PtlParamFont.h:20
文字の描画に使うパラメータクラスです。
Definition PtlParamWriteString.h:21
座標(x、y)を表現したクラスです。 座標の単位はmmで原点(0,0)は左下となりますので注意してください。
Definition PtlPoint.h:19
PDFの矩形座標を表現したクラスです。 矩形は左下(left,bottom)、右上(right,top)で表現されます。 座標の単位はmmで原点(0,0)は左下となりますので注意してください。
Definition PtlRect.h:20
ページに描画されるテキストボックスを表現するクラスです。 テキストボックスをにテキストを書き、テキストボックスをコンテントに配置します。
Definition PtlTextBox.h:22
ファイルやストリームの入出力指定に使うベースクラスです。 PDFToolではstd::ifstreamを使うPtlParamInput、std::ofstreamを使うPtlParamOutputクラ...
Definition PtlParamStream.h:19
文字列を扱うクラスです。
Definition PtlParamString.h:27