• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef SKIA_PATH_ITERATOR_H
17 #define SKIA_PATH_ITERATOR_H
18 
19 #include "include/core/SkPath.h"
20 
21 #include "impl_interface/path_iterator_impl.h"
22 #include "utils/scalar.h"
23 
24 namespace OHOS {
25 namespace Rosen {
26 namespace Drawing {
27 class DRAWING_API SkiaPathIterator : public PathIteratorImpl {
28 public:
29     static inline constexpr AdapterType TYPE = AdapterType::SKIA_ADAPTER;
30 
31     explicit SkiaPathIterator(const Path &path) noexcept;
~SkiaPathIterator()32     ~SkiaPathIterator() override {};
33 
GetType()34     AdapterType GetType() const override
35     {
36         return AdapterType::SKIA_ADAPTER;
37     }
38 
39     const SkPath::RawIter& ExportSkiaPathIterator() const;
40     scalar ConicWeight() const override;
41     PathVerb Next(Point* points) override;
42     PathVerb Peek() override;
43 private:
44     SkPath::RawIter skPathIterator_;
45 };
46 } // namespace Drawing
47 } // namespace Rosen
48 } // namespace OHOS
49 #endif
50