Flutter Engine
The Flutter Engine
Functions
crbug_947055.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM_BG (crbug_947055, canvas, 200, 50, SK_ColorBLUE)
 

Function Documentation

◆ DEF_SIMPLE_GM_BG()

DEF_SIMPLE_GM_BG ( crbug_947055  ,
canvas  ,
200  ,
50  ,
SK_ColorBLUE   
)

Definition at line 15 of file crbug_947055.cpp.

15 {
16 // Green 2D rectangle to highlight the red rectangle. Isn't necessary
17 // to trigger problem, but helps show the extreme corner outsets.
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}
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
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
const Paint & paint
Definition: color_source.cc:38
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition: SkRect.h:659
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609