# RubberStamp **Repository Path**: archermind-ti/rubberstamp ## Basic Information - **Project Name**: RubberStamp - **Description**: RubberStamp is an library that makes it easy for you to watermark your images. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-10 - **Last Updated**: 2024-05-29 ## Categories & Tags **Categories**: harmonyos-image **Tags**: None ## README # RubberStamp #### 项目介绍 - 功能: 可让您轻松地为图像添加水印。 ![image](./images/RubberStamp.gif) #### 安装教程 方式一 1. 在需要使用的模块的build.gradle中引入 ``` dependencies { compile project(path: ':rubberstamp') } ``` 在sdk5,DevEco Studio2.1 Release下项目可直接运行 方式二 在project的build.gradle中添加mavenCentral()的引用 ``` repositories { ... mavenCentral() ... } ``` 在entry的build.gradle中添加依赖 ``` dependencies { ... implementation 'com.gitee.archermind-ti:rubberstamp:1.0.0-beta' ... } ``` #### 使用说明 ``` 使用RubberStamp非常容易。 首先,使用RubberStampConfig定义水印的特征 RubberStampConfig config = new RubberStampConfigBuilder() .base(getPixeMap(ResourceTable.Media_lenna)) .rubberStamp("Watermark") .rubberStampPosition(RubberStamp.CENTER) .alpha(100) .margin(30, 30) .rotation(-45) .textColor(Color.BLACK) .textBackgroundColor(Color.WHITE) .textShadow(0.1f, 5, 5, Color.BLUE) .textSize(90) .textFont("fonts/champagne.ttf"); .build(); 这就是真正需要的。 接下来您需要做的就是将此配置传递给 RubberStamp 类的 addStamp 方法。 RubberStamp rubberStamp = new RubberStamp(this); rubberStamp.addStamp(config); ``` #### 版本迭代 - v1.0.0 #### 基线release版本 Releases 1.0.0 commit id 1e7eb7da72a0eb6404045720b6be240bd52718e6 #### 版权和许可信息 Copyright 2017 Vinay Gaba 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.