mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-21 20:01:52 +00:00
Update rect.class.js
This commit is contained in:
parent
d87af17aa4
commit
55f9a5947b
1 changed files with 2 additions and 6 deletions
|
|
@ -98,17 +98,13 @@
|
|||
ry = this.ry ? Math.min(this.ry, this.height / 2) : 0,
|
||||
w = this.width,
|
||||
h = this.height,
|
||||
x = noTransform ? this.left : 0,
|
||||
y = noTransform ? this.top : 0,
|
||||
x = noTransform ? this.left : -this.width / 2,
|
||||
y = noTransform ? this.top : -this.height / 2,
|
||||
isRounded = rx !== 0 || ry !== 0,
|
||||
k = 1 - 0.5522847498 /* "magic number" for bezier approximations of arcs (http://itc.ktu.lt/itc354/Riskus354.pdf) */;
|
||||
|
||||
ctx.beginPath();
|
||||
|
||||
if (!noTransform) {
|
||||
ctx.translate(-this.width / 2, -this.height / 2);
|
||||
}
|
||||
|
||||
ctx.moveTo(x + rx, y);
|
||||
|
||||
ctx.lineTo(x + w - rx, y);
|
||||
|
|
|
|||
Loading…
Reference in a new issue