DrawRectangle()

Graphics::DrawRectangle(const SharedPtr<Pen>&, int, int, int, int) method

Draws the specified rectangle using the specified pen on the surface represented by the current object.

void System::Drawing::Graphics::DrawRectangle(const SharedPtr<Pen> &pen, int x, int y, int width, int height)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A pen to use when drawing the rectangle
xintThe X coordinate of the upper left corner of the rectangle to draw
yintThe Y coordinate of the upper left corner of the rectangle to draw
widthintThe width of the rectangle to draw
heightintThe height of the rectangle to draw

Graphics::DrawRectangle(const SharedPtr<Pen>&, float, float, float, float) method

Draws the specified rectangle using the specified pen on the surface represented by the current object.

void System::Drawing::Graphics::DrawRectangle(const SharedPtr<Pen> &pen, float x, float y, float width, float height)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A pen to use when drawing the rectangle
xfloatThe X coordinate of the upper left corner of the rectangle to draw
yfloatThe Y coordinate of the upper left corner of the rectangle to draw
widthfloatThe width of the rectangle to draw
heightfloatThe height of the rectangle to draw

Graphics::DrawRectangle(const SharedPtr<Pen>&, Rectangle) method

Draws the specified rectangle using the specified pen on the surface represented by the current object.

void System::Drawing::Graphics::DrawRectangle(const SharedPtr<Pen> &pen, Rectangle rect)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A pen to use when drawing the rectangle
rectRectangleA Rectangle object that specifies the location and size of the rectangle to draw

See Also