I ran a bit low on clock cycles in my game, and found a lot of wasted cycles in this rutine. Instead of using the code as presented in my last post directly, it should be rearranged to be more efficiant.
Dim XScale As Single, YScale As Single
XScale = Object.ScaleX(1, vbUser, vbPixels)
YScale = Object.ScaleY(1, vbUser, vbPixels)
LOOP
poly(ix).x = (poly(ix).x - Object.ScaleLeft) * XScale
poly(ix).y = (poly(ix).y - Object.ScaleTop) * YScale
END LOOP
Using the above approach I managed to reduce the cycle usage by ~40%. I ran both versions 2000 times on a polygon with 60 sides. First approach took ~2700ms and second approach took ~1650ms. That's 44,444.44 calculations per second compared to 72,727.27 