Handles parsing ellipse and circle tags. @param circle true if this is a circle and not an ellipse
(boolean circle)
| 418 | * @param circle true if this is a circle and not an ellipse |
| 419 | */ |
| 420 | protected void parseEllipse(boolean circle) { |
| 421 | kind = ELLIPSE; |
| 422 | family = PRIMITIVE; |
| 423 | params = new float[4]; |
| 424 | |
| 425 | params[0] = getFloatWithUnit(element, "cx", svgWidth); |
| 426 | params[1] = getFloatWithUnit(element, "cy", svgHeight); |
| 427 | |
| 428 | float rx, ry; |
| 429 | if (circle) { |
| 430 | rx = ry = getFloatWithUnit(element, "r", svgSizeXY); |
| 431 | } else { |
| 432 | rx = getFloatWithUnit(element, "rx", svgWidth); |
| 433 | ry = getFloatWithUnit(element, "ry", svgHeight); |
| 434 | } |
| 435 | params[0] -= rx; |
| 436 | params[1] -= ry; |
| 437 | |
| 438 | params[2] = rx*2; |
| 439 | params[3] = ry*2; |
| 440 | } |
| 441 | |
| 442 | |
| 443 | protected void parseRect() { |
no test coverage detected