Add more flat line cases to trickycubicstrokes
Bug: skia:10419 Change-Id: Ie3eba0181d59d6ab759bcf8cc4b53dfac135cbd6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315857 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
038ba443a0
commit
c2ae19caa5
@ -20,7 +20,7 @@
|
||||
|
||||
static constexpr float kStrokeWidth = 30;
|
||||
static constexpr int kCellSize = 200;
|
||||
static constexpr int kNumCols = 4;
|
||||
static constexpr int kNumCols = 5;
|
||||
static constexpr int kNumRows = 4;
|
||||
|
||||
enum class CellFillMode {
|
||||
@ -51,6 +51,10 @@ static const TrickyCubic kTrickyCubics[] = {
|
||||
{{{39,-39}, {40,-40}, {40,-40}, {0,0}}, CellFillMode::kStretch}, // Flat diagonal with 180
|
||||
{{{40, 40}, {0, 0}, {200, 200}, {0, 0}}, CellFillMode::kStretch}, // Diag with an internal 180
|
||||
{{{0,0}, {1e-2f,0}, {-1e-2f,0}, {0,0}}, CellFillMode::kCenter}, // Circle
|
||||
{{{400.75f,100.05f}, {400.75f,100.05f}, {100.05f,300.95f}, {100.05f,300.95f}},
|
||||
CellFillMode::kStretch}, // Flat line with no turns
|
||||
{{{0.5f,0}, {0,0}, {20,0}, {10,0}}, CellFillMode::kStretch}, // Flat line with 2 180s
|
||||
{{{10,0}, {0,0}, {10,0}, {10,0}}, CellFillMode::kStretch}, // Flat line with a 180
|
||||
};
|
||||
|
||||
static SkRect calc_tight_cubic_bounds(const SkPoint P[4], int depth=5) {
|
||||
|
Loading…
Reference in New Issue
Block a user