Xwt.Drawing.Font.WithScaledSize C# (CSharp) Method

WithScaledSize() public method

public WithScaledSize ( double scale ) : Font
scale double
return Font
		public Font WithScaledSize (double scale)
		{
			return new Font (handler.SetSize (Backend, Size * scale), ToolkitEngine);
		}
		

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Get a Font exactly the same as the passed in one, except for scale factor.
 /// </summary>
 /// <param name="initial">The font to scale.</param>
 /// <param name="scale">Scale by this factor.</param>
 /// <returns>The scaled font.</returns>
 public static Font ScaleFont(Font initial, double scale)
 {
     Font scaled = initial.WithScaledSize (scale);
     return scaled;
 }