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 · BR-DF flag SVG

defaultconstant

The flag of Federal District (ブラジリア連邦直轄区), BR-DF, as an SVG string: viewBox 1453.8 by 1050 (1.385:1), 844 B. From Wikimedia Commons, "Bandeira do Distrito Federal (Brasil).svg" (public domain); the /manifest entry gives its author, licence and why it was chosen. It has a viewBox and no width or height, so it fills the box it is put in at its own aspect ratio.

Import it

import value from "@johnmorrisdotca/hata/flags/br-df";

Definition

const svg: string = "<svg data-hata=\"br-df\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1453.8 1050\"><path fill=\"#fff\" d=\"M0 920h180v130H0z\" style=\"fill:#fff;stroke-width:.12189\" transform=\"matrix(8.0769231,0,0,8.0769231,0,-7430.7691)\"/><path fill=\"#00923f\" d=\"M60.7 952.2h58v65h-58z\" style=\"fill:#00b241;fill-opacity:1;stroke-width:.118078\" transform=\"matrix(8.0769231,0,0,8.0769231,0,-7430.7691)\"/><path d=\"m89.7 953.7-7.5 6h4v2.8l-2 1.6v15H72.6l-1.6 2h-2.8v-4l-6 7.6 6 7.5v-4H71l1.6 2h11.6v15l2 1.7v2.8h-4l7.5 6 7.5-6h-4v-2.8l2-1.6v-15.1h11.6l1.6-2h2.8v4l6-7.5-6-7.5v4h-2.8l-1.6-2H95.2V964l-2-1.6v-2.8h4Zm0 23.5 5.5 5.5 2 2-3.5 3.5-2 2-2 2-3.5-3.5-2-2-2-2 4-4Z\" style=\"fill:#feb81c;fill-opacity:1;stroke-width:1.48119;stroke-linecap:round;stroke-linejoin:round;paint-order:markers fill stroke\" transform=\"matrix(8.0769231,0,0,8.0769231,0,-7430.7691)\"/></svg>"

Examples

Example 1

import flag from "@johnmorrisdotca/hata/flags/br-df";

const host=document.createElement("div");
host.innerHTML = flag; // or toDataUri(flag) from "@johnmorrisdotca/hata" for an <img src>
console.log(host.querySelector("svg")?.getAttribute("viewBox"));

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/br-df";
console.log(svg.startsWith("<svg"),svg.length);
true 844

What it prints (run when this page was built)

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