question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rounded rectangle

See original GitHub issue

What you think about add a rounded rectangle?

I suggest a property radius, e.g.

const rectangle = ocanvas.display.rectangle({
  width: 200,
  height: 100,
  x: 0,
  y: 0,
  stroke: '1px black',
  radius: 10,
}

Maybe a radiusTopLeft, radiusTopRight, etc… can be useful

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
nestorrentecommented, Jun 2, 2018

Hi guys!

These last days I was fighting with a bug. Today I found it was caused by a typo — I missed a ! before a boolean expression 😅

Now I’m trying to clean the code, but I want to share with you this screenshot:

borderradiusfinal

I tested the border-radius feature using fills and strokes with alpha. I also tested the clipChildren property — that’s why you can see those little green rectangles. I compared it with the non-border-radius version of the rectangle, and here are the results.

Thank you very much for your support, guys 😃

Greetings!

0reactions
koggdalcommented, Jun 4, 2018

Great work! Let’s continue the discussion in the PR! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rounded Rectangle -- from Wolfram MathWorld
A rounded rectangle is the shape obtained by taking the convex hull of four equal circles of radius r and placing their centers...
Read more >
Create rounded squares and rectangles with the ...
Click the Rounded Rectangle tool . · Drag to draw a rounded rectangle. · Drag any of the corner handles within the shape...
Read more >
Perimeter and Area of a Rounded Rectangle - Had2Know
Rounded rectangles have corners that are smoothed out with quarter-circle arcs. Rectangles that have rounded corners instead of square corners are pleasing ...
Read more >
rounded rectangle - Cairo graphics library
rounded rectangle. /* a custom shape that could be wrapped in a function */ double x = 25.6, /* parameters like cairo_rectangle */...
Read more >
Rounded Rectangle Vector Art - Vecteezy
Browse 11786 incredible Rounded Rectangle vectors, icons, clipart graphics, and backgrounds for ... rectangle shape with rounded corner background. vector.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found