rotate

Last update: 2023-08-31
  • Created for:
  • Developer
    User

Rotate image. Rotates the image, text, or solid color layer by the specified angle.

rotate= *angle*

angle

Rotation angle in degrees (real).

Positive angles rotate clockwise. The layer anchor point ( anchor= or catalog::Anchor) serves as the center-of-rotation. The layer rectangle is enlarged and fitted around the rotated data as needed to avoid cropping. Rotation is applied after filling the layer’s background area with color=. The modifier bgColor= can be used to add background color to the bounding rectangle after rotation.

Properties

Layer command. Applies to the current layer or to layer 0 if layer=comp. Ignored by effect layers.

Default

rotate=0, for no rotation.

Example

Place an “On Sale” label near the top-left corner of images in an image catalog. The label image is already sized correctly for the 300x300 view and should be rotated 30° to the left. To enhance the label, fill the text box with a white, semi-opaque color.

http:// *server*/myRootId/myImageId?scl=1&size=300,300&origin=-0.5,-0.5 &layer=1&src=labelImage&origin=-0.5,-0.5&rotate=-30&color=ffffff40

Apply size= to layer 0 to set the view size, rather than using wid= and hei=. This method allows myImageId to be resized while not changing the final size of labelImage. Also, specify scl=1, otherwise the composite image might be scaled to attribute::DefaultPix (unless that is set to 0,0). The modifier color= adds the semi-opaque background color to the text box before rotation.

The origin for both layers is set to the top-left corner to achieve the desired alignment. The origin point for layer 1 applies to labelImageafter it is rotated.

See Example A in Templates for an example of rotated text.

See also

anchor= , bgColor=, color=

On this page