共用方式為


image.rotation property

[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

Gets or sets the degree of rotation applied to the g:image element.

This property is read/write.

Syntax

rotation = image.rotation
image.rotation = rotation

Property value

A Floating-point that specifies or receives the degree of rotation. Positive values indicate clockwise rotation and negative values indicate counter-clockwise rotation.

(0)

Default. No rotation applied. The target element is not modified.

Remarks

The rotation amount can be specified in the gadget HTML and script files.

Examples

The following example demonstrates how to rotate the g:image element from a gadget script file.

\\ imgBackground is the value of the 'id' attribute for the g:background element.
var imgRotation = imgBackground.addImageObject(file, intX, intY);
imgRotation.rotation = 90.0;

The following example demonstrates how to rotate the g:background element in the gadget HTML file.

<g:image src="..\aerologo.png" rotation="90.0"/>

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008
Header
D2d1helper.h
IDL
Sidebar.idl
DLL
Sidebar.Exe (version 1.00 or later)

See also

Reference

background

image

text