#1122 SVG import - relative coordinates - test coords-units-02-b

This commit is contained in:
Jindra Petřík
2021-03-11 23:20:53 +01:00
parent a581836a33
commit b3954e7ec9
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file.
- AS3 P-code - hilight and edit traits outside classes
- [#1585] SVG import - support for style tag (CSS)
- [#1585] SVG import - support for switch tag
- [#1122] SVG import - relative coordinates in gradients (tests coords-units-01-b, pservers-grad-12-b)
- [#1122] SVG import - relative coordinates (tests coords-units-01-b, coords-units-02-b, pservers-grad-12-b)
- Preview in image file selection dialogs
### Changed

View File

@@ -847,7 +847,7 @@ public class SvgImporter {
double cy = attr.length() > 0 ? parseCoordinate(attr, viewBox.height) : 0;
attr = childElement.getAttribute("r");
double r = attr.length() > 0 ? parseLength(attr, viewBox.width/* todo: how much is 100%? */) : 0;
double r = attr.length() > 0 ? parseLength(attr, (viewBox.width + viewBox.height) / 2) : 0;
processEllipse(shapeNum, shapes, transform, style, cx, cy, r, r);
}