#include <drawer.h>


Public Member Functions | |
| a2dViewPrintout (a2dCanvasView *drawer, const wxString &title, const wxString &filename, a2dCommand *typeOfPrint, bool drawframe, double scalelimit, bool fitToPage) | |
| initialize mapping based on an existing canvas | |
| ~a2dViewPrintout (void) | |
| destructor | |
| bool | OnPrintPage (int) |
| called for every page to print, for a2dCanvasDocument in general just one. | |
Protected Attributes | |
| a2dCommand * | m_typeOfPrint |
| type of print requested | |
| a2dCanvasView * | m_drawingView |
| maping defined by this canvas | |
| wxString | m_title |
| title put above printout | |
| wxString | m_filename |
| filename put below printout | |
| double | m_scalelimit |
| limit scaling to this value (world/pixel) | |
| bool | m_drawframe |
| draw a frame around the page | |
| bool | m_fitToPage |
Internal a second wxDarwer class is initiated with a mapping that nicely fits that mapping of the input a2dCanvasView to a piece of paper. This mapping depends on the type of print. If only what is on the view needs to be printed, the mapping of the input drawer is used, but if the whole document is wanted as seen from the ShowObject() of the input drawer, the boundingbox of the showobject will be used for the mapping.
Definition at line 314 of file drawer.h.
| a2dViewPrintout::a2dViewPrintout | ( | a2dCanvasView * | drawer, | |
| const wxString & | title, | |||
| const wxString & | filename, | |||
| a2dCommand * | typeOfPrint, | |||
| bool | drawframe, | |||
| double | scalelimit, | |||
| bool | fitToPage | |||
| ) |
initialize mapping based on an existing canvas
| drawer | the a2dCanvasView from which the print is wanted. | |
| title | title at top of the print | |
| filename | the name of the file to be printed (may be empty ) | |
| typeOfPrint | When called from a2dDocumentCommandProcessor, the a2dCommand* which lead to this call. |
a2dCommand_Print::a2dPrintWhat { Print, Preview, PrintView, PreviewView, PrintDocument, PreviewDocument, PrintSetup };
Here View is to only print what is the visible view. Document print the document as seen from the a2dView::ShowObject(), it fits this to the paper.
| drawframe | print a frame rectangle in bounding box of drawing/view | |
| scalelimit | limits the scaling (world/pixel) to the given value, so that small graphics are not zoomed to full page | |
| fitToPage | scale to fit the page |
Definition at line 416 of file drawer.cpp.
| bool a2dViewPrintout::OnPrintPage | ( | int | ) |
called for every page to print, for a2dCanvasDocument in general just one.
It redraws/rerenders without double buffering the view or document on the pinter its wxDC. Internal a a2dDcDrawer is used to redraw the a2dCanvasDocument on the device.
needed ?
now draw to the area within the margins
Reimplemented from a2dDocumentPrintout.
Definition at line 431 of file drawer.cpp.
bool a2dViewPrintout::m_fitToPage [protected] |