RectangleFExtensionsScaleBySizeDifference Method
Scale the size and position of the source RectangleF
by the difference of the specified sizes.
Namespace: DevCase.Extensions.RectangleFExtensionsAssembly: 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 RectangleF ScaleBySizeDifference(
this RectangleF sender,
SizeF fromSize,
SizeF toSize
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ScaleBySizeDifference (
sender As RectangleF,
fromSize As SizeF,
toSize As SizeF
) As RectangleF
Dim sender As RectangleF
Dim fromSize As SizeF
Dim toSize As SizeF
Dim returnValue As RectangleF
returnValue = sender.ScaleBySizeDifference(fromSize,
toSize)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static RectangleF ScaleBySizeDifference(
RectangleF sender,
SizeF fromSize,
SizeF toSize
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ScaleBySizeDifference :
sender : RectangleF *
fromSize : SizeF *
toSize : SizeF -> RectangleF
No code example is currently available or this language may not be supported.
- sender RectangleF
-
The source RectangleF.
- fromSize SizeF
-
The source SizeF.
- toSize SizeF
-
The target SizeF.
RectangleF
The resulting
RectangleF.
In Visual Basic and C#, you can call this method as an instance method on any object of type
RectangleF. 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 oldSize As New SizeF(640, 480)
Dim oldRect As New RectangleF(New PointF(100, 100), New SizeF(639, 479))
Dim newSize As New SizeF(800, 600)
Dim newRect As RectangleF = ScaleBySizeDifference(oldRect, oldSize, newSize)
Console.WriteLine(String.Format("oldRect: {0}", oldRect.ToString())) ' {X=100,Y=100,Width=639,Height=479}
Console.WriteLine(String.Format("newRect: {0}", newRect.ToString())) ' {X=125,Y=125,Width=798.75,Height=598.75}
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.