Flutter Engine
 
Loading...
Searching...
No Matches
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
6
8
9namespace flutter {
10
12 : blend_mode_(static_cast<unsigned>(DlBlendMode::kDefaultMode)),
13 draw_style_(static_cast<unsigned>(DlDrawStyle::kDefaultStyle)),
14 stroke_cap_(static_cast<unsigned>(DlStrokeCap::kDefaultCap)),
15 stroke_join_(static_cast<unsigned>(DlStrokeJoin::kDefaultJoin)),
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
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:227
unsigned stroke_cap_
Definition dl_paint.h:225
unsigned is_invert_colors_
Definition dl_paint.h:228
unsigned draw_style_
Definition dl_paint.h:224
unsigned blend_mode_
Definition dl_paint.h:223
unsigned stroke_join_
Definition dl_paint.h:226
DlStrokeJoin
Definition dl_paint.h:37
DlStrokeCap
Definition dl_paint.h:28
bool Equals(const T *a, const U *b)
DlDrawStyle
Definition dl_paint.h:19
BlendMode
Definition color.h:58