# LargeImage **Repository Path**: cjjjune/LargeImage ## Basic Information - **Project Name**: LargeImage - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 15 - **Created**: 2022-03-30 - **Last Updated**: 2022-03-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LargeImage Loads image which can perform zoom (zoom-in and zoom-out) and scroll operations to view all the edges of the image upon zoom-in. - Detailed functions: 1. Load images. 2. Supports scaling. 3. Supports the translation function. # Usage Instructions Import LargeImage as below : `` import {LargeImage} from '../largeimage/LargeImage.ets'; `` ## API 1. ### Create model `` @State model: LargeImage.Model = new LargeImage.Model() `` 2. ### Setting Image Resources public setImage(src: Rawfile | Resource) 3. ### Sets whether the image can be zoomed. public setZoomEnabled(zoomEnabled: boolean) 4. ### Sets whether the image can be panned. public setPanEnabled(panEnabled: boolean) 5. ### Set the maximum zoom ratio of the image. public setMaxScale(maxScale: number) 6. ### Setting the Image Rotation Angle public setOrientation(degrees: number) 7. ### Obtaining the Source Image Width and Height public getLoadedImageWidth() public getLoadedImageHeight() 8. ### Click Listener public setSingleTapListener(listener: OnSingleTapListener) 9. ### Press and hold the monitor. public setLongPressListener(listener: OnLongPressListener) 10. ### Double-click the listener. public setDoubleTapListener(listener: OnDoubleTapListener) # License ``` Copyright 2015 shizhefei(LuckyJayce) 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. ```