Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: {{ name }}</title>
<h1 style="font-size: 20px;">{{ name }}</h1>
<p>{{ desc }}</p>
{% if notes %}<p>{{ notes }}</p>{% endif %}
<div style="display: grid; grid-gap: 4px;
grid-template-columns: repeat({{ grid_width }}, max-content);
font-size: 13px; text-align: center;">
{% for variant in element_variants %}
<span>
{% for variant_name in variant.grid_variant_names %}
<div>{{ variant_name }}</div>
{% endfor %}
{% set x_pos = ((loop.index0 % grid_width) | int) * variant.size[0] %}
{% set y_pos = ((loop.index0 / grid_width) | int) * variant.size[1] %}
<img src="{{ img_reference }}"
style="outline: 1px solid;
width: {{ variant.size[0] }}px;
height: {{ variant.size[1] }}px;
object-position: {{ -x_pos }}px {{ -y_pos }}px;
object-fit: none;">
</span>
{% endfor %}
</div>