# RoundedImageView **Repository Path**: HarmonyOS-tpc/RoundedImageView ## Basic Information - **Project Name**: RoundedImageView - **Description**: A fast ImageView (and Drawable) that supports rounded corners (and ovals or circles) based on the original example from Romain Guy. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 1 - **Created**: 2021-04-01 - **Last Updated**: 2025-11-19 ## Categories & Tags **Categories**: harmonyos-image **Tags**: None ## README ## RoundedImageView ## Introduction A fast ImageView (and Drawable) that supports rounded corners (and ovals or circles) based on the original example from Romain Guy. It supports many additional features including ovals, rounded rectangles and ScaleTypes. There are many ways to create rounded corners in openharmony, but this is the fastest and best one that I know of because it: * does **not** create a copy of the original pixelMap * does **not** use a clipPath which is not hardware accelerated and not anti-aliased. ### Features supported: - Load Image from Resource folder in rectangular shape - Load Image from Resource folder in rounded rectangular shape - Load Image from Resource folder in oval shape - Load Image from Color resource in oval shape - Load Image from Color resource folder in rounded rectangular shape ## Usage Instruction ```xml ``` ```java RoundedImageView imgview = null; imgview = new RoundedImageView( classcontext); imgview.setImageResource(ResourceTable.Media_jellyfish); imgview.setScaleMode(Image.ScaleMode.CENTER); ``` ## Installation Tutorial ``` Method 1: Generate har package from library and add it to lib folder. add following code to gradle of entry implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) Method 2: allprojects{ repositories{ mavenCentral() } } implementation 'io.openharmony.tpc.thirdlib:RoundedImageView:1.0.1' ``` ## License Copyright 2017 Vincent Mi 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.