Sorry, we don't support your browser.  Install a modern browser

Inner/Outer Stroke#71

Currently the stroke goes from the center of the outline evenly to the inside and outside. This causes a weird effect when using clipping effects with the shapes. It would be great if I could choose whether the stroke is on the exterior, interior, or centered like it is currently.

I have attached pictures of the current look where the clipped layer goes over half of the stroke and what I think would be a good addition to have incorporated without an extra layer where the stroke is on the outside.

Just a suggestion because I’ve been running into this situation quite frequently. Thanks!

2 years ago

The clipping with stroke can look unaligned. This is tracked in

2 years ago
Changed the title from "Stroke Alignment Selection" to "Inner/Outer Stroke"
2 years ago

Our engine currently only supports centered strokes, but agreed that it would be great to have the option to set them also to outer or inner.

Clipping is behaving as intended here, as it typically only works with paths (it ignores fills and strokes). This is a very performant way to achieve a “cutting” effect.

Masking allows you to use the fill and stroke to create more complex types of cuts or even fades, but it has a bigger hit on performance (essentially the system needs to do more work every frame). We don’t support masking in Rive 2 yet (though it is planned).

2 years ago

I had a chat with our engineers and have some extra info on supporting inner and outer strokes (as well as our default, which is center).

We’re currently using center strokes only as this is supported by all the native rendering systems across our platforms (iOS, Android, Web, Flutter, etc).

We should be able to support inner and outer strokes once we add custom path operations, which will be required for real-time boolean path operations (like add, subtract, intersect, etc). Path operations come at a potential performance cost, so it will always be best (from a performance perspective) to use center strokes when possible.

2 years ago