We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing Parameters: we can pass CanvasPattern, and typescript do not report syntax error
finally this attribute is used for set fillStyle, so I think it can add a CanvasPattern type to background, like this, and it is worked I tried
The text was updated successfully, but these errors were encountered:
For now we have already support Pattern: https://g.antv.antgroup.com/en/api/css/pattern
interface Pattern { image: string | CanvasImageSource | Rect; repetition?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'; transform?: string; }
So maybe we can pass in a description of pattern:
new Canvas({ background: { image: 'http://example.png', repetition: 'repeat', transform: 'rotate(30deg)', } });
Sorry, something went wrong.
https://github.com/antvis/G/blob/next/packages/g-lite/src/types.ts#L482
thanks for your answer, but i think it can not pass the typecheck
https://github.com/antvis/G/blob/next/packages/g-lite/src/types.ts#L482 new Canvas({ background: { image: 'http://example.png', repetition: 'repeat', transform: 'rotate(30deg)', } }); thanks for your answer, but i think it can not pass the typecheck
Yes, since I haven't implemented it yet. For now background only supports string.
background
string
thats ok,栓q
xiaoiver
No branches or pull requests
What problem does this feature solve?
Passing Parameters: we can pass CanvasPattern, and typescript do not report syntax error
What does the proposed API look like?
finally this attribute is used for set fillStyle, so I think it can add a CanvasPattern type to background, like this, and it is worked I tried
The text was updated successfully, but these errors were encountered: