/*! 2D Transformation Matrix v2.7.5 (c) Epistemex.com 2014-2018 License: MIT */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ /*! https://mths.be/codepointat v0.2.0 by @mathias */ /** * 2D transformation matrix object initialized with identity matrix. * * The matrix can synchronize a canvas 2D context by supplying the context * as an argument, or later apply current absolute transform to an * existing context. * * To synchronize a DOM element you can use [`toCSS()`]{@link Matrix#toCSS} or [`toCSS3D()`]{@link Matrix#toCSS3D}. * together with for example the `style.transform` property. * * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix * @param {HTMLElement} [element=null] - DOM Element to synchronize * @prop {number} a - scale x * @prop {number} b - shear y * @prop {number} c - shear x * @prop {number} d - scale y * @prop {number} e - translate x * @prop {number} f - translate y * @prop {CanvasRenderingContext2D} [context] - set or get current synchronized 2D context * @prop {HTMLElement} [element] - get current synchronized DOM element * @prop {boolean} [useCSS3D=false] - is a DOM element is defined for sync., choose whether to use 2D (false) or 3D (true) matrix to sync it. * @constructor * @license MIT license * @copyright Epistemex.com 2014-2018 */ /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */