PrinterSettings.CreateMeasurementGraphics 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回 Graphics,它包含打印机信息。
重载
CreateMeasurementGraphics(PageSettings) |
返回 Graphics,包含与指定 PageSettings 关联的打印机信息。 |
CreateMeasurementGraphics(PageSettings, Boolean) |
创建与指定页设置关联的 Graphics 并选择性地指定边距处的原点。 |
CreateMeasurementGraphics() |
返回 Graphics,它包含创建 PrintDocument 时有用的打印机信息。 |
CreateMeasurementGraphics(Boolean) |
返回包含打印机信息的 Graphics,选择性地指定边距处的原点。 |
CreateMeasurementGraphics(PageSettings)
返回 Graphics,包含与指定 PageSettings 关联的打印机信息。
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics(System::Drawing::Printing::PageSettings ^ pageSettings);
public System.Drawing.Graphics CreateMeasurementGraphics (System.Drawing.Printing.PageSettings pageSettings);
member this.CreateMeasurementGraphics : System.Drawing.Printing.PageSettings -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics (pageSettings As PageSettings) As Graphics
参数
- pageSettings
- PageSettings
要检索其图形对象的 PageSettings。
返回
Graphics,包含来自 PageSettings 的打印机信息。
注解
CreateMeasurementGraphics使用该方法,无需创建打印作业即可获取Graphics打印机的打印机。 使用该 Graphics 操作可决定如何布局复杂打印作业的视觉元素,如字体、大小和类型样式。
适用于
CreateMeasurementGraphics(PageSettings, Boolean)
创建与指定页设置关联的 Graphics 并选择性地指定边距处的原点。
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics(System::Drawing::Printing::PageSettings ^ pageSettings, bool honorOriginAtMargins);
public System.Drawing.Graphics CreateMeasurementGraphics (System.Drawing.Printing.PageSettings pageSettings, bool honorOriginAtMargins);
member this.CreateMeasurementGraphics : System.Drawing.Printing.PageSettings * bool -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics (pageSettings As PageSettings, honorOriginAtMargins As Boolean) As Graphics
参数
- pageSettings
- PageSettings
要检索其 PageSettings 对象的 Graphics。
- honorOriginAtMargins
- Boolean
true
即指定边距处的原点;否则为 false
。
返回
Graphics,包含来自 PageSettings 的打印机信息。
注解
使用此方法 CreateMeasurementGraphics 可以获取打印机的打印 Graphics 作业,而无需创建打印作业。 使用该 Graphics 操作可决定如何布局复杂打印作业的视觉元素,如字体、大小和类型样式。
适用于
CreateMeasurementGraphics()
返回 Graphics,它包含创建 PrintDocument 时有用的打印机信息。
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics();
public System.Drawing.Graphics CreateMeasurementGraphics ();
member this.CreateMeasurementGraphics : unit -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics () As Graphics
返回
Graphics,包含来自打印机的信息。
例外
PrinterName 属性中命名的打印机不存在。
注解
CreateMeasurementGraphics使用该方法,无需创建打印作业即可获取Graphics打印机的打印机。 可以使用 Graphics 该控件来决定如何布局复杂打印作业的视觉元素,如字体、大小和类型样式。
另请参阅
适用于
CreateMeasurementGraphics(Boolean)
返回包含打印机信息的 Graphics,选择性地指定边距处的原点。
public:
System::Drawing::Graphics ^ CreateMeasurementGraphics(bool honorOriginAtMargins);
public System.Drawing.Graphics CreateMeasurementGraphics (bool honorOriginAtMargins);
member this.CreateMeasurementGraphics : bool -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics (honorOriginAtMargins As Boolean) As Graphics
参数
- honorOriginAtMargins
- Boolean
true
表示边距处的原点;否则为 false
。
返回
Graphics,包含来自 PageSettings 的打印机信息。
注解
CreateMeasurementGraphics使用该方法,无需创建打印作业即可获取Graphics打印机的打印机。 使用该 Graphics 操作可决定如何布局复杂打印作业的视觉元素,如字体、大小和类型样式。