Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
gm
crbug_946965.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2019 Google LLC
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/SkPaint.h
"
11
#include "
include/core/SkRRect.h
"
12
#include "
include/core/SkRect.h
"
13
14
// Exposed a bug in ellipse rendering where the radii were wrong under 90 degree rotation.
15
DEF_SIMPLE_GM
(crbug_946965, canvas, 75, 150) {
16
SkPaint
paint
;
17
paint
.setAntiAlias(
true
);
18
canvas->translate(25, 80);
19
canvas->rotate(90.f);
20
canvas->scale(1.5, 1);
21
SkRRect
rrect =
SkRRect::MakeRectXY
(
SkRect::MakeLTRB
(-20, -5, 20, 5), 10, 10);
22
canvas->drawRRect(rrect,
paint
);
23
canvas->translate(0, -20);
24
paint
.setStrokeWidth(3.f);
25
paint
.setStyle(
SkPaint::kStroke_Style
);
26
canvas->drawRRect(rrect,
paint
);
27
}
SkCanvas.h
SkPaint.h
SkRRect.h
SkRect.h
SkPaint
Definition
SkPaint.h:44
SkPaint::kStroke_Style
@ kStroke_Style
set to stroke geometry
Definition
SkPaint.h:194
SkRRect
Definition
SkRRect.h:35
SkRRect::MakeRectXY
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
Definition
SkRRect.h:180
paint
const Paint & paint
Definition
color_source.cc:38
gm.h
DEF_SIMPLE_GM
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
Definition
gm.h:50
SkRect::MakeLTRB
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Definition
SkRect.h:646
Generated on Fri Apr 26 2024 06:16:02 for Flutter Engine by
1.9.8