private Cairo.PointD PositionToClientPt(Point pos) { Point center = Allocation.Center(); double halfWidth = PintaCore.Workspace.ImageSize.Width / Allocation.Width; double halfHeight = PintaCore.Workspace.ImageSize.Height / Allocation.Height; double ptX = pos.X / halfWidth; double ptY = pos.Y / halfHeight; return(new Cairo.PointD(ptX, ptY)); }