Adam Barth 77264d3e94 Teach sky.Paragraph how to actually compute layout
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.
2015-09-17 09:37:30 -07:00

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