/* draw_hf_dialog.h - headers for HF pen (dotted stroke) * * Copyright (C) 2003 Patrice St-Gelais * patrstg@users.sourceforge.net * www.oricom.ca/patrice.st-gelais * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _DRAW_HF_DIALOG #define _DRAW_HF_DIALOG 1 #include #include "hf.h" typedef struct { gpointer *hf; // The pen is a height field wrapper gint level; // Right shift (division) of the pen before applying it; from -2 (>>4) to 2 (>>0) gint merge; // ADD, SUBTRACT, SMOOTH_OP gint wrap; // TILING_AUTO, TILING_YES, TILING_NO GtkWidget *size_toolbar; gboolean control_spacing; // Initializes a check button, // controlling the activation of the spacing scale gint spacing; // A % of pen size, from 0 to 100 GtkObject *adj_spacing; // A scale } draw_hf_struct; // Prototypes GtkWidget* draw_hf_dialog_new (GtkWidget *window, GtkTooltips *tooltips, draw_hf_struct *hf_pen, dist_matrix_struct *dist_matrix, gpointer data); draw_hf_struct *hf_pen_new(); void hf_pen_free(draw_hf_struct *hf_pen); void instantiate_hf_pen (gpointer hfw, gpointer pen); // "hfw" is a hf_wrapper_struct* void stroke_dot (gpointer hfw, draw_hf_struct *pen, gint x, gint y); gboolean draw_hf_line (gpointer hfw, draw_hf_struct *pen, gint begin_x, gint begin_y, gint *end_x_ptr, gint *end_y_ptr); #endif // DRAW_HF_DIALOG