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 · RW.4X3 flag SVG

defaultconstant

The flag of Rwanda (ルワンダ), RW, drawn again by hand at 4:3 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 640 by 480, 666 B. The drawing flag("RW", { shape: "4:3" }) uses, 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 value from "@johnmorrisdotca/hata/flags/rw.4x3";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 480\"><path fill=\"#20603d\" d=\"M0 0h640v480H0z\"/><path fill=\"#fad201\" d=\"M0 0h640v360H0z\"/><path fill=\"#00a1de\" d=\"M0 0h640v240H0z\"/><g transform=\"translate(511 125.4)scale(.66667)\"><g id=\"hata-rw-4x3-b\"><path id=\"hata-rw-4x3-a\" fill=\"#e5be01\" d=\"M116.1 0 35.7 4.7l76.4 25.4-78.8-16.3L100.6 58l-72-36.2L82 82.1 21.9 28.6l36.2 72-44.3-67.3L30 112 4.7 35.7 0 116.1-1-1z\"/><use width=\"100%\" height=\"100%\" href=\"#hata-rw-4x3-a\" transform=\"scale(1 -1)\"/></g><use width=\"100%\" height=\"100%\" href=\"#hata-rw-4x3-b\" transform=\"scale(-1 1)\"/><circle r=\"34.3\" fill=\"#e5be01\" stroke=\"#00a1de\" stroke-width=\"3.4\"/></g></svg>"

Examples

Example 1

import square from "@johnmorrisdotca/hata/flags/rw.4x3";

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

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/rw.4x3";
console.log(svg.startsWith("<svg"),svg.length);
true 666

What it prints (run when this page was built)

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