Path.RawIter

class RawIter

Iterates through verb array, and associated Point array and conic weight.

verb array, Point array, and conic weight are returned unaltered.

Methods

__init__

Overloaded function.

conicWeight

Returns conic weight if next() returned kConic_Verb.

next

Returns next Verb in verb array, and advances RawIter.

peek

Returns next Verb, but does not advance RawIter.

setPath

Sets RawIter to return elements of verb array, Point array, and conic weight in path.

Methods

RawIter.__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: skia.Path.RawIter) -> None

    Initializes RawIter with an empty Path.

    next() on RawIter returns kDone_Verb. Call setPath() to initialize RawIter at a later time.

    return:

    RawIter of empty Path

  2. __init__(self: skia.Path.RawIter, path: skia.Path) -> None

    Sets RawIter to return elements of verb array, Point array, and conic weight in path.

    path:

    Path to iterate

    return:

    RawIter of path

RawIter.conicWeight(self: skia.Path.RawIter) float

Returns conic weight if next() returned kConic_Verb.

If next() has not been called, or next() did not return kConic_Verb, result is undefined.

Returns:

conic weight for conic Point returned by next()

RawIter.next(self: skia.Path.RawIter) tuple

Returns next Verb in verb array, and advances RawIter.

When verb array is exhausted, returns kDone_Verb.

Zero to four Point are stored in pts, depending on the returned Verb.

Returns:

tuple of the following: next Verb from verb array; and storage for Point data describing returned Verb

Return type:

Tuple[skia.Path.Verb,List[skia.Point]]

RawIter.peek(self: skia.Path.RawIter) skia.Path.Verb

Returns next Verb, but does not advance RawIter.

Returns:

next Verb from verb array

RawIter.setPath(self: skia.Path.RawIter, path: skia.Path) None

Sets RawIter to return elements of verb array, Point array, and conic weight in path.

Parameters:

path (skia.Path) – Path to iterate