TPrinterCanvas class
Implements a canvas used for TPrinter device output.
Declaration
TPrinterCanvas = class(TCanvas)Inheritance
- TPrinterCanvas
- TCanvas
TFPCustomCanvas
Descends from it: TFilePrinterCanvas
Description
TPrinterCanvas is a
TCanvas descendant which implements
a canvas used to position, format, and output values from a TPrinter print
device. The TPrinter instance which provides the capabilities for the device
is passed as an argument to the constructor, and stored in the
Printer property.
TPrinterCanvas provides methods which mirror the operations performed in
TPrinter, like: BeginDoc, NewPage,
BeginPage, EndPage and EndDoc. Methods in
the canvas are called from the corresponding methods in TPrinter when its
RawMode property is set to False.
A TPrinterCanvas (or descendant) class reference is used to implement the
TPrinter.CanvasClass property.
See also
Properties
Printer | public | Device which uses the canvas to print a document. |
Title | public | Title for the document rendered using the printer canvas. |
PageHeight | public | Size of the printable area for the page on the vertical axis. |
PageWidth | public | Size of the printable area for the page on the horizontal axis. |
PaperWidth | public | Horizontal size for the paper selected in the print device. |
PaperHeight | public | Vertical size for the paper selected in the print device. |
PageNumber | public | The number for the current page in the printer canvas. |
TopMargin | public | The size of the margin at the top of the canvas. |
LeftMargin | public | The size of the margin at the left edge of the canvas. |
BottomMargin | public | The size of the margin at the bottom edge of the canvas. |
RightMargin | public | The size of the margin at the right edge of the canvas. |
Orientation | public | Orientation of the page on the selected paper. |
XDPI | public | DPI (Dots per Inch) in the horizontal direction for the print device. |
YDPI | public | DPI (Dots per Inch) in the vertical direction for the print device. |
Methods
GetLeftMargin | protected | Gets the value for the LeftMargin property. |
GetTopMargin | protected | Gets the value for the TopMargin property. |
GetBottomMargin | protected | Gets the value for the BottomMargin property. |
GetRightMargin | protected | Gets the value for the RightMargin property. |
Create | public | Constructor for the class instance. |
BeginDoc | public | Performs actions needed to start printing a document. |
NewPage | public | Performs actions needed when a new page is started. |
BeginPage | public | Performs actions needed when a page is started. |
EndPage | public | Performs actions needed when a page is completed. |
EndDoc | public | Performs actions needed when a document has finished printing. |
Changing | public | Signals the OnChanging event when the printer status is changed. |
Inherited
From TCanvas (111)
AngleArc AntialiasingMode Arc ArcTo AutoRedraw Brush BrushChanging BrushCopy Changed CheckHelper Chord CopyMode CopyRect CreateBrush CreateFont CreateHandle CreatePen CreateRegion DeselectHandles Destroy DoCopyRect DoCreateDefaultBrush DoCreateDefaultFont DoCreateDefaultPen DoDraw DoEllipse DoEllipseAndFill DoEllipseFill DoFloodFill DoGetTextHeight DoGetTextSize DoGetTextWidth DoLine DoLineTo DoLockCanvas DoMoveTo DoPolyBezier DoPolygon DoPolygonAndFill DoPolygonFill DoPolyline DoRectangle DoRectangleAndFill DoRectangleFill DoTextOut DoUnlockCanvas Draw DrawFocusRect Ellipse FillRect FloodFill Font FontChanging Frame Frame3D FrameRect FreeHandle GetClipping GetClipRect GetColor GetDefaultColor GetHeight GetPixel GetTextMetrics GetUpdatedHandle GetWidth GradientFill Handle HandleAllocated Height Lock OnChange OnChanging Pen PenChanging Pie Pixels PolyBezier Polygon Polyline RadialPie RealizeAntialiasing RealizeAutoRedraw Rectangle Refresh Region RegionChanging RequiredState RestoreHandleState RoundRect SaveHandleState SetClipping SetClipRect SetColor SetHandle SetHeight SetInternalPenPos SetPenPos SetPixel SetWidth StretchDraw TextExtent TextFitInfo TextHeight TextOut TextRect TextStyle TextWidth TryLock Unlock Width
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
