| 1 | = Image Decorator = |
---|
| 2 | |
---|
| 3 | The 'image' decorator can render a single image or a rectangular subsection of a single image. It has the following properties: |
---|
| 4 | |
---|
| 5 | ''image-src'' |
---|
| 6 | || ''Value:'' || <string> || |
---|
| 7 | || ''Initial:'' || not defined || |
---|
| 8 | || ''Percentages:'' || N/A || |
---|
| 9 | |
---|
| 10 | This property defines the name (and, for file sources, the relative path) of the source image. |
---|
| 11 | |
---|
| 12 | ''image-s-begin'', ''image-t-begin'' |
---|
| 13 | || ''Value:'' || <number> | <length> | <percentage> || |
---|
| 14 | || ''Initial:'' || 0 || |
---|
| 15 | || ''Percentages:'' || N/A || |
---|
| 16 | |
---|
| 17 | ''image-s-end'', ''image-t-end'' |
---|
| 18 | || ''Value:'' || <number> | <length> | <percentage> || |
---|
| 19 | || ''Initial:'' || 1 || |
---|
| 20 | || ''Percentages:'' || N/A || |
---|
| 21 | |
---|
| 22 | These values specify the texture coordinates to use when rendering the image. Values have the following meanings: |
---|
| 23 | |
---|
| 24 | number:: |
---|
| 25 | Expected to be a floating-point number from 0 to 1, this is the raw texture coordinate. |
---|
| 26 | length:: |
---|
| 27 | Expected to be expressed in 'px' units and from 0 to the length of the appropriate texture axis. The texture will be rendered from (for -begin) or to (for -end) this pixel. |
---|
| 28 | percentage:: |
---|
| 29 | The texture will be rendered from (for -begin) ot to (for -end) this far across the appropriate texture axis. |
---|
| 30 | |
---|
| 31 | ''image-s''[[BR]] |
---|
| 32 | A shorthand property for setting ''image-s-begin'' and ''image-s-end''. |
---|
| 33 | |
---|
| 34 | ''image-t''[[BR]] |
---|
| 35 | A shorthand property for setting ''image-t-begin'' and ''image-t-end''. |
---|
| 36 | |
---|
| 37 | ''image''[[BR]] |
---|
| 38 | A shorthand property for setting ''image-src'', ''image-s-begin'', ''image-t-begin'', ''image-s-end'' and ''image-t-end''. |
---|
| 39 | |
---|
| 40 | {{{ |
---|
| 41 | /* Declares an image decorator. */ |
---|
| 42 | div#avatar |
---|
| 43 | { |
---|
| 44 | avatar-decorator: image; |
---|
| 45 | avatar-image: player.png 0px 32px 32px 64px; |
---|
| 46 | } |
---|
| 47 | }}} |
---|
| 48 | |
---|
| 49 | The image will be stretched or shrunk to render across the entire padded area of an element it is attached to. |