THPDFWatermarkBase Record
Unified watermark descriptor shared by text and shape watermarks: angle, layering, placement, opacity, and stroke settings
Declaration
THPDFWatermarkBase= record
Angle: Extended;
Overlay: boolean;
HorizPos: THPDFWatermarkHorizPos;
VertPos: THPDFWatermarkVertPos;
X, Y: Single;
OpacityStroke: Single;
OpacityFill: Single;
StrokeColor: TColor;
PenWidth: Single;
class function Default: THPDFWatermarkBase; static;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
Angle | Rotation in degrees; 0, 45, 90, 180, and 270 receive anchor correction so the watermark stays on the page |
Overlay | True draws above existing page content; false (underlay) draws below it |
HorizPos | Horizontal placement preset; hpCustom keeps the literal X value, every other value recomputes X from the MediaBox |
VertPos | Vertical placement preset; vpCustom keeps the literal Y value |
X, Y | Anchor coordinates used when both position presets are custom |
OpacityStroke | Stroke opacity from 0 to 1, applied through the extended graphics state |
OpacityFill | Fill opacity from 0 to 1 |
StrokeColor | Pen color used for text and shape outlines |
PenWidth | Pen width used for stroke drawing |
Usage notes
- Start from
THPDFWatermarkBase.Default, which gives 0 degrees, overlay drawing, custom position at the origin, full opacity, black stroke, and pen width 1 - The same record drives
AddTextWatermarkExand every shape watermark variant, so one placement configuration serves text and graphics templates alike - Non-custom
HorizPos/VertPospresets make the watermark adapt to pages of differing sizes without per-page coordinates