Sign in Join
FPDoc Onlineexperiment

TPrinterCanvas class

In unit Printers

Implements a canvas used for TPrinter device output.

Declaration

pascal
TPrinterCanvas = class(TCanvas)

Inheritance

  1. TPrinterCanvas
  2. TCanvas
  3. 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

PrinterpublicDevice which uses the canvas to print a document.
TitlepublicTitle for the document rendered using the printer canvas.
PageHeightpublicSize of the printable area for the page on the vertical axis.
PageWidthpublicSize of the printable area for the page on the horizontal axis.
PaperWidthpublicHorizontal size for the paper selected in the print device.
PaperHeightpublicVertical size for the paper selected in the print device.
PageNumberpublicThe number for the current page in the printer canvas.
TopMarginpublicThe size of the margin at the top of the canvas.
LeftMarginpublicThe size of the margin at the left edge of the canvas.
BottomMarginpublicThe size of the margin at the bottom edge of the canvas.
RightMarginpublicThe size of the margin at the right edge of the canvas.
OrientationpublicOrientation of the page on the selected paper.
XDPIpublicDPI (Dots per Inch) in the horizontal direction for the print device.
YDPIpublicDPI (Dots per Inch) in the vertical direction for the print device.

Methods

GetLeftMarginprotectedGets the value for the LeftMargin property.
GetTopMarginprotectedGets the value for the TopMargin property.
GetBottomMarginprotectedGets the value for the BottomMargin property.
GetRightMarginprotectedGets the value for the RightMargin property.
CreatepublicConstructor for the class instance.
BeginDocpublicPerforms actions needed to start printing a document.
NewPagepublicPerforms actions needed when a new page is started.
BeginPagepublicPerforms actions needed when a page is started.
EndPagepublicPerforms actions needed when a page is completed.
EndDocpublicPerforms actions needed when a document has finished printing.
ChangingpublicSignals 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.