chromium/ui/gfx/canvas_skia.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <limits.h>
#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <utility>

#include "build/build_config.h"
#include "cc/paint/paint_canvas.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/render_text.h"
#include "ui/gfx/text_elider.h"
#include "ui/gfx/text_utils.h"

namespace gfx {

namespace {

// Strips accelerator character prefixes in |text| if needed, based on |flags|.
// Returns a range in |text| to underline or Range::InvalidRange() if
// underlining is not needed.
Range StripAcceleratorChars(int flags, std::u16string* text) {}

// Elides |text| and adjusts |range| appropriately. If eliding causes |range|
// to no longer point to the same character in |text|, |range| is made invalid.
void ElideTextAndAdjustRange(const FontList& font_list,
                             float width,
                             std::u16string* text,
                             Range* range) {}

// Updates |render_text| from the specified parameters.
void UpdateRenderText(const Rect& rect,
                      const std::u16string& text,
                      const FontList& font_list,
                      int flags,
                      SkColor color,
                      RenderText* render_text) {}

}  // namespace

// static
void Canvas::SizeStringFloat(const std::u16string& text,
                             const FontList& font_list,
                             float* width,
                             float* height,
                             int line_height,
                             int flags) {}

void Canvas::DrawStringRectWithFlags(const std::u16string& text,
                                     const FontList& font_list,
                                     SkColor color,
                                     const Rect& text_bounds,
                                     int flags) {}

}  // namespace gfx