共用方式為


Diagram.Print(Graphics, Rectangle, PointD, Single) Method

Definition

Draws the diagram using the specified printer Graphics object.

public:
 void Print(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipRectangle, Microsoft::VisualStudio::Modeling::Diagrams::PointD sourceLocation, float scale);
public void Print (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipRectangle, Microsoft.VisualStudio.Modeling.Diagrams.PointD sourceLocation, float scale);
member this.Print : System.Drawing.Graphics * System.Drawing.Rectangle * Microsoft.VisualStudio.Modeling.Diagrams.PointD * single -> unit
Public Sub Print (graphics As Graphics, clipRectangle As Rectangle, sourceLocation As PointD, scale As Single)

Parameters

graphics
Graphics

The graphics object to use for drawing.

clipRectangle
Rectangle

The clipping rectangle in which to draw. The rectangle is in device units.

sourceLocation
PointD

Top-left of the bounding box on the diagram (in world units relative to the top-left of the diagram) that should be drawn to the destination clipping rectangle.

scale
Single

Scale (100% is 1.0f).

Remarks

This method will set the PageUnit, PageScale, SmoothingMode, and TextRenderingHint of the Graphics object. This method will also translate the Graphics object based on the sourceLocation argument.

Applies to