-
Notifications
You must be signed in to change notification settings - Fork 1
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
Try more form-fitting inner bounding box #7
Comments
@bo-peng had a good idea to maybe use a "bubble letter" concept. That is, expand the paths of the letters like a bubbly font. |
Good idea. This would be easier than drawing boxes manually. Maybe we can do this by putting a super thick stroke weight on it? |
Just did a little experiment and it doesn't look like creating a thick stroke will work: var red_line = Path.Line(
new Point(100, 100),
new Point(300, 100)
)
red_line.strokeColor = 'red';
red_line.strokeWidth = 50;
var blue_line = Path.Line(
new Point(100, 95),
new Point(300, 95)
)
blue_line.strokeColor = 'blue';
// prints an empty list '[]' even though blue line clearly interesects the red region
console.log(red_line.getIntersections(blue_line)); |
scaling the path looks like it might work though... |
Indeed! var red_path = Path.Rectangle(
new Point(100, 99),
new Point(300, 101)
)
red_path.fillColor = 'red';
red_path.scale(2);
var blue_path = Path.Line(
new Point(100, 0),
new Point(200, 98)
)
blue_path.strokeColor = 'blue';
// this correctly has intersections when the path is scaled up and misses when it doesn't!
console.log(red_path.getIntersections(blue_path)); |
Working on this. You can get the individual letter paths by getting text.children[0].children, but their positions and bounds are wonky... they don't correspond to where you actually see the letters on the canvas. |
Nice; thanks for looking into this and sharing some screenshots! Both the How computationally intensive is the |
I would expect so. It's intended to be used for video games and such. A On Thu, Oct 30, 2014 at 2:37 AM, Dean Malmgren [email protected]
brian lange | +1.513.254.6751 |
… (see issue #7). Results.. not really that much better, maybe worse
@deanmalmgren suggested: what if we drew a bounding box around the x-height and the ascenders/descenders of the wordmark, instead of just a dumb rectangle? Could make for logos that interact with the wordmark better. ¯_(ツ)_/¯
The text was updated successfully, but these errors were encountered: