Commit aedaa94b authored by Colin Kiama's avatar Colin Kiama

Done. Fixed bug where rectangles created in the artboard with a mouse a...

Done. Fixed bug where rectangles created in the artboard with a mouse a located in a different place than specified with the mous
parent a0f630d6
......@@ -26,11 +26,11 @@ namespace UWPVectorGraphicsToolExample
public void AddElementFromWorldSpace(ICanvasDrawable worldSpaceElementToAdd, Size canvasSize)
{
Vector2 worldSizeVector = CalculateWorldSizeVector(canvasSize);
Vector2 artBoardInWorldSpacePosition = CalulateArtBoardWorldSpacePosition(canvasSize);
if (worldSpaceElementToAdd is VectorRect rectToAdd)
{
Vector2 worldSpacePosition = rectToAdd.Position;
//rectToAdd.Position = worldSizeVector - worldSpacePosition;
rectToAdd.Position = worldSpacePosition - artBoardInWorldSpacePosition;
ItemCollection.Add(rectToAdd);
}
}
......
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