AnyLogic
Expand
Font size

@AnyLogicInternalAPI
public class SVGUtils
extends Object
This class is internal and shouldn't be called by user.
it may be removed/renamed in future.
Author:
AnyLogic North America, LLC https://anylogic.com

Method Summary

Modifier and TypeMethodDescription
static final doubleadjustArcAngle(double x, double y, double offx, double offy, boolean cw, double alimit, double cx, double cy)
Moves an end point of the arc (namely, its angle) to get a certain offset from the initial point
static final doubleangleBetween(double astart, double aend, boolean clockwise)
returns a positive angle between the start and end angles
static final StringsvgColor(Color c)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
static final StringsvgNumberFormat(double value)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
static final StringsvgNumberFormatPrecise(double value)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
static final StringsvgNumberFormatWithOptions(double value, boolean precise)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

svgColor

@AnyLogicInternalAPI
public static final String svgColor(Color c)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

svgNumberFormat

@AnyLogicInternalAPI
public static final String svgNumberFormat(double value)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

svgNumberFormatPrecise

@AnyLogicInternalAPI
public static final String svgNumberFormatPrecise(double value)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

svgNumberFormatWithOptions

@AnyLogicInternalAPI
public static final String svgNumberFormatWithOptions(double value,
 boolean precise)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

angleBetween

public static final double angleBetween(double astart,
 double aend,
 boolean clockwise)
returns a positive angle between the start and end angles
Parameters:
astart - the start angle, possibly negative
aend - the end angle, possibly negative
clockwise - direction of the arc
Returns:
the positive angle between the two given angles

adjustArcAngle

public static final double adjustArcAngle(double x,
 double y,
 double offx,
 double offy,
 boolean cw,
 double alimit,
 double cx,
 double cy)
Moves an end point of the arc (namely, its angle) to get a certain offset from the initial point
Parameters:
x - the x of the initial point of the arc end
y - the y of the initial point of the arc end
offx - the minimum distance along the x axis from x, or (if offy = 0) minimum distance in all directions
offy - the minimum distance along the y axis from y, or 0
cw - if true, arc goes clockwise from (x,y) to the other end, otherwise - counterclockwise
alimit - the end angle of the arc; we should stop to leave a certain arc length in any case
cx - the x of the arc center
cy - the y of the arc center
Returns:
the new angle of the adjusted arc end