2.2.5 • Published 2 years ago

react-native-drawableview v2.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

DrawableView

Draw svg paths with shadows

android: api 21+
ios : 10.0+
web: svg

Getting started

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

or

$ yarn add react-native-drawableview

IOS

cd ios

pod install

Add Swift

/ios/name_project

add a .swift file

Usage

import {DrawableView ,DrawableViewS,DrawableViewB, Color} from 'react-native-drawableview';

// (Android) DrawableViewS  -> support shadow (  Layer type Software < api 28 )
// (Android) DrawableViewB  ->Layer type None , support shadow ( Bitmap < api 28 ) 
// (Android) DrawableView  -> Layer type None 

// TODO: What to do with the module?

   var colorRed = Color('red') //Color('rgba(255,0,0,1)'), #FF0000 .....

   <DrawableViewS {...props} shadow={colorRed} />

Props

Namedescriptiontypedefault
svgKey(web) required to shadow , stroke start-end.String""
dThe shape, defined by a series of commandsString""
viewBoxdefines the position and dimension, in user spaceArrayNumberundefined
alignthe aligmentStringxMidYMid
aspectaspect ratioStringmeet
opacityThe opacity attribute specifies the transparencyNumber1
fillThe fill prop refers to the color inside the shape.Colorblack
fillRuledetermines what side of a path is inside a shapeStringnonzero
fillOpacitythe opacity of the color 0 - 1Number1
strokedefines the color of a lineColortransparent
strokeOpacitythe opacity of the line color 0 - 1Number1
strokeWidthdefines the thickness of a lineNumber1
strokeCapline capstring'butt'
strokeJoinline joinstring'miter'
strokeMitercontrol the behavior of miterNumber4
strokeStartthe startNumber0
strokeEndthe endNumber1
dashArrayrequired for stroke (web)Number0
dashClipValue(web) required for stroke start-end != 0-1. 0 to 1Number0
shadowset the sahdow colorColor'black'
shadowOpacityset the shadow opacity 0 - 1Number0
shadowRadiusthe radiusNumber2
shadowOffsetset the offsetNumber2
shadowOffsetXset the offset xNumber2
shadowOffsetYset the offset yNumber2
shadowPercentageValueoffset * size (mobile)Boolfalse
shadowRectclip Region (web)Objectsize * 3

Transform

The percentageValue property (mobile) : refers to the fact that the Origin will be multiplied by the size of the view.

Nametypedefault
translateZNumber (zIndex)0
transXNumber0
transYNumber0
transPercentageValueBoolfalse
rotNumber0
rotOxNumber0
rotOyNumber0
rotPercentageValueBoolfalse
scNumber1
scXNumber1
scYNumber1
scONumber0
scOxNumber0
scOyNumber0
scPercentageValueBoolfalse
2.2.3

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.2.2

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.9

3 years ago

2.1.6

3 years ago

2.1.2

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.5

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.7

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.9.6

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.2.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago