content stream
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace pdfengine {
|
||||
|
||||
enum class ContentObjectType {
|
||||
Text,
|
||||
Path,
|
||||
Image,
|
||||
Unknown
|
||||
};
|
||||
|
||||
class ContentObject {
|
||||
public:
|
||||
virtual ~ContentObject() = default;
|
||||
virtual ContentObjectType getType() const = 0;
|
||||
};
|
||||
|
||||
class TextObject : public ContentObject {
|
||||
public:
|
||||
ContentObjectType getType() const override { return ContentObjectType::Text; }
|
||||
|
||||
std::string text; // The decoded text string
|
||||
std::string fontName; // Font resource name (e.g. "F1")
|
||||
double fontSize = 0.0; // Font size
|
||||
|
||||
// Text Transformation Matrix (a, b, c, d, e, f)
|
||||
// Default is identity matrix: [1 0 0 1 0 0]
|
||||
double tm[6] = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0};
|
||||
};
|
||||
|
||||
} // namespace pdfengine
|
||||
Reference in New Issue
Block a user