Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/core/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 2 kB image not shown  

Quelle  SkPathRaw.h

  Sprache: C
 

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


#ifndef SkPathRaw_DEFINED
#define SkPathRaw_DEFINED

#include "include/core/SkPathIter.h"
#include "include/core/SkPathTypes.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkSpan.h"
#include "src/core/SkPathEnums.h"   // SkPathConvexity

#include <array>
#include <cstddef>
#include <optional>

/**
 *  SkPathRaw is a non-owning, immutable view of the path geometry.
 *
 *  It allows us to have stack-allocated paths, see SkPathRawShapes.h
 *
 *  It is the responsibility of the creator to ensure that the spans in SkPathRaw point to valid
 *  data that outlives the SkPathRaw instance.
 */

struct SkPathRaw {
    SkSpan<const SkPoint>    fPoints;
    SkSpan<const SkPathVerb> fVerbs;
    SkSpan<const float>      fConics;
    SkRect                   fBounds;
    SkPathFillType           fFillType;
    SkPathConvexity          fConvexity;
    uint8_t                  fSegmentMask;  // See SkPath::SegmentMask

    SkSpan<const SkPoint> points() const { return fPoints; }
    SkSpan<const SkPathVerb> verbs() const { return fVerbs; }
    SkSpan<const float> conics() const { return fConics; }
    SkRect bounds() const { return fBounds; }
    SkPathFillType fillType() const { return fFillType; }
    SkPathConvexity convexity() const { return fConvexity; }
    unsigned segmentMasks() const { return fSegmentMask; }

    bool empty() const { return fVerbs.empty(); }
    bool isInverseFillType() const { return SkPathFillType_IsInverse(fFillType); }
    bool isKnownToBeConvex() const { return SkPathConvexity_IsConvex(fConvexity); }

    std::optional<SkRect> isRect() const;

    SkPathIter iter() const { return {fPoints, fVerbs, fConics}; }

    static SkPathRaw Empty(SkPathFillType ft = SkPathFillType::kDefault) {
        return {
            {}, {}, {}, SkRect::MakeEmpty(), ft, SkPathConvexity::kConvex_Degenerate, 0,
        };
    }
};

#endif

Messung V0.5 in Prozent
C=92 H=100 G=95

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.