This site is supported by donations to The OEIS Foundation.

Template:Image

From OeisWiki
Jump to: navigation, search
The {{image}} graphic template is used to display an image in the canvas.

Usage

{{image
| filename = ''filename''
| center = ''x_0, y_0''
| width = ''width''
| height = ''height''  
| units = ''units'' 
| style = ''style''
}}

where (the origin being at the bottom left of the canvas), and

  • filename is the filename of the image to display.
  • center are the (comma separated) coordinates x_0, y_0 of the center of the image box. (0, 0 as default value. The center of the image box is thus at the bottom left of the containing element by default.)
  • width is the width of the image box. (100 as default, i.e. 100% with default units.)
  • height is the height of the image box. (100 as default, i.e. 100% with default units.)
  • units are the units used with center, width and height. (% as default.)
  • style is the style to apply to the image.

Examples

Issue: The {{rotate}} template has a yet unresolved issue with the origin used for rotation.

Code Result
<!--
-->{{canvas|width = 500|height = 500|float = right|<!--

  -->{{image|Clockface.png}}<!--

-->}}<!--
-->


100x100%


Code Result
<!--
-->{{canvas|width = 500|height = 500|float = right|<!--

  -->{{rotate|{{image|Clockface.png}}| 0 | angle unit = deg }}<!--

-->}}<!--
-->


100x100%


Code Result
<!--
-->{{canvas|width = 500|height = 500|float = right|<!--

  -->{{rotate|{{image|Clockface.png}}| 45 | angle unit = deg }}<!--

-->}}<!--
-->


100x100%


Code Result
<!--
-->{{canvas|width = 500|height = 500|float = right|<!--

  -->{{rotate|{{image|Clockface.png}}| 90 | angle unit = deg }}<!--

-->}}<!--
-->


100x100%

Code



See also

Drawing templates






Affine transforms templates

See Help:CSS Transforms.