Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Implement Pattern in brush API #8

Open
Esemesek opened this issue Jun 15, 2019 · 1 comment
Open

Implement Pattern in brush API #8

Esemesek opened this issue Jun 15, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Esemesek
Copy link
Collaborator

Feature Request

Currently there is Pattern brush, that was designed to be passed as a fill attribute, but it doesn't quite work. There are some missing parts in lib/helpers.js that need to be implemented.

More info here.

How it should work

import {Shape, Pattern} from '@react-native-community/art';
import someImage from '../images/image.png';


function Component() {
  return (
    <Shape d="{PATH}" fill={new Pattern(someImage, WIDTH, HEIGHT)} />
  );
}
@Esemesek Esemesek added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jun 15, 2019
@msand
Copy link

msand commented Aug 15, 2019

You can also use https://github.com/react-native-community/react-native-svg#pattern until this gets implemented in art

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants