First, let me take these smaller notifications:
- positionX = $x$
- positionY = $y$
- width = $w$
- height = $h$
- rotation = $\theta$ Thus, our top-left point is $(x,y)$. The other 3 points will be(without rotation): $(x+w, y)$, $(x+w, y-h)$ and $(x, y-h)$.
Since we are rotating the complete geometry about point $(x,y)$ by an angle of $\theta$, we'll have new points given as:
- $(x, y)$
- $(x + w*\cos(\theta), y + w*\sin(\theta))$
- $(x + w*\cos(\theta) + h*\cos(\frac{3\pi}{2}-\theta), y + w*\sin(\theta) + h*\sin(\frac{3\pi}{2}-\theta))$
- $(x + h*\cos(\frac{3\pi}{2}+\theta), y + h*\sin(\frac{3\pi}{2}+\theta))$
which, on simplification give us the co-ordinates
- $(x, y)$
- $(x + w*\cos(\theta), y + w*\sin(\theta))$
- $(x + w*\cos(\theta) - h*\sin(\theta), y + w*\sin(\theta) - h*\cos(\theta))$
- $(x + h*\sin(\theta), y - h*\cos\theta))$
I am not entirely sure of the conversion I did for $\sin(\frac{3\pi}{2}±\theta)$ or $\cos(\frac{3\pi}{2}±\theta)$
KEY: 1. -> Top-Left corner, 2. -> Top-Right Corner, 3. -> Bottom-Right Corner and 4. -> Bottom-Left Corner.