fix oval sketch overlay measurement error

This commit is contained in:
Vojtěch Fošnár 2023-02-19 21:03:04 +01:00
parent 3da8a5c8aa
commit 6756e0ad6a
No known key found for this signature in database
GPG key ID: 657727E71C40859A
3 changed files with 3 additions and 3 deletions

View file

@ -192,7 +192,7 @@ func Oval(r *Runner, shape d2target.Shape) (string, error) {
} }
soElement := d2themes.NewThemableElement("ellipse") soElement := d2themes.NewThemableElement("ellipse")
soElement.SetTranslate(float64(shape.Pos.X+shape.Width)/2, float64(shape.Pos.Y+shape.Height)/2) soElement.SetTranslate(float64(shape.Pos.X+shape.Width/2), float64(shape.Pos.Y+shape.Height/2))
soElement.Rx = float64(shape.Width / 2) soElement.Rx = float64(shape.Width / 2)
soElement.Ry = float64(shape.Height / 2) soElement.Ry = float64(shape.Height / 2)
renderedSO, err := d2themes.NewThemableSketchOverlay( renderedSO, err := d2themes.NewThemableSketchOverlay(

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 298 KiB

After

Width:  |  Height:  |  Size: 298 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 289 KiB