panel.angle
Rotation angle for a counterclockwise rotation of the panel, in degrees.
Range:
0..360 (default: 0)
Type:
var
Remarks:
- For displaying text or numbers, and for reacting on mouse events
angle must be zero.
- The rotation center can be set by center_x.
- All panel elements, except for the Digits element, rotate with
the panel.
Example:
PANEL* pan;
// rotate a panel about its center
function pan_rotate(p)
{
pan = p; // set the panel pointer from the function parameter
pan.center_x = pan.size_x * 0.5; // set the rotation center at the panel center
pan.center_y = pan.size_y * 0.5;
while (pan.angle < 360) // one full rotation
{
pan.angle += 10*time_step;
wait(1);
pan = p; // local variables are preserved during wait(), global pointers aren't
}
pan.angle = 0;
}
See Also:
panel, bmap, layer,
center_x