Browse Source

Clarify the CenterX and CenterY properties in Avalonia.Media.RotateTransform (#19741)

* Clarify the Center properties in RotateTransform
From the property's description, it isn't obvious how the CenterX and CenterY property works. I assumed 0 would be the left edge but it's actually the center of the visual.

* Add documentation crefs in RotateTransform

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
pull/19864/head
YoriMirus 12 months ago
committed by GitHub
parent
commit
39a8e3dc15
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      src/Avalonia.Base/Media/RotateTransform.cs

10
src/Avalonia.Base/Media/RotateTransform.cs

@ -5,7 +5,7 @@ using Avalonia.VisualTree;
namespace Avalonia.Media
{
/// <summary>
/// Rotates an <see cref="Visual"/>.
/// Rotates a <see cref="Visual"/>.
/// </summary>
public sealed class RotateTransform : Transform
{
@ -49,8 +49,8 @@ namespace Avalonia.Media
/// Initializes a new instance of the <see cref="RotateTransform"/> class.
/// </summary>
/// <param name="angle">The angle, in degrees.</param>
/// <param name="centerX">The x-coordinate of the center point for the rotation.</param>
/// <param name="centerY">The y-coordinate of the center point for the rotation.</param>
/// <param name="centerX">The x-coordinate of the center point for the rotation with 0 being the <see cref="Visual.RenderTransformOrigin"/> point (center by default).</param>
/// <param name="centerY">The y-coordinate of the center point for the rotation with 0 being the <see cref="Visual.RenderTransformOrigin"/> point (center by default).</param>
public RotateTransform(double angle, double centerX, double centerY)
: this()
{
@ -69,7 +69,7 @@ namespace Avalonia.Media
}
/// <summary>
/// Gets or sets the x-coordinate of the rotation center point. The default is 0.
/// Gets or sets the x-coordinate of the rotation center point. The default is 0 which is the <see cref="Visual.RenderTransformOrigin"/> point (center by default).
/// </summary>
public double CenterX
{
@ -78,7 +78,7 @@ namespace Avalonia.Media
}
/// <summary>
/// Gets or sets the y-coordinate of the rotation center point. The default is 0.
/// Gets or sets the y-coordinate of the rotation center point. The default is 0 which is the <see cref="Visual.RenderTransformOrigin"/> point (center by default).
/// </summary>
public double CenterY
{

Loading…
Cancel
Save