MCPcopy Create free account
hub / github.com/JetBrains/skija / getMatrix

Method getMatrix

shared/java/PathMeasure.java:131–140  ·  view source on GitHub ↗

Pins distance to 0 <= distance <= getLength(), and then computes the corresponding matrix (by calling getPosition/getTangent). @return null if there is no path, or a zero-length path was specified.

(float distance, boolean getPosition, boolean getTangent)

Source from the content-addressed store, hash-verified

129 * @return null if there is no path, or a zero-length path was specified.
130 */
131 @Nullable
132 public Matrix33 getMatrix(float distance, boolean getPosition, boolean getTangent) {
133 try {
134 Stats.onNativeCall();
135 float[] mat = _nGetMatrix(_ptr, distance, getPosition, getTangent);
136 return mat == null ? null : new Matrix33(mat);
137 } finally {
138 Reference.reachabilityFence(this);
139 }
140 }
141
142 /**
143 * Given a start and stop distance, return in dst the intervening segment(s).

Callers 2

executeMethod · 0.80

Calls 2

onNativeCallMethod · 0.95
_nGetMatrixMethod · 0.95

Tested by 1

executeMethod · 0.64