Coder Social home page Coder Social logo

only-icesoul / react-native-maskview Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 282 KB

Maskview android ios - Hardware Accelerated

License: MIT License

Java 59.57% JavaScript 15.73% Objective-C 5.67% Ruby 8.24% Swift 10.79%
maskview android ios react native hardware accelerated gpu

react-native-maskview's Introduction

MaskView

Mask

[x] android: api 21+
[x] ios : 10.0+

Getting started

$ npm install react-native-maskview --save
$ react-native link react-native-maskview

or

$ yarn add react-native-maskview

IOS

cd ios
pod install

Add Swift

/ios/name_project

add a .swift file

Usage

import {MaskView , MaskViewH} from 'react-native-maskview';

// (Android) MaskViewH Layer type Hardware
// TODO: What to do with the module?

   <MaskView  style={{width:300,height:300,backgroundColor:'purple',justifyContent:'center',alignItems:'center'}}
   mask={
       <View style={{flex:1,display:'flex',justifyContent:'center',alignItems:'center'}}>
                 <TextReact > MASK TEXT </TextReact>
             </View>
   } >


         <Painter style={{width:250,height:250,backgroundColor:'green'}}>
              <Rect  x={0} y={0}  w={150} h={170} fill={colorOrange} shadowOpacity={1} shadowOffset={{x:10,y:10}}/>
       </Painter>
   </MaskView>

Props

Name description default
mask An view whose alpha channel is used to mask a view’s content. undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.