OpenPetra
Free Administration Software for Non-Profits
|
The TGfxPrinter class is the base class for TPdfPrinter More...
Public Types | |
enum | ePrinterBehaviour { eReport , eFormLetter } |
we have some different behaviour when printing the columns of a report and when printing a form letter More... | |
Public Member Functions | |
TGfxPrinter (ePrinterBehaviour APrinterBehaviour) | |
sets the orientation of the page More... | |
override void | Init (eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) |
todoComment More... | |
override Boolean | PrintString (String ATxt, eFont AFont, eAlignment AAlign) |
prints into the current line, aligned x position More... | |
override Boolean | PrintString (String ATxt, eFont AFont, float AXPos) |
prints into the current line, absolute x position More... | |
override Boolean | PrintString (String ATxt, eFont AFont, float AXPos, float AWidth, eAlignment AAlign) |
prints into the current line, absolute x position with width and alignment More... | |
override bool | PrintStringWrap (String ATxt, eFont AFont, float AXPos, float AWidth, eAlignment AAlign) |
prints into the current line, absolute x position with width and alignment this method uses FCurrentXPos and FCurrentYPos to be able to continue a paragraph uses FCurrentXPos and FCurrentYPos to know where to start to print, and also sets valid values in those member variables More... | |
override Boolean | PrintStringAndFits (String ATxt, eFont AFont, float AXPos, float AWidth, eAlignment AAlign) |
This function uses the normal DrawString function to print into a given space. It will return whether the text did fit that space or not. More... | |
override float | GetWidthString (String ATxt, eFont AFont) |
prints into the current line, into the given column More... | |
override Boolean | DrawLine (float AXPos1, float AXPos2, eLinePosition ALinePosition, eFont AFont) |
Draws a line, either above or below the current text line the font is required to get the height of the row More... | |
override void | DrawLine (Int32 APenPixels, float AXPos1, float AYPos1, float AXPos2, float AYPos2) |
Draws a line, at specified position More... | |
override void | DrawRectangle (Int32 APenPixels, float AXPos, float AYPos, float AWidth, float AHeight) |
draw a rectangle More... | |
override void | DrawBitmap (string APath, float AXPos, float AYPos) |
draw a bitmap at the given position; the current position is moved More... | |
override void | DrawBitmap (string APath, float AXPos, float AYPos, float AWidth, float AHeight, float AWidthPercentage, float AHeightPercentage) |
draw a bitmap at the given position; the current position is moved More... | |
override float | LineFeed (eFont AFont) |
Line Feed; increases the current y position by the height of the given font More... | |
override float | LineFeed () |
Line Feed; increases the current y position by the height of the biggest last used font More... | |
override float | LineSpaceFeed (eFont AFont) |
Line Feed, but not full line; increases the current y position by half the height of the given font More... | |
override float | LineUnFeed (eFont AFont) |
Reverse Line Feed; decreases the current y position by the height of the given font More... | |
override void | SetPageFooterSpace (System.Int32 ANumberOfLines, eFont AFont) |
Set the space that is required by the page footer. ValidYPos will consider this value. More... | |
override float | LineFeedToPageFooter () |
Jump to the position where the page footer starts. SetPageFooterSpace is used to define the space reserved for the footer. More... | |
override Boolean | ValidXPos (float APosition) |
Is the given position still on the page? More... | |
override Boolean | ValidYPos () |
Is the current line still on the page? More... | |
override void | SetHasMorePages (bool AHasMorePages) |
Tell the printer, that there are more pages coming More... | |
override bool | HasMorePages () |
more pages are coming More... | |
override float | Cm (float AValueInCm) |
Converts the given value in cm to the currently used measurement unit More... | |
override float | PixelHorizontal (float AWidth) |
convert pixels to inches or other unit used for output More... | |
override float | PixelVertical (float AHeight) |
convert pixels to inches or other unit used for output More... | |
virtual void | SaveState () |
save the state before a rotation etc More... | |
virtual void | RestoreState () |
restore the state after a rotation etc More... | |
virtual void | RotateAtTransform (double ADegrees, double XPos, double YPos) |
rotate the following output by some degrees, at the given position More... | |
float | LineFeed (float height) |
Line Feed; increases the current y position by the given height More... | |
void | StartSimulatePrinting () |
start the simulation of printing; nothing is actually printed, but the CurrentYPos is increased More... | |
void | FinishSimulatePrinting () |
finish the simulation of printing; the actual CurrentYPos is restored More... | |
void | PushCurrentState () |
store the current printer state (font size etc) More... | |
void | PopCurrentState () |
return to previous printer state; this is used for printing table cells More... | |
void | PopCurrentStateApartFromYPosition () |
return to previous printer state; but keep the new y position (used eg. for printing the page header) More... | |
float | Inch (float AValueInInch) |
Converts the given value in inch to the currently used measurement unit; uses Inch2Cm and Cm More... | |
virtual void | InsertDocument (string AFilename) |
insert another document into the current document. At the moment only used for PDF More... | |
virtual float | PrintTable (float AXPos, float AWidthAvailable, List< TTableRowGfx >rows, out Int32 ARowsFittingOnPage) |
renders a table at the current FCurrentYPos does not support rowspan at the moment colspan might be implemented in the generation of the TTableRowGfx structure does not care about fitting on page etc. More... | |
Static Public Member Functions | |
static float | Cm2Inch (float AValueInCm) |
Converts the given value in cm to the equivalent value in inches More... | |
static float | Inch2Cm (float AValueInInch) |
Converts the given value in inches to the equivalent value in centimeters More... | |
Public Attributes | |
ePrinterBehaviour | FPrinterBehaviour = ePrinterBehaviour.eReport |
we have some different behaviour when printing the columns of a report (can make text fit) and when printing a form letter More... | |
float | FPageXPos |
printing should be started at this position for each line More... | |
float | FPageWidthAvailable |
space available for printing More... | |
Static Public Attributes | |
const Int32 | DEFAULTPRINTERRESOLUTION = 300 |
default printer resolution More... | |
Protected Member Functions | |
virtual bool | UpdateBiggestLastUsedFont (eFont AFont) |
update the biggest last used font for the next line feed More... | |
String | GetFittedText (String ATxt, eFont AFont, float AWidth) |
Check if the text will fit into the given width. If yes, the text will be returned. If no, the text will be shortened and a "..." will be added to indicate that some text is missing. More... | |
String | CutTextToLength (String ATxt, eFont AFont, float AWidth) |
Cuts a given text so it will not extend the given width. More... | |
Int32 | GetTextLengthThatWillFit (String ATxt, eFont AFont, float AWidth) |
word wrap text, return the number of characters that fit the line width; if the first word does not fit the space available, wrap the word in itself More... | |
Protected Attributes | |
float | FLinesPerPage |
these values are set by PrintPage More... | |
eOrientation | FOrientation |
todoComment More... | |
eMarginType | FMarginType |
use printable area or default margins More... | |
Int32 | FNumberOfPages |
todoComment More... | |
float | FPageFooterSpace |
how much space is needed for the footer lines; footerspace = font.height number of lines More... | |
float | FLeftMargin |
todoComment More... | |
float | FTopMargin |
todoComment More... | |
float | FRightMargin |
todoComment More... | |
float | FBottomMargin |
todoComment More... | |
float | FWidth |
todoComment More... | |
float | FHeight |
todoComment More... | |
TPrinterLayout | FPrinterLayout |
todoComment More... | |
TPrinterState | FCurrentState = new TPrinterState() |
current state of printer More... | |
PrintAction | FprintAction |
I can check whether I'm printing to a preview or a real printer. More... | |
Properties | |
System.Int32 | CurrentPageNr [get, set] |
todoComment More... | |
System.Int32 | CurrentDocumentNr [get, set] |
a document can consist of several pages; a document is one body element More... | |
System.Int32 | NumberOfPages [get, set] |
this only has a valid value after the first rendering of the report More... | |
float | CurrentYPos [get, set] |
todoComment More... | |
float | CurrentXPos [get, set] |
todoComment More... | |
float | AnchorXPos [get, set] |
other elements can be positioned relative to this position More... | |
float | AnchorYPos [get, set] |
other elements can be positioned relative to this position More... | |
float | LeftMargin [get] |
todoComment More... | |
float | RightMargin [get] |
todoComment More... | |
eFont | CurrentFont [get, set] |
todoComment More... | |
float | CurrentLineHeight [get, set] |
1 is the normal height of the font, CurrentLineHeight is multiplied with the height of the font More... | |
float | CurrentRelativeFontSize [get, set] |
the relative font size; 0 is default size More... | |
eAlignment | CurrentAlignment [get, set] |
todoComment More... | |
ePrintingMode | PrintingMode [get, set] |
this is about simulation or printing More... | |
float | Width [get] |
todoComment More... | |
float | PageFooterSpace [get] |
todoComment More... | |
The TGfxPrinter class is the base class for TPdfPrinter
|
inline |
sets the orientation of the page
|
inlinevirtual |
Converts the given value in cm to the currently used measurement unit
Implements Ict.Common.Printing.TPrinter.
|
inlinestaticinherited |
Converts the given value in cm to the equivalent value in inches
|
inlineprotected |
Cuts a given text so it will not extend the given width.
ATxt | The text to cut |
AFont | The font used |
AWidth | The available length for the text in cm. |
|
inlinevirtual |
draw a bitmap at the given position; the current position is moved
APath | |
AXPos | |
AYPos |
Reimplemented from Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
draw a bitmap at the given position; the current position is moved
Either Width or WidthPercentage should be unequals 0, but only one should have a value. Same applies to Height
Reimplemented from Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Draws a line, either above or below the current text line the font is required to get the height of the row
AXPos1 | |
AXPos2 | |
ALinePosition | |
AFont |
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Draws a line, at specified position
Reimplemented from Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
draw a rectangle
APenPixels | |
AXPos | |
AYPos | |
AWidth | |
AHeight |
Reimplemented from Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlineinherited |
finish the simulation of printing; the actual CurrentYPos is restored
|
inlineprotected |
Check if the text will fit into the given width. If yes, the text will be returned. If no, the text will be shortened and a "..." will be added to indicate that some text is missing.
ATxt | the original text |
AFont | the font |
AWidth | the space available for the text in cm |
|
inlineprotected |
word wrap text, return the number of characters that fit the line width; if the first word does not fit the space available, wrap the word in itself
ATxt | |
AFont | |
AWidth |
|
inlinevirtual |
prints into the current line, into the given column
ATxt | |
AFont |
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
|
inlineinherited |
Converts the given value in inch to the currently used measurement unit; uses Inch2Cm and Cm
|
inlinestaticinherited |
Converts the given value in inches to the equivalent value in centimeters
|
inlinevirtual |
todoComment
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtualinherited |
insert another document into the current document. At the moment only used for PDF
AFilename |
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Line Feed; increases the current y position by the height of the biggest last used font
Reimplemented from Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Line Feed; increases the current y position by the height of the given font
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlineinherited |
Line Feed; increases the current y position by the given height
|
inlinevirtual |
Jump to the position where the page footer starts. SetPageFooterSpace is used to define the space reserved for the footer.
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Line Feed, but not full line; increases the current y position by half the height of the given font
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Reverse Line Feed; decreases the current y position by the height of the given font
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
convert pixels to inches or other unit used for output
AWidth |
Implements Ict.Common.Printing.TPrinter.
|
inlinevirtual |
convert pixels to inches or other unit used for output
Implements Ict.Common.Printing.TPrinter.
|
inlineinherited |
return to previous printer state; this is used for printing table cells
|
inlineinherited |
return to previous printer state; but keep the new y position (used eg. for printing the page header)
|
inlinevirtual |
prints into the current line, aligned x position
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
prints into the current line, absolute x position
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
prints into the current line, absolute x position with width and alignment
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
This function uses the normal DrawString function to print into a given space. It will return whether the text did fit that space or not.
ATxt | |
AFont | |
AXPos | |
AWidth | |
AAlign |
Implements Ict.Common.Printing.TPrinter.
|
inlinevirtual |
prints into the current line, absolute x position with width and alignment this method uses FCurrentXPos and FCurrentYPos to be able to continue a paragraph uses FCurrentXPos and FCurrentYPos to know where to start to print, and also sets valid values in those member variables
Reimplemented from Ict.Common.Printing.TPrinter.
|
inlinevirtualinherited |
renders a table at the current FCurrentYPos does not support rowspan at the moment colspan might be implemented in the generation of the TTableRowGfx structure does not care about fitting on page etc.
AXPos | the X position to start the table |
AWidthAvailable | AWidthAvailable |
rows | |
ARowsFittingOnPage | number of rows that fitted on the page |
|
inlineinherited |
store the current printer state (font size etc)
|
inlinevirtualinherited |
restore the state after a rotation etc
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtualinherited |
rotate the following output by some degrees, at the given position
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtualinherited |
save the state before a rotation etc
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
Tell the printer, that there are more pages coming
Implements Ict.Common.Printing.TPrinter.
|
inlinevirtual |
Set the space that is required by the page footer. ValidYPos will consider this value.
Implements Ict.Common.Printing.TPrinter.
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlineinherited |
start the simulation of printing; nothing is actually printed, but the CurrentYPos is increased
|
inlineprotectedvirtual |
update the biggest last used font for the next line feed
AFont |
Reimplemented in Ict.Common.Printing.TPdfPrinter.
|
inlinevirtual |
|
inlinevirtual |
|
static |
default printer resolution
|
protectedinherited |
todoComment
|
protectedinherited |
current state of printer
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protected |
these values are set by PrintPage
|
protectedinherited |
use printable area or default margins
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
how much space is needed for the footer lines; footerspace = font.height number of lines
float Ict.Common.Printing.TGfxPrinter.FPageWidthAvailable |
space available for printing
float Ict.Common.Printing.TGfxPrinter.FPageXPos |
printing should be started at this position for each line
|
protectedinherited |
I can check whether I'm printing to a preview or a real printer.
ePrinterBehaviour Ict.Common.Printing.TGfxPrinter.FPrinterBehaviour = ePrinterBehaviour.eReport |
we have some different behaviour when printing the columns of a report (can make text fit) and when printing a form letter
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
protectedinherited |
todoComment
|
getsetinherited |
other elements can be positioned relative to this position
|
getsetinherited |
other elements can be positioned relative to this position
|
getsetinherited |
todoComment
|
getsetinherited |
a document can consist of several pages; a document is one body element
|
getsetinherited |
todoComment
|
getsetinherited |
1 is the normal height of the font, CurrentLineHeight is multiplied with the height of the font
|
getsetinherited |
todoComment
|
getsetinherited |
the relative font size; 0 is default size
|
getsetinherited |
todoComment
|
getsetinherited |
todoComment
|
getinherited |
todoComment
|
getsetinherited |
this only has a valid value after the first rendering of the report
|
getinherited |
todoComment
|
getsetinherited |
this is about simulation or printing
|
getinherited |
todoComment
|
getinherited |
todoComment