Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc369783 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am a6198d37: Merge "Fix bug in PathMeasure with trimmed paths"

* commit 'a6198d37':
  Fix bug in PathMeasure with trimmed paths
parents 62208619 a6198d37
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -113,9 +113,15 @@ public class PathMeasure {
     * 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 startWithMoveTo is true
     * Begin the segment with a moveTo if startWithMoveTo is true.
     *
     * <p>On {@link android.os.Build.VERSION_CODES#KITKAT} and earlier
     * releases, the resulting path may not display on a hardware-accelerated
     * Canvas. A simple workaround is to add a single operation to this path,
     * such as <code>dst.rLineTo(0, 0)</code>.</p>
     */
    public boolean getSegment(float startD, float stopD, Path dst, boolean startWithMoveTo) {
        dst.isSimplePath = false;
        return native_getSegment(native_instance, startD, stopD, dst.ni(), startWithMoveTo);
    }