BOOL DrvStartPage( SURFOBJ *pso ) /*++ Routine Description: Function called to process BEGIN_DOC transaction. That is, the start of a document. Thus it is necessary to send the initialisation data to the printer, as well as initialise internal data. Arguments: pso - Pointer to the SURFOBJ which belong to this driver Return Value: TRUE if sucessful FALSE otherwise Author: 15-Feb-1994 Tue 09:58:26 updated -by- Daniel Chou (danielc) Move PhysPosition and AnchorCorner to the SendPageHeader where the commmand is sent. 30-Nov-1993 Tue 23:08:12 created -by- Daniel Chou (danielc) Revision History: --*/ { PPDEV pPDev; if (!(pPDev = SURFOBJ_GETPDEV(pso))) { PLOTERR(("DrvStartPage: invalid pPDev")); return(FALSE); } // // initialize some PDEV values for current plotter state... // pPDev->CurPenSelected = -1; pPDev->LastDevROP = 0xFFFF; pPDev->Rop3CopyBits = 0xCC; pPDev->LastFillTypeIndex = 0xFFFF; pPDev->LastLineType = PLOT_LT_UNDEFINED; pPDev->DevBrushUniq = 0; ResetDBCache(pPDev); return(SendPageHeader(pPDev)); }
BOOL DrvSendPage( SURFOBJ *pso ) /*++ Routine Description: Called when the user has completed the drawing for this page. and we need to start output the remainding data Arguments: pso - Pointer to the SURFOBJ which belong to this driver Return Value: TRUE if sucessful FALSE otherwise Author: 30-Nov-1993 Tue 21:34:53 created -by- Daniel Chou (danielc) Revision History: --*/ { PPDEV pPDev; // // Not a great deal to do - we basically get the surface details and call // the output functions. If this is a surface, then nothing needs to be // done, but journal files require more complex processing. // // TODO we need REPLOT support here if we support multiple copies.... // we also have to determine how much data gets resett after the plot // page.. if (!(pPDev = SURFOBJ_GETPDEV(pso))) { PLOTERR(("DrvSendPage: invalid pPDev")); return(FALSE); } if (pso->iType == STYPE_DEVICE) { return(SendPageTrailer(pPDev)); } else { PLOTRIP(("DrvSendPage: Invalid surface type %ld passed???", (LONG)pso->iType)); return(FALSE); } }
BOOL DrvEndDoc( SURFOBJ *pso, FLONG Flags ) /*++ Routine Description: This function end the control information on the device for the document Arguments: pso - Pointer to the SURFOBJ for the device Flags - if ED_ABORTDOC bit is set then the document has been aborted Return Value: BOOLLEAN to specified if function sucessful Author: 30-Nov-1993 Tue 21:16:48 created -by- Daniel Chou (danielc) Revision History: --*/ { PPDEV pPDev; if (!(pPDev = SURFOBJ_GETPDEV(pso))) { PLOTERR(("DrvEndDoc: invalid pPDev")); return(FALSE); } // // TODO we should review if we should do anything here... // PLOTDBG(DBG_ENDDOC,("DrvEndDoc called with Flags = %08lx", Flags)); return(TRUE); }
BOOL DrvStartDoc( SURFOBJ *pso, PWSTR pwDocName, DWORD JobId ) /*++ Routine Description: This function is called by start page, and is the second highest level initialization call. It initializes the beginning of a document, which is different from the beginning of a page, since multiple pages may exist in a document. Arguments: pso - Pointer to the SURFOBJ which belong to this driver pwDocName - Pointer to the document name to be started JobID - Job's ID Return Value: BOOL Author: 16-Nov-1993 Tue 01:55:15 updated -by- Daniel Chou (danielc) re-write 08-Feb-1994 Tue 13:51:59 updated -by- Daniel Chou (danielc) Move to StartPage for now Revision History: --*/ { PPDEV pPDev; if (!(pPDev = SURFOBJ_GETPDEV(pso))) { PLOTERR(("DrvStartDoc: invalid pPDev")); return(FALSE); } // // TODO we should review if we should do anything here... // PLOTDBG(DBG_STARTDOC,("DrvStartDoc: DocName = %s", pwDocName)); //TODO may need to resett stuff in drvstart page return(TRUE); }
_Use_decl_annotations_ BOOL WINAPI DrvStrokePath( SURFOBJ *pso, PATHOBJ *ppo, CLIPOBJ *pco, XFORMOBJ *pxo, BRUSHOBJ *pbo, PPOINTL pptlBrushOrg, LINEATTRS *plineattrs, MIX Mix ) /*++ Routine Description: The driver's function for the StrokePath Arguments: same as EngStrokePath Return Value: TRUE if sucessful FALSE if failed Author: 8/18/92 -- t-alip Rewrote it. 30-Nov-1993 Tue 22:21:51 updated updated by DC 04-Aug-1994 Thu 20:00:23 updated bug# 22348 Revision History: 31-Jan-1994 Tue 22:21:51 updated Fixed dopolygon to pass in ROP4 not just MIX --*/ { PPDEV pPDev; BOOL bRetVal; UNREFERENCED_PARAMETER(pxo); PLOTDBG(DBG_STROKEPATH, ("DrvStrokePath: Mix = %x", Mix)); if (!(pPDev = SURFOBJ_GETPDEV(pso))) { PLOTERR(("DrvStrokePath: Invalid pPDev")); return(FALSE); } if (!(bRetVal = DoPolygon(pPDev, NULL, pco, ppo, pptlBrushOrg, NULL, pbo, MixToRop4(Mix), plineattrs, FPOLY_STROKE) )) { // // Since DoPolygon failed, it can only be because we had both a complex // clip and a pathobj, so the thing to here is do the stroke via another // method using some of the engine helpers. // // We will also failed when STYLE LINE + DC_RECT when raster plotter is // used // bRetVal = DoStrokePathByEnumingClipLines( pPDev, pso, pco, ppo, pptlBrushOrg, pbo, MixToRop4(Mix), plineattrs); } return(bRetVal); }