Last active
March 15, 2023 23:30
-
-
Save dnfield/a309ab473c4fa827187f5f1cc8a58043 to your computer and use it in GitHub Desktop.
Test to image instead of playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST_P(AiksTest, CanRenderStrokes) { | |
Canvas canvas; | |
Paint paint; | |
paint.color = Color::Red(); | |
paint.stroke_width = 20.0; | |
paint.style = Paint::Style::kStroke; | |
canvas.DrawPath(PathBuilder{}.AddLine({200, 100}, {800, 100}).TakePath(), | |
paint); | |
Picture picture = canvas.EndRecordingAsPicture(); | |
std::shared_ptr<Image> image = picture.ToImage(GetContext(), {1000, 1000}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment