/**
 * Copyright 2020 Bonitasoft S.A.
 *
 * 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
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/// <reference types="typed-mxgraph" />
import type { IconConfiguration, ShapeConfiguration } from './render-types';
import type { mxAbstractCanvas2D } from 'mxgraph';
/**
 * **WARN**: You may use it to customize the BPMN Theme as suggested in the examples. But be aware that the way the default BPMN theme can be modified is subject to change.
 *
 * @category BPMN Theme
 * @experimental
 */
export interface BpmnCanvasConfiguration {
    canvas: mxAbstractCanvas2D;
    shapeConfig: ShapeConfiguration;
    iconConfig: IconConfiguration;
}
/**
 * Wrapper of `mxAbstractCanvas2D` to simplify method calls when painting icons/markers of BPMN shapes.
 *
 * It can scale dimensions passed to the method of the original `mxAbstractCanvas2D`.
 *
 * **WARN**: You may use it to customize the BPMN Theme as suggested in the examples. But be aware that the way the default BPMN theme can be modified is subject to change.
 *
 * @example
 * The vanilla canvas calls when a scale factor must be applied to position
 * ```javascript
 * const scaleX = 0.26;
 * const scaleY = 0.35;
 * c.moveTo(8 * scaleX, 39 * scaleY);
 * c.lineTo(12 * scaleX, 25 * scaleY);
 * ```
 *
 * @example
 * With `BpmnCanvas`
 * ```javascript
 * const canvas = new BpmnCanvas(c, 0.26, 0.35);
 * canvas.moveTo(8, 39);
 * canvas.lineTo(12, 25);
 * ```
 *
 * @category BPMN Theme
 * @experimental
 */
export declare class BpmnCanvas {
    private canvas;
    private readonly iconOriginalSize;
    private readonly scaleX;
    private readonly scaleY;
    private iconPaintingOriginX;
    private iconPaintingOriginY;
    private readonly shapeConfiguration;
    constructor({ canvas, shapeConfig, iconConfig }: BpmnCanvasConfiguration);
    /**
     * Set the icon origin to the top left corner of the shape.
     */
    setIconOriginToShapeTopLeft(topMargin?: number, leftMargin?: number): void;
    /**
     * Set the icon origin to ensure that the icon is centered on the shape.
     */
    setIconOriginForIconCentered(): void;
    /**
     * Set the icon origin to ensure that, on the shape, the icon is horizontally centered and vertically aligned to the bottom.
     */
    setIconOriginForIconBottomCentered(bottomMargin?: number): void;
    /**
     * Set the icon origin to ensure that, on the shape, the icon is vertically aligned to the bottom and translate to the left from the horizontal center.
     */
    setIconOriginForIconOnBottomLeft(bottomMargin?: number, fromCenterMargin?: number): void;
    /**
     * Translate the icon origin using the scale factor associated to the horizontal and vertical directions.
     *
     * The values should be given with using the icon original size (as translated values will be scaled as other values passed to method of this class).
     *
     * @param dx the horizontal translation
     * @param dy the vertical translation
     */
    translateIconOrigin(dx: number, dy: number): void;
    private computeScaleFromOriginX;
    private computeScaleFromOriginY;
    private updateCanvasStyle;
    arcTo(rx: number, ry: number, angle: number, largeArcFlag: number, sweepFlag: number, x: number, y: number): void;
    begin(): void;
    close(): void;
    curveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void;
    fill(): void;
    fillAndStroke(): void;
    setFillColor(fillColor: string): void;
    stroke(): void;
    setStrokeColor(color: string): void;
    setRoundLineJoin(): void;
    lineTo(x: number, y: number): void;
    moveTo(x: number, y: number): void;
    rect(x: number, y: number, w: number, h: number): void;
    roundrect(x: number, y: number, w: number, h: number, dx: number, dy: number): void;
    ellipse(x: number, y: number, w: number, h: number): void;
    rotateOnIconCenter(theta: number): void;
}
