Table of Contents

ITMSFNCCustomPDFGraphicsLib Interface

Platform abstraction for PDF drawing operations; provides shape, image, text, path, and transform primitives.

API unit family: TMSFNCPDFGraphicsLib Extends: IInterface

Syntax

ITMSFNCCustomPDFGraphicsLib = interface(IInterface)

Remarks

Obtain a reference via ITMSFNCCustomPDFLib.Graphics after calling BeginDocument and NewPage. All coordinates are in PDF user units (points by default).

Properties

Name Description
Alignment Horizontal alignment applied to all text drawing operations.
BitmapContainer Bitmap container used to look up named images for the DrawImageWithName overloads.
Fill Fill settings applied to shapes and closed paths.
Font Font applied to all text drawing operations.
LineBreakMode Controls how text wraps when it reaches the end of a line within a bounding rectangle.
LineHeightFactor Multiplier applied to the default line height; 1.0 uses the font default, values above 1.0 increase spacing.
Stroke Stroke settings applied to lines, outlines, and open paths.
URLFont Font applied to URL link text added via AddURL.

Methods

Name Description
AddGoTo Adds an internal navigation link that jumps to a named destination in the same document.
AddURL Adds a clickable hyperlink annotation over the specified rectangle.
CalculateHTMLText Returns the bounding rectangle of the specified HTML text at the given scale, without drawing.
CalculateText Returns the bounding rectangle of the specified plain text using the current font, without drawing.
CalculateTextOverflow Returns the number of characters that overflow the specified single-column rectangle.
DrawClear Clears the specified rectangle to the page background color.
DrawEllipse Draws a filled and/or stroked ellipse using the current Fill and Stroke settings.
DrawHTMLText Draws HTML text starting at the specified point and returns its bounding rectangle.
DrawImage Draws a bitmap at the specified point and returns its drawn bounds.
DrawImageFromFile Draws an image loaded from a file at the specified point and returns its drawn bounds.
DrawImageWithName Draws a named bitmap from the bitmap container at the specified point and returns its drawn bounds.
DrawLine Draws a straight line between two points using the current Stroke settings.
DrawPathAddCurveToPoint Adds a cubic Bezier curve segment to the current path.
DrawPathAddEllipse Adds an ellipse sub-path to the current path.
DrawPathAddLineToPoint Adds a straight line segment from the current path cursor to the specified point.
DrawPathAddLines Adds a sequence of connected line segments to the current path.
DrawPathAddQuadCurveToPoint Adds a quadratic Bezier curve segment to the current path.
DrawPathAddRectangle Adds a rectangle sub-path to the current path.
DrawPathBegin Begins a new open path; subsequent DrawPath* calls add segments to this path.
DrawPathBeginClip Begins a new path that will be used as a clipping region when closed with DrawPathEndClip.
DrawPathClose Closes the current open path by drawing a straight line back to its starting point.
DrawPathEnd Fills and/or strokes the current path according to the specified drawing mode.
DrawPathEndClip Closes the current clipping path and activates it as the active clip region.
DrawPathEndLinearGradient Closes and fills the current path using a linear gradient between two points.
DrawPathMoveToPoint Moves the path cursor to the specified point without drawing a segment.
DrawRectangle Draws a filled and/or stroked rectangle using the current Fill and Stroke settings.
DrawRestoreState Restores the graphics state most recently saved with DrawSaveState.
DrawSaveState Saves the current graphics state (transform, fill, stroke, and font) onto an internal stack.
DrawSetTransform Applies a 2-D affine transformation matrix specified as six scalar components to all subsequent drawing operations.
DrawText Draws plain text across the specified number of columns within a rectangle and returns the overflow character count.
GetTextRect Returns the bounding rectangle occupied by the most recent text drawing operation.
LineHeightFactorResetToDefault Resets the line height factor to the library default value.