Path: blob/master/src/java.desktop/share/native/libharfbuzz/hb-draw.h
41149 views
/*1* Copyright © 2019-2020 Ebrahim Byagowi2*3* This is part of HarfBuzz, a text shaping library.4*5* Permission is hereby granted, without written agreement and without6* license or royalty fees, to use, copy, modify, and distribute this7* software and its documentation for any purpose, provided that the8* above copyright notice and the following two paragraphs appear in9* all copies of this software.10*11* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR12* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES13* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN14* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH15* DAMAGE.16*17* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,18* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND19* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS20* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO21* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.22*/2324#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)25#error "Include <hb.h> instead."26#endif2728#ifndef HB_DRAW_H29#define HB_DRAW_H3031#include "hb.h"3233HB_BEGIN_DECLS3435#ifdef HB_EXPERIMENTAL_API36typedef void (*hb_draw_move_to_func_t) (hb_position_t to_x, hb_position_t to_y, void *user_data);37typedef void (*hb_draw_line_to_func_t) (hb_position_t to_x, hb_position_t to_y, void *user_data);38typedef void (*hb_draw_quadratic_to_func_t) (hb_position_t control_x, hb_position_t control_y,39hb_position_t to_x, hb_position_t to_y,40void *user_data);41typedef void (*hb_draw_cubic_to_func_t) (hb_position_t control1_x, hb_position_t control1_y,42hb_position_t control2_x, hb_position_t control2_y,43hb_position_t to_x, hb_position_t to_y,44void *user_data);45typedef void (*hb_draw_close_path_func_t) (void *user_data);4647/**48* hb_draw_funcs_t:49*50* Glyph draw callbacks.51*52* _move_to, _line_to and _cubic_to calls are nessecary to be defined but we53* translate _quadratic_to calls to _cubic_to if the callback isn't defined.54*55* Since: EXPERIMENTAL56**/57typedef struct hb_draw_funcs_t hb_draw_funcs_t;5859HB_EXTERN void60hb_draw_funcs_set_move_to_func (hb_draw_funcs_t *funcs,61hb_draw_move_to_func_t move_to);6263HB_EXTERN void64hb_draw_funcs_set_line_to_func (hb_draw_funcs_t *funcs,65hb_draw_line_to_func_t line_to);6667HB_EXTERN void68hb_draw_funcs_set_quadratic_to_func (hb_draw_funcs_t *funcs,69hb_draw_quadratic_to_func_t quadratic_to);7071HB_EXTERN void72hb_draw_funcs_set_cubic_to_func (hb_draw_funcs_t *funcs,73hb_draw_cubic_to_func_t cubic_to);7475HB_EXTERN void76hb_draw_funcs_set_close_path_func (hb_draw_funcs_t *funcs,77hb_draw_close_path_func_t close_path);7879HB_EXTERN hb_draw_funcs_t *80hb_draw_funcs_create (void);8182HB_EXTERN hb_draw_funcs_t *83hb_draw_funcs_reference (hb_draw_funcs_t *funcs);8485HB_EXTERN void86hb_draw_funcs_destroy (hb_draw_funcs_t *funcs);8788HB_EXTERN void89hb_draw_funcs_make_immutable (hb_draw_funcs_t *funcs);9091HB_EXTERN hb_bool_t92hb_draw_funcs_is_immutable (hb_draw_funcs_t *funcs);93#endif9495HB_END_DECLS9697#endif /* HB_DRAW_H */9899100