Commit 18b3e405 authored by Colin Kiama's avatar Colin Kiama

Renamed references and methods for "worldSizeVector" to "worldOriginVector" to...

Renamed references and methods for "worldSizeVector" to "worldOriginVector" to make the project easier to understand.
parent c9ff83ed
......@@ -73,20 +73,20 @@ namespace UWPVectorGraphicsToolExample
private Vector2 CalulateArtBoardWorldSpacePosition(Size canvasSize)
{
var worldSizeVector = CalculateWorldSizeVector(canvasSize);
return worldSizeVector + Position - new Vector2(Width, Height) / 2;
var worldOriginVector = CalculateworldOriginVector(canvasSize);
return worldOriginVector + Position - new Vector2(Width, Height) / 2;
}
private Vector2 CalulateArtBoardWorldSpacePosition(Vector2 worldSizeVector)
private Vector2 CalulateArtBoardWorldSpacePosition(Vector2 worldOriginVector)
{
return worldSizeVector + Position - new Vector2(Width, Height) / 2;
return worldOriginVector + Position - new Vector2(Width, Height) / 2;
}
internal bool CanContainElement(Rect rectToAdd, Size canvasSize)
{
bool canArtBoardContainElement = false;
Vector2 worldSizeVector = CalculateWorldSizeVector(canvasSize);
Vector2 artBoardPositionInWorldSpace = CalulateArtBoardWorldSpacePosition(worldSizeVector);
Vector2 worldOriginVector = CalculateworldOriginVector(canvasSize);
Vector2 artBoardPositionInWorldSpace = CalulateArtBoardWorldSpacePosition(worldOriginVector);
Rect artBoardRect = new Rect(artBoardPositionInWorldSpace.X, artBoardPositionInWorldSpace.Y, Width, Height);
......@@ -106,7 +106,7 @@ namespace UWPVectorGraphicsToolExample
return canArtBoardContainElement;
}
private Vector2 CalculateWorldSizeVector(Size canvasSize)
private Vector2 CalculateworldOriginVector(Size canvasSize)
{
return new Vector2((float)(canvasSize.Width / 2), (float)(canvasSize.Height / 2));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment