mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add dark mode support to dart:ui diagrams (flutter/engine#36533)
* Add dark mode support to dart:ui diagrams * Oopsie
This commit is contained in:
parent
bb08a46561
commit
5f656a0546
@ -634,7 +634,8 @@ class Size extends OffsetBase {
|
||||
class Rect {
|
||||
/// Construct a rectangle from its left, top, right, and bottom edges.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
@pragma('vm:entry-point')
|
||||
const Rect.fromLTRB(this.left, this.top, this.right, this.bottom)
|
||||
: assert(left != null),
|
||||
@ -648,14 +649,16 @@ class Rect {
|
||||
/// To construct a [Rect] from an [Offset] and a [Size], you can use the
|
||||
/// rectangle constructor operator `&`. See [Offset.&].
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
const Rect.fromLTWH(double left, double top, double width, double height) : this.fromLTRB(left, top, left + width, top + height);
|
||||
|
||||
/// Construct a rectangle that bounds the given circle.
|
||||
///
|
||||
/// The `center` argument is assumed to be an offset from the origin.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
Rect.fromCircle({ required Offset center, required double radius }) : this.fromCenter(
|
||||
center: center,
|
||||
width: radius * 2,
|
||||
@ -666,7 +669,8 @@ class Rect {
|
||||
///
|
||||
/// The `center` argument is assumed to be an offset from the origin.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
Rect.fromCenter({ required Offset center, required double width, required double height }) : this.fromLTRB(
|
||||
center.dx - width / 2,
|
||||
center.dy - height / 2,
|
||||
@ -677,7 +681,8 @@ class Rect {
|
||||
/// Construct the smallest rectangle that encloses the given offsets, treating
|
||||
/// them as vectors from the origin.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
Rect.fromPoints(Offset a, Offset b) : this.fromLTRB(
|
||||
math.min(a.dx, b.dx),
|
||||
math.min(a.dy, b.dy),
|
||||
@ -934,12 +939,14 @@ class Rect {
|
||||
class Radius {
|
||||
/// Constructs a circular radius. [x] and [y] will have the same radius value.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
const Radius.circular(double radius) : this.elliptical(radius, radius);
|
||||
|
||||
/// Constructs an elliptical radius with the given radii.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
const Radius.elliptical(this.x, this.y);
|
||||
|
||||
/// The radius value on the horizontal axis.
|
||||
|
||||
@ -2430,7 +2430,8 @@ class Path extends NativeFieldWrapperClass1 {
|
||||
/// point to the given point (x2,y2), using the control point
|
||||
/// (x1,y1).
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
@FfiNative<Void Function(Pointer<Void>, Float, Float, Float, Float)>('Path::quadraticBezierTo', isLeaf: true)
|
||||
external void quadraticBezierTo(double x1, double y1, double x2, double y2);
|
||||
|
||||
@ -2446,7 +2447,8 @@ class Path extends NativeFieldWrapperClass1 {
|
||||
/// to the given point (x3,y3), using the control points (x1,y1) and
|
||||
/// (x2,y2).
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
@FfiNative<Void Function(Pointer<Void>, Float, Float, Float, Float, Float, Float)>('Path::cubicTo', isLeaf: true)
|
||||
external void cubicTo(double x1, double y1, double x2, double y2, double x3, double y3);
|
||||
|
||||
@ -2463,7 +2465,8 @@ class Path extends NativeFieldWrapperClass1 {
|
||||
/// hyperbola; if the weight equals 1, it's a parabola; and if it is
|
||||
/// less than 1, it is an ellipse.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
@FfiNative<Void Function(Pointer<Void>, Float, Float, Float, Float, Float)>('Path::conicTo', isLeaf: true)
|
||||
external void conicTo(double x1, double y1, double x2, double y2, double w);
|
||||
|
||||
@ -2594,9 +2597,11 @@ class Path extends NativeFieldWrapperClass1 {
|
||||
/// rectangle and with positive angles going clockwise around the
|
||||
/// oval.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
void addArc(Rect oval, double startAngle, double sweepAngle) {
|
||||
assert(_rectIsValid(oval));
|
||||
_addArc(oval.left, oval.top, oval.right, oval.bottom, startAngle, sweepAngle);
|
||||
@ -4913,7 +4918,8 @@ class Canvas extends NativeFieldWrapperClass1 {
|
||||
///
|
||||
/// The `p1` and `p2` arguments are interpreted as offsets from the origin.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
void drawLine(Offset p1, Offset p2, Paint paint) {
|
||||
assert(_offsetIsValid(p1));
|
||||
assert(_offsetIsValid(p2));
|
||||
@ -4939,7 +4945,8 @@ class Canvas extends NativeFieldWrapperClass1 {
|
||||
/// Draws a rectangle with the given [Paint]. Whether the rectangle is filled
|
||||
/// or stroked (or both) is controlled by [Paint.style].
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
void drawRect(Rect rect, Paint paint) {
|
||||
assert(_rectIsValid(rect));
|
||||
assert(paint != null);
|
||||
@ -4952,7 +4959,8 @@ class Canvas extends NativeFieldWrapperClass1 {
|
||||
/// Draws a rounded rectangle with the given [Paint]. Whether the rectangle is
|
||||
/// filled or stroked (or both) is controlled by [Paint.style].
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
void drawRRect(RRect rrect, Paint paint) {
|
||||
assert(_rrectIsValid(rrect));
|
||||
assert(paint != null);
|
||||
@ -4981,7 +4989,8 @@ class Canvas extends NativeFieldWrapperClass1 {
|
||||
/// with the given [Paint]. Whether the oval is filled or stroked (or both) is
|
||||
/// controlled by [Paint.style].
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
void drawOval(Rect rect, Paint paint) {
|
||||
assert(_rectIsValid(rect));
|
||||
assert(paint != null);
|
||||
@ -4996,7 +5005,8 @@ class Canvas extends NativeFieldWrapperClass1 {
|
||||
/// the third argument. Whether the circle is filled or stroked (or both) is
|
||||
/// controlled by [Paint.style].
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
void drawCircle(Offset c, double radius, Paint paint) {
|
||||
assert(_offsetIsValid(c));
|
||||
assert(paint != null);
|
||||
@ -5016,7 +5026,8 @@ class Canvas extends NativeFieldWrapperClass1 {
|
||||
/// closed back to the center, forming a circle sector. Otherwise, the arc is
|
||||
/// not closed, forming a circle segment.
|
||||
///
|
||||
/// 
|
||||
/// 
|
||||
/// 
|
||||
///
|
||||
/// This method is optimized for drawing arcs and should be faster than [Path.arcTo].
|
||||
void drawArc(Rect rect, double startAngle, double sweepAngle, bool useCenter, Paint paint) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user