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, FontFamily, string, FontStyle, bool, float?, float?)Declarationpublic static float GetMaximumFontSize(
this Graphics graphics,
FontFamily fontFamily,
string text,
FontStyle style = Regular,
bool allowWordWrapping = false,
float? maxWidth = null,
float? maxHeight = null
) 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. | FontFamily | fontFamily |
The font to measure. | string | text |
The text whose size mustn't exceed maxWidth and maxHeight. | FontStyle | style |
Font style to apply. | bool | allowWordWrapping |
True if the text is allowed to word-wrap within the specified bounds. | float? | maxWidth |
Maximum width the text may have, or null if only the maximum height should apply. If allowWordWrapping is true, this cannot be null. | float? | maxHeight |
Maximum width the text may have, or null if only the maximum width should apply. If maxWidth is null, this cannot be null. |
|