System::Drawing::Graphics::DrawString method

Graphics::DrawString(const String&, const SharedPtr<Font>&, const SharedPtr<Brush>&, float, float, const System::SharedPtr<System::Drawing::StringFormat>&) method

Draws the specified string at the specified location using the specified font and brush.

void System::Drawing::Graphics::DrawString(const String &str, const SharedPtr<Font> &font, const SharedPtr<Brush> &brush, float x, float y, const System::SharedPtr<System::Drawing::StringFormat> &stringFormat=nullptr)
ParameterTypeDescription
strconst String&The string to draw
fontconst SharedPtr<Font>&A font to use
brushconst SharedPtr<Brush>&A Brush object to use for drawing
xfloatThe X coordinate of the location of the upper left corner of the drawn string
yfloatThe Y coordinate of the location of the upper left corner of the drawn string
stringFormatconst System::SharedPtr<System::Drawing::StringFormat>&Specified the format of the string

See Also

Graphics::DrawString(const String&, const SharedPtr<Font>&, const SharedPtr<Brush>&, PointF, const System::SharedPtr<System::Drawing::StringFormat>&) method

Draws the specified string at the specified location using the specified font and brush.

void System::Drawing::Graphics::DrawString(const String &str, const SharedPtr<Font> &font, const SharedPtr<Brush> &brush, PointF topLeft, const System::SharedPtr<System::Drawing::StringFormat> &stringFormat=nullptr)
ParameterTypeDescription
strconst String&The string to draw
fontconst SharedPtr<Font>&A font to use
brushconst SharedPtr<Brush>&A Brush object to use for drawing
topLeftPointFSpecifies the location of the upper left corner of the drawn string
stringFormatconst System::SharedPtr<System::Drawing::StringFormat>&Specified the format of the string

See Also

Graphics::DrawString(const String&, const SharedPtr<Font>&, const SharedPtr<Brush>&, RectangleF, const System::SharedPtr<System::Drawing::StringFormat>&) method

Draws the specified string in the specified rectangle using the specified font and brush.

void System::Drawing::Graphics::DrawString(const String &str, const SharedPtr<Font> &font, const SharedPtr<Brush> &brush, RectangleF layoutRectangle, const System::SharedPtr<System::Drawing::StringFormat> &stringFormat=nullptr)
ParameterTypeDescription
strconst String&The string to draw
fontconst SharedPtr<Font>&A font to use
brushconst SharedPtr<Brush>&A Brush object to use for drawing
layoutRectangleRectangleFSpecifies a rectangle to draw the string in
stringFormatconst System::SharedPtr<System::Drawing::StringFormat>&Specified the format of the string

See Also