Skip to content

Instantly share code, notes, and snippets.

View nonkitMac's full-sized avatar
🙂
modifying nonkitMac/Pictionary

Nonki Takahashi (Mac) nonkitMac

🙂
modifying nonkitMac/Pictionary
View GitHub Profile
@nonkitMac
nonkitMac / Shapes_CalcRotateZoomPos
Last active December 16, 2019 13:17 — forked from nonkit/Shapes_CalcRotateZoomPos.sb
Small Basic Shapes Subroutines
Sub Shapes_CalcRotateZoomPos
' Shapes | calculate position for rotated and zoomed shape
' param["x"], param["y"] - position of a shape
' param["width"], param["height"] - size of a shape
' param ["cx"], param["cy"] - center of rotation
' param ["angle"] - rotate angle
' param ["scale"] - resize scale
' return x, y - rotated position of a shape
_cx = param["x"] + param["width"] / 2
_cy = param["y"] + param["height"] / 2