Skip to the content

Chizu地図

Draw SVG maps, frame regions, place numbered callouts and build geography quizzes with English and Japanese names.

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference · Framing, geometry and quiz tools

InsetTransformtype

What to do to a region's own geometry to seat it in its box: a scale, and a move.

Import it

import type { InsetTransform } from "@johnmorrisdotca/chizu";

Definition

type InsetTransform = {
    scale: number;
    x: number;
    y: number;
};

Members

NameTypeDescription
scalenumber
xnumber
ynumber

Examples

import { insetTransformAttribute, type InsetTransform } from "@johnmorrisdotca/chizu";

const move: InsetTransform = { scale: 0.5, x: 20, y: 610 };
console.log(insetTransformAttribute(move));
// translate(20 610) scale(0.5)
translate(20 610) scale(0.5)

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.5.0.