Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
gm
crbug_947055.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2019 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#include "
gm/gm.h
"
9
#include "
include/core/SkCanvas.h
"
10
#include "
include/core/SkColor.h
"
11
#include "
include/core/SkMatrix.h
"
12
#include "
include/core/SkPaint.h
"
13
#include "
include/core/SkRect.h
"
14
15
DEF_SIMPLE_GM_BG
(crbug_947055, canvas, 200, 50,
SK_ColorBLUE
) {
16
// Green 2D rectangle to highlight the red rectangle. Isn't necessary
17
// to trigger problem, but helps show the extreme corner outsets.
18
SkPaint
paint
;
19
paint
.setAntiAlias(
true
);
20
paint
.setColor(
SK_ColorGREEN
);
21
canvas->drawRect(
SkRect::MakeXYWH
(19.f, 7.f, 180.f, 10.f),
paint
);
22
23
// Red perspective rectangle with bad AA on Ganesh
24
paint
.setColor(
SK_ColorRED
);
25
canvas->concat(
SkMatrix::MakeAll
(1.0f, 2.4520f, 19.0f,
26
0.0f, 0.3528f, 9.5f,
27
0.0f, 0.0225f, 1.0f));
28
canvas->drawRect(
SkRect::MakeWH
(180.f, 500.f),
paint
);
29
}
SkCanvas.h
SkColor.h
SK_ColorBLUE
constexpr SkColor SK_ColorBLUE
Definition
SkColor.h:135
SK_ColorRED
constexpr SkColor SK_ColorRED
Definition
SkColor.h:126
SK_ColorGREEN
constexpr SkColor SK_ColorGREEN
Definition
SkColor.h:131
SkMatrix.h
SkPaint.h
SkRect.h
SkMatrix::MakeAll
static SkMatrix MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, SkScalar skewY, SkScalar scaleY, SkScalar transY, SkScalar pers0, SkScalar pers1, SkScalar pers2)
Definition
SkMatrix.h:179
SkPaint
Definition
SkPaint.h:44
paint
const Paint & paint
Definition
color_source.cc:38
gm.h
DEF_SIMPLE_GM_BG
#define DEF_SIMPLE_GM_BG(NAME, CANVAS, W, H, BGCOLOR)
Definition
gm.h:52
SkRect::MakeXYWH
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition
SkRect.h:659
SkRect::MakeWH
static constexpr SkRect MakeWH(float w, float h)
Definition
SkRect.h:609
Generated on Fri Apr 26 2024 06:16:02 for Flutter Engine by
1.9.8