CFx SDK Documentation  2023 SP0
DbPlotSettings.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef OD_DBPLOTSETTINGS_H
25 #define OD_DBPLOTSETTINGS_H
26 
27 #include "TD_PackPush.h"
28 
29 #include "DbObject.h"
30 #include "Ge/GePoint2d.h"
31 
41 {
42 public:
44 
46 
48  {
49  kInches = 0, // Inches
50  kMillimeters = 1, // Millimeters
51  kPixels = 2 // Pixels
52  };
53 
55  {
56  k0degrees = 0, // No rotation
57  k90degrees = 1, // 90° CCW
58  k180degrees = 2, // Inverted
59  k270degrees = 3 // 90° CW
60  };
61 
62  enum PlotType
63  {
64  kDisplay = 0, // Display
65  kExtents = 1, // Extents
66  kLimits = 2, // Limits
67  kView = 3, // View
68  kWindow = 4, // Window
69  kLayout = 5 // Layout
70  };
71 
73  {
74  kScaleToFit = 0, // Scaled to Fit
75  k1_128in_1ft = 1, // 1/128" = 1'
76  k1_64in_1ft = 2, // 1/64" = 1'
77  k1_32in_1ft = 3, // 1/32" = 1'
78  k1_16in_1ft = 4, // 1/16" = 1'
79  k3_32in_1ft = 5, // 3/32" = 1'
80  k1_8in_1ft = 6, // 1/8" = 1'
81  k3_16in_1ft = 7, // 3/16" = 1'
82  k1_4in_1ft = 8, // 1/4" = 1'
83  k3_8in_1ft = 9, // 3/8" = 1'
84  k1_2in_1ft = 10, // 1/2" = 1'
85  k3_4in_1ft = 11, // 3/4" = 1'
86  k1in_1ft = 12, // 1" = 1'
87  k3in_1ft = 13, // 3" = 1'
88  k6in_1ft = 14, // 6" = 1'
89  k1ft_1ft = 15, // 1' = 1'
90  k1_1 = 16, // 1:1
91  k1_2 = 17, // 1:2
92  k1_4 = 18, // 1:4
93  k1_5 = 19, // 1:5
94  k1_8 = 20, // 1:8
95  k1_10 = 21, // 1:10
96  k1_16 = 22, // 1:16
97  k1_20 = 23, // 1:20
98  k1_30 = 24, // 1:30
99  k1_40 = 25, // 1:40
100  k1_50 = 26, // 1:50
101  k1_100 = 27, // 1:100
102  k2_1 = 28, // 2:1
103  k4_1 = 29, // 4:1
104  k8_1 = 30, // 8:1
105  k10_1 = 31, // 10:1
106  k100_1 = 32, // 100:1
107  k1000_1 = 33, // 1000:1
108  k1and1_2in_1ft = 34 // 1.5"= 1'
109  };
110 
112  {
113  kAsDisplayed = 0, // As displayed
114  kWireframe = 1, // Wireframe
115  kHidden = 2, // Hidden lines removed
116  kRendered = 3, // Rendered
117  kVisualStyle = 4, // Visual style
118  kRenderPreset = 5 // Render preset
119  };
120 
122  {
123  kDraft = 0, // Draft
124  kPreview = 1, // Preview
125  kNormal = 2, // Normal
126  kPresentation = 3, // Presentation
127  kMaximum = 4, // Maximum
128  kCustom = 5 // Custom
129  };
130 
137  OdDbDatabase *pDb);
138 
143 
150  const OdString& plotSettingsName);
151 
156 
170  double& leftMargin,
171  double& bottomMargin,
172  double& rightMargin,
173  double& topMargin) const;
174 
183  double& paperWidth,
184  double& paperHeight) const;
185 
193 
205  double& xCoordinate,
206  double& yCoordinate) const;
207 
222 
229  bool plotViewportBorders() const;
230 
237  bool plotViewportBorders);
238 
245  bool plotPlotStyles() const;
246 
253  bool plotPlotStyles);
254 
258  bool showPlotStyles() const;
259 
266  bool showPlotStyles);
267 
283 
287  bool plotCentered() const;
288 
293  bool plotHidden() const;
294 
301  void setPlotHidden(bool plotHidden);
302 
320 
333  double& xMin,
334  double& yMin,
335  double& xMax,
336  double& yMax) const;
337 
345 
349  bool useStandardScale() const;
350 
361  double& numerator,
362  double& denominator) const;
363 
368 
415 
416 
423  double& standardScale) const;
424 
428  bool scaleLineweights() const;
429 
436  bool scaleLineweights);
437 
441  bool printLineweights() const;
442 
448  void setPrintLineweights(bool printLineweights);
449 
475  bool drawViewportsFirst() const;
476 
484  bool drawViewportsFirst);
485 
492  bool modelType() const;
493 
502  void setModelType(bool modelType);
503 
507  double getTopMargin() const;
508 
512  double getRightMargin() const;
513 
517  double getBottomMargin() const;
518 
522  double getLeftMargin() const;
523 
528 
533  void setPaperImageOrigin(OdGePoint2d paperImageOrigin);
534 
535  // New to 2004 api
536 
553 
573 
595 
619  OdDbPlotSettings::ShadePlotResLevel shadePlotResLevel);
620 
633 
648  OdInt16 shadePlotCustomDPI);
649 
651  void* pClsid) const;
652 
654  OdDbDwgFiler* pFiler);
655 
656  virtual void dwgOutFields(
657  OdDbDwgFiler* pFiler) const;
658 
660  OdDbDxfFiler* pFiler);
661 
662  virtual void dxfOutFields(
663  OdDbDxfFiler* pFiler) const;
664 
665  virtual void subClose();
666 
668  bool erasing);
669 
670  virtual void subHandOverTo(
671  OdDbObject* pNewObject);
672 
673  virtual void copyFrom(
674  const OdRxObject* pSource);
675 
676 // New in AC2007
677 
678 // Returns the OdDbObjectId of the OdDbVisualStyle or OdDbRenderSettings object
679 // referenced by this object.
680 
686 
705  OdDbObjectId shadePlotId);
709  bool plotWireframe() const;
713  bool plotAsRaster () const;
714 
718  bool plotTransparency() const;
724  void setPlotTransparency(bool bSet);
725 };
726 
731 
732 #include "TD_PackPop.h"
733 
734 #endif
735 
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbPlotSettings > OdDbPlotSettingsPtr
@ kExtents
short OdInt16
OdResult
Definition: OdResult.h:29
bool showPlotStyles() const
OdString getPlotCfgName() const
OdString getPlotSettingsName() const
void getPlotOrigin(double &xCoordinate, double &yCoordinate) const
void setShadePlotCustomDPI(OdInt16 shadePlotCustomDPI)
void setModelType(bool modelType)
void setPlotPlotStyles(bool plotPlotStyles)
bool plotCentered() const
OdString getPlotViewName() const
OdString getCurrentStyleSheet() const
bool plotTransparency() const
OdString getCanonicalMediaName() const
bool modelType() const
void getPlotWindowArea(double &xMin, double &yMin, double &xMax, double &yMax) const
OdDbPlotSettings::PlotType plotType() const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
void setShadePlotResLevel(OdDbPlotSettings::ShadePlotResLevel shadePlotResLevel)
void setScaleLineweights(bool scaleLineweights)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
ODDB_DECLARE_MEMBERS(OdDbPlotSettings)
double getRightMargin() const
void getStdScale(double &standardScale) const
bool printLineweights() const
void setPrintLineweights(bool printLineweights)
bool plotHidden() const
OdDbPlotSettings::PlotRotation plotRotation() const
OdDbPlotSettings::StdScaleType stdScaleType() const
virtual OdResult subErase(bool erasing)
virtual void subClose()
OdDbPlotSettings::PlotPaperUnits plotPaperUnits() const
double getTopMargin() const
bool plotViewportBorders() const
OdDbPlotSettings::ShadePlotType shadePlot() const
void setDrawViewportsFirst(bool drawViewportsFirst)
OdInt16 shadePlotCustomDPI() const
bool plotPlotStyles() const
void setPlotSettingsName(const OdString &plotSettingsName)
void setPlotViewportBorders(bool plotViewportBorders)
bool drawViewportsFirst() const
void getCustomPrintScale(double &numerator, double &denominator) const
virtual void subHandOverTo(OdDbObject *pNewObject)
OdResult setShadePlot(OdDbPlotSettings::ShadePlotType shadePlot)
virtual OdResult subGetClassID(void *pClsid) const
OdDbObjectId shadePlotId() const
bool plotAsRaster() const
void getPlotPaperMargins(double &leftMargin, double &bottomMargin, double &rightMargin, double &topMargin) const
OdGePoint2d getPaperImageOrigin() const
bool scaleLineweights() const
void setShowPlotStyles(bool showPlotStyles)
double getBottomMargin() const
virtual void copyFrom(const OdRxObject *pSource)
void setPlotTransparency(bool bSet)
OdDbPlotSettings::ShadePlotResLevel shadePlotResLevel() const
void getPlotPaperSize(double &paperWidth, double &paperHeight) const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdResult setShadePlot(OdDbPlotSettings::ShadePlotType type, OdDbObjectId shadePlotId)
bool plotWireframe() const
void setPaperImageOrigin(OdGePoint2d paperImageOrigin)
void addToPlotSettingsDict(OdDbDatabase *pDb)
double getLeftMargin() const
void setPlotHidden(bool plotHidden)
bool useStandardScale() const
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274