mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
Consistent with HarfBuzz naming: hb_vector_* prefix for all vector library types. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
/*
|
|
* Copyright © 2026 Behdad Esfahbod
|
|
*
|
|
* This is part of HarfBuzz, a text shaping library.
|
|
*
|
|
* Permission is hereby granted, without written agreement and without
|
|
* license or royalty fees, to use, copy, modify, and distribute this
|
|
* software and its documentation for any purpose, provided that the
|
|
* above copyright notice and the following two paragraphs appear in
|
|
* all copies of this software.
|
|
*
|
|
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
* DAMAGE.
|
|
*
|
|
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
*
|
|
* Author(s): Behdad Esfahbod
|
|
*/
|
|
|
|
#ifndef HB_VECTOR_PATH_HH
|
|
#define HB_VECTOR_PATH_HH
|
|
|
|
#include "hb.hh"
|
|
#include "hb-vector.hh"
|
|
#include "hb-vector.h"
|
|
#include "hb-draw.h"
|
|
#include "hb-vector-buf.hh"
|
|
|
|
/* Lightweight path sink: serializes hb_draw_* calls into an
|
|
* external char buffer as either SVG path-data or PDF path
|
|
* operators, depending on format. Used by the vector paint
|
|
* backends to accumulate arbitrary clip paths (and by the
|
|
* SVG backend to emit glyph outlines into defs). */
|
|
struct hb_vector_path_sink_t
|
|
{
|
|
hb_vector_buf_t *path;
|
|
unsigned precision;
|
|
float x_scale;
|
|
float y_scale;
|
|
};
|
|
|
|
HB_INTERNAL hb_draw_funcs_t *
|
|
hb_vector_svg_path_draw_funcs_get ();
|
|
|
|
HB_INTERNAL hb_draw_funcs_t *
|
|
hb_vector_pdf_path_draw_funcs_get ();
|
|
|
|
HB_INTERNAL hb_draw_funcs_t *
|
|
hb_vector_path_draw_funcs_get (hb_vector_format_t format);
|
|
|
|
#endif /* HB_VECTOR_PATH_HH */
|