Skip to content
New issue

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

Mask offset #203

Open
Darkar25 opened this issue Apr 12, 2022 · 1 comment
Open

Mask offset #203

Darkar25 opened this issue Apr 12, 2022 · 1 comment

Comments

@Darkar25
Copy link

Is there a way to offset a mask?looks like i can only resize it and it stays in the center...

@mgierlasinski
Copy link
Owner

@Darkar25 There is no such way at the moment, masks are scaled from center by design. You can create your own mask and play around with virtual methods BeginLayout and EndLayout to add custom offset. Checkout TextMask as an example, there is custom positioning depending of vertical and horizontal text alignment:

protected override void BeginLayout(RenderContext context, SKRect bounds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants