AcPlPlotEngine.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // AcPlPlotPageInfo - interface for prescan info
  12. // AcPlPreviewEngine - interface with plotting pipeline for previewing
  13. // AcPlPlotEngine - interface with plotting pipeline for plotting
  14. //
  15. #ifndef _ACPLPLOTENGINE_H
  16. #define _ACPLPLOTENGINE_H
  17. #include "AdAChar.h"
  18. #include "AcPl.h"
  19. #include "AcPlObject.h"
  20. class AcViewport;
  21. class PlotEnvironment;
  22. class AcPlPlotProgress;
  23. class AcPlPlotInfo;
  24. class AcDbPlotSettings;
  25. class AcPlPlotConfig;
  26. // Status values for ACPL_PREVIEWENDPLOT
  27. enum PreviewStatus {
  28. kNormal = 0,
  29. kPlot,
  30. kCancel,
  31. kNext,
  32. kPrevious
  33. };
  34. // Struct ACPL_PREVIEWENDPLOT, in/out parameter modified by AcPlPlotEngine::endPlot()
  35. // if the engine was created with AcPlPlotFactory::createPreviewEngine.
  36. struct ACPL_PREVIEWENDPLOT {
  37. PreviewStatus nStatus;
  38. };
  39. class AcPlPlotPageInfo : public AcPlObject
  40. {
  41. ACPL_DECLARE_MEMBERS(AcPlPlotPageInfo);
  42. public:
  43. ACPL_PORT AcPlPlotPageInfo();
  44. ACPL_PORT virtual ~AcPlPlotPageInfo();
  45. ACPL_PORT Adesk::Int32 entityCount() const;
  46. ACPL_PORT Adesk::Int32 rasterCount() const;
  47. ACPL_PORT Adesk::Int32 oleObjectCount() const;
  48. ACPL_PORT Adesk::Int32 gradientCount() const;
  49. ACPL_PORT Adesk::Int32 shadedViewportType() const;
  50. };
  51. #ifdef _ADESK_MAC_
  52. class ACPL_PORT AcPlPlotEngine {
  53. #else
  54. class ADESK_NO_VTABLE AcPlPlotEngine {
  55. #endif
  56. public:
  57. virtual Acad::ErrorStatus beginPlot(AcPlPlotProgress* pPlotProgress, void* pParams = NULL);
  58. virtual Acad::ErrorStatus endPlot(void* pParams = NULL);
  59. // This plotInfo must not be deleted until endDocument().
  60. virtual Acad::ErrorStatus beginDocument(AcPlPlotInfo& plotInfo,
  61. const ACHAR * pDocname,
  62. void *pParams = NULL,
  63. Adesk::Int32 nCopies = 1,
  64. bool bPlotToFile = false,
  65. const ACHAR * pFileName = NULL);
  66. virtual Acad::ErrorStatus endDocument(void* pParams = NULL);
  67. // This plotInfo may be the same as for beginDocument().
  68. virtual Acad::ErrorStatus beginPage(AcPlPlotPageInfo& pageInfo,
  69. AcPlPlotInfo& plotInfo,
  70. bool bLastPage,
  71. void* pParams = NULL);
  72. virtual Acad::ErrorStatus endPage(void* pParams = NULL);
  73. virtual Acad::ErrorStatus beginGenerateGraphics(void* pParams = NULL);
  74. virtual Acad::ErrorStatus beginGenerateGraphics(AcViewport*& pViewport, void* pParams = NULL);
  75. virtual Acad::ErrorStatus endGenerateGraphics(void* pParams = NULL);
  76. virtual void destroy();
  77. virtual bool isBackgroundPackaging() const;
  78. };
  79. #endif // _ACPLPLOTENGINE_H