diff --git a/lib/ui/painting/canvas.cc b/lib/ui/painting/canvas.cc index d09f4eebcf794..7bfeb5cfdda9e 100644 --- a/lib/ui/painting/canvas.cc +++ b/lib/ui/painting/canvas.cc @@ -4,6 +4,7 @@ #include "flutter/lib/ui/painting/canvas.h" +#define _USE_MATH_DEFINES #include #include "flutter/flow/layers/physical_shape_layer.h" diff --git a/lib/ui/painting/gradient.cc b/lib/ui/painting/gradient.cc index 95694ab516fd0..9cbf5a19c5275 100644 --- a/lib/ui/painting/gradient.cc +++ b/lib/ui/painting/gradient.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#define _USE_MATH_DEFINES + #include "flutter/lib/ui/painting/gradient.h" #include "lib/tonic/converter/dart_converter.h" diff --git a/lib/ui/painting/path.cc b/lib/ui/painting/path.cc index ffd9f4b7c5b02..2ef610648e650 100644 --- a/lib/ui/painting/path.cc +++ b/lib/ui/painting/path.cc @@ -4,6 +4,7 @@ #include "flutter/lib/ui/painting/path.h" +#define _USE_MATH_DEFINES #include #include "flutter/lib/ui/painting/matrix.h" @@ -215,7 +216,7 @@ void CanvasPath::addPath(CanvasPath* path, double dx, double dy) { void CanvasPath::addPathWithMatrix(CanvasPath* path, double dx, double dy, tonic::Float64List& matrix4) { if (!path) Dart_ThrowException(ToDart("Path.addPathWithMatrix called with non-genuine Path.")); - + SkMatrix matrix = ToSkMatrix(matrix4); matrix.setTranslateX(matrix.getTranslateX() + dx); matrix.setTranslateY(matrix.getTranslateY() + dy); @@ -233,7 +234,7 @@ void CanvasPath::extendWithPath(CanvasPath* path, double dx, double dy) { void CanvasPath::extendWithPathAndMatrix(CanvasPath* path, double dx, double dy, tonic::Float64List& matrix4) { if (!path) Dart_ThrowException(ToDart("Path.addPathWithMatrix called with non-genuine Path.")); - + SkMatrix matrix = ToSkMatrix(matrix4); matrix.setTranslateX(matrix.getTranslateX() + dx); matrix.setTranslateY(matrix.getTranslateY() + dy); diff --git a/lib/ui/painting/path_measure.cc b/lib/ui/painting/path_measure.cc index 5bff424d7798d..e81e4b9c3b5d3 100644 --- a/lib/ui/painting/path_measure.cc +++ b/lib/ui/painting/path_measure.cc @@ -4,6 +4,7 @@ #include "flutter/lib/ui/painting/path_measure.h" +#define _USE_MATH_DEFINES #include #include "flutter/lib/ui/painting/matrix.h"