1 /* viewer.h 2 Copyright (C) 2004-2019 Mark Tyler and Dmitry Groshev 3 4 This file is part of mtPaint. 5 6 mtPaint is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3 of the License, or 9 (at your option) any later version. 10 11 mtPaint is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with mtPaint in the file COPYING. 18 */ 19 20 int font_aa, font_bk, font_r; 21 int font_bkg, font_angle, font_align, font_spacing; 22 int font_setdpi, font_dpi, sys_dpi; 23 24 extern char *align_txt[]; 25 26 int view_showing; // 0: hidden, 1: horizontal split, 2: vertical split 27 int vw_focus_on; 28 float vw_zoom; 29 int opaque_view; 30 int max_pan; 31 32 void **vw_drawing; 33 34 void create_cline_area( GtkWidget *vbox1 ); 35 36 void pressed_pan(); 37 38 void pressed_centralize(int state); 39 void pressed_view_focus(int state); 40 extern void *init_view_code[]; // Initial setup 41 void view_show(); 42 void view_hide(); 43 44 int make_text_clipboard(unsigned char *img, int w, int h, int src_bpp); 45 void pressed_help(); 46 void pressed_text(); 47 void render_text(); 48 49 void vw_align_size( float new_zoom ); // Set new zoom 50 void vw_realign(); // Reapply old zoom 51 void vw_focus_view(); // Focus view window to main window 52 void vw_focus_idle(); // Same but done in idle cycles 53 void view_render_rgb( unsigned char *rgb, int px, int py, int pw, int ph, double czoom ); 54 size_t render_layers(unsigned char *rgb, int cxy[4], int pw, int zoom, int scale, 55 int lr0, int lr1, int view); 56 void lr_update_area(int lr, int x, int y, int w, int h); // Update x,y,w,h area of a layer 57 #define LR_ANIM 0x10000 /* Update only view window */ 58 59 int comp_need_alpha(int ftype); // Need RGBA compositing 60 void collect_alpha(unsigned char *alpha, int pw, int ph); // Composite alpha channel 61 62 void vw_configure(); 63