Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Custom Guide Shape #41

Merged
merged 3 commits into from
Oct 6, 2020
Merged

Custom Guide Shape #41

merged 3 commits into from
Oct 6, 2020

Conversation

NicholasMata
Copy link
Contributor

@NicholasMata NicholasMata commented Sep 29, 2020

Extends existing functionality to allow for a custom guide shape.

This is done through the use of a new interface called Targetable.

How it works

If the target view given to the GuideView constructor implements Targetable.

  • boundingRect will be used to set targetRect property inside the GuideView class.
  • guidePath will be used when onDraw is called in GuideView instead of always using drawRoundRect the canvas will call drawPath and will draw the guide path.

PS: I have added onto the sample application with a demonstration of how this works as well.

This implementation could be used to resolve issue #29

@mreram
Copy link
Owner

mreram commented Oct 3, 2020

Thanks for your contribution, I will review this ASAP.

Copy link
Owner

@mreram mreram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review my comments.

@NicholasMata
Copy link
Contributor Author

If you could review again I made the requested changes. Let me know if I need to do anything else.

@mreram mreram merged commit 2291ffe into mreram:master Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants