PrinterSettings.CreateMeasurementGraphics 方法

定义

返回 Graphics,它包含打印机信息。Returns a Graphics that contains printer information.

重载

CreateMeasurementGraphics(PageSettings)

返回 Graphics,包含与指定 PageSettings 关联的打印机信息。Returns a Graphics that contains printer information associated with the specified PageSettings.

CreateMeasurementGraphics(PageSettings, Boolean)

创建与指定页设置关联的 Graphics 并选择性地指定边距处的原点。Creates a Graphics associated with the specified page settings and optionally specifying the origin at the margins.

CreateMeasurementGraphics()

返回 Graphics,它包含创建 PrintDocument 时有用的打印机信息。Returns a Graphics that contains printer information that is useful when creating a PrintDocument.

CreateMeasurementGraphics(Boolean)

返回包含打印机信息的 Graphics,选择性地指定边距处的原点。Returns a Graphics that contains printer information, optionally specifying the origin at the margins.

CreateMeasurementGraphics(PageSettings)

返回 Graphics,包含与指定 PageSettings 关联的打印机信息。Returns a Graphics that contains printer information associated with the specified 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

要检索其图形对象的 PageSettingsThe PageSettings to retrieve a graphics object for.

返回

Graphics

Graphics,包含来自 PageSettings 的打印机信息。A Graphics that contains printer information from the PageSettings.

注解

使用 CreateMeasurementGraphics 方法,可以获取打印机的, Graphics 而无需创建打印作业。With the CreateMeasurementGraphics method, you can obtain a Graphics for the printer without creating a print job. 使用 Graphics 可以决定如何对复杂的打印作业的字体、大小和类型样式等视觉对象进行布局。Use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.

适用于

CreateMeasurementGraphics(PageSettings, Boolean)

创建与指定页设置关联的 Graphics 并选择性地指定边距处的原点。Creates a Graphics associated with the specified page settings and optionally specifying the origin at the margins.

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 对象的 GraphicsThe PageSettings to retrieve a Graphics object for.

honorOriginAtMargins
Boolean

true 即指定边距处的原点;否则为 falsetrue to specify the origin at the margins; otherwise, false.

返回

Graphics

Graphics,包含来自 PageSettings 的打印机信息。A Graphics that contains printer information from the PageSettings.

注解

使用 CreateMeasurementGraphics 方法可以获取 Graphics 打印机的,而无需创建打印作业。The CreateMeasurementGraphics method allows you to obtain a Graphics for the printer without creating a print job. 使用 Graphics 可以决定如何对复杂的打印作业的字体、大小和类型样式等视觉对象进行布局。Use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.

适用于

CreateMeasurementGraphics()

返回 Graphics,它包含创建 PrintDocument 时有用的打印机信息。Returns a Graphics that contains printer information that is useful when creating a PrintDocument.

public:
 System::Drawing::Graphics ^ CreateMeasurementGraphics();
public System.Drawing.Graphics CreateMeasurementGraphics ();
member this.CreateMeasurementGraphics : unit -> System.Drawing.Graphics
Public Function CreateMeasurementGraphics () As Graphics

返回

Graphics

Graphics,包含来自打印机的信息。A Graphics that contains information from a printer.

例外

PrinterName 属性中命名的打印机不存在。The printer named in the PrinterName property does not exist.

注解

使用 CreateMeasurementGraphics 方法,可以获取打印机的, Graphics 而无需创建打印作业。With the CreateMeasurementGraphics method, you can obtain a Graphics for the printer without creating a print job. 你可以使用 Graphics 来决定如何对复杂的打印作业的字体、大小和类型样式等视觉元素进行布局。You can use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.

另请参阅

适用于

CreateMeasurementGraphics(Boolean)

返回包含打印机信息的 Graphics,选择性地指定边距处的原点。Returns a Graphics that contains printer information, optionally specifying the origin at the margins.

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 表示边距处的原点;否则为 falsetrue to indicate the origin at the margins; otherwise, false.

返回

Graphics

Graphics,包含来自 PageSettings 的打印机信息。A Graphics that contains printer information from the PageSettings.

注解

使用 CreateMeasurementGraphics 方法,可以获取打印机的, Graphics 而无需创建打印作业。With the CreateMeasurementGraphics method, you can obtain a Graphics for the printer without creating a print job. 使用 Graphics 可以决定如何对复杂的打印作业的字体、大小和类型样式等视觉对象进行布局。Use the Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.

适用于