chromium/components/enterprise/watermarking/watermark.cc

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

#include "components/enterprise/watermarking/watermark.h"

#include "base/no_destructor.h"
#include "base/strings/utf_string_conversions.h"
#include "cc/paint/skia_paint_canvas.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/render_text.h"

namespace {

// UX Requirements:
constexpr int kWatermarkBlockSpacing =;
constexpr double kRotationAngle =;
constexpr SkColor kFillColor =;
constexpr SkColor kOutlineColor =;
constexpr float kTextSize =;

gfx::Font WatermarkFont() {}

gfx::Font::Weight WatermarkFontWeight() {}

std::unique_ptr<gfx::RenderText> CreateRenderText(const gfx::Rect& display_rect,
                                                  const std::u16string& text) {}

int block_width_offset(int block_width) {}

int block_height_offset(int block_height) {}

int min_x(double angle, const gfx::Rect& bounds, int block_width) {}

int max_x(double angle, const gfx::Rect& bounds, int block_width) {}

int min_y(double angle, const gfx::Rect& bounds) {}

int max_y(double angle, const gfx::Rect& bounds) {}

void DrawTextBlock(gfx::Canvas* canvas,
                   int x,
                   int y,
                   gfx::RenderText* text_fill,
                   gfx::RenderText* text_outline,
                   int block_height,
                   int block_width) {}

}  // namespace

namespace enterprise_watermark {

const gfx::FontList& WatermarkFontList() {}

int GetWatermarkBlockHeight(const std::u16string& utf16_text,
                            int line_count,
                            int block_width,
                            int text_size) {}

std::unique_ptr<gfx::RenderText> CreateFillRenderText(
    const gfx::Rect& display_rect,
    const std::u16string& text) {}

std::unique_ptr<gfx::RenderText> CreateOutlineRenderText(
    const gfx::Rect& display_rect,
    const std::u16string& text) {}

void DrawWatermark(gfx::Canvas* canvas,
                   gfx::RenderText* text_fill,
                   gfx::RenderText* text_outline,
                   int block_height,
                   const gfx::Rect& contents_bounds,
                   int block_width) {}

void DrawWatermark(SkCanvas* canvas,
                   SkSize size,
                   const std::string& text,
                   int block_width,
                   int text_size) {}

}  // namespace enterprise_watermark