GetMaximumFontSize(graphics, fontFamily, text, style, allowWordWrapping, maxWidth, maxHeight) MakeSemitransparentImage(width, height, initGraphics, drawOpaqueLayer, drawTransparencyLayer, transparencyFromChannel, invertTransparency)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Extension method: float GetMaximumFontSize(this Graphics, SizeF, FontFamily, string, FontStyle, bool)Declarationpublic static float GetMaximumFontSize(
this Graphics graphics,
SizeF maximumSize,
FontFamily fontFamily,
string text,
FontStyle style = Regular,
bool allowWordWrapping = false
) Summary
Determines the largest font size at which the specified text fits into the specified maximum size in the
specified font. Parametersthis Graphics | graphics |
Specifies the Graphics object to use when measuring the font size. | SizeF | maximumSize |
Maximum size (in pixels) the text should have. | FontFamily | fontFamily |
The font to measure. | string | text |
The text whose size mustn't exceed maximumSize. | FontStyle | style |
Font style to apply. | bool | allowWordWrapping |
True if the text is allowed to word-wrap within the specified bounds. |
|