public static GetPointForCenterString ( |
||
graphics | ||
rectangle | ||
Message | string | |
font | ||
return |
public static PointF GetPointForCenterString(Graphics graphics, Rectangle rectangle, string Message, Font font)
{
SizeF size = graphics.MeasureString(Message, font);
return new PointF((rectangle.Width / 2) - (size.Width / 2), (rectangle.Height / 2) - (font.SizeInPoints / 2));
}
GDIHelper::GetPointForCenterString ( |
|
GDIHelper::GetPointForCenterString ( |