Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
dl_paint.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/display_list/dl_paint.h"
6
7namespace flutter {
8
10 : blend_mode_(static_cast<unsigned>(DlBlendMode::kDefaultMode)),
11 draw_style_(static_cast<unsigned>(DlDrawStyle::kDefaultStyle)),
12 stroke_cap_(static_cast<unsigned>(DlStrokeCap::kDefaultCap)),
13 stroke_join_(static_cast<unsigned>(DlStrokeJoin::kDefaultJoin)),
14 is_anti_alias_(false),
15 is_invert_colors_(false),
16 color_(color),
17 stroke_width_(kDefaultWidth),
18 stroke_miter_(kDefaultMiter) {}
19
20bool DlPaint::operator==(DlPaint const& other) const {
21 return blend_mode_ == other.blend_mode_ && //
22 draw_style_ == other.draw_style_ && //
23 stroke_cap_ == other.stroke_cap_ && //
24 stroke_join_ == other.stroke_join_ && //
25 is_anti_alias_ == other.is_anti_alias_ && //
27 color_ == other.color_ && //
28 stroke_width_ == other.stroke_width_ && //
29 stroke_miter_ == other.stroke_miter_ && //
30 Equals(color_source_, other.color_source_) && //
31 Equals(color_filter_, other.color_filter_) && //
32 Equals(image_filter_, other.image_filter_) && //
33 Equals(mask_filter_, other.mask_filter_);
34}
35
37
38} // namespace flutter
static int kDefaultWidth
Definition: Request.cpp:23
bool operator==(DlPaint const &other) const
Definition: dl_paint.cc:20
static const DlPaint kDefault
Definition: dl_paint.h:52
unsigned is_anti_alias_
Definition: dl_paint.h:204
unsigned stroke_cap_
Definition: dl_paint.h:202
unsigned is_invert_colors_
Definition: dl_paint.h:205
unsigned draw_style_
Definition: dl_paint.h:201
unsigned blend_mode_
Definition: dl_paint.h:200
unsigned stroke_join_
Definition: dl_paint.h:203
DlColor color
DlStrokeJoin
Definition: dl_paint.h:37
bool Equals(const T *a, const T *b)
Definition: dl_comparable.h:19
DlStrokeCap
Definition: dl_paint.h:28
DlDrawStyle
Definition: dl_paint.h:19