anki/ts/image-occlusion/icons.ts
Abdo 9e147c6335
Add text tool to image occlusion (#2705)
* Add text tool to IO

* Remove unnecessary parentheses

* Fix text objects always grouped

* Remove log

* Fix text objects hidden on back side

* Implement text scaling

* Add inverse text outline

* Warn about IO notes with only text objects

This will result in a different error message than the case where no
objects are added at all though, and the user can bypass the warning.
Maybe this is better to avoid discarding the user's work if they have
spent some time adding text.

* Add isValidType

* Use matches!

* Lock aspect ratio of text objects

* Reword misleading comment

The confusion probably comes from the Fabric docs, which apparently need updating: http://fabricjs.com/docs/fabric.Canvas.html#uniformScaling

* Do not count text objects when calculating current index

* Make text objects respond to size changes

* Fix uniform scaling not working when editing

* Use Arial font

* Escape colons and unify parsing

* Handle scale factor when restricting shape to view

* Use 'cloned'

* Add text background

* Tweak drawShape's params
2023-10-12 13:40:11 +10:00

39 lines
2.7 KiB
TypeScript

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/// <reference types="../lib/image-import" />
export { default as mdiAlignHorizontalCenter } from "@mdi/svg/svg/align-horizontal-center.svg";
export { default as mdiAlignHorizontalLeft } from "@mdi/svg/svg/align-horizontal-left.svg";
export { default as mdiAlignHorizontalRight } from "@mdi/svg/svg/align-horizontal-right.svg";
export { default as mdiAlignVerticalBottom } from "@mdi/svg/svg/align-vertical-bottom.svg";
export { default as mdiAlignVerticalCenter } from "@mdi/svg/svg/align-vertical-center.svg";
export { default as mdiAlignVerticalTop } from "@mdi/svg/svg/align-vertical-top.svg";
export { default as mdiChevronDown } from "@mdi/svg/svg/chevron-down.svg";
export { default as mdiClose } from "@mdi/svg/svg/close.svg";
export { default as mdiCodeTags } from "@mdi/svg/svg/code-tags.svg";
export { default as mdiCopy } from "@mdi/svg/svg/content-copy.svg";
export { default as mdiCursorDefaultOutline } from "@mdi/svg/svg/cursor-default-outline.svg";
export { default as mdiDeleteOutline } from "@mdi/svg/svg/delete-outline.svg";
export { default as mdiEllipseOutline } from "@mdi/svg/svg/ellipse-outline.svg";
export { default as mdiEye } from "@mdi/svg/svg/eye.svg";
export { default as mdiFormatAlignCenter } from "@mdi/svg/svg/format-align-center.svg";
export { default as mdiFormatBold } from "@mdi/svg/svg/format-bold.svg";
export { default as mdiFormatItalic } from "@mdi/svg/svg/format-italic.svg";
export { default as mdiFormatUnderline } from "@mdi/svg/svg/format-underline.svg";
export { default as mdiGroup } from "@mdi/svg/svg/group.svg";
export { default as mdiZoomReset } from "@mdi/svg/svg/magnify-expand.svg";
export { default as mdiZoomOut } from "@mdi/svg/svg/magnify-minus-outline.svg";
export { default as mdiZoomIn } from "@mdi/svg/svg/magnify-plus-outline.svg";
export { default as mdiMagnifyScan } from "@mdi/svg/svg/magnify-scan.svg";
export { default as mdiRectangleOutline } from "@mdi/svg/svg/rectangle-outline.svg";
export { default as mdiRedo } from "@mdi/svg/svg/redo.svg";
export { default as mdiRefresh } from "@mdi/svg/svg/refresh.svg";
export { default as mdiSquare } from "@mdi/svg/svg/square.svg";
export { default as mdiTextBox } from "@mdi/svg/svg/text-box.svg";
export { default as mdiUndo } from "@mdi/svg/svg/undo.svg";
export { default as mdiUnfoldMoreHorizontal } from "@mdi/svg/svg/unfold-more-horizontal.svg";
export { default as mdiUngroup } from "@mdi/svg/svg/ungroup.svg";
export { default as mdiVectorPolygonVariant } from "@mdi/svg/svg/vector-polygon-variant.svg";
export { default as mdiViewDashboard } from "@mdi/svg/svg/view-dashboard.svg";