c0bd9f9fe5
Current strategy: everything from the top Things to look at first are the manual changes: - added tools/rewrite_includes.py - removed -Idirectives from BUILD.gn - various compile.sh simplifications - tweak tools/embed_resources.py - update gn/find_headers.py to write paths from the top - update gn/gn_to_bp.py SkUserConfig.h layout so that #include "include/config/SkUserConfig.h" always gets the header we want. No-Presubmit: true Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
/*
|
|
* Copyright 2006 The Android Open Source Project
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkDashPathEffect_DEFINED
|
|
#define SkDashPathEffect_DEFINED
|
|
|
|
#include "include/core/SkPathEffect.h"
|
|
|
|
class SK_API SkDashPathEffect {
|
|
public:
|
|
/** intervals: array containing an even number of entries (>=2), with
|
|
the even indices specifying the length of "on" intervals, and the odd
|
|
indices specifying the length of "off" intervals. This array will be
|
|
copied in Make, and can be disposed of freely after.
|
|
count: number of elements in the intervals array
|
|
phase: offset into the intervals array (mod the sum of all of the
|
|
intervals).
|
|
|
|
For example: if intervals[] = {10, 20}, count = 2, and phase = 25,
|
|
this will set up a dashed path like so:
|
|
5 pixels off
|
|
10 pixels on
|
|
20 pixels off
|
|
10 pixels on
|
|
20 pixels off
|
|
...
|
|
A phase of -5, 25, 55, 85, etc. would all result in the same path,
|
|
because the sum of all the intervals is 30.
|
|
|
|
Note: only affects stroked paths.
|
|
*/
|
|
static sk_sp<SkPathEffect> Make(const SkScalar intervals[], int count, SkScalar phase);
|
|
};
|
|
|
|
#endif
|