Glund
Glund

Reputation: 547

Color only border of rectangle

Is there a way I can only color the borders of a rectangle and leave the inside of it white? Similar to this one.

Like this rectangle

Upvotes: 0

Views: 1698

Answers (1)

Max
Max

Reputation: 66

Just use stroke and strokeWidth instead of fill.

See http://fabricjs.com/fabric-intro-part-1/#objects or the documentation for more information.

Upvotes: 4

Related Questions