mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Previously layout was exiting early because the frame view was null. Now we actually compute some layout and paint the text. This patch makes paragraph_builder_test pass.
36 lines
869 B
C++
36 lines
869 B
C++
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "sky/engine/core/text/TextStyle.h"
|
|
|
|
namespace blink {
|
|
|
|
TextStyle::TextStyle(
|
|
SkColor color,
|
|
const String& fontFamily,
|
|
double fontSize,
|
|
FontWeight fontWeight,
|
|
FontStyle fontStyle,
|
|
const Vector<TextDecoration>& decoration,
|
|
SkColor decorationColor,
|
|
TextDecorationStyle decorationStyle)
|
|
: m_color(color)
|
|
, m_fontFamily(fontFamily)
|
|
, m_fontSize(fontSize)
|
|
, m_fontWeight(fontWeight)
|
|
, m_fontStyle(fontStyle)
|
|
, m_decoration(TextDecorationNone)
|
|
, m_decorationColor(decorationColor)
|
|
, m_decorationStyle(decorationStyle)
|
|
{
|
|
for (const auto& d : decoration)
|
|
m_decoration |= d;
|
|
}
|
|
|
|
TextStyle::~TextStyle()
|
|
{
|
|
}
|
|
|
|
} // namespace blink
|