RectangleExtensionsScaleByFactor Method
Scale the size and position of the source RectangleF
by the specified percentage factor.
Namespace: DevCase.Extensions.RectangleExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Rectangle ScaleByFactor(
this Rectangle sender,
int factor
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ScaleByFactor (
sender As Rectangle,
factor As Integer
) As Rectangle
Dim sender As Rectangle
Dim factor As Integer
Dim returnValue As Rectangle
returnValue = sender.ScaleByFactor(factor)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Rectangle ScaleByFactor(
Rectangle sender,
int factor
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ScaleByFactor :
sender : Rectangle *
factor : int -> Rectangle
No code example is currently available or this language may not be supported.
- sender Rectangle
-
The source Rectangle.
- factor Int32
-
The percentage factor.
Rectangle
The resulting
Rectangle.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Rectangle. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim oldRect As New Rectangle(New Point(100, 100), New Size(100, 100))
Dim newRect As RectangleF = ScaleByFactor(oldRect, 2)
Console.WriteLine(String.Format("oldRect: {0}", oldRect.ToString())) ' {X=100,Y=100,Width=100,Height=100}
Console.WriteLine(String.Format("newRect: {0}", newRect.ToString())) ' {X=200,Y=200,Width=200,Height=200}
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.