chromium/third_party/skia/src/gpu/tessellate/StrokeIterator.h

/*
 * Copyright 2020 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef skgpu_tessellate_StrokeIterator_DEFINED
#define skgpu_tessellate_StrokeIterator_DEFINED

#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathTypes.h"
#include "include/core/SkPoint.h"
#include "include/core/SkStrokeRec.h"
#include "include/private/base/SkAssert.h"
#include "src/core/SkPathPriv.h"

#include <array>

class SkPath;

namespace skgpu::tess {

// This class iterates over the stroke geometry defined by a path and stroke. It automatically
// converts closes and square caps to lines, and round caps to circles so the user doesn't have to
// worry about it. At each location it provides a verb and "prevVerb" so there is context about the
// preceding join. Usage:
//
//     StrokeIterator iter(path, stroke);
//     while (iter.next()) {  // Call next() first.
//         iter.verb();
//         iter.pts();
//         iter.w();
//         iter.prevVerb();
//         iter.prevPts();
//     }
//
class StrokeIterator {};

}  // namespace skgpu::tess

#endif  // skgpu_tessellate_StrokeIterator_DEFINED