/** * Copyright 2023-present DreamNum Co., Ltd. * * 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. */ import type { IAccessor, Workbook } from '@univerjs/core'; import type { IRenderContext, IRenderModule } from '@univerjs/engine-render'; import type { ISheetLocationBase } from '@univerjs/sheets'; import { Disposable, ICommandService, IContextService, Injector, IURLImageService, LocaleService } from '@univerjs/core'; import { IDrawingManagerService, IImageIoService } from '@univerjs/drawing'; import { SheetInterceptorService, SheetSkeletonService, SheetsSelectionsService } from '@univerjs/sheets'; import { ISheetDrawingService } from '@univerjs/sheets-drawing'; import { ISheetSelectionRenderService } from '@univerjs/sheets-ui'; import { ILocalFileService, IMessageService } from '@univerjs/ui'; /** * Get the size of the drawing within the cell * @param {IAccessor} accessor Accessor * @param {ISheetLocationBase} location Cell location * @param {number} originImageWidth Original image width * @param {number} originImageHeight Original image height * @param {number} angle Rotation angle in degrees (0-360) * @returns {{ width: number; height: number }} Drawing size */ export declare function getDrawingSizeByCell(accessor: IAccessor, location: ISheetLocationBase, originImageWidth: number, originImageHeight: number, angle: number): false | { width: number; height: number; }; export declare class SheetDrawingUpdateController extends Disposable implements IRenderModule { private readonly _context; private readonly _commandService; private readonly _sheetInterceptorService; private readonly _selectionRenderService; private readonly _imageIoService; private readonly _fileOpenerService; private readonly _sheetDrawingService; private readonly _drawingManagerService; private readonly _contextService; private readonly _messageService; private readonly _localeService; private readonly _sheetSkeletonService; private readonly _injector; private readonly _urlImageService; private readonly _workbookSelections; constructor(_context: IRenderContext, _commandService: ICommandService, _sheetInterceptorService: SheetInterceptorService, _selectionRenderService: ISheetSelectionRenderService, _imageIoService: IImageIoService, _fileOpenerService: ILocalFileService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService, _contextService: IContextService, _messageService: IMessageService, _localeService: LocaleService, selectionManagerService: SheetsSelectionsService, _sheetSkeletonService: SheetSkeletonService, _injector: Injector, _urlImageService: IURLImageService); insertFloatImage(): Promise; insertCellImage(): Promise; insertCellImageByFile(file: File, location?: ISheetLocationBase): Promise; insertFloatImageByFile(file: File): Promise; private _insertCellImage; insertCellImageByUrl(url: string, location?: ISheetLocationBase): Promise; private _getUnitInfo; private _getImagePosition; private _updateOrderListener; private _updateDrawingListener; private _getSheetTransformByParam; private _groupDrawingListener; private _focusDrawingListener; }