Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · TZ.1X1 flag SVG

svgconstant

The flag of Tanzania (タンザニア), TZ, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 470 B. The drawing flag("TZ", { shape: "1:1" }) uses (and the round frame, in a circle), made for that shape by hand rather than cut from the flag. The /manifest entry's framings say how each frame was chosen.

Import it

import { svg } from "@johnmorrisdotca/hata/flags/tz.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><defs><clipPath id=\"hata-tz-1x1-a\"><path d=\"M103 0h496v496H103z\"/></clipPath></defs><g clip-path=\"url(#hata-tz-1x1-a)\" transform=\"translate(-106.2)scale(1.0321)\"><g fill-rule=\"evenodd\"><path fill=\"#09f\" d=\"M0 0h744v496H0z\"/><path fill=\"#090\" d=\"M0 0h744L0 496z\"/><path fill=\"#000001\" d=\"M0 496h165l579-393V0H579L0 393z\"/><path fill=\"#ff0\" d=\"M0 378 567 0h56L0 415zm121 118L744 81v37L177 496z\"/></g></g></svg>"

Examples

Example 1

import square from "@johnmorrisdotca/hata/flags/tz.1x1";

const host=document.createElement("div");
host.innerHTML = square;
console.log(host.querySelector("svg")?.getAttribute("viewBox"));

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/tz.1x1";
console.log(svg.startsWith("<svg"),svg.length);
true 470

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.6.0.