Predefinição:Transform/doc

Fonte: Terraria Wiki
Saltar para a navegação Saltar para a pesquisa

This template uses css transform to either flip horizontally, mirror vertically, or rotate. It can be used on an image, template, text, and/or other elements. It is mainly intended to transform images, or templates that display images alone, however any text or other included elements will also display transformed.

The transformation happens at the center of the whole object and its effective dimensions will retain the original values of the object as if untransformed, so you may adjust the position and padding to avoid unwanted overlapping. Use the style= parameter to specify the CSS style. The 'display' CSS property is specified separately via the display= parameter.

This template does not support IE8 or older browsers. IE8 requires cumbersome calculating of matrices. You may implement it into this template if you know how to translate the formula into Lua.

Usage

Unnamed Parameter 1

Element to be transformed, for example: [[File:Dryad.png]] or {{item|mode=image|Guide}}

flip = y / yes

Flips element horizontally.

mirror = y / yes

Mirrors element vertically.

rotation = #

Rotation in degrees (clockwise). For best results, use only 90, 180, and 270 degree rotations.

scale = #

Scales the image. 1=full size, .5=50%

Examples

  • {{transform|[[File:Dryad.png]]|flip=y}}
    Dryad.png
  • {{transform|[[File:Megashark.png]]|mirror=y}}
    Megashark.png
  • {{transform|{{item|mode=image|Guide}}|rotation=90}} →    
    Guia
  • {{transform|{{Important}}|flip=y}}
    Sign.png
    Importante: Nenhuma nota providenciada.
  • {{transform|{{3DS version}}|mirror=y}}
  • {{transform|{{item|mode=text|Dryad}}|rotation=90}}
  • {{transform|[[File:Dryad.png]]|flip=y|mirror=y|rotation=30}} →  
    Dryad.png
  • {{transform|{{item|mode=image|Guide}}|scale=1}} →    
    Guia
    Guia
    Guia
  • {{transform|{{item|mode=image|Guide}}|scale=.75}} →    
    Guia
    Guia
    Guia