Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
crbug_892988.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (crbug_892988, canvas, 256, 256)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( crbug_892988  ,
canvas  ,
256  ,
256   
)

Definition at line 19 of file crbug_892988.cpp.

19 {
20 SkPaint paint1;
22 paint1.setStrokeWidth(1.f);
23 paint1.setAntiAlias(true);
24 canvas->drawRect(SkRect::MakeLTRB(11.5, 0.5, 245.5, 245.5), paint1);
25 canvas->clipRect(SkRect::MakeLTRB(12, 1, 244, 244), true);
26 SkPaint paint2;
27 // Use src mode with a non-opaque color to produce a blend that can't be handled with
28 // simple blend coefficients.
29 paint2.setColor(0xF0FFFFFF);
31 paint2.setAntiAlias(true);
32 canvas->drawRect(SkRect::MakeLTRB(12, 1, 244, 244), paint2);
33}
void setStyle(Style style)
Definition SkPaint.cpp:105
void setColor(SkColor color)
Definition SkPaint.cpp:119
void setAntiAlias(bool aa)
Definition SkPaint.h:170
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
void setBlendMode(SkBlendMode mode)
Definition SkPaint.cpp:151
void setStrokeWidth(SkScalar width)
Definition SkPaint.cpp:159
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Definition SkRect.h:646