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

svgconstant

The flag of Panama (パナマ), PA, drawn again by hand at 4:3 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 640 by 480, 687 B. The drawing flag("PA", { 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 { svg } from "@johnmorrisdotca/hata/flags/pa.4x3";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 480\"><defs><clipPath id=\"hata-pa-4x3-a\"><path fill-opacity=\".7\" d=\"M0 0h640v480H0z\"/></clipPath></defs><g clip-path=\"url(#hata-pa-4x3-a)\"><path fill=\"#fff\" d=\"M0 0h640v480H0z\"/><path fill=\"#fff\" fill-rule=\"evenodd\" d=\"M92.5 0h477.2v480H92.4z\"/><path fill=\"#db0000\" fill-rule=\"evenodd\" d=\"M323 3.6h358v221.7H323z\"/><path fill=\"#0000ab\" fill-rule=\"evenodd\" d=\"M3.2 225.3h319.9V480H3.2zm211.6-47.6-42-29.4-41.7 29.6 15.5-48L105 100l51.6-.4 16-48 16.3 47.9h51.6l-41.5 30 15.9 48z\"/><path fill=\"#d80000\" fill-rule=\"evenodd\" d=\"m516.9 413.9-42.4-27.7-42.1 28 15.6-45.6-42-28 52-.5 16.2-45.4 16.4 45.3h52l-41.8 28.5 16 45.4z\"/></g></svg>"

Examples

Example 1

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

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

Example 2

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

What it prints (run when this page was built)

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