MCPcopy Create free account
hub / github.com/HumbleUI/Skija / getSegment

Method getSegment

shared/java/PathMeasure.java:149–158  ·  view source on GitHub ↗

Given a start and stop distance, return in dst the intervening segment(s). If the segment is zero-length, return false, else return true. startD and stopD are pinned to legal values (0..getLength()). If startD > stopD then return false (and leave dst untouched). Begin the segment with a moveTo if

(float startD, float endD, @NotNull PathBuilder dst, boolean startWithMoveTo)

Source from the content-addressed store, hash-verified

147 * Begin the segment with a moveTo if startWithMoveTo is true
148 */
149 @Nullable
150 public boolean getSegment(float startD, float endD, @NotNull PathBuilder dst, boolean startWithMoveTo) {
151 try {
152 Stats.onNativeCall();
153 return _nGetSegment(_ptr, startD, endD, Native.getPtr(dst), startWithMoveTo);
154 } finally {
155 ReferenceUtil.reachabilityFence(this);
156 ReferenceUtil.reachabilityFence(dst);
157 }
158 }
159
160 /**
161 * @return true if the current contour is closed.

Calls 4

onNativeCallMethod · 0.95
_nGetSegmentMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected