mafs-image-shape

Additional

Language
Java
Version
N/A
Created
Feb 16, 2017
Updated
Feb 26, 2017
Owner
Md. Mafujul Islam (mafujuls)
Contributor
Md. Mafujul Islam (mafujuls)
1
Activity
Badge
Generate
Download
Source code
APK file

Advertising

mafs-image-shape (Library for developing android project)

This is a library for making custom shape for your image on your image view. If you want to make a custom shape for your image you need to pass two image, first one is original image and second one is for your shape. First one is your actual image, this image will get the shape as like second image.

Installation

Add the depedency in your build.gradle. The library is distributed via jCenter

dependencies {
    compile 'com.mafstech.libs:mafs-image-shape:1.0.4'   
}

Just call the "shape" method from Shaper class and pass 6 parameter.

First one is context

Second one is original image

Third one is shape image

Forth one is image view

5th and 6th one are for height and weight of image in dp.

Code sample
Shaper.shape(MainActivity.this, R.drawable.flag, R.drawable.tri, ivOne, 150, 150);   

Images for getting shape

![alt tag]( https://github.com/mafujuls/mafs-image-shape/blob/master/app/src/main/res/drawable/tri.png) ![alt tag]( https://github.com/mafujuls/mafs-image-shape/blob/master/app/src/main/res/drawable/pro_pic.png) ![alt tag]( https://github.com/mafujuls/mafs-image-shape/blob/master/app/src/main/res/drawable/shape2.png)

Original Image

![alt tag]( https://github.com/mafujuls/mafs-image-shape/blob/master/app/src/main/res/drawable/flag.jpg)

Output (Screenshot)

![alt tag]( https://github.com/mafujuls/mafs-image-shape/blob/master/app/src/main/res/drawable/screen.png)