mtpaint-3.40/0000755000175000000620000000000011677136166012451 5ustar muammarstaffmtpaint-3.40/Makefile0000644000175000000620000000043710364436560014106 0ustar muammarstaffinclude _conf.txt all: $(subdirs) .PHONY: $(subdirs) $(subdirs): $(MAKE) -C $@ install: for dir in $(subdirs); do $(MAKE) -C $$dir install; done uninstall: for dir in $(subdirs); do $(MAKE) -C $$dir uninstall; done clean: for dir in $(subdirs); do $(MAKE) -C $$dir clean; done mtpaint-3.40/src/0000755000175000000620000000000011677136163013235 5ustar muammarstaffmtpaint-3.40/src/info.c0000644000175000000620000002464311647074734014347 0ustar muammarstaff/* info.c Copyright (C) 2005-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "canvas.h" #include "layer.h" // Maximum median cuts to make #define MAX_CUTS 128 static int hs_rgb[256][3], // Raw frequencies hs_rgb_sorted[256][3]; // Sorted frequencies #define HS_GRAPH_W 256 #define HS_GRAPH_H 64 static unsigned char *hs_rgb_mem; // RGB chunk holding graphs static GtkWidget *hs_drawingarea; static int hs_norm; static void hs_plot_graph() // Plot RGB graphs { unsigned char *im, col1[3] = { mem_pal_def[0].red, mem_pal_def[0].green, mem_pal_def[0].blue}, col2[3]; int i, j, k, t, /*min[3],*/ max[3], med[3], bars[256][3]; float f; for ( i=0; i<3; i++ ) col2[i] = 255 - col1[i]; im = hs_rgb_mem; if ( im != NULL ) { // Flush background to palette 0 colour j = HS_GRAPH_W * HS_GRAPH_H * mem_img_bpp; for ( i=0; i0; j=j-HS_GRAPH_H/2 ) { im = hs_rgb_mem + j*HS_GRAPH_W*3; for ( i=0; i0; j=j-HS_GRAPH_W/4 ) { im = hs_rgb_mem + j*3; for ( i=0; i 0 ) { t = j; break; } } // min[k] = hs_rgb_sorted[t][k]; med[k] = hs_rgb_sorted[(t+255)/2][k]; max[k] = hs_rgb_sorted[255][k]; } // Calculate bar values - either linear or normalized if ( hs_norm ) { for ( k=0; k63 ) t=63; im = hs_rgb_mem + i*3 + (k+1)*HS_GRAPH_H*HS_GRAPH_W*3; im = im - HS_GRAPH_W*3; for ( j=0; j0; j-- ) // The venerable bubble sort { for ( i=0; i hs_rgb_sorted[i+1][k] ) { t = hs_rgb_sorted[i][k]; hs_rgb_sorted[i][k] = hs_rgb_sorted[i+1][k]; hs_rgb_sorted[i+1][k] = t; } } } } } static gboolean hs_expose_graph( GtkWidget *widget, GdkEventExpose *event ) { int x = event->area.x, y = event->area.y; int w = event->area.width, h = event->area.height; if ( hs_rgb_mem == NULL ) return FALSE; if ( x >= HS_GRAPH_W || y >= HS_GRAPH_H*mem_img_bpp ) return FALSE; mtMIN( w, w, HS_GRAPH_W-x ) mtMIN( h, h, HS_GRAPH_H*3-y ) gdk_draw_rgb_image (hs_drawingarea->window, hs_drawingarea->style->black_gc, x, y, w, h, GDK_RGB_DITHER_NONE, hs_rgb_mem + 3*(x + y*HS_GRAPH_W), HS_GRAPH_W*3 ); return FALSE; } //// INFORMATION WINDOW static GtkWidget *info_window; static void delete_info(GtkWidget *widget) { destroy_dialog(info_window); free(hs_rgb_mem); hs_rgb_mem = NULL; } void pressed_information() { char txt[256]; int i, j, orphans = 0, maxi; GtkWidget *vbox4, *vbox5, *table4;//, *hs_normalize_check; GtkWidget *scrolledwindow1, *viewport1, *table5; info_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Information"), GTK_WIN_POS_CENTER, TRUE ); if ( mem_img_bpp == 1 ) gtk_widget_set_usize (GTK_WIDGET (info_window), -2, 400); vbox4 = add_vbox(info_window); table4 = gtk_table_new (3, 2, FALSE); gtk_widget_show (table4); add_with_frame(vbox4, _("Memory"), table4); gtk_container_set_border_width (GTK_CONTAINER (table4), 5); add_to_table( _("Total memory for main + undo images"), table4, 0, 0, 5 ); snprintf(txt, 60, "%1.1f MB", ( (float) mem_used() )/1024/1024 ); add_to_table( txt, table4, 0, 1, 5 ); maxi = rint(((double)mem_undo_limit * 1024 * 1024) * (mem_undo_common * layers_total * 0.01 + 1) / (mem_width * mem_height * mem_img_bpp * (layers_total + 1)) - 1.25); maxi = maxi < 0 ? 0 : maxi >= mem_undo_max ? mem_undo_max - 1 : maxi; snprintf(txt, 60, "%i / %i / %i", mem_undo_done, mem_undo_redo, maxi); add_to_table( txt, table4, 1, 1, 5 ); add_to_table( _("Undo / Redo / Max levels used"), table4, 1, 0, 5 ); if ( mem_clipboard == NULL ) { add_to_table( _("Clipboard"), table4, 2, 0, 5 ); add_to_table( _("Unused"), table4, 2, 1, 5 ); } else { if ( mem_clip_bpp == 1 ) snprintf(txt, 250, _("Clipboard = %i x %i"), mem_clip_w, mem_clip_h ); if ( mem_clip_bpp == 3 ) snprintf(txt, 250, _("Clipboard = %i x %i x RGB"), mem_clip_w, mem_clip_h ); add_to_table( txt, table4, 2, 0, 5 ); snprintf(txt, 250, "%1.1f MB", ( (float) mem_clip_w * mem_clip_h * mem_clip_bpp )/1024/1024 ); add_to_table( txt, table4, 2, 1, 5 ); } if ( mem_img_bpp == 3) // RGB image so count different colours { add_to_table( _("Unique RGB pixels"), table4, 3, 0, 5 ); i = mem_count_all_cols(); if ( i<0 ) { maxi = mem_cols_used(1024); if ( maxi < 1024 ) snprintf(txt, 250, "%i", maxi); else sprintf( txt, ">1023" ); } else snprintf(txt, 250, "%i", i); add_to_table( txt, table4, 3, 1, 5 ); } if ( layers_total>0 ) { add_to_table( _("Layers"), table4, 4, 0, 5 ); snprintf(txt, 60, "%i", layers_total ); add_to_table( txt, table4, 4, 1, 5 ); add_to_table( _("Total layer memory usage"), table4, 5, 0, 5 ); snprintf(txt, 60, "%1.1f MB", ( (float) mem_used_layers() )/1024/1024 ); add_to_table( txt, table4, 5, 1, 5 ); } vbox5 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox5); add_with_frame_x(vbox4, _("Colour Histogram"), vbox5, 4, FALSE); hs_norm = FALSE; hs_rgb_mem = malloc( HS_GRAPH_W * HS_GRAPH_H * 3 * mem_img_bpp ); hs_populate_rgb(); hs_plot_graph(); hs_drawingarea = pack(vbox5, gtk_drawing_area_new()); gtk_widget_show (hs_drawingarea); gtk_widget_set_usize (hs_drawingarea, HS_GRAPH_W, HS_GRAPH_H*mem_img_bpp); gtk_signal_connect_object( GTK_OBJECT(hs_drawingarea), "expose_event", GTK_SIGNAL_FUNC (hs_expose_graph), NULL ); // hs_normalize_check = pack(vbox5, sig_toggle(_("Normalize"), FALSE, NULL, GTK_SIGNAL_FUNC(hs_click_normalize))); if ( mem_img_bpp == 1 ) { mem_get_histogram(CHN_IMAGE); j = 0; for ( i=0; i 0 ) j++; snprintf( txt, 250, _("Colour index totals - %i of %i used"), j, mem_cols ); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow1); add_with_frame_x(vbox4, txt, scrolledwindow1, 4, TRUE); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow1), 4); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); viewport1 = gtk_viewport_new (NULL, NULL); gtk_widget_show (viewport1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); /// Big index table table5 = gtk_table_new (mem_cols+2+1, 3, FALSE); gtk_widget_show (table5); gtk_container_add (GTK_CONTAINER (viewport1), table5); add_to_table( _("Index"), table5, 0, 0, 5 ); add_to_table( _("Canvas pixels"), table5, 0, 1, 5 ); add_to_table( "%", table5, 0, 2, 5 ); for ( i=0; i 128 #error "Layer indices cannot fit in ani_cycle structure" #endif typedef struct { int frame0, frame1, len; signed char layers[MAX_CYC_ITEMS]; } ani_cycle; int ani_frame1, ani_frame2, ani_gif_delay; ani_cycle ani_cycle_table[MAX_CYC_SLOTS]; void ani_init(); // Initialize variables/arrays etc. void pressed_animate_window(); void pressed_set_key_frame(); void pressed_remove_key_frames(); void ani_read_file( FILE *fp ); // Read data from layers file already opened void ani_write_file( FILE *fp ); // Write data to layers file already opened void ani_but_preview(); // Preview the animation mtpaint-3.40/src/mtlib.h0000644000175000000620000000312110654662452014511 0ustar muammarstaff/* mtlib.h Copyright (C) 2005-2006 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ typedef struct { double x,y,z; } MT_Coor; MT_Coor MT_coze(); // Return zero coordinates MT_Coor MT_co_div_k(MT_Coor AA, double BB); // Divide coords/vector by constant MT_Coor MT_co_mul_k(MT_Coor AA, double BB); // Multiply coords/vector by constant MT_Coor MT_addco(MT_Coor AA, MT_Coor BB); // Add two coords together (AA+BB) MT_Coor MT_subco(MT_Coor AA, MT_Coor BB); // Add two coords together (AA-BB) double MT_lin_len(MT_Coor AA, MT_Coor BB); // Return length of line between two coordinates double MT_lin_len2(MT_Coor AA); // Return length of vector MT_Coor MT_uni_vec(MT_Coor AA, MT_Coor BB); // Return unit vector between two coords (A to B) MT_Coor MT_uni_vec2(MT_Coor AA); // Return unit vector MT_Coor MT_palin(double position, double ratio, MT_Coor p1, MT_Coor p2, MT_Coor p3, MT_Coor p4, MT_Coor lenz); // Parabolic Linear Interpolation from point 2 to point 3 at position (0-1) and ratio (0=flat, 0.25=curvy, 1=very bendy) mtpaint-3.40/src/wu.c0000644000175000000620000002770411261614663014041 0ustar muammarstaff/* The following quantizing algorithm is the work of Xiaolin Wu - see the attached notes I downloaded it from: http://www.ece.mcmaster.ca/~xwu/cq.c During September 2005 I adjusted the code slightly to get it to work with mtPaint, and for the code to conform to my programming style, but the colour selection algorithm remains the same. Mark Tyler, September 2005. I updated the integration code to use mtPaint 3.30 interfaces. Dmitry Groshev, July 2008. And added "diameter weighting" mode. Dmitry Groshev, November 2008. */ #include "mygtk.h" #include "memory.h" /* Having received many constructive comments and bug reports about my previous C implementation of my color quantizer (Graphics Gems vol. II, p. 126-133), I am posting the following second version of my program (hopefully 100% healthy) as a reply to all those who are interested in the problem. */ /********************************************************************** C Implementation of Wu's Color Quantizer (v. 2) (see Graphics Gems vol. II, pp. 126-133) Author: Xiaolin Wu Dept. of Computer Science Univ. of Western Ontario London, Ontario N6A 5B7 wu@csd.uwo.ca Algorithm: Greedy orthogonal bipartition of RGB space for variance minimization aided by inclusion-exclusion tricks. For speed no nearest neighbor search is done. Slightly better performance can be expected by more sophisticated but more expensive versions. The author thanks Tom Lane at Tom_Lane@G.GP.CS.CMU.EDU for much of additional documentation and a cure to a previous bug. Free to distribute, comments and suggestions are appreciated. **********************************************************************/ #define MAXCOLOR 256 #define RED 2 #define GREEN 1 #define BLUE 0 struct box { int r0, r1, g0, g1, b0, b1, vol; // min value, exclusive. max value, inclusive }; /* Histogram is in elements 1..HISTSIZE along each axis, * element 0 is for base or marginal value * NB: these must start out 0! */ static float *m2; static int *wt, *mr, *mg, *mb; static int size; // image size static int K; // color look-up table size static void Hist3d(inbuf, vwt, vmr, vmg, vmb) // build 3-D color histogram of counts, r/g/b, c^2 unsigned char *inbuf; int *vwt, *vmr, *vmg, *vmb; { register int ind, r, g, b; int inr, ing, inb, table[256]; register long int i; for(i=0; i<256; ++i) table[i]=i*i; for(i=0; i>3)+1; ing=(g>>3)+1; inb=(b>>3)+1; ind=(inr<<10)+(inr<<6)+inr+(ing<<5)+ing+inb; // [inr][ing][inb] ++vwt[ind]; vmr[ind] += r; vmg[ind] += g; vmb[ind] += b; m2[ind] += (float)(table[r]+table[g]+table[b]); } if (!quan_sqrt) return; // "Diameter weighting" in action for (i = 0; i < 33 * 33 * 33; i++) { double d; if (!vwt[i]) continue; d = vwt[i]; d = (vwt[i] = sqrt(d)) / d; vmr[i] *= d; vmg[i] *= d; vmb[i] *= d; m2[i] *= d; } } /* At conclusion of the histogram step, we can interpret * wt[r][g][b] = sum over voxel of P(c) * mr[r][g][b] = sum over voxel of r*P(c) , similarly for mg, mb * m2[r][g][b] = sum over voxel of c^2*P(c) * Actually each of these should be divided by 'size' to give the usual * interpretation of P() as ranging from 0 to 1, but we needn't do that here. */ /* We now convert histogram into moments so that we can rapidly calculate * the sums of the above quantities over any desired box. */ static void M3d(vwt, vmr, vmg, vmb) // compute cumulative moments. int *vwt, *vmr, *vmg, *vmb; { register unsigned short int ind1, ind2; register unsigned char i, r, g, b; long int line, line_r, line_g, line_b, area[33], area_r[33], area_g[33], area_b[33]; float line2, area2[33]; for(r=1; r<=32; ++r) { for(i=0; i<=32; ++i) area2[i]=area[i]=area_r[i]=area_g[i]=area_b[i]=0; for(g=1; g<=32; ++g) { line2 = line = line_r = line_g = line_b = 0; for(b=1; b<=32; ++b) { ind1 = (r<<10) + (r<<6) + r + (g<<5) + g + b; // [r][g][b] line += vwt[ind1]; line_r += vmr[ind1]; line_g += vmg[ind1]; line_b += vmb[ind1]; line2 += m2[ind1]; area[b] += line; area_r[b] += line_r; area_g[b] += line_g; area_b[b] += line_b; area2[b] += line2; ind2 = ind1 - 1089; /* [r-1][g][b] */ vwt[ind1] = vwt[ind2] + area[b]; vmr[ind1] = vmr[ind2] + area_r[b]; vmg[ind1] = vmg[ind2] + area_g[b]; vmb[ind1] = vmb[ind2] + area_b[b]; m2[ind1] = m2[ind2] + area2[b]; } } } } static long int Vol(cube, mmt) // Compute sum over a box of any given statistic struct box *cube; int mmt[33][33][33]; { return( mmt[cube->r1][cube->g1][cube->b1] -mmt[cube->r1][cube->g1][cube->b0] -mmt[cube->r1][cube->g0][cube->b1] +mmt[cube->r1][cube->g0][cube->b0] -mmt[cube->r0][cube->g1][cube->b1] +mmt[cube->r0][cube->g1][cube->b0] +mmt[cube->r0][cube->g0][cube->b1] -mmt[cube->r0][cube->g0][cube->b0] ); } /* The next two routines allow a slightly more efficient calculation * of Vol() for a proposed subbox of a given box. The sum of Top() * and Bottom() is the Vol() of a subbox split in the given direction * and with the specified new upper bound. */ static long int Bottom(cube, dir, mmt) // Compute part of Vol(cube, mmt) that doesn't depend on r1, g1, or b1 // (depending on dir) struct box *cube; unsigned char dir; int mmt[33][33][33]; { switch(dir) { case RED: return( -mmt[cube->r0][cube->g1][cube->b1] +mmt[cube->r0][cube->g1][cube->b0] +mmt[cube->r0][cube->g0][cube->b1] -mmt[cube->r0][cube->g0][cube->b0] ); break; case GREEN: return( -mmt[cube->r1][cube->g0][cube->b1] +mmt[cube->r1][cube->g0][cube->b0] +mmt[cube->r0][cube->g0][cube->b1] -mmt[cube->r0][cube->g0][cube->b0] ); break; case BLUE: return( -mmt[cube->r1][cube->g1][cube->b0] +mmt[cube->r1][cube->g0][cube->b0] +mmt[cube->r0][cube->g1][cube->b0] -mmt[cube->r0][cube->g0][cube->b0] ); break; } return 0; } static long int Top(cube, dir, pos, mmt) // Compute remainder of Vol(cube, mmt), substituting pos for // r1, g1, or b1 (depending on dir) struct box *cube; unsigned char dir; int pos; int mmt[33][33][33]; { switch(dir) { case RED: return( mmt[pos][cube->g1][cube->b1] -mmt[pos][cube->g1][cube->b0] -mmt[pos][cube->g0][cube->b1] +mmt[pos][cube->g0][cube->b0] ); break; case GREEN: return( mmt[cube->r1][pos][cube->b1] -mmt[cube->r1][pos][cube->b0] -mmt[cube->r0][pos][cube->b1] +mmt[cube->r0][pos][cube->b0] ); break; case BLUE: return( mmt[cube->r1][cube->g1][pos] -mmt[cube->r1][cube->g0][pos] -mmt[cube->r0][cube->g1][pos] +mmt[cube->r0][cube->g0][pos] ); break; } return 0; } static float Var(cube) // Compute the weighted variance of a box // NB: as with the raw statistics, this is really the variance * size struct box *cube; { float dr, dg, db, xx; dr = Vol(cube, mr); dg = Vol(cube, mg); db = Vol(cube, mb); xx = m2[ 33*33*cube->r1 + 33*cube->g1 + cube->b1] -m2[ 33*33*cube->r1 + 33*cube->g1 + cube->b0] -m2[ 33*33*cube->r1 + 33*cube->g0 + cube->b1] +m2[ 33*33*cube->r1 + 33*cube->g0 + cube->b0] -m2[ 33*33*cube->r0 + 33*cube->g1 + cube->b1] +m2[ 33*33*cube->r0 + 33*cube->g1 + cube->b0] +m2[ 33*33*cube->r0 + 33*cube->g0 + cube->b1] -m2[ 33*33*cube->r0 + 33*cube->g0 + cube->b0]; return( xx - (dr*dr+dg*dg+db*db)/(float)Vol(cube,wt) ); } /* We want to minimize the sum of the variances of two subboxes. * The sum(c^2) terms can be ignored since their sum over both subboxes * is the same (the sum for the whole box) no matter where we split. * The remaining terms have a minus sign in the variance formula, * so we drop the minus sign and MAXIMIZE the sum of the two terms. */ static float Maximize(cube, dir, first, last, cut, whole_r, whole_g, whole_b, whole_w) struct box *cube; unsigned char dir; int first, last, *cut; long int whole_r, whole_g, whole_b, whole_w; { register long int half_r, half_g, half_b, half_w; long int base_r, base_g, base_b, base_w; register int i; register float temp, max; base_r = Bottom(cube, dir, mr); base_g = Bottom(cube, dir, mg); base_b = Bottom(cube, dir, mb); base_w = Bottom(cube, dir, wt); max = 0.0; *cut = -1; for(i=first; i max) { max=temp; *cut=i; } } return(max); } static int Cut(struct box *set1, struct box *set2) { unsigned char dir; int cutr, cutg, cutb; float maxr, maxg, maxb; long int whole_r, whole_g, whole_b, whole_w; whole_r = Vol(set1, mr); whole_g = Vol(set1, mg); whole_b = Vol(set1, mb); whole_w = Vol(set1, wt); maxr = Maximize(set1, RED, set1->r0+1, set1->r1, &cutr, whole_r, whole_g, whole_b, whole_w); maxg = Maximize(set1, GREEN, set1->g0+1, set1->g1, &cutg, whole_r, whole_g, whole_b, whole_w); maxb = Maximize(set1, BLUE, set1->b0+1, set1->b1, &cutb, whole_r, whole_g, whole_b, whole_w); if( (maxr>=maxg)&&(maxr>=maxb) ) { dir = RED; if (cutr < 0) return 0; // can't split the box } else if( (maxg>=maxr)&&(maxg>=maxb) ) dir = GREEN; else dir = BLUE; set2->r1 = set1->r1; set2->g1 = set1->g1; set2->b1 = set1->b1; switch (dir) { case RED: set2->r0 = set1->r1 = cutr; set2->g0 = set1->g0; set2->b0 = set1->b0; break; case GREEN: set2->g0 = set1->g1 = cutg; set2->r0 = set1->r0; set2->b0 = set1->b0; break; case BLUE: set2->b0 = set1->b1 = cutb; set2->r0 = set1->r0; set2->g0 = set1->g0; break; } set1->vol=(set1->r1-set1->r0)*(set1->g1-set1->g0)*(set1->b1-set1->b0); set2->vol=(set2->r1-set2->r0)*(set2->g1-set2->g0)*(set2->b1-set2->b0); return 1; } static void Mark(struct box *cube, int label, unsigned char *tag) { register int r, g, b; for(r=cube->r0+1; r<=cube->r1; ++r) for(g=cube->g0+1; g<=cube->g1; ++g) for(b=cube->b0+1; b<=cube->b1; ++b) tag[(r<<10) + (r<<6) + r + (g<<5) + g + b] = label; } int wu_quant(unsigned char *inbuf, int width, int height, int quant_to, png_color *pal) { void *mem; struct box cube[MAXCOLOR]; unsigned char *tag; long int next; register long int i, k, weight; float vv[MAXCOLOR], temp; K = quant_to; size = width*height; mem = multialloc(MA_ALIGN_DEFAULT, &m2, 33*33*33 * sizeof(float), &wt, 33*33*33 * sizeof(int), &mr, 33*33*33 * sizeof(int), &mg, 33*33*33 * sizeof(int), &mb, 33*33*33 * sizeof(int), &tag, 33*33*33, NULL); if (!mem) return (-1); Hist3d(inbuf, wt, mr, mg, mb); M3d(wt, mr, mg, mb); cube[0].r0 = cube[0].g0 = cube[0].b0 = 0; cube[0].r1 = cube[0].g1 = cube[0].b1 = 32; next = 0; for(i=1; i1) ? Var(&cube[next]) : 0.0; vv[i] = (cube[i].vol>1) ? Var(&cube[i]) : 0.0; } else { vv[next] = 0.0; // don't try to split this box again i--; // didn't create box i } next = 0; temp = vv[0]; for(k=1; k<=i; ++k) if (vv[k] > temp) { temp = vv[k]; next = k; } if (temp <= 0.0) { K = i+1; // Only got K boxes break; } } for(k=0; k #include "global.h" #include "mygtk.h" #include "inifile.h" #include "memory.h" #include "png.h" #include "canvas.h" #include "mainwindow.h" #include "spawn.h" static char *mt_temp_dir; static char *get_tempdir() { char *env; env = getenv("TMPDIR"); if (!env || !*env) env = getenv("TMP"); if (!env || !*env) env = getenv("TEMP"); #ifdef P_tmpdir if (!env || !*env) env = P_tmpdir; #endif if (!env || !*env || (strlen(env) >= PATHBUF)) // Bad if too long #ifdef WIN32 env = "\\"; #else env = "/tmp"; #endif return (env); } static char *new_temp_dir() { char *buf, *base = get_tempdir(); #ifdef HAVE_MKDTEMP buf = file_in_dir(NULL, base, "mtpaintXXXXXX", PATHBUF); if (!buf) return (NULL); if (mkdtemp(buf)) { chmod(buf, 0755); return (buf); } #else buf = tempnam(base, "mttmp"); if (!buf) return (NULL); #ifdef WIN32 /* No mkdtemp() in MinGW */ /* tempnam() may use Unix path separator */ reseparate(buf); if (!mkdir(buf)) return (buf); #else if (!mkdir(buf, 0755)) return (buf); #endif #endif free(buf); return (NULL); } /* Store index for name, or fetch it (when idx < 0) */ static int last_temp_index(char *name, int idx) { // !!! For now, use simplest model - same index regardless of name static int index; if (idx >= 0) index = idx; return (index); } typedef struct { void *next, *id; int type, rgb; char name[1]; } tempfile; static void *tempchain; static char *remember_temp_file(char *name, int type, int rgb) { static wjmem *tempstore; tempfile *tmp, *tm0; if ((tempstore || (tempstore = wjmemnew(0, 0))) && (tmp = wjmalloc(tempstore, offsetof(tempfile, name) + strlen(name) + 1, ALIGNOF(tempfile)))) { tmp->type = type; tmp->rgb = rgb; strcpy(tmp->name, name); if (mem_tempfiles) /* Have anchor - insert after it */ { tm0 = tmp->id = mem_tempfiles; tmp->next = tm0->next; tm0->next = (void *)tmp; } else /* No anchor - insert before all */ { tmp->next = tempchain; mem_tempfiles = tempchain = tmp->id = (void *)tmp; } return (tmp->name); } return (NULL); // Failed to allocate } void spawn_quit() { tempfile *tmp; for (tmp = tempchain; tmp; tmp = tmp->next) unlink(tmp->name); if (mt_temp_dir) rmdir(mt_temp_dir); } static char *get_temp_file(int type, int rgb) { ls_settings settings; tempfile *tmp; unsigned char *img = NULL; char buf[PATHBUF], nstub[NAMEBUF], ids[32], *c, *f = "tmp.png"; int fd, cnt, idx, res; /* Use the original file if possible */ if (!mem_changed && mem_filename && (!rgb ^ (mem_img_bpp == 3)) && ((type == FT_NONE) || (detect_file_format(mem_filename, FALSE) == type))) return (mem_filename); /* Prepare temp directory */ if (!mt_temp_dir) mt_temp_dir = new_temp_dir(); if (!mt_temp_dir) return (NULL); /* Temp dir creation failed */ /* Analyze name */ if ((type == FT_NONE) && mem_filename) { f = strrchr(mem_filename, DIR_SEP); if (!f) f = mem_filename; type = file_type_by_ext(f, FF_SAVE_MASK); } if (type == FT_NONE) type = FT_PNG; /* Use existing file if possible */ for (tmp = mem_tempfiles; tmp; tmp = tmp->next) { if (tmp->id != mem_tempfiles) break; if ((tmp->type == type) && (tmp->rgb == rgb)) return (tmp->name); } /* Stubify filename */ strcpy(nstub, "tmp"); c = strrchr(f, '.'); if (c != f) /* Extension should not be alone */ wjstrcat(nstub, NAMEBUF, f, c ? c - f : strlen(f), NULL); /* Create temp file */ while (TRUE) { idx = last_temp_index(nstub, -1); ids[0] = 0; for (cnt = 0; cnt < 256; cnt++ , idx++) { if (idx) sprintf(ids, "%d", idx); snprintf(buf, PATHBUF, "%s" DIR_SEP_STR "%s%s.%s", mt_temp_dir, nstub, ids, file_formats[type].ext); fd = open(buf, O_WRONLY | O_CREAT | O_EXCL, 0644); if (fd >= 0) break; } last_temp_index(nstub, idx); if (fd >= 0) break; if (!strcmp(nstub, "tmp")) return (NULL); /* Utter failure */ strcpy(nstub, "tmp"); /* Try again with "tmp" */ } close(fd); /* Save image */ init_ls_settings(&settings, NULL); memcpy(settings.img, mem_img, sizeof(chanlist)); settings.pal = mem_pal; settings.width = mem_width; settings.height = mem_height; settings.bpp = mem_img_bpp; settings.colors = mem_cols; settings.ftype = type; if (rgb && (mem_img_bpp == 1)) /* Save indexed as RGB */ { settings.img[CHN_IMAGE] = img = malloc(mem_width * mem_height * 3); if (!img) return (NULL); /* Failed to allocate RGB buffer */ settings.bpp = 3; do_convert_rgb(0, 1, mem_width * mem_height, img, mem_img[CHN_IMAGE], mem_pal); } res = save_image(buf, &settings); free(img); if (res) return (NULL); /* Failed to save */ return (remember_temp_file(buf, type, rgb)); } static char *insert_temp_file(char *pattern, int where, int skip) { char *fname, *pat = pattern; int i, l, rgb = mem_img_bpp == 3, fform = FT_NONE; while (TRUE) { /* Skip initial whitespace if any */ pat += strspn(pat, " \t"); /* Finish if not a transform request */ if (*pat != '>') break; l = strcspn(++pat, "> \t"); if (!strncasecmp("RGB", pat, l)) rgb = TRUE; else { for (i = FT_NONE + 1; i < NUM_FTYPES; i++) { fformat *ff = file_formats + i; if ((ff->flags & FF_IMAGE) && !(ff->flags & FF_NOSAVE) && (!strncasecmp(ff->name, pat, l) || !strncasecmp(ff->ext, pat, l) || (ff->ext2[0] && !strncasecmp(ff->ext2, pat, l)))) fform = i; } } pat += l; } where -= pat - pattern; if (where < 0) return (NULL); // Syntax error if (fform != FT_NONE) { unsigned int flags = file_formats[fform].flags; if (rgb && !(flags & FF_RGB)) fform = FT_NONE; // No way else if (flags & FF_SAVE_MASK); // Is OK else if (flags & FF_RGB) rgb = TRUE; // Fallback else fform = FT_NONE; // Give up } fname = get_temp_file(fform, rgb); if (!fname) return (NULL); /* Temp save failed */ return (wjstrcat(NULL, 0, pat, where, "\"", fname, "\"", pat + where + skip, NULL)); } int spawn_expansion(char *cline, char *directory) // Replace %f with "current filename", then run via shell { int res = -1; char *s1; #ifdef WIN32 char *argv[4] = { getenv("COMSPEC"), "/C", cline, NULL }; #else char *argv[4] = { "sh", "-c", cline, NULL }; #endif s1 = strstr( cline, "%f" ); // Has user included the current filename? if (s1) { s1 = insert_temp_file(cline, s1 - cline, 2); if (s1) { argv[2] = s1; res = spawn_process(argv, directory); free(s1); } else return -1; } else { res = spawn_process(argv, directory); } // Note that on Linux systems, returning 0 means that the shell was // launched OK, but gives no info on the success of the program being run by the shell. // To find out what happened you will need to use the output window. // MT 18-1-2007 return res; } // Front End stuff static GtkWidget *faction_list, *faction_entry[3]; static int faction_current_row, faction_block; static char *faction_ini[3] = { "fact%dName", "fact%dCommand", "fact%dDir" }; void pressed_file_action(int item) { char *comm, *dir, txt[64]; sprintf(txt, faction_ini[1], item); comm = inifile_get(txt,""); sprintf(txt, faction_ini[2], item); dir = inifile_get(txt,""); spawn_expansion(comm, dir); } static void faction_changed(GtkEditable *entry, gpointer user_data) { if (faction_block) return; gtk_clist_set_text(GTK_CLIST(faction_list), faction_current_row, (int)user_data, gtk_entry_get_text(GTK_ENTRY(entry))); } static void faction_select_row(GtkCList *clist, gint row, gint col, GdkEvent *event, gpointer *pointer) { gchar *celltext; int i, j; faction_current_row = row; faction_block = TRUE; for (i = 0; i < 3; i++) { j = gtk_clist_get_text(GTK_CLIST(faction_list), row, i, &celltext); gtk_entry_set_text(GTK_ENTRY(faction_entry[i]), j ? celltext : ""); } faction_block = FALSE; } static void faction_moved(GtkCList *clist, gint src, gint dest, gpointer user_data) { faction_current_row = dest; } static void update_faction_menu() // Populate menu { int i, items = 0; char txt[64], *nm, *cm; GtkWidget *item; /* Show valid slots in menu */ for (i = 1; i <= FACTION_PRESETS_TOTAL; i++) { item = menu_widgets[MENU_FACTION1 - 1 + i]; gtk_widget_hide(item); /* Hide by default */ sprintf(txt, faction_ini[0], i); nm = inifile_get(txt, ""); if (!nm || !nm[0] || (nm[0] == '#')) continue; sprintf(txt, faction_ini[1], i); cm = inifile_get(txt, ""); if (!cm || !cm[0] || (cm[0] == '#')) continue; gtk_label_set_text( GTK_LABEL(GTK_MENU_ITEM(item)->item.bin.child), nm); gtk_widget_show(item); items++; } /* Hide separator if no valid slots */ (items ? gtk_widget_show : gtk_widget_hide)(menu_widgets[MENU_FACTION_S]); } void init_factions() { #ifndef WIN32 int i, j; static char *row_def[][3] = { {"View EXIF data (leafpad)", "exif %f | leafpad"}, {"View filesystem data (xterm)", "xterm -hold -e ls -l %f"}, {"Edit in Gimp", "gimp %f"}, {"View in GQview", "gqview %f"}, {"Print image", "kprinter %f"}, {"Email image", "seamonkey -compose attachment=file://%f"}, {"Send image to Firefox", "firefox %f"}, {"Send image to OpenOffice", "soffice %f"}, {"Edit Clipboards", "mtpaint ~/.clip*"}, {"Time delayed screenshot", "sleep 10; mtpaint -s &"}, {"View image information", "xterm -hold -sb -rightbar -geometry 100x100 -e identify -verbose %f"}, {"#Create temp directory", "mkdir ~/images"}, {"#Remove temp directory", "rm -rf ~/images"}, {"#GIF to PNG conversion (in situ)", "mogrify -format png *.gif"}, {"#ICO to PNG conversion (temp directory)", "ls --file-type *.ico | xargs -I FILE convert FILE ~/images/FILE.png"}, {"Convert image to ICO file", "mogrify -format ico %f"}, {"Create thumbnails in temp directory", "ls --file-type * | xargs -I FILE convert FILE -thumbnail 120x120 -sharpen 1 -quality 95 ~/images/th_FILE.jpg"}, {"Create thumbnails (in situ)", "ls --file-type * | xargs -I FILE convert FILE -thumbnail 120x120 -sharpen 1 -quality 95 th_FILE.jpg"}, {"Peruse temp images", "mtpaint ~/images/*"}, {"Rename *.jpeg to *.jpg", "rename .jpeg .jpg *.jpeg"}, {"Remove spaces from filenames", "for file in *\" \"*; do mv \"$file\" `echo $file | sed -e 's/ /_/g'`; done"}, {"Remove extra .jpg. from filename", "rename .jpg. . *.jpg.jpg"}, // {"", ""}, {NULL, NULL, NULL} }, txt[64]; for (i = 0; row_def[i][0]; i++) // Needed for first time usage - populate inifile list { for (j = 0; j < 3; j++) { sprintf(txt, faction_ini[j], i + 1); inifile_get(txt, row_def[i][j]); } } #endif update_faction_menu(); // Prepare menu } static void faction_ok(GtkWidget *widget, gpointer user_data) { char txt[64], path[PATHBUF]; gchar *celltext; int i, j, k; for (i = 0; i < FACTION_ROWS_TOTAL; i++) { for (j = 0; j < 3; j++) { sprintf(txt, faction_ini[j], i + 1); k = gtk_clist_get_text(GTK_CLIST(faction_list), i, j, &celltext); if (!k) celltext = ""; else if (j) { gtkncpy(path, celltext, PATHBUF); celltext = path; } inifile_set(txt, celltext); } } update_faction_menu(); gtk_widget_destroy(widget); } static void faction_execute(GtkWidget *widget, gpointer user_data) { spawn_expansion((char *)gtk_entry_get_text(GTK_ENTRY(faction_entry[1])), (char *)gtk_entry_get_text(GTK_ENTRY(faction_entry[2]))); } void pressed_file_configure() { gchar *clist_titles[3] = { _("Action"), _("Command"), "" }; GtkWidget *vbox, *hbox, *win, *sw, *clist, *entry; gchar *row_text[3]; char txt[64], paths[2][PATHTXT]; int i, j; win = add_a_window( GTK_WINDOW_TOPLEVEL, _("Configure File Actions"), GTK_WIN_POS_CENTER, TRUE ); gtk_window_set_default_size( GTK_WINDOW(win), 500, 400 ); vbox = add_vbox(win); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); sw = xpack5(vbox, gtk_scrolled_window_new(NULL, NULL)); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); faction_list = clist = gtk_clist_new_with_titles(3, clist_titles); gtk_container_add(GTK_CONTAINER(sw), clist); /* Store directories in a hidden third column */ gtk_clist_set_column_visibility(GTK_CLIST(clist), 2, FALSE); gtk_clist_set_column_width(GTK_CLIST(clist), 0, 200); // gtk_clist_set_column_width(GTK_CLIST(clist), 1, 200); gtk_clist_column_titles_passive(GTK_CLIST(clist)); gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_BROWSE); clist_enable_drag(clist); for (i = 1; i <= FACTION_ROWS_TOTAL; i++) { for (j = 0; j < 3; j++) { sprintf(txt, faction_ini[j], i); row_text[j] = inifile_get(txt, ""); if (!j) continue; gtkuncpy(paths[j - 1], row_text[j], PATHTXT); row_text[j] = paths[j - 1]; } gtk_clist_append(GTK_CLIST(clist), row_text); } gtk_signal_connect(GTK_OBJECT(clist), "select_row", GTK_SIGNAL_FUNC(faction_select_row), NULL); gtk_signal_connect(GTK_OBJECT(clist), "row_move", GTK_SIGNAL_FUNC(faction_moved), NULL); /* Entries */ for (j = 0; j < 2; j++) { hbox = gtk_hbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); add_with_frame(vbox, !j ? _("Action") : _("Command"), hbox); faction_entry[j] = entry = xpack5(hbox, gtk_entry_new()); gtk_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(faction_changed), (gpointer)j); } faction_entry[2] = mt_path_box(_("Directory"), vbox, _("Select Directory"), FS_SELECT_DIR); gtk_signal_connect(GTK_OBJECT(faction_entry[2]), "changed", GTK_SIGNAL_FUNC(faction_changed), (gpointer)2); /* Cancel / Execute / OK */ hbox = pack(vbox, OK_box(0, win, _("OK"), GTK_SIGNAL_FUNC(faction_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); OK_box_add(hbox, _("Execute"), GTK_SIGNAL_FUNC(faction_execute)); gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(main_window)); gtk_widget_show_all(win); gtk_clist_select_row(GTK_CLIST(clist), 0, 0); // Select first item } // Process spawning code #ifdef WIN32 /* With Glib's g_spawn*() smart-ass tricks making it utterly unusable in * Windows, the only way is to reimplement the functionality - WJ */ #define WIN32_LEAN_AND_MEAN #include int spawn_process(char *argv[], char *directory) { PROCESS_INFORMATION pi; STARTUPINFO st; gchar *cmdline, *c; int res; memset(&pi, 0, sizeof(pi)); memset(&st, 0, sizeof(st)); st.cb = sizeof(st); cmdline = g_strjoinv(" ", argv); if (directory && !directory[0]) directory = NULL; c = g_locale_from_utf8(cmdline, -1, NULL, NULL, NULL); if (c) { g_free(cmdline); cmdline = c; c = NULL; } if (directory) { c = g_locale_from_utf8(directory, -1, NULL, NULL, NULL); if (c) directory = c; } res = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, /* CREATE_NEW_CONSOLE | */ CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, NULL, directory, &st, &pi); g_free(cmdline); g_free(c); if (!res) return (1); CloseHandle(pi.hProcess); CloseHandle(pi.hThread); return (0); } #else #include #include #include int spawn_process(char *argv[], char *directory) { pid_t child, grandchild; int res = -1, err, fd_flags, fds[2], status; child = fork(); if ( child < 0 ) return 1; if (child == 0) // Child { if (pipe(fds) == -1) _exit(1); // Set up the pipe grandchild = fork(); if (grandchild == 0) // Grandchild { if (directory) chdir(directory); if (close(fds[0]) != -1) // Close the read pipe /* Make the write end close-on-exec */ if ((fd_flags = fcntl(fds[1], F_GETFD)) != -1) if (fcntl(fds[1], F_SETFD, fd_flags | FD_CLOEXEC) != -1) execvp(argv[0], &argv[0]); /* Run program */ /* If we are here, an error occurred */ /* Send the error code to the parent */ err = errno; write(fds[1], &err, sizeof(err)); _exit(1); } /* Close the write pipe - has to be done BEFORE read */ close(fds[1]); /* Get the error code from the grandchild */ if (grandchild > 0) res = read(fds[0], &err, sizeof(err)); close(fds[0]); // Close the read pipe _exit(res); } waitpid(child, &status, 0); // Wait for child to die res = WEXITSTATUS(status); // Find out the childs exit value return (res); } #endif // Copy string quoting space chars static char *quote_spaces(const char *src) { char *tmp, *dest; int n = 0; for (*(const char **)&tmp = src; *tmp; tmp++) { if (*tmp == ' ') #ifdef WIN32 n += 2; #else n++; #endif n++; } dest = malloc(n + 1); if (!dest) return (""); for (tmp = dest; *src; src++) { if (*src == ' ') { #ifdef WIN32 *tmp++ = '"'; *tmp++ = ' '; *tmp++ = '"'; #else *tmp++ = '\\'; *tmp++ = ' '; #endif } else *tmp++ = *src; } *tmp = 0; return (dest); } // Wrapper for animated GIF handling, or other builtin actions #ifdef U_ANIM_IMAGICK /* Use Image Magick for animated GIF processing; not really recommended, * because it is many times slower than Gifsicle, and less efficient */ /* !!! Image Magick version prior to 6.2.6-3 won't work properly */ #define CMD_GIF_CREATE \ "convert %2$s -layers optimize -set delay %1$d -loop 0 \"%3$s\"" #define CMD_GIF_PLAY "animate \"%s\" &" #else /* Use Gifsicle; the default choice for animated GIFs */ /* global colourmaps, suppress warning, high optimizations, background * removal method, infinite loops, ensure result works with Java & MS IE */ #define CMD_GIF_CREATE \ "gifsicle --colors 256 -w -O2 -D 2 -l0 --careful -d %d %s -o \"%s\"" #define CMD_GIF_PLAY "gifview -a \"%s\" &" #endif /* Windows shell does not know "&", nor needs it to run mtPaint detached */ #ifndef WIN32 #define CMD_DETACH " &" #else /* WIN32 */ #define CMD_DETACH #ifndef WEXITSTATUS #define WEXITSTATUS(A) ((A) & 0xFF) #endif #endif int run_def_action(int action, char *sname, char *dname, int delay) { char *msg, *c8, *command = NULL; int res, code; switch (action) { case DA_GIF_CREATE: c8 = quote_spaces(sname); command = g_strdup_printf(CMD_GIF_CREATE, delay, c8, dname); free(c8); break; case DA_GIF_PLAY: #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 /* 'gifviev' and 'animate' both are X-only */ command = g_strdup_printf(CMD_GIF_PLAY, sname); break; #else return (-1); #endif case DA_GIF_EDIT: command = g_strdup_printf("mtpaint -g %d -w \"%s.???\" -w \"%s.????\"" CMD_DETACH, delay, sname, sname); break; } res = system(command); if (res) { if (res > 0) code = WEXITSTATUS(res); else code = res; c8 = gtkuncpy(NULL, command, 0); msg = g_strdup_printf(_("Error %i reported when trying to run %s"), code, c8); alert_box(_("Error"), msg, NULL); g_free(msg); g_free(c8); } g_free(command); return (res); } #ifdef WIN32 #include #define HANDBOOK_LOCATION_WIN "..\\docs\\index.html" #else /* Linux */ #define HANDBOOK_BROWSER "firefox" #define HANDBOOK_LOCATION "/usr/doc/mtpaint/index.html" #define HANDBOOK_LOCATION2 "/usr/share/doc/mtpaint/index.html" #endif int show_html(char *browser, char *docs) { char buf[PATHBUF + 2], buf2[PATHBUF]; int i=-1; #ifdef WIN32 char *r; if (!docs || !docs[0]) { /* Use default path relative to installdir */ docs = buf + 1; i = GetModuleFileNameA(NULL, docs, PATHBUF); if (!i) return (-1); r = strrchr(docs, '\\'); if (!r) return (-1); r[1] = 0; strnncat(docs, HANDBOOK_LOCATION_WIN, PATHBUF); } #else /* Linux */ char *argv[5]; if (!docs || !docs[0]) { docs = HANDBOOK_LOCATION; if (valid_file(docs) < 0) docs = HANDBOOK_LOCATION2; } #endif else docs = gtkncpy(buf + 1, docs, PATHBUF); if ((valid_file(docs) < 0)) { alert_box( _("Error"), _("I am unable to find the documentation. Either you need to download the mtPaint Handbook from the web site and install it, or you need to set the correct location in the Preferences window."), NULL); return (-1); } #ifdef WIN32 if (browser && !browser[0]) browser = NULL; if (browser) { /* Quote the filename */ i = strlen(docs); buf[0] = docs[i] = '"'; docs[i + 1] = '\0'; /* Rearrange parameters */ docs = gtkncpy(buf2, browser, PATHBUF); browser = buf; } if ((unsigned int)ShellExecuteA(NULL, "open", docs, browser, NULL, SW_SHOW) <= 32) i = -1; else i = 0; #else argv[1] = docs; argv[2] = NULL; /* Try to use default browser */ if (!browser || !browser[0]) { argv[0] = "xdg-open"; i = spawn_process(argv, NULL); if (!i) return (0); // System has xdg-utils installed // No xdg-utils - try "BROWSER" variable then browser = getenv("BROWSER"); } else browser = gtkncpy(buf2, browser, PATHBUF); if (!browser) browser = HANDBOOK_BROWSER; argv[0] = browser; i = spawn_process(argv, NULL); #endif if (i) alert_box( _("Error"), _("There was a problem running the HTML browser. You need to set the correct program name in the Preferences window."), NULL); return (i); } mtpaint-3.40/src/wu.h0000644000175000000620000000017211037661662014036 0ustar muammarstaff// wu.h // See wu.c for details int wu_quant(unsigned char *inbuf, int width, int height, int quant_to, png_color *pal); mtpaint-3.40/src/spawn.h0000644000175000000620000000265111423112345014523 0ustar muammarstaff/* spawn.h Copyright (C) 2007-2010 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define FACTION_ROWS_TOTAL 25 #define FACTION_PRESETS_TOTAL 15 // This number must exactly match the number of menu items declared int spawn_process(char *argv[], char *directory); // argv must be NULL terminated! int spawn_expansion(char *cline, char *directory); // Replace %f with "current filename", then run via shell void pressed_file_configure(); void pressed_file_action(int item); void init_factions(); // Initialize file action menu void spawn_quit(); // Delete temp files // Default action codes #define DA_GIF_CREATE 0 //#define DA_GIF_EXPLODE 1 #define DA_GIF_PLAY 2 #define DA_GIF_EDIT 3 // Run some default action int run_def_action(int action, char *sname, char *dname, int delay); int show_html(char *browser, char *docs); mtpaint-3.40/src/icons1/0000755000175000000620000000000011331055321014410 5ustar muammarstaffmtpaint-3.40/src/icons1/xbm_spray_mask.xbm0000644000175000000620000000074010476322246020154 0ustar muammarstaff#define xbm_spray_mask_width 20 #define xbm_spray_mask_height 20 static unsigned char xbm_spray_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xFF, 0xFC, 0x0F, 0xFF, 0xFD, 0x0F, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x0F, 0x7F, 0xFC, 0x0F, 0xF7, 0xFC, 0x0F, 0xF3, 0xFC, 0x0F, 0xE0, 0xFD, 0x0F, 0xE0, 0xFD, 0x0F, 0xC0, 0xFD, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_shuffle.xpm0000644000175000000620000000106710113625016017463 0ustar muammarstaff/* XPM */ static char * xpm_shuffle_xpm[] = { "20 20 2 1", ". c None", "+ c #000000", "....................", "....................", "....................", "...............++...", "....++++++++...++...", "....+...............", "....+...............", "....+...............", "....+..........+....", "..+++++.......+++...", "...+++.......+++++..", "....+..........+....", "...............+....", "...............+....", "...............+....", "...++...++++++++....", "...++...............", "....................", "....................", "...................."}; mtpaint-3.40/src/icons1/xbm_select.xbm0000644000175000000620000000073510122024706017252 0ustar muammarstaff#define xbm_select_width 20 #define xbm_select_height 20 static unsigned char xbm_select_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/icon.xpm0000644000175000000620000000666610147636762016126 0ustar muammarstaff/* XPM */ static char *icon_xpm[] = { "32 32 80 2", "00 c #000000", "01 c #0C0000", "02 c #4A0000", "03 c #7C0000", "04 c #A10000", "05 c #AD0000", "06 c #C60000", "07 c #FF0000", "08 c #BB120E", "09 c #F41408", "0A c #B11A0B", "0B c #CE5C42", "0C c #9F421B", "0D c #CE5623", "0E c #FE6A2B", "0F c #DE5D26", "10 c #5F2810", "11 c #100703", "12 c #8E5B44", "13 c #F9773B", "14 c #D8A980", "15 c #E4AD7A", "16 c #907255", "17 c #090900", "18 c #101000", "19 c #373700", "1A c #505040", "1B c #5C5C00", "1C c #606000", "1D c #777700", "1E c #818100", "1F c #939300", "20 c #9A9A00", "21 c #9F9F00", "22 c #BABA95", "23 c #CFCF00", "24 c #D0D000", "25 c #D5D500", "26 c #DFDF00", "27 c #D5D5AA", "28 c #E5E56A", "29 c #FAFA15", "2A c #FFFF00", "2B c #8E930E", "2C c #D3D77B", "2D c #B9C742", "2E c #BDC99A", "2F c #7B9244", "30 c #B3C393", "31 c #859F55", "32 c #A8BE8C", "33 c #9EB985", "34 c #95B280", "35 c #8CAA7C", "36 c #82A377", "37 c #293729", "38 c #5F805F", "39 c #6D926D", "3A c #B9C4BB", "3B c #B5CDCA", "3C c #728C94", "3D c #8BC2F4", "3E c #080C10", "3F c #304860", "40 c #80BFFF", "41 c #70A7DF", "42 c #689BCF", "43 c #50779F", "44 c #6279A4", "45 c #8F9CC2", "46 c #5464BF", "47 c #7783FF", "48 c #5458ED", "49 c #050510", "4A c #1E1E60", "4B c #32329F", "4C c #4141CF", "4D c #4646DF", "4E c #5050FF", "4F c #8080FF", "0000000000000000000000000000000000000000000000000000000000000000", "00000000000A0000000000000000002000000000000000000046000000000000", "000000000209100000000000000019241C000000000000004A473F0000000000", "0000000005070F000000000000001E2526000000000000004D4F410000000000", "00000037160B141A000000000037312D2C1A0000000000373C453A1A00000000", "0000003836332E2200000000003836332E2200000000003836332E2200000000", "00003739353330271A0000003739353330271A0000003739353330271A000000", "0000383934333227220000003839343332272200000038393433322722000000", "0000081233333315130000002B2F333333282900000048443333333B3D000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000006060707070E0E0000001F1F2525252A2A0000004E4E4F4F4F4040000000", "000004060707070E0D0000001D1F2525252A230000004C4E4F4F4F4042000000", "000001030707070C11000000171B2525252118000000494B4F4F4F433E000000", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000000" }; mtpaint-3.40/src/icons1/xbm_slash_mask.xbm0000644000175000000620000000075110126235254020124 0ustar muammarstaff#define xbm_slash_mask_width 20 #define xbm_slash_mask_height 20 static unsigned char xbm_slash_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x0c, 0xff, 0x01, 0x0e, 0xff, 0x03, 0x07, 0xff, 0x83, 0x03, 0x7f, 0xc0, 0x01, 0xf7, 0xe0, 0x00, 0xf3, 0x70, 0x00, 0xe0, 0x39, 0x00, 0xe0, 0x1d, 0x00, 0xc0, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_rect1.xpm0000644000175000000620000000112310142753306017044 0ustar muammarstaff/* XPM */ static char *xpm_rect1_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FF0000", "3 c #FFFF00", " ", " 1111111111111111", " 1111111111111111", " 11 11", " 11 11", "222222222222222 11", "222222222222222 11", "22 11 22 11", "22 11 22 11", "22 11 22 11", "22 11 22 11", "22 11 22 11", "22 11 22 11", "22 11 22 11", "22 1111111112211111", "22 1111111112211111", "22 22 ", "22 22 ", "222222222222222 ", "222222222222222 " }; mtpaint-3.40/src/icons1/xbm_n7x7.xbm0000644000175000000620000000102210635672204016577 0ustar muammarstaff#define xbm_n7x7_width 7 #define xbm_n7x7_height 70 static unsigned char xbm_n7x7_bits[] = { 0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x66, 0x60, 0x30, 0x18, 0x0C, 0x7E, 0x3C, 0x66, 0x60, 0x38, 0x60, 0x66, 0x3C, 0x30, 0x38, 0x3C, 0x36, 0x7E, 0x30, 0x30, 0x7E, 0x06, 0x3E, 0x60, 0x60, 0x66, 0x3C, 0x38, 0x0C, 0x06, 0x3E, 0x66, 0x66, 0x3C, 0x7E, 0x60, 0x30, 0x30, 0x18, 0x18, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x3C, 0x66, 0x66, 0x7C, 0x60, 0x30, 0x1C }; mtpaint-3.40/src/icons1/xbm_line.xbm0000644000175000000620000000071610132254624016726 0ustar muammarstaff#define xbm_line_width 20 #define xbm_line_height 20 static unsigned char xbm_line_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0xF0, 0x03, 0x0E, 0xF0, 0x03, 0x1E, 0x80, 0x03, 0x3E, 0xF0, 0x03, 0x7E, 0xF0, 0x03, 0xFE, 0xC0, 0x03, 0xFE, 0xF1, 0x03, 0x3E, 0xF0, 0x03, 0x36, 0x80, 0x03, 0x62, 0xF0, 0x03, 0x60, 0xF0, 0x03, 0xC0, 0xC0, 0x03, 0xC0, 0xF0, 0x03, 0x00, 0xF0, 0x03, 0x00, 0x80, 0x03, 0x00, 0xF0, 0x03, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_paste.xpm0000644000175000000620000000125610263256634017157 0ustar muammarstaff/* XPM */ static char *xpm_paste_xpm[] = { "20 20 10 1", " c None", "1 c #000000", "2 c #FFFF92", "3 c #FFFFFF", "4 c #49DB00", "5 c #40CC05", "6 c #36BD0A", "7 c #2DAE10", "8 c #239F15", "9 c #1A901A", " ", " ", " 1111 ", " 111112211111 ", " 11441211214411 ", " 14412222221441 ", " 15411111111541 ", " 15555555555551 ", " 16565656565651 ", " 16666661111111 ", " 176767613333331 ", " 1777777133333331 ", " 18787871333333331 ", " 18888881311111131 ", " 19898981333333331 ", " 11999991333333331 ", " 1111111311111131 ", " 1333333331 ", " 1111111111 ", " " }; mtpaint-3.40/src/icons1/xbm_grad.xbm0000644000175000000620000000071510524377044016722 0ustar muammarstaff#define xbm_grad_width 20 #define xbm_grad_height 20 static unsigned char xbm_grad_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x40, 0x00, 0x0E, 0x40, 0x00, 0x1E, 0xF0, 0x01, 0x3E, 0x40, 0x00, 0x7E, 0x40, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x41, 0x00, 0x3E, 0x00, 0x00, 0x36, 0x40, 0x00, 0x62, 0x00, 0x00, 0x60, 0x40, 0x00, 0xC0, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_cline.xpm0000644000175000000620000000110410747565500017127 0ustar muammarstaff/* XPM */ static char *xpm_cline_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFFFF", " ", " ", " ", " 11111111111111 ", " 12222222222221 ", " 12222222222221 ", " 12112222222221 ", " 12112111111121 ", " 12222222222221 ", " 12112222222221 ", " 12112111111121 ", " 12222222222221 ", " 12112222222221 ", " 12112111111121 ", " 12222222222221 ", " 12222222222221 ", " 11111111111111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_smudge.xbm0000644000175000000620000000072410163365710017265 0ustar muammarstaff#define xbm_smudge_width 20 #define xbm_smudge_height 20 static unsigned char xbm_smudge_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x7E, 0x00, 0x00, 0xFE, 0x80, 0x07, 0xFE, 0xC1, 0x07, 0x3E, 0xA0, 0x07, 0x36, 0xD0, 0x07, 0x62, 0xA8, 0x02, 0x60, 0x50, 0x01, 0xC0, 0xA8, 0x00, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_mode_cont.xpm0000644000175000000620000000122510403273200017766 0ustar muammarstaff/* XPM */ static char *xpm_mode_cont_xpm[] = { "22 22 2 1", " c None", "1 c #000000", " ", " ", " ", " ", " 111 111 ", " 111 111 ", " 111 111 111 ", " 111 ", " 111 ", " ", " 111111 ", " 111111111 ", " 111111111111 ", " 1111111111 ", " 1111111 ", " 11111 ", " 11111 ", " 1111 ", " 1111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_picker_mask.xbm0000644000175000000620000000076310745307166020303 0ustar muammarstaff#define xbm_picker_mask_width 17 #define xbm_picker_mask_height 17 #define xbm_picker_mask_x_hot 2 #define xbm_picker_mask_y_hot 16 static unsigned char xbm_picker_mask_bits[] = { 0x00, 0x70, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0xff, 0x01, 0x80, 0xff, 0x01, 0x00, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x80, 0x3f, 0x00, 0xc0, 0x3f, 0x00, 0xe0, 0x13, 0x00, 0xf0, 0x01, 0x00, 0xf8, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x02, 0x00, 0x00, }; mtpaint-3.40/src/icons1/xbm_polygon.xbm0000644000175000000620000000072710243330744017471 0ustar muammarstaff#define xbm_polygon_width 20 #define xbm_polygon_height 20 static unsigned char xbm_polygon_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x04, 0x06, 0x00, 0x04, 0x05, 0x00, 0x84, 0x04, 0x00, 0x40, 0x04, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_flood.xpm0000644000175000000620000000121710113673066017137 0ustar muammarstaff/* XPM */ static char * xpm_flood_xpm[] = { "20 20 8 1", ". c None", "+ c #000000", "@ c #505050", "# c #A0A0A0", "$ c #C8C8C8", "% c #FF2200", "& c #FFFFFF", "* c #787878", "....................", "....................", "....................", ".........++++.......", ".......++@@+#+......", "......+@@@@+$#+.....", ".....+@@@@+$$$#+....", "....%%%%%+$$&&$#+...", "...%%%%++$$&&&&$#+..", "..%%%++#$$&&&&&&$#+.", "..%%%+*#$$&&&&&&&$+.", ".%%%%.+*#$$&&&&&&$+.", ".%%%...+*#$$&&&&$+..", ".%%%....+*#$$&&$#+..", ".%%%.....+*#$$$#+...", ".%%%......+*##++....", ".%%%.......+++......", "..%.................", "..%.................", "...................."}; mtpaint-3.40/src/icons1/xpm_ellipse2.xpm0000644000175000000620000000112610171540300017536 0ustar muammarstaff/* XPM */ static char *xpm_ellipse2_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FF0000", "3 c #FFFF00", " 1 ", " 1111111 ", " 111111111 ", " 111 211 ", " 111222222222222 ", " 12222222222222222 ", " 222 11 222 ", "122 11 222", "222 11 22", "222 11 22", "122 11 222", "1222 11 222 ", "112222222222222222 ", " 1 222222222222 ", " 11 2 11 ", " 111 111 ", " 111 111 ", " 111111111 ", " 1111111 ", " 1 " }; mtpaint-3.40/src/icons1/xbm_slash.xbm0000644000175000000620000000073210126235174017111 0ustar muammarstaff#define xbm_slash_width 20 #define xbm_slash_height 20 static unsigned char xbm_slash_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0x00, 0x04, 0xfe, 0x01, 0x02, 0x3e, 0x00, 0x01, 0x36, 0x80, 0x00, 0x62, 0x40, 0x00, 0x60, 0x20, 0x00, 0xc0, 0x10, 0x00, 0xc0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_mode_mask.xpm0000644000175000000620000000126310425705324017773 0ustar muammarstaff/* XPM */ static char *xpm_mode_mask_xpm[] = { "22 22 4 1", " c None", "1 c #FFFF00", "2 c #FF6D00", "3 c #000000", " ", " ", " 3333 3 3 ", " 3111333 3 3 1 3 ", " 311111133 3 1 1 1 ", " 3111111111 1 1 1 3 ", " 311331111 1 1 3 1 ", " 3113333111 3 3 1 3 ", " 311133331 3 3 1 1 ", " 3111133311 3 1 1 3 ", " 311111111 1 1 1 1 ", " 3111111111 1 1 1 3 ", " 311331111 1 1 3 1 ", " 3113333111 3 3 1 3 ", " 31133333 3 3 1 3 ", " 311133333 3 1 1 ", " 3111333 3 1 1 ", " 3111111 1 1 ", " 31111 1 1 ", " 33111 3 ", " 33 3 ", " " }; mtpaint-3.40/src/icons1/xpm_down.xpm0000644000175000000620000000121610265024462017000 0ustar muammarstaff/* XPM */ static char *xpm_down_xpm[] = { "20 20 8 1", " c None", "1 c #000000", "2 c #FFFF6D", "3 c #F0F066", "4 c #E2E25F", "5 c #D3D357", "6 c #C5C550", "7 c #B6B649", " ", " ", " ", " 111111 ", " 144551 ", " 134451 ", " 144551 ", " 134451 ", " 11111445511111 ", " 12223344556671 ", " 11233445566711 ", " 112334455611 ", " 1134455611 ", " 11344511 ", " 114511 ", " 1111 ", " 11 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_circle_mask.xbm0000644000175000000620000000074310132254242020247 0ustar muammarstaff#define xbm_circle_mask_width 20 #define xbm_circle_mask_height 20 static unsigned char xbm_circle_mask_bits[] = { 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0xFF, 0xF1, 0x03, 0xFF, 0xFB, 0x07, 0xFF, 0x3B, 0x07, 0x7F, 0x1C, 0x0E, 0xF7, 0x1C, 0x0E, 0xF3, 0x38, 0x07, 0xE0, 0xF9, 0x07, 0xE0, 0xF1, 0x03, 0xC0, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_spray.xbm0000644000175000000620000000100710147103036017123 0ustar muammarstaff#define xbm_spray_width 20 #define xbm_spray_height 20 #define xbm_spray_x_hot 10 #define xbm_spray_y_hot 10 static unsigned char xbm_spray_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x7E, 0x00, 0x00, 0xFE, 0x88, 0x04, 0xFE, 0x21, 0x00, 0x3E, 0x00, 0x05, 0x36, 0x40, 0x00, 0x62, 0x28, 0x02, 0x60, 0x00, 0x00, 0xC0, 0x10, 0x01, 0xC0, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_flood_mask.xbm0000644000175000000620000000075110121572422020111 0ustar muammarstaff#define xbm_flood_mask_width 20 #define xbm_flood_mask_height 20 static unsigned char xbm_flood_mask_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x3f, 0x00, 0xc0, 0x7f, 0x00, 0xe0, 0xff, 0x00, 0xf0, 0xff, 0x01, 0xf8, 0xff, 0x03, 0xfc, 0xff, 0x07, 0xfe, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xdf, 0xff, 0x07, 0x9f, 0xff, 0x07, 0x1f, 0xff, 0x03, 0x1f, 0xfe, 0x01, 0x1f, 0xfc, 0x00, 0x0e, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x04, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_select.xpm0000644000175000000620000000112410122025364017300 0ustar muammarstaff/* XPM */ static char * xpm_select_xpm[] = { "20 20 4 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #FF0000", " ", " ", " ", " ...+++..+++... ", " +@@@@@@@@@@@@+ ", " +@@@@@@@@@@@@+ ", " +@@@@@@@@@@@@+ ", " .@@@@@@@@@@@@. ", " .@@@@@@@@@@@@. ", " .@@@@@@@@@@@@. ", " +@@@@@@@@@@@@+ ", " +@@@@@@@@@@@@+ ", " +@@@@@@@@@@@@+ ", " .@@@@@@@@@@@@. ", " .@@@@@@@@@@@@. ", " +@@@@@@@@@@@@+ ", " ++..+++++...++ ", " ", " ", " "}; mtpaint-3.40/src/icons1/xpm_flip_vs.xpm0000644000175000000620000000114410142162326017467 0ustar muammarstaff/* XPM */ static char *xpm_flip_vs_xpm[] = { "20 20 5 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #B4B4B4", "4 c #FF0000", " 222111222", " 144444441", " 1 11 144444441", " 111 1211 144444441", "11111 1222 244444442", " 1 1222 244444442", " 1 1222 244444442", " 1 1222 144444441", " 1 1111 111222111", " 1 ", " 1 ", " 1 11111111111111", " 1 133333333311 ", " 1 1333333311 ", " 1 13333311 ", "11111 133311 ", " 111 1311 ", " 1 11 ", " ", " " }; mtpaint-3.40/src/icons1/xbm_grad_mask.xbm0000644000175000000620000000073410524377274017743 0ustar muammarstaff#define xbm_grad_mask_width 20 #define xbm_grad_mask_height 20 static unsigned char xbm_grad_mask_bits[] = { 0x02, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x0F, 0xE0, 0x00, 0x1F, 0xF8, 0x03, 0x3F, 0xF8, 0x03, 0x7F, 0xF8, 0x03, 0xFF, 0xE0, 0x00, 0xFF, 0xE1, 0x00, 0xFF, 0xE3, 0x00, 0xFF, 0xE3, 0x00, 0x7F, 0xE0, 0x00, 0xF7, 0xE0, 0x00, 0xF3, 0xE0, 0x00, 0xE0, 0xE1, 0x00, 0xE0, 0xE1, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0xF8, 0x03, 0x00, 0xF8, 0x03, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00 }; mtpaint-3.40/src/icons1/xpm_clone.xpm0000644000175000000620000000110410254604734017131 0ustar muammarstaff/* XPM */ static char *xpm_clone_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFFFF", " ", " ", " 1111 1111 ", " 122221 122221 ", " 12222221 12222221 ", " 12222221 12222221 ", " 12222221 12222221 ", " 122221 122221 ", " 1221 1221 ", " 111221111111122111 ", "12222222222222222221", "12222222222222222221", " 111221111111122111 ", " 1221 1221 ", " 1221 1221 ", " 122221 122221 ", " 12211221 12211221 ", "1221 12211221 1221", " 11 11 11 11 ", " " }; mtpaint-3.40/src/icons1/xpm_rotate_cs.xpm0000644000175000000620000000112710142163022020003 0ustar muammarstaff/* XPM */ static char *xpm_rotate_cs_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #FF0000", " ", " 222111222 ", " 133333331 ", " 133333331 ", " 133333331 ", " 233333332 ", " 11 233333332 ", " 1111 233333332 ", " 111111 133333331 ", "11111111 111222111 ", " 11 11 ", " 11 11 ", " 11 11 ", " 11 11 ", " 111 111 ", " 11111111 ", " 1111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_horizontal.xbm0000644000175000000620000000075110126234520020163 0ustar muammarstaff#define xbm_horizontal_width 20 #define xbm_horizontal_height 20 static unsigned char xbm_horizontal_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x3e, 0x00, 0x00, 0x36, 0xf8, 0x07, 0x62, 0xf8, 0x07, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_circle.xbm0000644000175000000620000000073510126233632017240 0ustar muammarstaff#define xbm_circle_width 20 #define xbm_circle_height 20 static unsigned char xbm_circle_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0xc0, 0x00, 0xfe, 0x31, 0x03, 0x3e, 0x10, 0x02, 0x36, 0x08, 0x04, 0x62, 0x08, 0x04, 0x60, 0x10, 0x02, 0xc0, 0x30, 0x03, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_newdir.xpm0000644000175000000620000000127610734702576017341 0ustar muammarstaff/* XPM */ static char *xpm_newdir_xpm[] = { "20 20 11 1", " c None", "1 c #000000", "2 c #FFFF92", "3 c #49DB00", "4 c #44D303", "5 c #40CC05", "6 c #3BC408", "7 c #36BD0B", "8 c #32B50D", "9 c #2DAE10", "A c #FFFF00", " 1A1 ", " 1 1A1 1 ", " 1A11A11A1 ", " 11111 1A1A1A1 ", " 12222211111AAA1111", " 12222221AAAAAAAAAAA", " 122222221111AAA1111", " 12222222221A1A1A1 ", " 1222111111A11A11A1 ", " 1222133333131A1311 ", " 1221444444441A141 ", " 12215555555551551 ", " 1216666666666661 ", " 1217777777777771 ", " 118888888888881 ", " 119999999999991 ", " 11111111111111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_open.xpm0000644000175000000620000000125510263314026016771 0ustar muammarstaff/* XPM */ static char *xpm_open_xpm[] = { "20 20 10 1", " c None", "1 c #000000", "2 c #FFFF92", "3 c #49DB00", "4 c #44D303", "5 c #40CC05", "6 c #3BC408", "7 c #36BD0B", "8 c #32B50D", "9 c #2DAE10", " ", " ", " ", " 11111 ", " 1222221 ", " 12222222111111 ", " 12222222222221 ", " 12222222222221 ", " 122211111111111111 ", " 122213333333333331 ", " 12214444444444441 ", " 12215555555555551 ", " 1216666666666661 ", " 1217777777777771 ", " 118888888888881 ", " 119999999999991 ", " 11111111111111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_horizontal_mask.xbm0000644000175000000620000000077010126234514021202 0ustar muammarstaff#define xbm_horizontal_mask_width 20 #define xbm_horizontal_mask_height 20 static unsigned char xbm_horizontal_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x01, 0x00, 0xff, 0x03, 0x00, 0xff, 0xff, 0x0f, 0x7f, 0xfc, 0x0f, 0xf7, 0xfc, 0x0f, 0xf3, 0xfc, 0x0f, 0xe0, 0x01, 0x00, 0xe0, 0x01, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_rect2.xpm0000644000175000000620000000112310142753326017047 0ustar muammarstaff/* XPM */ static char *xpm_rect2_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FF0000", "3 c #FFFF00", " ", " 1111111111111111", " 1111111111111111", " 1111111111111111", " 1111111111111111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "22222222222222211111", "222222222222222 ", "222222222222222 ", "222222222222222 ", "222222222222222 " }; mtpaint-3.40/src/icons1/xpm_case.xpm0000644000175000000620000000112210734702576016752 0ustar muammarstaff/* XPM */ static char *xpm_case_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FF4949", "3 c #FFFFFF", " ", " ", " ", " 11111 ", " 1133311 ", " 1333331 ", " 1333331 ", " 113333311 ", " 133133331 ", " 1133133331 ", " 13311133311 ", " 13311133331 ", " 113333333331 ", " 1331111133311 ", " 1331 133331 ", " 1113111 11133311 ", " 1333331 13333331 ", " 1111111 11111111 ", " ", " " }; mtpaint-3.40/src/icons1/xpm_mode_tint.xpm0000644000175000000620000000307410403273744020022 0ustar muammarstaff/* XPM */ static char *xpm_mode_tint_xpm[] = { "22 22 30 2", " c None", "01 c #FFFFFF", "02 c #EDEDED", "03 c #DBDBDB", "04 c #C8C8C8", "05 c #B6B6B6", "06 c #A4A4A4", "07 c #929292", "08 c #7F7F7F", "09 c #6D6D6D", "0A c #5B5B5B", "0B c #494949", "0C c #373737", "0D c #242424", "0E c #121212", "0F c #000000", "10 c #00FF00", "11 c #00ED00", "12 c #00DB00", "13 c #00C800", "14 c #00B600", "15 c #00A400", "16 c #009200", "17 c #007F00", "18 c #006D00", "19 c #005B00", "1A c #004900", "1B c #003700", "1C c #002400", "1D c #001200", " ", " ", " ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_smudge_mask.xbm0000644000175000000620000000074310476322246020305 0ustar muammarstaff#define xbm_smudge_mask_width 20 #define xbm_smudge_mask_height 20 static unsigned char xbm_smudge_mask_bits[] = { 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xFF, 0x80, 0x0F, 0xFF, 0xC1, 0x0F, 0xFF, 0xE3, 0x0F, 0xFF, 0xF3, 0x0F, 0x7F, 0xF8, 0x0F, 0xF7, 0xFC, 0x07, 0xF3, 0xFC, 0x03, 0xE0, 0xFD, 0x01, 0xE0, 0xF9, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_text.xpm0000644000175000000620000000106410262741314017015 0ustar muammarstaff/* XPM */ static char *xpm_text_xpm[] = { "20 20 2 1", " c None", "1 c #000000", " ", " 11111111111111111 ", " 11111111111111111 ", " 111 111 111 ", " 11 111 11 ", " 1 111 1 ", " 111 ", " 111 ", " 111 ", " 111 ", " 111 ", " 111 ", " 111 ", " 111 ", " 111 ", " 111 ", " 11111 ", " 1111111 ", " 111111111 ", " " }; mtpaint-3.40/src/icons1/xbm_backslash.xbm0000644000175000000620000000074610126235536017741 0ustar muammarstaff#define xbm_backslash_width 20 #define xbm_backslash_height 20 static unsigned char xbm_backslash_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0x08, 0x00, 0xfe, 0x11, 0x00, 0x3e, 0x20, 0x00, 0x36, 0x40, 0x00, 0x62, 0x80, 0x00, 0x60, 0x00, 0x01, 0xc0, 0x00, 0x02, 0xc0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_clone_mask.xbm0000644000175000000620000000074010255022414020103 0ustar muammarstaff#define xbm_clone_mask_width 20 #define xbm_clone_mask_height 20 static unsigned char xbm_clone_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x71, 0x00, 0xFF, 0xFB, 0x00, 0xFF, 0xFB, 0x00, 0x7F, 0xF8, 0x00, 0xF7, 0xFC, 0x01, 0xF3, 0xF8, 0x00, 0xE0, 0xF9, 0x00, 0xE0, 0xDD, 0x01, 0xC0, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_square_mask.xbm0000644000175000000620000000074310476322246020321 0ustar muammarstaff#define xbm_square_mask_width 20 #define xbm_square_mask_height 20 static unsigned char xbm_square_mask_bits[] = { 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xFF, 0xFC, 0x0F, 0xFF, 0xFD, 0x0F, 0xFF, 0xFF, 0x0F, 0xFF, 0x1F, 0x0E, 0x7F, 0x1C, 0x0E, 0xF7, 0x1C, 0x0E, 0xF3, 0x1C, 0x0E, 0xE0, 0xFD, 0x0F, 0xE0, 0xFD, 0x0F, 0xC0, 0xFD, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_new.xpm0000644000175000000620000000110210262741230016610 0ustar muammarstaff/* XPM */ static char *xpm_new_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFFFF", " ", " ", " ", " 1111111 ", " 12222211 ", " 122222121 ", " 1222221221 ", " 12222212221 ", " 122222111111 ", " 122222222221 ", " 122222222221 ", " 122222222221 ", " 122222222221 ", " 122222222221 ", " 122222222221 ", " 122222222221 ", " 111111111111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_ring4.xbm0000644000175000000620000000041210631324312017007 0ustar muammarstaff#define xbm_ring4_width 9 #define xbm_ring4_height 9 #define xbm_ring4_x_hot 4 #define xbm_ring4_y_hot 4 static unsigned char xbm_ring4_bits[] = { 0x00, 0x00, 0x38, 0x00, 0x44, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x44, 0x00, 0x38, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_redo.xpm0000644000175000000620000000121610262744700016763 0ustar muammarstaff/* XPM */ static char *xpm_redo_xpm[] = { "20 20 8 1", " c None", "1 c #000000", "2 c #FFFF6D", "3 c #F0F066", "4 c #E2E25F", "5 c #D3D357", "6 c #C5C550", "7 c #B6B649", " ", " ", " ", " 111 ", " 1211 ", " 12211 ", " 123211 ", " 111111333311 ", " 1434343434311 ", " 14444444444411 ", " 15454545454511 ", " 1555555555511 ", " 111111565611 ", " 166611 ", " 16711 ", " 1711 ", " 111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_rotate_as.xpm0000644000175000000620000000112710142162754020014 0ustar muammarstaff/* XPM */ static char *xpm_rotate_as_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #FF0000", " ", " 222111222 ", " 133333331 ", " 133333331 ", " 133333331 ", " 233333332 ", " 233333332 11 ", " 233333332 1111 ", " 133333331 111111 ", " 111222111 11111111", " 11 11 ", " 11 11 ", " 11 11 ", " 11 11 ", " 111 111 ", " 11111111 ", " 1111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_save.xpm0000644000175000000620000000131310265257066016775 0ustar muammarstaff/* XPM */ static char *xpm_save_xpm[] = { "20 20 12 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #DBDBDB", "4 c #B6B6B6", "5 c #929292", "6 c #00B6FF", "7 c #00A4FB", "8 c #0092F8", "9 c #007FF4", "A c #006DF1", "B c #005BED", " ", " ", " 1111111111111111 ", " 1666666666666661 ", " 1662222222222661 ", " 1672222222222671 ", " 1772222222222771 ", " 1782222222222781 ", " 1882222222222881 ", " 1892222222222891 ", " 1999999999999991 ", " 1999999999999991 ", " 19A443323344A9A1 ", " 1AA431133444AAA1 ", " 1AB331B34445BAB1 ", " 1BB321B44455BBB1 ", " 1B233444555BBB1 ", " 11111111111111 ", " ", " " }; mtpaint-3.40/src/icons1/xbm_select_mask.xbm0000644000175000000620000000075410122025016020261 0ustar muammarstaff#define xbm_select_mask_width 20 #define xbm_select_mask_height 20 static unsigned char xbm_select_mask_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0xf8, 0xf1, 0x03, 0xf8, 0xf1, 0x03, 0xf8, 0xf1, 0x03, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_centre.xpm0000644000175000000620000000112410265260130017301 0ustar muammarstaff/* XPM */ static char *xpm_centre_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #B4B4B4", "3 c #FFFF00", " ", " ", " 1111111111111111 ", " 1222222222222221 ", " 1222222222222221 ", " 1222222222222221 ", " 1222222222222221 ", " 1222211111122221 ", " 1222213333122221 ", " 1222213333122221 ", " 1222213333122221 ", " 1222213333122221 ", " 1222211111122221 ", " 1222222222222221 ", " 1222222222222221 ", " 1222222222222221 ", " 1222222222222221 ", " 1111111111111111 ", " ", " " }; mtpaint-3.40/src/icons1/xpm_brcosa.xpm0000644000175000000620000000131510151171232017272 0ustar muammarstaff/* XPM */ static char *xpm_brcosa_xpm[] = { "20 20 12 1", " c None", "1 c #000000", "2 c #FFFF00", "3 c #FFE300", "4 c #FFC600", "5 c #FFAA00", "6 c #FF8E00", "7 c #FF7100", "8 c #FF5500", "9 c #FF3900", "A c #FF1C00", "B c #FF0000", " 11 ", " 11 11 11 ", " 111 11 111 ", " 111 111 ", " 11 1111 11 ", " 11876511 ", " 1A98765431 ", " 1A98765431 ", " 1BA987654321 ", "111 1BA987654321 111", "111 1BA987654321 111", " 1BA987654321 ", " 1A98765431 ", " 1A98765431 ", " 11876511 ", " 11 1111 11 ", " 111 111 ", " 111 11 111 ", " 11 11 11 ", " 11 " }; mtpaint-3.40/src/icons1/xpm_flip_hs.xpm0000644000175000000620000000114410142162326017451 0ustar muammarstaff/* XPM */ static char *xpm_flip_hs_xpm[] = { "20 20 5 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #B4B4B4", "4 c #FF0000", " 1 222111222", " 1 144444441", " 11 144444441", " 11 144444441", " 121 244444442", " 121 244444442", " 1221 244444442", " 1221 144444441", " 12221 111222111", " 12221 ", " 122221 133331 ", " 122221 133331 ", " 1222221 1333331 ", " 1111111 1111111 ", " ", " 1 1 ", " 11 11 ", " 1111111111111111 ", " 11 11 ", " 1 1 " }; mtpaint-3.40/src/icons1/xbm_flood.xbm0000644000175000000620000000073210121571720017075 0ustar muammarstaff#define xbm_flood_width 20 #define xbm_flood_height 20 static unsigned char xbm_flood_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x29, 0x00, 0x40, 0x48, 0x00, 0x20, 0x84, 0x00, 0xf0, 0x03, 0x01, 0xf8, 0x01, 0x02, 0x7c, 0x00, 0x04, 0x3c, 0x00, 0x04, 0x5e, 0x00, 0x04, 0x8e, 0x00, 0x02, 0x0e, 0x01, 0x02, 0x0e, 0x02, 0x01, 0x0e, 0xc4, 0x00, 0x0e, 0x38, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_patterns.xbm0000644000175000000620000001155710707114162017644 0ustar muammarstaff#define xbm_patterns_width 80 #define xbm_patterns_height 80 static unsigned char xbm_patterns_bits[] = { 0x00, 0x11, 0x11, 0x55, 0x55, 0x55, 0x55, 0x55, 0xAA, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0xAA, 0x55, 0x33, 0x00, 0x00, 0x44, 0x44, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x55, 0xCC, 0x00, 0x11, 0x11, 0x55, 0x55, 0x55, 0x55, 0x55, 0xAA, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0xAA, 0x55, 0x33, 0x00, 0x00, 0x44, 0x44, 0x55, 0x55, 0x55, 0x55, 0xAA, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x55, 0xCC, 0xC3, 0xC0, 0x40, 0x44, 0xC1, 0xE3, 0x00, 0x30, 0x00, 0x33, 0xE1, 0x60, 0x20, 0x22, 0x63, 0xF7, 0x22, 0xCC, 0x66, 0x0C, 0xF0, 0x30, 0x10, 0x11, 0x36, 0x7F, 0x11, 0x03, 0x66, 0x33, 0x78, 0x18, 0x08, 0x88, 0x1C, 0x3E, 0x88, 0x00, 0x00, 0xC0, 0x3C, 0x0C, 0x04, 0x44, 0x1C, 0x3E, 0x00, 0x30, 0x00, 0x33, 0x1E, 0x06, 0x02, 0x22, 0x36, 0x7F, 0x22, 0xCC, 0x66, 0x0C, 0x0F, 0x03, 0x01, 0x11, 0x63, 0xF7, 0x11, 0x03, 0x66, 0x33, 0x87, 0x81, 0x80, 0x88, 0xC1, 0xE3, 0x08, 0x00, 0x00, 0xC0, 0x0F, 0x03, 0x01, 0x11, 0x41, 0x55, 0x00, 0x6C, 0x0F, 0x03, 0x1E, 0x06, 0x02, 0x22, 0x22, 0x22, 0x08, 0xC6, 0x0F, 0x0C, 0x3C, 0x0C, 0x04, 0x44, 0x14, 0x55, 0x11, 0x93, 0x0F, 0x30, 0x78, 0x18, 0x08, 0x88, 0x08, 0x88, 0x22, 0x39, 0x0F, 0xC0, 0xF0, 0x30, 0x10, 0x11, 0x14, 0x55, 0x00, 0x6C, 0xF0, 0x03, 0xE1, 0x60, 0x20, 0x22, 0x22, 0x22, 0x88, 0xC6, 0xF0, 0x0C, 0xC3, 0xC0, 0x40, 0x44, 0x41, 0x55, 0x11, 0x93, 0xF0, 0x30, 0x87, 0x81, 0x80, 0x88, 0x80, 0x88, 0x22, 0x39, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x22, 0xFF, 0x11, 0x10, 0x00, 0x88, 0xFF, 0xFF, 0xFF, 0x02, 0x22, 0xFF, 0x00, 0x38, 0x00, 0x88, 0x00, 0x00, 0x00, 0x02, 0x22, 0x03, 0x10, 0x7C, 0x00, 0x44, 0x00, 0x00, 0xFF, 0x02, 0x22, 0x03, 0x00, 0xFE, 0x18, 0x44, 0x00, 0x00, 0x00, 0x02, 0x22, 0x03, 0x55, 0xEF, 0x18, 0x22, 0x00, 0xFF, 0xFF, 0x02, 0x22, 0x03, 0x00, 0xC7, 0x00, 0x22, 0x00, 0x00, 0x00, 0x02, 0x22, 0x03, 0x10, 0x83, 0x00, 0x11, 0x00, 0x00, 0xFF, 0x02, 0x22, 0x03, 0x00, 0x01, 0x00, 0x11, 0x00, 0x00, 0x22, 0x02, 0x22, 0x02, 0x22, 0x00, 0x08, 0x11, 0x55, 0x55, 0xDD, 0x00, 0x00, 0x55, 0x55, 0x55, 0x14, 0x11, 0x00, 0x00, 0x22, 0x02, 0x22, 0x02, 0x22, 0x00, 0x2A, 0x22, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x11, 0x55, 0x22, 0x00, 0x00, 0x22, 0x02, 0x22, 0x02, 0x22, 0x82, 0x2A, 0x44, 0x00, 0x55, 0xDD, 0x00, 0x00, 0x00, 0x55, 0x44, 0x14, 0x44, 0x00, 0x00, 0x22, 0x02, 0x22, 0x02, 0x22, 0x28, 0x08, 0x88, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x88, 0x00, 0x00, 0xAA, 0x06, 0x66, 0x02, 0x22, 0x08, 0x08, 0xC0, 0xFF, 0xFF, 0xAA, 0x06, 0x66, 0xFF, 0xFF, 0x1C, 0x1C, 0x30, 0xFF, 0xFF, 0xAA, 0x06, 0x66, 0x02, 0x22, 0x3E, 0x3E, 0x0C, 0x00, 0x00, 0xAA, 0x06, 0x66, 0x02, 0x22, 0xFF, 0x7F, 0x03, 0x00, 0x00, 0xAA, 0x06, 0x66, 0x02, 0x22, 0x3E, 0x3E, 0xC0, 0x00, 0xFF, 0xAA, 0x06, 0x66, 0x02, 0xFF, 0x1C, 0x1C, 0x30, 0x00, 0xFF, 0xAA, 0x06, 0x66, 0x02, 0x22, 0x08, 0x08, 0x0C, 0x00, 0x00, 0xAA, 0x06, 0x66, 0x02, 0x22, 0x08, 0x00, 0x03, 0x71, 0x18, 0x00, 0x00, 0x80, 0x11, 0xEE, 0x08, 0x08, 0x38, 0xBB, 0x0C, 0x10, 0x00, 0x80, 0x11, 0x19, 0x14, 0x14, 0x22, 0x17, 0x06, 0x20, 0x20, 0xAA, 0x11, 0x1F, 0x22, 0x22, 0x0E, 0x0E, 0x13, 0x40, 0x50, 0x14, 0x11, 0x1F, 0xC1, 0xC9, 0x22, 0x1D, 0x30, 0x00, 0x00, 0x08, 0x0A, 0xEE, 0x22, 0x22, 0x38, 0xBB, 0x60, 0x04, 0x00, 0x08, 0x04, 0x91, 0x14, 0x14, 0x22, 0xD1, 0xC0, 0x02, 0x02, 0xAA, 0x40, 0xF1, 0x08, 0x08, 0x0E, 0xE0, 0x80, 0x01, 0x05, 0x41, 0xA0, 0xF1, 0x08, 0x08, 0x22, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x08, 0x08, 0x00, 0xFF, 0x0F, 0x10, 0x6C, 0x10, 0x38, 0x01, 0x14, 0x14, 0x77, 0xFF, 0x0F, 0x38, 0xFE, 0x38, 0x38, 0x01, 0x22, 0x22, 0x22, 0xFF, 0x0F, 0x7C, 0xFE, 0x7C, 0xD6, 0x82, 0x41, 0x49, 0xAA, 0x00, 0x0F, 0x7C, 0x7C, 0xFE, 0xFE, 0x7C, 0x22, 0x22, 0x88, 0x00, 0x0F, 0x38, 0x38, 0xD6, 0xD6, 0x10, 0x14, 0x14, 0xDD, 0x00, 0x0F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x10, 0x10, 0x28, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x21, 0x88, 0x10, 0x08, 0x88, 0x20, 0x04, 0x81, 0x7E, 0x7E, 0x12, 0x44, 0x20, 0x04, 0x88, 0x20, 0x24, 0xA5, 0x42, 0x42, 0x84, 0x22, 0x50, 0x0A, 0x8F, 0x20, 0xEE, 0x81, 0x5A, 0x42, 0x48, 0x11, 0x88, 0x11, 0x88, 0xFF, 0x20, 0x81, 0x5A, 0x42, 0x21, 0x44, 0x05, 0xA0, 0x88, 0x02, 0x04, 0xBD, 0x42, 0x42, 0x12, 0x88, 0x02, 0x40, 0x88, 0x02, 0x77, 0x81, 0x7E, 0x7E, 0x84, 0x11, 0x04, 0x20, 0xF8, 0x02, 0x24, 0xFF, 0x00, 0x00, 0x48, 0x22, 0x08, 0x10, 0x88, 0xFF, 0x20, 0x00, 0x00, 0x11, 0x80, 0x01, 0x77, 0x71, 0x14, 0x00, 0x22, 0x02, 0xAA, 0x44, 0x80, 0x01, 0x51, 0x33, 0x36, 0x00, 0x2E, 0x00, 0x00, 0x11, 0xC0, 0x03, 0x57, 0x17, 0x77, 0xFF, 0x22, 0x00, 0x55, 0x44, 0x21, 0x84, 0x00, 0x00, 0x00, 0x88, 0x3A, 0x00, 0x00, 0x11, 0x12, 0x48, 0x75, 0x74, 0x77, 0xAA, 0x22, 0x00, 0xAA, 0x44, 0x0C, 0x30, 0x45, 0x66, 0x36, 0x22, 0x2E, 0x00, 0x00, 0x11, 0x30, 0x0C, 0x77, 0x47, 0x14, 0xFF, 0x22, 0x00, 0x55, 0x44, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x3A }; mtpaint-3.40/src/icons1/xbm_picker.xbm0000644000175000000620000000072410746363134017263 0ustar muammarstaff#define xbm_picker_width 17 #define xbm_picker_height 17 #define xbm_picker_x_hot 2 #define xbm_picker_y_hot 16 static unsigned char xbm_picker_bits[] = { 0x00, 0x70, 0x00, 0x00, 0x88, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x01, 0x80, 0x00, 0x01, 0x00, 0x81, 0x00, 0x00, 0x62, 0x00, 0x00, 0x27, 0x00, 0x80, 0x2B, 0x00, 0xC0, 0x11, 0x00, 0xE0, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_cut.xpm0000644000175000000620000000106310263261220016615 0ustar muammarstaff/* XPM */ static char *xpm_cut_xpm[] = { "20 20 2 1", " c None", "1 c #000000", " ", " ", " 1 1 ", " 11 11 ", " 11 11 ", " 11 11 ", " 11 11 ", " 11 11 ", " 11 11 ", " 1111 ", " 11 ", " 11 ", " 1111 ", " 11111 11111 ", " 11 11 11 11 ", " 1 1 1 1 ", " 11 11 11 11 ", " 111 111 ", " ", " " }; mtpaint-3.40/src/icons1/xpm_hidden.xpm0000644000175000000620000000110510734702576017273 0ustar muammarstaff/* XPM */ static char *xpm_hidden_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFFFF", " ", " ", " ", " 1111111 ", " 12222211 ", " 122222121 ", " 1222221221 ", " 122222122 1 ", " 12222211 1 1 ", " 1222222 2 2 ", " 122222 2 2 1 ", " 12222 2 2 2 ", " 1222 2 2 2 1 ", " 122 2 2 2 2 ", " 12 2 2 2 2 1 ", " 1 2 2 2 2 2 ", " 1 1 1 1 1 1 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_line.xpm0000644000175000000620000000110310132254770016753 0ustar muammarstaff/* XPM */ static char *xpm_line_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFFFF", " ", " 11111111 ", " 12222221 ", " 12222221 ", " 11112221 ", " 12222221 ", " 12222221 ", " 11122221 ", " 12222221 ", " 12222221 ", " 11112221 ", " 12222221 ", " 12222221 ", " 11122221 ", " 12222221 ", " 12222221 ", " 11112221 ", " 12222221 ", " 12222221 ", " 11111111 " }; mtpaint-3.40/src/icons1/xbm_square.xbm0000644000175000000620000000073510476322246017307 0ustar muammarstaff#define xbm_square_width 20 #define xbm_square_height 20 static unsigned char xbm_square_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0xf8, 0x07, 0xfe, 0x09, 0x04, 0x3e, 0x08, 0x04, 0x36, 0x08, 0x04, 0x62, 0x08, 0x04, 0x60, 0x08, 0x04, 0xc0, 0x08, 0x04, 0xc0, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_polygon.xpm0000644000175000000620000000112510243333232017511 0ustar muammarstaff/* XPM */ static char *xpm_polygon_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #FF0000", " ", " 1 ", " 11 ", " 2332 ", " 23332 ", " 233332 ", " 13333331 ", " 133333331 ", " 1333333331 ", " 233333333332 ", " 2333333333332 ", " 213333333333332 ", " 1133333333331 ", " 22333333331 ", " 2113333331 ", " 1133332 ", " 22332 ", " 2132 ", " 11 ", " " }; mtpaint-3.40/src/icons1/xpm_mode_blend.xpm0000644000175000000620000000137710605723626020137 0ustar muammarstaff/* XPM */ static char *xpm_mode_blend_xpm[] = { "22 22 9 1", " c None", "1 c #000000", "2 c #FF0000", "3 c #FF00FF", "4 c #FFFF00", "5 c #0000FF", "6 c #FFFFFF", "7 c #00FF00", "8 c #00FFFF", " ", " 1111 ", " 11222211 ", " 1222222221 ", " 122222222221 ", " 122222222221 ", " 12222222222221 ", " 12333322444421 ", " 1533333664444471 ", " 155333366664444771 ", " 155533366664447771 ", " 15555336666664477771 ", " 15555536666664777771 ", " 15555558666687777771 ", " 15555558888887777771 ", " 155555588887777771 ", " 155555588887777771 ", " 1555555887777771 ", " 11555511777711 ", " 1111 1111 ", " ", " " }; mtpaint-3.40/src/icons1/xbm_polygon_mask.xbm0000644000175000000620000000074610243331016020476 0ustar muammarstaff#define xbm_polygon_mask_width 20 #define xbm_polygon_mask_height 20 static unsigned char xbm_polygon_mask_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x04, 0x00, 0xF0, 0xE0, 0x01, 0xF8, 0xF1, 0x03, 0xF0, 0xE0, 0x01, 0x00, 0x04, 0x04, 0x00, 0x0E, 0x0E, 0x00, 0x0E, 0x0F, 0x00, 0x8E, 0x0F, 0x00, 0xCE, 0x0F, 0x00, 0xE4, 0x0F, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0x0F }; mtpaint-3.40/src/icons1/xbm_shuffle.xbm0000644000175000000620000000102110147103322017413 0ustar muammarstaff#define xbm_shuffle_width 20 #define xbm_shuffle_height 20 #define xbm_shuffle_x_hot 10 #define xbm_shuffle_y_hot 10 static unsigned char xbm_shuffle_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x7E, 0x00, 0x00, 0xFE, 0x78, 0x06, 0xFE, 0x09, 0x06, 0x3E, 0x08, 0x00, 0x36, 0x08, 0x00, 0x62, 0x00, 0x00, 0x60, 0x00, 0x04, 0xC0, 0x18, 0x04, 0xC0, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_close.xpm0000644000175000000620000000110410265203226017127 0ustar muammarstaff/* XPM */ static char *xpm_close_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FF0000", " ", " ", " ", " ", " 1 1 ", " 121 121 ", " 12221 12221 ", " 1222112221 ", " 12222221 ", " 122221 ", " 122221 ", " 12222221 ", " 1222112221 ", " 12221 12221 ", " 121 121 ", " 1 1 ", " ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_paint.xpm0000644000175000000620000000121710227431532017143 0ustar muammarstaff/* XPM */ static char *xpm_paint_xpm[] = { "20 20 8 1", " c None", "1 c #C8C8FF", "2 c #7878FF", "3 c #0000FF", "4 c #000000", "5 c #B6B678", "6 c #DBDBB4", "7 c #FFFFC8", " ", " 44444 ", " 432124 ", " 4321224 ", " 43212224 ", " 432122234 ", " 4321222334 ", " 4321222334 ", " 4321222334 ", " 4321222334 ", " 4321222334 ", " 476222334 ", " 467652334 ", " 47655534 ", " 46755544 ", " 425544 ", " 42344 ", " 434 ", " 44 ", " " }; mtpaint-3.40/src/icons1/xpm_up.xpm0000644000175000000620000000121410265024444016453 0ustar muammarstaff/* XPM */ static char *xpm_up_xpm[] = { "20 20 8 1", " c None", "1 c #000000", "2 c #FFFF6D", "3 c #F0F066", "4 c #E2E25F", "5 c #D3D357", "6 c #C5C550", "7 c #B6B649", " ", " ", " ", " 11 ", " 1111 ", " 114511 ", " 11344511 ", " 1134455611 ", " 112334455611 ", " 11233445566711 ", " 12223344556671 ", " 11111445511111 ", " 134451 ", " 144551 ", " 134451 ", " 144551 ", " 111111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_layers.xpm0000644000175000000620000000114310747565500017337 0ustar muammarstaff/* XPM */ static char *xpm_layers_xpm[] = { "20 20 5 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #E6E6E2", "4 c #CDCDFF", " ", " ", " ", " 1111111111 ", " 12222222221 ", " 12222222221 ", " 12222222221 ", " 12222222221111 ", " 11111111113331 ", " 13333333331 ", " 13333333331 ", " 13333333331111 ", " 11111111114441 ", " 14444444441 ", " 14444444441 ", " 14444444441 ", " 1111111111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_backslash_mask.xbm0000644000175000000620000000076510126235616020754 0ustar muammarstaff#define xbm_backslash_mask_width 20 #define xbm_backslash_mask_height 20 static unsigned char xbm_backslash_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0x0c, 0x00, 0xff, 0x1d, 0x00, 0xff, 0x3b, 0x00, 0xff, 0x73, 0x00, 0x7f, 0xe0, 0x00, 0xf7, 0xc0, 0x01, 0xf3, 0x80, 0x03, 0xe0, 0x01, 0x07, 0xe0, 0x01, 0x0e, 0xc0, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xbm_shuffle_mask.xbm0000644000175000000620000000074610147103374020452 0ustar muammarstaff#define xbm_shuffle_mask_width 20 #define xbm_shuffle_mask_height 20 static unsigned char xbm_shuffle_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xFF, 0xFC, 0x0F, 0xFF, 0xFD, 0x0F, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x0F, 0x7F, 0x3C, 0x0F, 0xF7, 0x3C, 0x0F, 0xF3, 0xFC, 0x0F, 0xE0, 0xFD, 0x0F, 0xE0, 0xFD, 0x0F, 0xC0, 0xFD, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_home.xpm0000644000175000000620000000101511124646600016755 0ustar muammarstaff/* XPM */ static char *xpm_home_xpm[] = { "18 18 5 1", " c None", "1 c #FFFFFF", "2 c #000000", "3 c #FFB650", "4 c #FF0000", " ", " 22 ", " 2332222 ", " 23443212 ", " 234444312 ", " 2344224432 ", " 234421124432 ", " 23442111124432 ", " 2344211111124432 ", "234421111111124432", " 2421111221111242 ", " 22111244211122 ", " 211124321112 ", " 211124321112 ", " 211124321112 ", " 211124321112 ", " 222222222222 ", " " }; mtpaint-3.40/src/icons1/xpm_mode_opac.xpm0000644000175000000620000000126310403273334017757 0ustar muammarstaff/* XPM */ static char *xpm_mode_opac_xpm[] = { "22 22 4 1", " c None", "1 c #6D6D6D", "2 c #494949", "3 c #242424", " ", " ", " ", " 11111111 ", " 11111111 ", " 11111111 ", " 111122221111 ", " 111122221111 ", " 111122221111 ", " 111122221111 ", " 111122232222111 ", " 11122222111 ", " 11122222111 ", " 11122222111 ", " 11111111 ", " 11111111 ", " 11111111 ", " 11111111 ", " ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_vertical.xbm0000644000175000000620000000074310476322246017617 0ustar muammarstaff#define xbm_vertical_width 20 #define xbm_vertical_height 20 static unsigned char xbm_vertical_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0xc0, 0x00, 0xfe, 0xc1, 0x00, 0x3e, 0xc0, 0x00, 0x36, 0xc0, 0x00, 0x62, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0xc0, 0xc0, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_mode_csel.xpm0000644000175000000620000000255410403274206017766 0ustar muammarstaff/* XPM */ static char *xpm_mode_csel_xpm[] = { "22 22 17 2", " c None", "01 c #000000", "02 c #FFFF00", "03 c #FFED00", "04 c #FFDB00", "05 c #FFC800", "06 c #FFB600", "07 c #FFA400", "08 c #FF9200", "09 c #FF7F00", "0A c #FF6D00", "0B c #FF5B00", "0C c #FF4900", "0D c #FF3700", "0E c #FF2400", "0F c #FF1200", "10 c #FF0000", " ", " ", " ", " 01 01 ", " 010101010101010101 ", " 01 01 ", " ", " 0101010101010101010101010101010101 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0102030405060708090A0B0C0D0E0F1001 ", " 0101010101010101010101010101010101 ", " ", " ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_config.xpm0000644000175000000620000000116210747565500017306 0ustar muammarstaff/* XPM */ static char *xpm_config_xpm[] = { "20 20 6 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #929292", "4 c #2AB2B2", "5 c #1E7F7F", " ", " ", " 1 1 ", " 121 121 ", " 121 121 ", " 1 121 11 ", " 1211221 1 ", " 1222231 1 ", " 1111211 ", " 1111 ", " 11111231 ", " 14441 1231 ", " 144451 1231 ", " 1444551 1231 ", " 144551 121 ", " 14551 11 ", " 111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/README0000644000175000000620000000050110342164056015273 0ustar muammarstaffThis directory contains icons and mouse pointers that are compiled into mtPaint. It is possible to create custom icon sets to suit personal taste. For example in order to create and build a new set try: 1) cp -r icons1 icons-new 2) Edit the icons and pointers in icons-new as required 3) ./configure icons-new 4) make mtpaint-3.40/src/icons1/xbm_line_mask.xbm0000644000175000000620000000073510132254650017741 0ustar muammarstaff#define xbm_line_mask_width 20 #define xbm_line_mask_height 20 static unsigned char xbm_line_mask_bits[] = { 0x02, 0x00, 0x00, 0x07, 0xF8, 0x07, 0x0F, 0xF8, 0x07, 0x1F, 0xF8, 0x07, 0x3F, 0xF8, 0x07, 0x7F, 0xF8, 0x07, 0xFF, 0xF8, 0x07, 0xFF, 0xF9, 0x07, 0xFF, 0xFB, 0x07, 0xFF, 0xFB, 0x07, 0x7F, 0xF8, 0x07, 0xF7, 0xF8, 0x07, 0xF3, 0xF8, 0x07, 0xE0, 0xF9, 0x07, 0xE0, 0xF9, 0x07, 0xC0, 0xF8, 0x07, 0x00, 0xF8, 0x07, 0x00, 0xF8, 0x07, 0x00, 0xF8, 0x07, 0x00, 0xF8, 0x07 }; mtpaint-3.40/src/icons1/xpm_mode_tint2.xpm0000644000175000000620000000307510403274100020070 0ustar muammarstaff/* XPM */ static char *xpm_mode_tint2_xpm[] = { "22 22 30 2", " c None", "01 c #FFFFFF", "02 c #EDEDED", "03 c #DBDBDB", "04 c #C8C8C8", "05 c #B6B6B6", "06 c #A4A4A4", "07 c #929292", "08 c #7F7F7F", "09 c #6D6D6D", "0A c #5B5B5B", "0B c #494949", "0C c #373737", "0D c #242424", "0E c #121212", "0F c #000000", "10 c #00FF00", "11 c #00ED00", "12 c #00DB00", "13 c #00C800", "14 c #00B600", "15 c #00A400", "16 c #009200", "17 c #007F00", "18 c #006D00", "19 c #005B00", "1A c #004900", "1B c #003700", "1C c #002400", "1D c #001200", " ", " ", " ", " 0F 0708090A0B0C0D0E0F ", " 0F 0708090A0B0C0D0E0F ", " 0F0F0F0F0F 0708090A0B0C0D0E0F ", " 0F 0708090A0B0C0D0E0F ", " 0F 0708090A0B0C0D0E0F ", " 0708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 0102030405060708090A0B0C0D0E0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718191A1B1C1D0F ", " 101112131415161718 ", " 101112131415161718 0F0F0F0F0F ", " 101112131415161718 ", " 101112131415161718 ", " ", " ", " ", " " }; mtpaint-3.40/src/icons1/xbm_vertical_mask.xbm0000644000175000000620000000076210476322246020633 0ustar muammarstaff#define xbm_vertical_mask_width 20 #define xbm_vertical_mask_height 20 static unsigned char xbm_vertical_mask_bits[] = { 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0xe0, 0x01, 0xff, 0xe1, 0x01, 0xff, 0xe3, 0x01, 0xff, 0xe3, 0x01, 0x7f, 0xe0, 0x01, 0xf7, 0xe0, 0x01, 0xf3, 0xe0, 0x01, 0xe0, 0xe1, 0x01, 0xe0, 0xe1, 0x01, 0xc0, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_ellipse.xpm0000644000175000000620000000112510142753074017467 0ustar muammarstaff/* XPM */ static char *xpm_ellipse_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FF0000", "3 c #FFFF00", " 1 ", " 1111111 ", " 111111111 ", " 11111111211 ", " 111222222222222 ", " 12222222222222222 ", " 222222222222222222 ", "12222222222222222222", "22222222222222222222", "22222222222222222222", "12222222222222222222", "1222222222222222222 ", "112222222222222222 ", " 111222222222222 ", " 1111111112111 ", " 1111111111111 ", " 11111111111 ", " 111111111 ", " 1111111 ", " 1 " }; mtpaint-3.40/src/icons1/xpm_undo.xpm0000644000175000000620000000121610262744664017010 0ustar muammarstaff/* XPM */ static char *xpm_undo_xpm[] = { "20 20 8 1", " c None", "1 c #000000", "2 c #FFFF6D", "3 c #F0F066", "4 c #E2E25F", "5 c #D3D357", "6 c #C5C550", "7 c #B6B649", " ", " ", " ", " 111 ", " 1121 ", " 11221 ", " 112321 ", " 113333111111 ", " 1134343434341 ", " 11444444444441 ", " 11545454545451 ", " 1155555555551 ", " 116565111111 ", " 116661 ", " 11761 ", " 1171 ", " 111 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_smudge.xpm0000644000175000000620000000137210163367722017326 0ustar muammarstaff/* XPM */ static char *xpm_smudge_xpm[] = { "20 20 15 1", " c None", "1 c #000000", "2 c #151515", "3 c #2A2A2A", "4 c #404040", "5 c #555555", "6 c #6A6A6A", "7 c #7F7F7F", "8 c #959595", "9 c #AAAAAA", "A c #BFBFBF", "B c #D4D4D4", "C c #EAEAEA", "D c #FFFFFF", "E c #000000", " EEEEEEE", " E111111E", " E2222221E", " E33333321E", " E444444321E", " E5555554321E", " E66666654321E", " E77777765432E ", " E88888876543E ", " E99999987654E ", " EAAAAAA98765E ", " EBBBBBBA9876E ", " ECCCCCCBA987E ", "EDDDDDDCBA98E ", "EDDDDDDCBA9E ", "EDDDDDDCBAE ", "EDDDDDDCBE ", "EDDDDDDCE ", "EDDDDDDE ", "EEEEEEE " }; mtpaint-3.40/src/icons1/xpm_grad_place.xpm0000644000175000000620000000257510474132312020117 0ustar muammarstaff/* XPM */ static char *xpm_grad_place_xpm[] = { "22 22 18 2", " c None", "01 c #000000", "02 c #FF0000", "03 c #FF8000", "04 c #FFFF00", "05 c #80FF00", "06 c #00FF00", "07 c #00FF55", "08 c #00FFAA", "09 c #00FFFF", "0A c #00AAFF", "0B c #0055FF", "0C c #0000FF", "0D c #8000FF", "0E c #FF00FF", "0F c #FF0080", "10 c #FF0000", "11 c #FFFFFF", " ", " ", " 01 01010101010101010101 ", " 0101 01020202020202020201 ", " 011101 01030303030303030301 ", " 01111101 01040404040404040401 ", " 0111111101 01050505050505050501 ", " 011111111101 01060606060606060601 ", " 01111111111101 01070707070707070701 ", " 0111111111111101 01080808080808080801 ", " 011111111111111101 01090909090909090901 ", " 01111111111111111101010A0A0A0A0A0A0A0A01 ", " 01111111111101010101010B0B0B0B0B0B0B0B01 ", " 01111101111101 010C0C0C0C0C0C0C0C01 ", " 011101 01111101 010D0D0D0D0D0D0D0D01 ", " 0101 01111101 010E0E0E0E0E0E0E0E01 ", " 01 01111101 010F0F0F0F0F0F0F0F01 ", " 01111101 01101010101010101001 ", " 010101 01010101010101010101 ", " ", " ", " " }; mtpaint-3.40/src/icons1/xpm_lasso.xpm0000644000175000000620000000112310254577736017166 0ustar muammarstaff/* XPM */ static char *xpm_lasso_xpm[] = { "20 20 4 1", " c None", "1 c #000000", "2 c #FFFFFF", "3 c #FF0000", " ", " 11111111111 ", " 122222222222111 ", " 12211111111122221 ", " 121 111221 ", " 121 1221", " 1221 121", " 12211 1221", " 1222111 1221 ", " 11222211 11221 ", " 11122212221 ", " 1122221 ", " 111221 ", " 121 ", " 111221 ", " 111122221 ", " 111122222111 ", " 1222221111 ", " 11111 ", " " }; mtpaint-3.40/src/icons1/xbm_clone.xbm0000644000175000000620000000072110255022240017064 0ustar muammarstaff#define xbm_clone_width 20 #define xbm_clone_height 20 static unsigned char xbm_clone_bits[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x7E, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x71, 0x00, 0x3E, 0x70, 0x00, 0x36, 0x20, 0x00, 0x62, 0xF8, 0x00, 0x60, 0x20, 0x00, 0xC0, 0x50, 0x00, 0xC0, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; mtpaint-3.40/src/icons1/xpm_copy.xpm0000644000175000000620000000110310262574556017011 0ustar muammarstaff/* XPM */ static char *xpm_copy_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFFFF", " ", " ", " 1111111 ", " 12222221 ", " 12221111111 ", " 122212222221 ", " 1211122222221 ", " 12221222222221 ", " 12221211111121 ", " 12111222222221 ", " 12221222222221 ", " 12221211111121 ", " 12111222222221 ", " 12221222222221 ", " 12221211111121 ", " 11111222222221 ", " 1222222221 ", " 1111111111 ", " ", " " }; mtpaint-3.40/src/icons1/xbm_ring4_mask.xbm0000644000175000000620000000044310631324350020030 0ustar muammarstaff#define xbm_ring4_mask_width 9 #define xbm_ring4_mask_height 9 #define xbm_ring4_mask_x_hot 4 #define xbm_ring4_mask_y_hot 4 static unsigned char xbm_ring4_mask_bits[] = { 0x38, 0x00, 0x7C, 0x00, 0xFE, 0x00, 0xC7, 0x01, 0xC7, 0x01, 0xC7, 0x01, 0xFE, 0x00, 0x7C, 0x00, 0x38, 0x00 }; mtpaint-3.40/src/icons1/xpm_pan.xpm0000644000175000000620000000110210200404176016572 0ustar muammarstaff/* XPM */ static char *xpm_pan_xpm[] = { "20 20 3 1", " c None", "1 c #000000", "2 c #FFFF00", " 11 ", " 1111 ", " 111111 ", " 11 ", " 11 ", " 11 ", " 11111111 ", " 1 12222221 1 ", " 11 12222221 11 ", "11111112222221111111", "11111112222221111111", " 11 12222221 11 ", " 1 12222221 1 ", " 11111111 ", " 11 ", " 11 ", " 11 ", " 111111 ", " 1111 ", " 11 " }; mtpaint-3.40/src/toolbar.h0000644000175000000620000000764711330403343015045 0ustar muammarstaff/* toolbar.h Copyright (C) 2006-2010 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ // DEFINITIONS #define PATTERN_GRID_W 10 #define PATTERN_GRID_H 10 /* !!! Must match order of menu item IDs (MENU_TBMAIN etc.) */ #define TOOLBAR_MAIN 1 #define TOOLBAR_TOOLS 2 #define TOOLBAR_SETTINGS 3 #define TOOLBAR_PALETTE 4 #define TOOLBAR_STATUS 5 #define TOOLBAR_MAX 6 #define PREVIEW_WIDTH 72 #define PREVIEW_HEIGHT 48 // Main toolbar buttons #define MTB_NEW 0 #define MTB_OPEN 1 #define MTB_SAVE 2 #define MTB_CUT 3 #define MTB_COPY 4 #define MTB_PASTE 5 #define MTB_UNDO 6 #define MTB_REDO 7 #define MTB_BRCOSA 8 #define MTB_PAN 9 #define TOTAL_ICONS_MAIN 10 // Tools toolbar buttons #define TTB_PAINT 0 #define TTB_SHUFFLE 1 #define TTB_FLOOD 2 #define TTB_LINE 3 #define TTB_SMUDGE 4 #define TTB_CLONE 5 #define TTB_SELECT 6 #define TTB_POLY 7 #define TTB_GRAD 8 #define TTB_LASSO 9 #define TTB_TEXT 10 #define TTB_ELLIPSE 11 #define TTB_FELLIPSE 12 #define TTB_OUTLINE 13 #define TTB_FILL 14 #define TTB_SELFV 15 #define TTB_SELFH 16 #define TTB_SELRCW 17 #define TTB_SELRCCW 18 #define DEFAULT_TOOL_ICON TTB_SELECT #define SMUDGE_TOOL_ICON TTB_SMUDGE #define TTB_0 TOTAL_SETTINGS #define TOTAL_ICONS_TOOLS 19 // Settings toolbar buttons #define SETB_CONT 0 #define SETB_OPAC 1 #define SETB_TINT 2 #define SETB_TSUB 3 #define SETB_CSEL 4 #define SETB_FILT 5 #define SETB_MASK 6 #define TOTAL_ICONS_SETTINGS 7 #define SETB_GRAD 7 #define TOTAL_SETTINGS 8 typedef struct { char *tooltip; signed char radio; unsigned short ID; int actmap; XPM_TYPE xpm; short action, mode, action2, mode2; } toolbar_item; // GLOBAL VARIABLES GtkWidget *icon_buttons[TOTAL_ICONS_TOOLS]; GdkCursor *m_cursor[TOTAL_CURSORS]; // My mouse cursors GdkCursor *move_cursor, *busy_cursor, *corner_cursor[4]; // System cursors gboolean toolbar_status[TOOLBAR_MAX]; // True=show GtkWidget *toolbar_boxes[TOOLBAR_MAX], // Used for showing/hiding *drawing_col_prev, *settings_box; // GLOBAL PROCEDURES void fill_toolbar(GtkToolbar *bar, toolbar_item *items, GtkWidget **wlist, GtkSignalFunc lclick, GtkSignalFunc rclick); void toolbar_init(GtkWidget *vbox_main); // Set up the widgets to the vbox void toolbar_palette_init(GtkWidget *box); // Set up the palette area void toolbar_exit(); // Remember toolbar settings on program exit void toolbar_showhide(); // Show/Hide all 4 toolbars void toolbar_zoom_update(); // Update the zoom combos to reflect current zoom void toolbar_viewzoom(gboolean visible); // Show/hide the view zoom combo void toolbar_update_settings(); // Update details in the settings toolbar void create_settings_box(); void pressed_toolbar_toggle(int state, int which); // Menu toggle for toolbars void mem_set_brush(int val); // Set brush, update size/flow/preview void mem_pat_update(); // Update indexed and then RGB pattern preview void update_top_swatch(); // Update selected colours A & B unsigned char *render_patterns(); // Create RGB dump of patterns to display void set_patterns(unsigned char *src); // Set 0-1 indexed image as new patterns void mode_change(int setting, int state); // Drawing mode variables void flood_settings(); // Flood fill step void smudge_settings(); // Smudge opacity mode void step_settings(); // Brush spacing void blend_settings(); // Blend mode mtpaint-3.40/src/ani.c0000644000175000000620000010356411652536100014145 0ustar muammarstaff/* ani.c Copyright (C) 2005-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include #include #include #include "global.h" #include "mygtk.h" #include "memory.h" #include "ani.h" #include "png.h" #include "mainwindow.h" #include "otherwindow.h" #include "canvas.h" #include "viewer.h" #include "layer.h" #include "spawn.h" #include "inifile.h" #include "mtlib.h" #include "wu.h" /// GLOBALS int ani_frame1 = 1, ani_frame2 = 1, ani_gif_delay = 10, ani_play_state = FALSE, ani_timer_state = 0; /// FORM VARIABLES static GtkWidget *animate_window = NULL, *ani_prev_win, *ani_entry_path, *ani_entry_prefix, *ani_spin[5], // start, end, delay *ani_text_pos, *ani_text_cyc, // Text input widgets *ani_prev_slider // Slider widget on preview area ; ani_cycle ani_cycle_table[MAX_CYC_SLOTS]; static int ani_layer_data[MAX_LAYERS + 1][4], // x, y, opacity, visible ani_currently_selected_layer; static char ani_output_path[PATHBUF], ani_file_prefix[ANI_PREFIX_LEN+2]; static gboolean ani_use_gif, ani_show_main_state; static void ani_win_read_widgets(); static void ani_widget_changed() // Widget changed so flag the layers as changed { layers_changed = 1; } static void ani_cyc_len_init() // Initialize the cycle length array before doing any animating { int i, k; for (i = 0; i < MAX_CYC_SLOTS; i++) { if (!ani_cycle_table[i].frame0) break; // Last slot reached for (k = 0; (k < MAX_CYC_ITEMS) && ani_cycle_table[i].layers[k]; k++); // Must be a minimum of 1 for modulo use ani_cycle_table[i].len = k ? k : 1; } } static void set_layer_from_slot( int layer, int slot ) // Set layer x, y, opacity from slot { ani_slot *ani = layer_table[layer].image->ani_pos + slot; layer_table[layer].x = ani->x; layer_table[layer].y = ani->y; layer_table[layer].opacity = ani->opacity; } static void set_layer_inbetween( int layer, int i, int frame, int effect ) // Calculate in between value for layer from slot i & (i+1) at given frame { MT_Coor c[4], co_res, lenz; float p1, p2; int f0, f1, f2, f3, ii[4] = {i-1, i, i+1, i+2}, j; ani_slot *ani = layer_table[layer].image->ani_pos; f1 = ani[i].frame; f2 = ani[i + 1].frame; if (i > 0) f0 = ani[i - 1].frame; else { f0 = f1; ii[0] = ii[1]; } if ((i >= MAX_POS_SLOTS - 2) || !(f3 = ani[i + 2].frame)) { f3 = f2; ii[3] = ii[2]; } // Linear in between p1 = ( (float) (f2-frame) ) / ( (float) (f2-f1) ); // % of (i-1) slot p2 = 1-p1; // % of i slot layer_table[layer].x = rint(p1 * ani[i].x + p2 * ani[i + 1].x); layer_table[layer].y = rint(p1 * ani[i].y + p2 * ani[i + 1].y); layer_table[layer].opacity = rint(p1 * ani[i].opacity + p2 * ani[i + 1].opacity); if ( effect == 1 ) // Interpolated smooth in between - use p2 value { for ( i=0; i<4; i++ ) c[i].z = 0; // Unused plane lenz.x = f1 - f0; lenz.y = f2 - f1; // Frames for each line lenz.z = f3 - f2; if ( lenz.x<1 ) lenz.x = 1; if ( lenz.y<1 ) lenz.y = 1; if ( lenz.z<1 ) lenz.z = 1; // Set up coords for ( j=0; j<4; j++ ) { c[j].x = ani[ii[j]].x; c[j].y = ani[ii[j]].y; } co_res = MT_palin(p2, 0.35, c[0], c[1], c[2], c[3], lenz); layer_table[layer].x = co_res.x; layer_table[layer].y = co_res.y; } } static void ani_set_frame_state( int frame ) { int i, k, e, a, b, done, l; ani_slot *ani; for ( k=1; k<=layers_total; k++ ) // Set x, y, opacity for each layer { ani = layer_table[k].image->ani_pos; if (ani[0].frame > 0) { for ( i=0; i= frame) break; // Exact match or one exceding it found } if ( i>=MAX_POS_SLOTS ) // All position slots < 'frame' { set_layer_from_slot( k, MAX_POS_SLOTS - 1 ); // Set layer pos/opac to last slot values } else { if (ani[i].frame == 0) // All position slots < 'frame' { set_layer_from_slot( k, i - 1 ); // Set layer pos/opac to last slot values } else { if (ani[i].frame == frame || i == 0) { set_layer_from_slot( k, i ); // If closest frame = requested frame, set all values to this // ditto if i=0, i.e. no better matches exist } else { // i is currently pointing to slot that excedes 'frame', so in between this and the previous slot set_layer_inbetween( k, i-1, frame, ani[i - 1].effect ); } } } } // If no slots have been defined leave the layer x, y, opacity as now } // Set visibility for each layer by processing cycle table for ( i=0; i0 ) { if ( e <= layers_total ) // If valid, show layer layer_table[e].visible = TRUE; } } } if ( a0 && e<=layers_total && e!=done ) { if ((frame - a) % l == k) { layer_table[e].visible = TRUE; done = e; // Don't switch this off later in loop } else layer_table[e].visible = FALSE; // Switch layer on or off according to frame position in cycle } } } } } static void ani_read_layer_data() // Read current layer x/y/opacity data to table { int i; for ( i=0; i<=MAX_LAYERS; i++ ) { ani_layer_data[i][0] = layer_table[i].x; ani_layer_data[i][1] = layer_table[i].y; ani_layer_data[i][2] = layer_table[i].opacity; ani_layer_data[i][3] = layer_table[i].visible; } } static void ani_write_layer_data() // Write current layer x/y/opacity data from table { int i; for ( i=0; i<=MAX_LAYERS; i++ ) { layer_table[i].x = ani_layer_data[i][0]; layer_table[i].y = ani_layer_data[i][1]; layer_table[i].opacity = ani_layer_data[i][2]; layer_table[i].visible = ani_layer_data[i][3]; } } static char *text_edit_widget_get(GtkWidget *w) // Get text string from input widget // WARNING memory allocated for this so lose it with g_free(txt) { #if GTK_MAJOR_VERSION == 1 return gtk_editable_get_chars( GTK_EDITABLE(w), 0, -1 ); #endif #if GTK_MAJOR_VERSION == 2 GtkTextIter begin, end; GtkTextBuffer *buffer = GTK_TEXT_VIEW(w)->buffer; gtk_text_buffer_get_start_iter( buffer, &begin ); gtk_text_buffer_get_end_iter( buffer, &end ); return gtk_text_buffer_get_text( buffer, &begin, &end, -1 ); #endif } static void empty_text_widget(GtkWidget *w) // Empty the text widget { #if GTK_MAJOR_VERSION == 1 gtk_text_set_point( GTK_TEXT(w), 0 ); gtk_text_forward_delete( GTK_TEXT(w), gtk_text_get_length(GTK_TEXT(w)) ); #endif #if GTK_MAJOR_VERSION == 2 gtk_text_buffer_set_text( GTK_TEXT_VIEW(w)->buffer, "", 0 ); #endif } static void ani_cyc_refresh_txt() // Refresh the text in the cycle text widget { int i, j, k; char txt[128 + MAX_CYC_ITEMS * 6], *tmp; #if GTK_MAJOR_VERSION == 2 GtkTextIter iter; g_signal_handlers_block_by_func(GTK_TEXT_VIEW(ani_text_cyc)->buffer, GTK_SIGNAL_FUNC(ani_widget_changed), NULL); #endif empty_text_widget(ani_text_cyc); // Clear the text in the widget for (i = 0; i < MAX_CYC_SLOTS; i++) { if (!ani_cycle_table[i].frame0) break; tmp = txt + sprintf(txt, "%i\t%i\t%i", ani_cycle_table[i].frame0, ani_cycle_table[i].frame1, ani_cycle_table[i].layers[0]); for (j = 1; j < MAX_CYC_ITEMS; j++) { k = ani_cycle_table[i].layers[j]; if (!k) break; tmp += sprintf(tmp, ",%i", k); } strcpy(tmp, "\n"); #if GTK_MAJOR_VERSION == 1 gtk_text_insert (GTK_TEXT (ani_text_cyc), NULL, NULL, NULL, txt, -1); #endif #if GTK_MAJOR_VERSION == 2 gtk_text_buffer_get_end_iter( GTK_TEXT_VIEW(ani_text_cyc)->buffer, &iter ); gtk_text_buffer_insert( GTK_TEXT_VIEW(ani_text_cyc)->buffer, &iter, txt, -1 ); #endif } #if GTK_MAJOR_VERSION == 2 g_signal_handlers_unblock_by_func(GTK_TEXT_VIEW(ani_text_cyc)->buffer, GTK_SIGNAL_FUNC(ani_widget_changed), NULL); // We have to switch off then back on or it looks like the user changed it #endif } static void ani_pos_refresh_txt() // Refresh the text in the position text widget { char txt[256]; int i = ani_currently_selected_layer, j; ani_slot *ani; #if GTK_MAJOR_VERSION == 2 GtkTextIter iter; g_signal_handlers_block_by_func(GTK_TEXT_VIEW(ani_text_pos)->buffer, GTK_SIGNAL_FUNC(ani_widget_changed), NULL); #endif empty_text_widget(ani_text_pos); // Clear the text in the widget if ( i > 0 ) // Must no be for background layer or negative => PANIC! { for (j = 0; j < MAX_POS_SLOTS; j++) { ani = layer_table[i].image->ani_pos + j; if (ani->frame <= 0) break; // Add a line if one exists snprintf(txt, 250, "%i\t%i\t%i\t%i\t%i\n", ani->frame, ani->x, ani->y, ani->opacity, ani->effect); #if GTK_MAJOR_VERSION == 1 gtk_text_insert (GTK_TEXT (ani_text_pos), NULL, NULL, NULL, txt, -1); #endif #if GTK_MAJOR_VERSION == 2 gtk_text_buffer_get_end_iter( GTK_TEXT_VIEW(ani_text_pos)->buffer, &iter ); gtk_text_buffer_insert( GTK_TEXT_VIEW(ani_text_pos)->buffer, &iter, txt, strlen(txt) ); #endif } } #if GTK_MAJOR_VERSION == 2 g_signal_handlers_unblock_by_func(GTK_TEXT_VIEW(ani_text_pos)->buffer, GTK_SIGNAL_FUNC(ani_widget_changed), NULL); // We have to switch off then back on or it looks like the user changed it #endif } void ani_init() // Initialize variables/arrays etc. before loading or on startup { int j; ani_frame1 = 1; ani_frame2 = 100; ani_gif_delay = 10; ani_cycle_table[0].frame0 = 0; if ( layers_total>0 ) // No position array malloc'd until layers>0 { for (j = 0; j <= layers_total; j++) layer_table[j].image->ani_pos[0].frame = 0; } strcpy(ani_output_path, "frames"); strcpy(ani_file_prefix, "f"); ani_use_gif = TRUE; } /// EXPORT ANIMATION FRAMES WINDOW static void ani_win_set_pos() { win_restore_pos(animate_window, "ani", 0, 0, 200, 200); } static void ani_fix_pos() { ani_read_layer_data(); layers_notify_changed(); } static void ani_but_save() { ani_win_read_widgets(); ani_write_layer_data(); layer_press_save(); } static gboolean delete_ani() { win_store_pos(animate_window, "ani"); ani_win_read_widgets(); gtk_widget_destroy(animate_window); animate_window = NULL; ani_write_layer_data(); layers_pastry_cut = FALSE; show_layers_main = ani_show_main_state; update_all_views(); return (FALSE); } static int parse_line_pos( char *txt, int layer, int row ) // Read in position row from some text { ani_slot data = { -1, -1, -1, -1, -1 }; char *tx;; int tot; tx = strchr( txt, '\n' ); // Find out length of this input line if ( tx == NULL ) tot = strlen(txt); else tot = tx - txt + 1; while ( txt[0] < 32 ) // Skip non ascii chars { if ( txt[0] == 0 ) return -1; // If we reach the end, tell the caller txt = txt + 1; } sscanf(txt, "%i\t%i\t%i\t%i\t%i", &data.frame, &data.x, &data.y, &data.opacity, &data.effect); layer_table[layer].image->ani_pos[row] = data; return tot; } static void ani_parse_store_positions() // Read current positions in text input and store { char *txt = text_edit_widget_get( ani_text_pos ), *tx; int i, j, layer = ani_currently_selected_layer; tx = txt; for ( i=0; iani_pos[i].frame = 0; // End delimeter g_free(tx); } static int parse_line_cyc( char *txt, int row ) // Read in cycle row from some text { char *tx, *eol; int a=-1, b=-1, c=-1, tot, i; tx = strchr( txt, '\n' ); // Find out length of this input line if ( tx == NULL ) tot = strlen(txt); else tot = tx - txt + 1; eol = txt + tot - 1; while ( txt[0] < 32 ) // Skip non ascii chars { if ( txt[0] == 0 ) return -1; // If we reach the end, tell the caller txt = txt + 1; } sscanf( txt, "%i\t%i\t%i", &a, &b, &c ); ani_cycle_table[row].frame0 = a; ani_cycle_table[row].frame1 = b; ani_cycle_table[row].layers[0] = c; // Read in a number after each comma for (i = 1; i < MAX_CYC_ITEMS; i++) { tx = strchr( txt, ',' ); // Get next comma if (!tx || (eol - tx < 2)) break; // Bail out if no comma on this line a = -1; sscanf(tx + 1, "%i", &a); ani_cycle_table[row].layers[i] = a; txt = tx + 1; } // Terminate with zero if needed if (i < MAX_CYC_ITEMS) ani_cycle_table[row].layers[i] = 0; return tot; } static void ani_parse_store_cycles() // Read current cycles in text input and store { char *txt = text_edit_widget_get( ani_text_cyc ), *tx; int i, j; tx = txt; for ( i=0; i ani_frame2) i = ani_frame1; mt_spinslide_set_value(ani_prev_slider, i); return TRUE; } } static void ani_play_start() { if (!ani_play_state) { ani_play_state = 1; if (!ani_timer_state) ani_timer_state = threads_timeout_add( ani_gif_delay * 10, ani_play_timer_call, NULL); } } static void ani_play_stop() { ani_play_state = 0; } /// PREVIEW WINDOW CALLBACKS static void ani_but_playstop(GtkToggleButton *togglebutton, gpointer user_data) { if (gtk_toggle_button_get_active(togglebutton)) ani_play_start(); else ani_play_stop(); } static void ani_frame_slider_moved(GtkAdjustment *adjustment, gpointer user_data) { int x = 0, y = 0, w = mem_width, h = mem_height; ani_set_frame_state(ADJ2INT(adjustment)); if (layer_selected) { x = -layer_table[layer_selected].x; y = -layer_table[layer_selected].y; w = layer_table[0].image->image_.width; h = layer_table[0].image->image_.height; } vw_update_area(x, y, w, h); // Update only the area we need } static gboolean ani_but_preview_close() { ani_play_stop(); // Stop animation playing if necessary win_store_pos(ani_prev_win, "ani_prev"); gtk_widget_destroy( ani_prev_win ); if ( animate_window != NULL ) { ani_win_set_pos(); gtk_widget_show (animate_window); } else { ani_write_layer_data(); layers_pastry_cut = FALSE; update_all_views(); } return (FALSE); } void ani_but_preview() { GtkWidget *hbox3, *button; GtkAccelGroup* ag = gtk_accel_group_new(); if ( animate_window != NULL ) { /* We need to remember this as we are hiding it */ win_store_pos(animate_window, "ani"); ani_win_read_widgets(); // Get latest values for the preview } else ani_read_layer_data(); ani_cyc_len_init(); // Prepare the cycle index for the animation if ( !view_showing ) view_show(); // If not showing, show the view window ani_prev_win = add_a_window( GTK_WINDOW_TOPLEVEL, _("Animation Preview"), GTK_WIN_POS_NONE, TRUE ); gtk_container_set_border_width(GTK_CONTAINER(ani_prev_win), 5); win_restore_pos(ani_prev_win, "ani_prev", 0, 0, 200, -1); hbox3 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox3); gtk_container_add (GTK_CONTAINER (ani_prev_win), hbox3); pack(hbox3, sig_toggle_button(_("Play"), FALSE, NULL, GTK_SIGNAL_FUNC(ani_but_playstop))); ani_play_state = FALSE; // Stopped ani_prev_slider = mt_spinslide_new(-2, -2); xpack(hbox3, widget_align_minsize(ani_prev_slider, 200, -2)); mt_spinslide_set_range(ani_prev_slider, ani_frame1, ani_frame2); mt_spinslide_set_value(ani_prev_slider, ani_frame1); mt_spinslide_connect(ani_prev_slider, GTK_SIGNAL_FUNC(ani_frame_slider_moved), NULL); if ( animate_window == NULL ) // If called via the menu have a fix button { button = add_a_button( _("Fix"), 5, hbox3, FALSE ); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ani_fix_pos), NULL); } button = add_a_button( _("Close"), 5, hbox3, FALSE ); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ani_but_preview_close), NULL); gtk_widget_add_accelerator (button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags) 0); gtk_signal_connect (GTK_OBJECT (ani_prev_win), "delete_event", GTK_SIGNAL_FUNC(ani_but_preview_close), NULL); gtk_window_set_transient_for( GTK_WINDOW(ani_prev_win), GTK_WINDOW(main_window) ); gtk_widget_show (ani_prev_win); gtk_window_add_accel_group(GTK_WINDOW (ani_prev_win), ag); if ( animate_window != NULL ) gtk_widget_hide (animate_window); else { layers_pastry_cut = TRUE; update_all_views(); } gtk_adjustment_value_changed(SPINSLIDE_ADJUSTMENT(ani_prev_slider)); } static void create_frames_ani() { image_info *image; ls_settings settings; png_color pngpal[256], *trans; unsigned char *layer_rgb, *irgb = NULL; char output_path[PATHBUF], *command, *wild_path; int a, b, k, i, tr, cols, layer_w, layer_h, npt, l = 0; ani_win_read_widgets(); ani_cyc_len_init(); // Prepare the cycle index for the animation gtk_widget_hide(animate_window); ani_write_layer_data(); layer_press_save(); // Save layers data file command = strrchr(layers_filename, DIR_SEP); if (command) l = command - layers_filename + 1; wjstrcat(output_path, PATHBUF, layers_filename, l, ani_output_path, NULL); l = strlen(output_path); if (!ani_output_path[0]); // Reusing layers file directory #ifdef WIN32 else if (mkdir(output_path)) #else else if (mkdir(output_path, 0777)) #endif { if ( errno != EEXIST ) { alert_box(_("Error"), _("Unable to create output directory"), NULL); goto failure; // Failure to create directory } } // Create output path and pointer for first char of filename a = ani_frame1 < ani_frame2 ? ani_frame1 : ani_frame2; b = ani_frame1 < ani_frame2 ? ani_frame2 : ani_frame1; image = layer_selected ? &layer_table[0].image->image_ : &mem_image; layer_w = image->width; layer_h = image->height; layer_rgb = malloc( layer_w * layer_h * 3); // Primary layer image for RGB version if (!layer_rgb) { memory_errors(1); goto failure; } /* Prepare settings */ init_ls_settings(&settings, NULL); settings.mode = FS_COMPOSITE_SAVE; settings.width = layer_w; settings.height = layer_h; settings.colors = 256; settings.silent = TRUE; if (ani_use_gif) { irgb = malloc(layer_w * layer_h); // Resulting indexed image if (!irgb) { free(layer_rgb); memory_errors(1); goto failure; } settings.ftype = FT_GIF; settings.img[CHN_IMAGE] = irgb; settings.bpp = 1; settings.pal = pngpal; } else { settings.ftype = FT_PNG; settings.img[CHN_IMAGE] = layer_rgb; settings.bpp = 3; /* Background transparency */ settings.xpm_trans = tr = image->trans; settings.rgb_trans = tr < 0 ? -1 : PNG_2_INT(image->pal[tr]); } progress_init(_("Creating Animation Frames"), 1); for ( k=a; k<=b; k++ ) // Create each frame and save it as a PNG or GIF image { if (progress_update(b == a ? 0.0 : (k - a) / (float)(b - a))) break; ani_set_frame_state(k); // Change layer positions view_render_rgb( layer_rgb, 0, 0, layer_w, layer_h, 1 ); // Render layer snprintf(output_path + l, PATHBUF - l, DIR_SEP_STR "%s%05d.%s", ani_file_prefix, k, ani_use_gif ? "gif" : "png"); if ( ani_use_gif ) // Prepare palette { cols = mem_cols_used_real(layer_rgb, layer_w, layer_h, 258, 0); // Count colours in image if ( cols <= 256 ) // If <=256 convert directly mem_cols_found(pngpal); // Get palette else // If >256 use Wu to quantize { cols = 256; if (wu_quant(layer_rgb, layer_w, layer_h, cols, pngpal)) goto failure2; } // Create new indexed image if (mem_dumb_dither(layer_rgb, irgb, pngpal, layer_w, layer_h, cols, FALSE)) goto failure2; settings.xpm_trans = -1; // Default is no transparency if (image->trans >= 0) // Background has transparency { trans = image->pal + image->trans; npt = PNG_2_INT(*trans); for (i = 0; i < cols; i++) { // Does it exist in the composite frame? if (PNG_2_INT(pngpal[i]) != npt) continue; // Transparency found so note it settings.xpm_trans = i; break; } } } if (save_image(output_path, &settings) < 0) { alert_box(_("Error"), _("Unable to save image"), NULL); goto failure2; } } if ( ani_use_gif ) // all GIF files created OK so lets give them to gifsicle { wild_path = wjstrcat(NULL, 0, output_path, l, DIR_SEP_STR, ani_file_prefix, "?????.gif", NULL); snprintf(output_path + l, PATHBUF - l, DIR_SEP_STR "%s.gif", ani_file_prefix); run_def_action(DA_GIF_CREATE, wild_path, output_path, ani_gif_delay); run_def_action(DA_GIF_PLAY, output_path, NULL, 0); free(wild_path); } failure2: progress_end(); free( layer_rgb ); failure: free( irgb ); gtk_widget_show(animate_window); } void pressed_remove_key_frames() { int i, j; i = alert_box(_("Warning"), _("Do you really want to clear all of the position and cycle data for all of the layers?"), _("No"), _("Yes"), NULL); if ( i==2 ) { for (j = 0; j <= layers_total; j++) layer_table[j].image->ani_pos[0].frame = 0; // Flush array in each layer ani_cycle_table[0].frame0 = 0; } } static void ani_set_key_frame(int key) // Set key frame postions & cycles as per current layers { ani_slot *ani; int i, j, k, l; for ( k=1; k<=layers_total; k++ ) // Add current position for each layer { ani = layer_table[k].image->ani_pos; // Find first occurence of 0 or frame # < 'key' for ( i=0; i key || ani[i].frame == 0) break; } if ( i>=MAX_POS_SLOTS ) i=MAX_POS_SLOTS-1; // Shift remaining data down a slot for ( j=MAX_POS_SLOTS-1; j>i; j-- ) { ani[j] = ani[j - 1]; } // Enter data for the current state ani[i].frame = key; ani[i].x = layer_table[k].x; ani[i].y = layer_table[k].y; ani[i].opacity = layer_table[k].opacity; ani[i].effect = 0; // No effect } // Find first occurence of 0 or frame # < 'key' for ( i=0; i key || ani_cycle_table[i].frame0 == 0 ) break; } if ( i>=MAX_CYC_SLOTS ) i=MAX_CYC_SLOTS-1; // Shift remaining data down a slot for ( j=MAX_CYC_SLOTS-1; j>i; j-- ) ani_cycle_table[j] = ani_cycle_table[j - 1]; // Enter data for the current state ani_cycle_table[i].frame0 = ani_cycle_table[i].frame1 = key; for ( j=1; j<=layers_total; j++ ) { if (j > MAX_CYC_ITEMS) break; // More layers than free items so bail out if ( layer_table[j].visible ) l=j; else l=-j; ani_cycle_table[i].layers[j - 1] = l; } // Add terminator if needed if (j <= MAX_CYC_ITEMS) ani_cycle_table[i].layers[j - 1] = 0; } static void ani_tog_gif(GtkToggleButton *togglebutton, gpointer user_data) { ani_use_gif = gtk_toggle_button_get_active(togglebutton); ani_widget_changed(); } static void ani_layer_select( GtkList *list, GtkWidget *widget ) { int j = layers_total - gtk_list_child_position(list, widget); if ( j<1 || j>layers_total ) return; // Item not found if ( ani_currently_selected_layer != -1 ) // Only if not first click { ani_parse_store_positions(); // Parse & store text inputs } ani_currently_selected_layer = j; ani_pos_refresh_txt(); // Refresh the text in the widget } static int do_set_key_frame(GtkWidget *spin, gpointer fdata) { int i; i = read_spin(spin); ani_set_key_frame(i); layers_notify_changed(); return TRUE; } void pressed_set_key_frame() { GtkWidget *spin = add_a_spin(ani_frame1, ani_frame1, ani_frame2); filter_window(_("Set Key Frame"), spin, do_set_key_frame, NULL, FALSE); } static GtkWidget *ani_text(GtkWidget **textptr) { GtkWidget *scroll, *text; #if GTK_MAJOR_VERSION == 1 text = gtk_text_new(NULL, NULL); gtk_text_set_editable(GTK_TEXT(text), TRUE); gtk_signal_connect(GTK_OBJECT(text), "changed", GTK_SIGNAL_FUNC(ani_widget_changed), NULL); scroll = gtk_scrolled_window_new(NULL, GTK_TEXT(text)->vadj); #else /* #if GTK_MAJOR_VERSION == 2 */ GtkTextBuffer *texbuf = gtk_text_buffer_new(NULL); text = gtk_text_view_new_with_buffer(texbuf); g_signal_connect(texbuf, "changed", GTK_SIGNAL_FUNC(ani_widget_changed), NULL); scroll = gtk_scrolled_window_new(GTK_TEXT_VIEW(text)->hadjustment, GTK_TEXT_VIEW(text)->vadjustment); #endif gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scroll), text); *textptr = text; return (scroll); } void pressed_animate_window() { GtkWidget *table, *label, *button, *notebook1, *scrolledwindow; GtkWidget /**ani_toggle_gif,*/ *ani_list_layers, *list_data; GtkWidget *hbox4, *hbox2, *vbox1, *vbox3, *vbox4; GtkAccelGroup* ag = gtk_accel_group_new(); char txt[PATHTXT]; int i; if ( layers_total < 1 ) // Only background layer available { alert_box(_("Error"), _("You must have at least 2 layers to create an animation"), NULL); return; } if (!layers_filename[0]) { alert_box(_("Error"), _("You must save your layers file before creating an animation"), NULL); return; } delete_layers_window(); // Lose the layers window if its up ani_read_layer_data(); ani_currently_selected_layer = -1; animate_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Configure Animation"), GTK_WIN_POS_NONE, TRUE ); ani_win_set_pos(); vbox1 = add_vbox(animate_window); notebook1 = xpack(vbox1, gtk_notebook_new()); gtk_container_set_border_width(GTK_CONTAINER(notebook1), 5); vbox4 = add_new_page(notebook1, _("Output Files")); table = xpack(vbox4, gtk_table_new(5, 3, FALSE)); label = add_to_table( _("Start frame"), table, 0, 0, 5 ); add_to_table( _("End frame"), table, 1, 0, 5 ); add_to_table( _("Delay"), table, 2, 0, 5 ); add_to_table( _("Output path"), table, 3, 0, 5 ); add_to_table( _("File prefix"), table, 4, 0, 5 ); ani_spin[0] = spin_to_table(table, 0, 1, 5, ani_frame1, 1, MAX_FRAME); // Start ani_spin[1] = spin_to_table(table, 1, 1, 5, ani_frame2, 1, MAX_FRAME); // End ani_spin[2] = spin_to_table(table, 2, 1, 5, ani_gif_delay, 1, MAX_DELAY); // Delay ani_entry_path = gtk_entry_new_with_max_length(PATHBUF); to_table(ani_entry_path, table, 3, 1, 0); gtkuncpy(txt, ani_output_path, PATHTXT); gtk_entry_set_text(GTK_ENTRY(ani_entry_path), txt); ani_entry_prefix = gtk_entry_new_with_max_length(ANI_PREFIX_LEN); to_table(ani_entry_prefix, table, 4, 1, 0); gtkuncpy(txt, ani_file_prefix, PATHTXT); gtk_entry_set_text(GTK_ENTRY(ani_entry_prefix), txt); track_updates(GTK_SIGNAL_FUNC(ani_widget_changed), ani_spin[0], ani_spin[1], ani_spin[2], ani_entry_path, ani_entry_prefix, NULL); // ani_toggle_gif = pack(vbox4, sig_toggle(_("Create GIF frames"), ani_use_gif, NULL, GTK_SIGNAL_FUNC(ani_tog_gif))); /// LAYERS TABLES hbox4 = gtk_hbox_new(FALSE, 0); label = gtk_label_new(_("Positions")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook1), hbox4, label); scrolledwindow = pack(hbox4, gtk_scrolled_window_new(NULL, NULL)); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); ani_list_layers = gtk_list_new (); gtk_signal_connect( GTK_OBJECT(ani_list_layers), "select_child", GTK_SIGNAL_FUNC(ani_layer_select), NULL ); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), ani_list_layers); gtk_widget_set_usize (ani_list_layers, 150, -2); gtk_container_set_border_width (GTK_CONTAINER (ani_list_layers), 5); for ( i=layers_total; i>0; i-- ) { hbox2 = gtk_hbox_new( FALSE, 3 ); list_data = gtk_list_item_new(); gtk_container_add( GTK_CONTAINER(ani_list_layers), list_data ); gtk_container_add( GTK_CONTAINER(list_data), hbox2 ); sprintf(txt, "%i", i); // Layer number label = pack(hbox2, gtk_label_new(txt)); gtk_widget_set_usize (label, 40, -2); gtk_misc_set_alignment( GTK_MISC(label), 0.5, 0.5 ); label = xpack(hbox2, gtk_label_new(layer_table[i].name)); // Layer name gtk_misc_set_alignment( GTK_MISC(label), 0, 0.5 ); } vbox3 = xpack(hbox4, gtk_vbox_new(FALSE, 0)); xpack(vbox3, ani_text(&ani_text_pos)); /// CYCLES TAB vbox3 = add_new_page(notebook1, _("Cycling")); xpack(vbox3, ani_text(&ani_text_cyc)); ani_cyc_refresh_txt(); /// MAIN BUTTONS hbox2 = pack(vbox1, gtk_hbox_new(FALSE, 0)); button = add_a_button(_("Close"), 5, hbox2, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(delete_ani), NULL); gtk_widget_add_accelerator (button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags) 0); button = add_a_button(_("Save"), 5, hbox2, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ani_but_save), NULL); button = add_a_button(_("Preview"), 5, hbox2, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ani_but_preview), NULL); button = add_a_button(_("Create Frames"), 5, hbox2, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_frames_ani), NULL); gtk_signal_connect_object (GTK_OBJECT (animate_window), "delete_event", GTK_SIGNAL_FUNC (delete_ani), NULL); ani_show_main_state = show_layers_main; // Remember old state show_layers_main = FALSE; // Don't show all layers in main window - too messy gtk_window_set_transient_for( GTK_WINDOW(animate_window), GTK_WINDOW(main_window) ); gtk_list_select_item( GTK_LIST(ani_list_layers), 0 ); gtk_widget_show_all(animate_window); gtk_window_add_accel_group(GTK_WINDOW (animate_window), ag); layers_pastry_cut = TRUE; update_all_views(); } /// FILE HANDLING void ani_read_file( FILE *fp ) // Read data from layers file already opened { int i, j, k, tot; char tin[2048]; ani_init(); do { if (!fgets(tin, 2000, fp)) return; // BAILOUT - invalid line string_chop( tin ); } while ( strcmp( tin, ANIMATION_HEADER ) != 0 ); // Look for animation header i = read_file_num(fp, tin); if ( i<0 ) return; // BAILOUT - invalid # ani_frame1 = i; i = read_file_num(fp, tin); if ( i<0 ) return; // BAILOUT - invalid # ani_frame2 = i; if (!fgets(tin, 2000, fp)) return; // BAILOUT - invalid line string_chop( tin ); strncpy0(ani_output_path, tin, PATHBUF); if (!fgets(tin, 2000, fp)) return; // BAILOUT - invalid # string_chop( tin ); strncpy0(ani_file_prefix, tin, ANI_PREFIX_LEN + 1); i = read_file_num(fp, tin); if ( i<0 ) { ani_use_gif = FALSE; ani_gif_delay = -i; } else { ani_use_gif = TRUE; ani_gif_delay = i; } /// CYCLE DATA i = read_file_num(fp, tin); if ( i<0 || i>MAX_CYC_SLOTS ) return; // BAILOUT - invalid # tot = i; for ( j=0; jMAX_POS_SLOTS ) return; // BAILOUT - invalid # tot = i; for ( j=0; jani_pos[j].frame = 0; // Mark end } } void ani_write_file( FILE *fp ) // Write data to layers file already opened { int gifcode = ani_gif_delay, i, j, k, l; if ( layers_total == 0 ) return; // No layers memory allocated so bail out if ( !ani_use_gif ) gifcode = -gifcode; // HEADER fprintf( fp, "%s\n", ANIMATION_HEADER ); fprintf( fp, "%i\n%i\n%s\n%s\n%i\n", ani_frame1, ani_frame2, ani_output_path, ani_file_prefix, gifcode ); // CYCLE INFO // Count number of cycles, and output this data (if any) for ( i=0; iani_pos; for ( i=0; i0 ) { for ( j=0; j= mem_width ? mem_width - 1 : x1; x2 = x2 < 0 ? 0 : x2 >= mem_width ? mem_width - 1 : x2; y1 = y1 < 0 ? 0 : y1 >= mem_height ? mem_height - 1 : y1; y2 = y2 < 0 ? 0 : y2 >= mem_height ? mem_height - 1 : y2; /* Image coords to thumbnail coords */ x1 = (x1 * pan_w) / mem_width; x2 = (x2 * pan_w) / mem_width; y1 = (y1 * pan_h) / mem_height; y2 = (y2 * pan_h) / mem_height; /* Draw the border */ dest = src = pan_rgb + (y1 * pan_w + x1) * 3; j = y2 - y1; k = (x2 - x1) * 3; for (i = 0; i <= j; i++) { dest[k + 0] = dest[k + 1] = dest[k + 2] = dest[0] = dest[1] = dest[2] = ((i >> 2) & 1) * 255; dest += pan_w * 3; } j = x2 - x1; k = (y2 - y1) * pan_w * 3; for (i = 0; i <= j; i++) { src[k + 0] = src[k + 1] = src[k + 2] = src[0] = src[1] = src[2] = ((i >> 2) & 1) * 255; src += 3; } if (draw_pan) gdk_draw_rgb_image(draw_pan->window, draw_pan->style->black_gc, 0, 0, pan_w, pan_h, GDK_RGB_DITHER_NONE, pan_rgb, pan_w * 3); } void pan_thumbnail() // Create thumbnail and selection box { GtkAdjustment *hori, *vert; // Update main window first to get new scroll positions if necessary handle_events(); hori = gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas) ); vert = gtk_scrolled_window_get_vadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas) ); draw_pan_thumb(hori->value, vert->value, hori->page_size, vert->page_size); } static void do_pan(GtkAdjustment *hori, GtkAdjustment *vert, int nv_h, int nv_v) { static int wait_h, wait_v, in_pan; nv_h = nv_h < 0 ? 0 : nv_h > hori->upper - hori->page_size ? hori->upper - hori->page_size : nv_h; nv_v = nv_v < 0 ? 0 : nv_v > vert->upper - vert->page_size ? vert->upper - vert->page_size : nv_v; if (in_pan) /* Delay reaction */ { wait_h = nv_h; wait_v = nv_v; in_pan |= 2; return; } while (TRUE) { in_pan = 1; /* Update selection box */ draw_pan_thumb(nv_h, nv_v, hori->page_size, vert->page_size); /* Update position of main window scrollbars */ hori->value = nv_h; vert->value = nv_v; gtk_adjustment_value_changed(hori); gtk_adjustment_value_changed(vert); /* Process events */ handle_events(); if (in_pan < 2) break; /* Do delayed update */ nv_h = wait_h; nv_v = wait_v; } in_pan = 0; } static void delete_pan() { free(pan_rgb); pan_rgb = NULL; // Needed to stop segfault gtk_widget_destroy(pan_window); } static gboolean key_pan(GtkWidget *widget, GdkEventKey *event) { int nv_h, nv_v, hm, vm; GtkAdjustment *hori, *vert; if (!check_zoom_keys_real(wtf_pressed(event))) { /* xine-ui sends bogus keypresses so don't delete on this */ if (!arrow_key(event, &hm, &vm, 4) && !XINE_FAKERY(event->keyval)) delete_pan(); else { hori = gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas) ); vert = gtk_scrolled_window_get_vadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas) ); nv_h = hori->value + hm * (hori->page_size / 4); nv_v = vert->value + vm * (hori->page_size / 4); do_pan(hori, vert, nv_h, nv_v); } } else pan_thumbnail(); // Update selection box as user may have zoomed in/out return (TRUE); } static void pan_button(int mx, int my, int button) { int nv_h, nv_v; float cent_x, cent_y; GtkAdjustment *hori, *vert; if (button == 1) // Left click = pan window { hori = gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas) ); vert = gtk_scrolled_window_get_vadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas) ); cent_x = ((float) mx) / pan_w; cent_y = ((float) my) / pan_h; nv_h = mem_width*can_zoom*cent_x - hori->page_size/2; nv_v = mem_height*can_zoom*cent_y - vert->page_size/2; do_pan(hori, vert, nv_h, nv_v); } else if (button == 3) delete_pan(); // Right click = kill window } static gboolean click_pan(GtkWidget *widget, GdkEventButton *event) { pan_button(event->x, event->y, event->button); return (TRUE); } static gboolean pan_motion(GtkWidget *widget, GdkEventMotion *event) { int x, y, button = 0; GdkModifierType state; if (event->is_hint) gdk_window_get_pointer (event->window, &x, &y, &state); else { x = event->x; y = event->y; state = event->state; } if (state & GDK_BUTTON1_MASK) button = 1; if (state & GDK_BUTTON3_MASK) button = 3; pan_button(x, y, button); return (TRUE); } static gboolean expose_pan(GtkWidget *widget, GdkEventExpose *event) { gdk_draw_rgb_image(widget->window, widget->style->black_gc, event->area.x, event->area.y, event->area.width, event->area.height, GDK_RGB_DITHER_NONE, pan_rgb + (event->area.y * pan_w + event->area.x) * 3, pan_w * 3); return (FALSE); } void pressed_pan() { float rat_x, rat_y; draw_pan = NULL; // Needed by draw_pan_thumb above rat_x = max_pan / ((float) mem_width); rat_y = max_pan / ((float) mem_height); if ( rat_x > rat_y ) { pan_w = rat_y * mem_width; pan_h = max_pan; } else { pan_w = max_pan; pan_h = rat_x * mem_height; } mtMAX(pan_w, pan_w, 1) mtMAX(pan_h, pan_h, 1) pan_rgb = calloc(1, pan_w * pan_h * 3); pan_thumbnail(); pan_window = add_a_window( GTK_WINDOW_POPUP, _("Pan Window"), GTK_WIN_POS_MOUSE, TRUE ); gtk_container_set_border_width (GTK_CONTAINER (pan_window), 2); draw_pan = gtk_drawing_area_new(); gtk_widget_set_usize( draw_pan, pan_w, pan_h ); gtk_container_add (GTK_CONTAINER (pan_window), draw_pan); gtk_widget_show( draw_pan ); gtk_signal_connect(GTK_OBJECT(draw_pan), "expose_event", GTK_SIGNAL_FUNC(expose_pan), NULL); gtk_signal_connect(GTK_OBJECT(draw_pan), "button_press_event", GTK_SIGNAL_FUNC(click_pan), NULL); gtk_signal_connect(GTK_OBJECT(draw_pan), "motion_notify_event", GTK_SIGNAL_FUNC(pan_motion), NULL); gtk_signal_connect(GTK_OBJECT(pan_window), "key_press_event", GTK_SIGNAL_FUNC(key_pan), NULL); gtk_widget_set_events(draw_pan, GDK_ALL_EVENTS_MASK); gtk_widget_show(pan_window); } //// VIEW WINDOW static int vw_width, vw_height, vw_last_x, vw_last_y, vw_move_layer; static int vw_mouse_status; GtkWidget *vw_drawing; int vw_focus_on; void render_layers(unsigned char *rgb, int step, int px, int py, int pw, int ph, double czoom, int lr0, int lr1, int align) { image_info *image; unsigned char *tmp, **img; int i, j, ii, jj, ll, wx0, wy0, wx1, wy1, xof, xpm, opac, thid, tdis; int ddx, ddy, mx, mw, my, mh; int pw2 = pw, ph2 = ph, dx = 0, dy = 0; int zoom = 1, scale = 1; if (czoom < 1.0) zoom = rint(1.0 / czoom); else scale = rint(czoom); /* Align on selected layer if needed */ if (align && layers_total && layer_selected && (zoom > 1)) { dx = layer_table[layer_selected].x % zoom; if (dx < 0) dx += zoom; dy = layer_table[layer_selected].y % zoom; if (dy < 0) dy += zoom; } /* Apply background bounds if needed */ if (layers_pastry_cut) { if (px < 0) { rgb -= px * 3; pw2 += px; px = 0; } if (py < 0) { rgb -= py * step; ph2 += py; py = 0; } i = mem_width; j = mem_height; if (layers_total && layer_selected) { i = layer_table[0].image->image_.width; j = layer_table[0].image->image_.height; } i = ((i - dx + zoom - 1) / zoom) * scale; j = ((j - dy + zoom - 1) / zoom) * scale; if (pw2 > i) pw2 = i; if (ph2 > j) ph2 = j; if ((pw2 <= 0) || (ph2 <= 0)) return; } xof = px % scale; if (xof < 0) xof += scale; /* Get image-space bounds */ i = px % scale < 0 ? 1 : 0; j = py % scale < 0 ? 1 : 0; wx0 = (px / scale) * zoom + dx - i; wy0 = (py / scale) * zoom + dy - j; wx1 = px + pw2 - 1; wy1 = py + ph2 - 1; i = wx1 % scale < 0 ? 1 : 0; j = wy1 % scale < 0 ? 1 : 0; wx1 = (wx1 / scale) * zoom + dx - i; wy1 = (wy1 / scale) * zoom + dy - j; /* No point in doing that here */ thid = hide_image; hide_image = FALSE; tdis = channel_dis[CHN_ALPHA]; channel_dis[CHN_ALPHA] = FALSE; for (ll = lr0; ll <= lr1; ll++) { if (ll && !layer_table[ll].visible) continue; i = layer_table[ll].x; j = layer_table[ll].y; if (!ll) i = j = 0; image = ll == layer_selected ? &mem_image : &layer_table[ll].image->image_; ii = i + image->width; jj = j + image->height; if ((i > wx1) || (j > wy1) || (ii <= wx0) || (jj <= wy0)) continue; ddx = ddy = mx = my = 0; if (zoom > 1) { if (i > wx0) mx = (i - wx0 + zoom - 1) / zoom; if (j > wy0) my = (j - wy0 + zoom - 1) / zoom; ddx = wx0 + mx * zoom - i; ddy = wy0 + my * zoom - j; if (ii - 1 >= wx1) mw = pw2 - mx; else mw = (ii - i - ddx + zoom - 1) / zoom; if (jj - 1 >= wy1) mh = ph2 - my; else mh = (jj - j - ddy + zoom - 1) / zoom; if ((mw <= 0) || (mh <= 0)) continue; } else { if (i > wx0) mx = i * scale - px; else ddx = wx0 - i; if (j > wy0) my = j * scale - py; else ddy = wy0 - j; if (ii - 1 >= wx1) mw = pw2 - mx; else mw = ii * scale - px - mx; if (jj - 1 >= wy1) mh = ph2 - my; else mh = jj * scale - py - my; } tmp = rgb + my * step + mx * 3; xpm = -1; opac = 255; if (ll) { opac = (layer_table[ll].opacity * 255 + 50) / 100; xpm = image->trans; } img = image->img; setup_row(xof + mx, mw, czoom, ii - i, xpm, opac, image->bpp, image->pal); i = (py + my) % scale; if (i < 0) i += scale; mh = mh * zoom + i; for (j = -1; i < mh; i += zoom , tmp += step) { if (i / scale == j) { memcpy(tmp, tmp - step, mw * 3); continue; } j = i / scale; render_row(tmp, img, ddx, ddy + j, NULL); } } hide_image = thid; channel_dis[CHN_ALPHA] = tdis; } void view_render_rgb( unsigned char *rgb, int px, int py, int pw, int ph, double czoom ) { int tmp = overlay_alpha; if (!rgb) return; /* Paranoia */ /* Control transparency separately */ overlay_alpha = opaque_view; /* Always align on background layer */ render_layers(rgb, pw * 3, px, py, pw, ph, czoom, 0, layers_total, 0); overlay_alpha = tmp; } static guint idle_focus; void vw_focus_view() // Focus view window to main window { int w0, h0; float px, py, nv_h, nv_v, main_hv[2]; GtkAdjustment *hori, *vert; if (idle_focus) gtk_idle_remove(idle_focus); idle_focus = 0; if (!view_showing) return; // Bail out if not visible if (!vw_focus_on) return; // Only focus if user wants to if (vw_mouse_status) /* Dragging in progress - delay focus */ { vw_mouse_status |= 2; return; } canvas_center(main_hv); /* If we are editing a layer above the background make adjustments */ if (layers_total && layer_selected) { w0 = layer_table[0].image->image_.width; h0 = layer_table[0].image->image_.height; px = main_hv[0] * mem_width + layer_table[layer_selected].x; py = main_hv[1] * mem_height + layer_table[layer_selected].y; px = px < 0.0 ? 0.0 : px >= w0 ? w0 - 1 : px; py = py < 0.0 ? 0.0 : py >= h0 ? h0 - 1 : py; main_hv[0] = px / w0; main_hv[1] = py / h0; } hori = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(vw_scrolledwindow)); vert = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(vw_scrolledwindow)); nv_h = nv_v = 0.0; if (hori->page_size < vw_width) { nv_h = vw_width * main_hv[0] - hori->page_size * 0.5; if (nv_h + hori->page_size > vw_width) nv_h = vw_width - hori->page_size; if (nv_h < 0.0) nv_h = 0.0; } if ( vert->page_size < vw_height ) { nv_v = vw_height * main_hv[1] - vert->page_size * 0.5; if (nv_v + vert->page_size > vw_height) nv_v = vw_height - vert->page_size; if (nv_v < 0.0) nv_v = 0.0; } /* Do nothing if nothing changed */ if ((hori->value == nv_h) && (vert->value == nv_v)) return; hori->value = nv_h; vert->value = nv_v; /* Update position of view window scrollbars */ gtk_adjustment_value_changed(hori); gtk_adjustment_value_changed(vert); } void vw_focus_idle() { if (idle_focus) return; if (!view_showing) return; if (!vw_focus_on) return; idle_focus = threads_idle_add_priority(GTK_PRIORITY_REDRAW + 5, (GtkFunction)vw_focus_view, NULL); } gboolean vw_configure( GtkWidget *widget, GdkEventConfigure *event ) { int ww, wh, new_margin_x = 0, new_margin_y = 0; if (canvas_image_centre) { ww = vw_drawing->allocation.width - vw_width; wh = vw_drawing->allocation.height - vw_height; if (ww > 0) new_margin_x = ww >> 1; if (wh > 0) new_margin_y = wh >> 1; } if ((new_margin_x != margin_view_x) || (new_margin_y != margin_view_y)) { margin_view_x = new_margin_x; margin_view_y = new_margin_y; /* Force redraw of whole canvas as the margin has shifted */ gtk_widget_queue_draw(vw_drawing); } if (idle_focus) vw_focus_view(); // Time to refocus is NOW return TRUE; } void vw_align_size(float new_zoom) { if (!view_showing) return; if (new_zoom < MIN_ZOOM) new_zoom = MIN_ZOOM; if (new_zoom > MAX_ZOOM) new_zoom = MAX_ZOOM; if (new_zoom == vw_zoom) return; vw_zoom = new_zoom; vw_realign(); toolbar_zoom_update(); // View zoom doesn't get changed elsewhere } void vw_realign() { int sw = mem_width, sh = mem_height, i; if (!view_showing) return; if (layers_total && layer_selected) { sw = layer_table[0].image->image_.width; sh = layer_table[0].image->image_.height; } if (vw_zoom < 1.0) { i = rint(1.0 / vw_zoom); sw = (sw + i - 1) / i; sh = (sh + i - 1) / i; } else { i = rint(vw_zoom); sw *= i; sh *= i; } if ((vw_width != sw) || (vw_height != sh)) { vw_width = sw; vw_height = sh; wjcanvas_size(vw_drawing, vw_width, vw_height); } /* !!! Let refocus wait a bit - if window is being resized, view pane's * allocation could be not yet updated (canvas is done first) - WJ */ vw_focus_idle(); } static void vw_repaint(int px, int py, int pw, int ph) { unsigned char *rgb; int vport[4]; if ((pw <= 0) || (ph <= 0)) return; rgb = calloc(1, pw * ph * 3); if (rgb) { memset(rgb, mem_background, pw * ph * 3); view_render_rgb(rgb, px - margin_view_x, py - margin_view_y, pw, ph, vw_zoom); wjcanvas_get_vport(vw_drawing, vport); gdk_draw_rgb_image(vw_drawing->window, vw_drawing->style->black_gc, px - vport[0], py - vport[1], pw, ph, GDK_RGB_DITHER_NONE, rgb, pw * 3); free(rgb); } } #define REPAINT_VIEW_COST 256 static gboolean vw_expose(GtkWidget *widget, GdkEventExpose *event) { int vport[4]; wjcanvas_get_vport(widget, vport); repaint_expose(event, vport, vw_repaint, REPAINT_VIEW_COST); return (FALSE); } void vw_update_area(int x, int y, int w, int h) // Update x,y,w,h area of current image { int zoom, scale, vport[4], rxy[4]; if (!view_showing) return; if ( layer_selected > 0 ) { x += layer_table[layer_selected].x; y += layer_table[layer_selected].y; } if (vw_zoom < 1.0) { zoom = rint(1.0 / vw_zoom); w += x; h += y; x = floor_div(x + zoom - 1, zoom); y = floor_div(y + zoom - 1, zoom); w = (w - x * zoom + zoom - 1) / zoom; h = (h - y * zoom + zoom - 1) / zoom; if ((w <= 0) || (h <= 0)) return; } else { scale = rint(vw_zoom); x *= scale; y *= scale; w *= scale; h *= scale; } x += margin_view_x; y += margin_view_y; wjcanvas_get_vport(vw_drawing, vport); if (clip(rxy, x, y, x + w, y + h, vport)) gtk_widget_queue_draw_area(vw_drawing, rxy[0] - vport[0], rxy[1] - vport[1], rxy[2] - rxy[0], rxy[3] - rxy[1]); } static void vw_mouse_event(int event, int x, int y, guint state, guint button) { image_info *image; unsigned char *rgb, **img; int dx, dy, i, lx, ly, lw, lh, bpp, tpix, ppix, ofs; int zoom = 1, scale = 1; png_color *pal; i = vw_mouse_status; if (!button || !layers_total || (event == GDK_BUTTON_RELEASE)) { vw_mouse_status = 0; if (i & 2) vw_focus_view(); /* Delayed focus event */ return; } if (vw_zoom < 1.0) zoom = rint(1.0 / vw_zoom); else scale = rint(vw_zoom); dx = vw_last_x; dy = vw_last_y; vw_last_x = x = ((x - margin_view_x) / scale) * zoom; vw_last_y = y = ((y - margin_view_y) / scale) * zoom; vw_mouse_status |= 1; if (i & 1) { if (vw_move_layer > 0) move_layer_relative(vw_move_layer, x - dx, y - dy); } else { vw_move_layer = -1; // Which layer has the user clicked? for (i = layers_total; i > 0; i--) { lx = layer_table[i].x; ly = layer_table[i].y; image = i == layer_selected ? &mem_image : &layer_table[i].image->image_; lw = image->width; lh = image->height; bpp = image->bpp; img = image->img; pal = image->pal; rgb = img[CHN_IMAGE]; /* Is click within layer box? */ if ( x>=lx && x<(lx + lw) && y>=ly && y<(ly + lh) && layer_table[i].visible ) { ofs = (x-lx) + lw*(y-ly); /* Is transparency disabled? */ if (opaque_view) break; /* Is click on a non transparent pixel? */ if (img[CHN_ALPHA]) { if (img[CHN_ALPHA][ofs] < (bpp == 1 ? 255 : 1)) continue; } tpix = image->trans; if (tpix >= 0) { if (bpp == 1) ppix = rgb[ofs]; else { tpix = PNG_2_INT(pal[tpix]); ppix = MEM_2_INT(rgb, ofs * 3); } if (tpix == ppix) continue; } break; } } if (i > 0) vw_move_layer = i; layer_choose(i); } } static gboolean view_window_motion(GtkWidget *widget, GdkEventMotion *event) { GdkModifierType state; guint button = 0; int x, y, vport[4]; if (event->is_hint) gdk_window_get_pointer (event->window, &x, &y, &state); else { x = event->x; y = event->y; state = event->state; } if ((state & (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) == (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) button = 13; else if (state & GDK_BUTTON1_MASK) button = 1; else if (state & GDK_BUTTON3_MASK) button = 3; else if (state & GDK_BUTTON2_MASK) button = 2; /* If cursor got warped, will have another movement event to handle */ if (button && wjcanvas_bind_mouse(widget, event, x, y)) return (TRUE); wjcanvas_get_vport(widget, vport); vw_mouse_event(event->type, x + vport[0], y + vport[1], state, button); return (TRUE); } static gint view_window_button( GtkWidget *widget, GdkEventButton *event ) { int vport[4], pflag = event->type != GDK_BUTTON_RELEASE; /* Steal focus from dock window */ if (pflag && dock_focused()) { gtk_window_set_focus(GTK_WINDOW(main_window), NULL); return (TRUE); } wjcanvas_get_vport(widget, vport); vw_mouse_event(event->type, event->x + vport[0], event->y + vport[1], event->state, event->button); return (pflag); } void view_show() { if (view_showing) return; gtk_widget_ref(scrolledwindow_canvas); gtk_container_remove(GTK_CONTAINER(vbox_right), scrolledwindow_canvas); gtk_paned_pack1 (GTK_PANED (main_split), scrolledwindow_canvas, FALSE, TRUE); gtk_paned_pack2 (GTK_PANED (main_split), vw_scrolledwindow, FALSE, TRUE); view_showing = TRUE; xpack(vbox_right, main_split); gtk_widget_unref(scrolledwindow_canvas); gtk_widget_unref(vw_scrolledwindow); gtk_widget_unref(main_split); toolbar_viewzoom(TRUE); set_cursor(); /* Because canvas window is now a new one */ gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(menu_widgets[MENU_VIEW]), TRUE); vw_focus_view(); #if GTK_MAJOR_VERSION == 1 /* GTK+1 leaves adjustments in wrong state */ gtk_adjustment_value_changed( gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas))); if (!vw_focus_on) gtk_adjustment_value_changed( gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(vw_scrolledwindow))); #endif } void view_hide() { if (!view_showing) return; view_showing = FALSE; gtk_widget_ref(scrolledwindow_canvas); gtk_widget_ref(vw_scrolledwindow); gtk_widget_ref(main_split); gtk_container_remove(GTK_CONTAINER(vbox_right), main_split); gtk_container_remove(GTK_CONTAINER(main_split), scrolledwindow_canvas); gtk_container_remove(GTK_CONTAINER(main_split), vw_scrolledwindow); xpack(vbox_right, scrolledwindow_canvas); gtk_widget_unref(scrolledwindow_canvas); toolbar_viewzoom(FALSE); set_cursor(); /* Because canvas window is now a new one */ gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(menu_widgets[MENU_VIEW]), FALSE); #if GTK_MAJOR_VERSION == 1 /* GTK+1 leaves adjustments in wrong state */ gtk_adjustment_value_changed( gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas))); #endif } void pressed_centralize(int state) { canvas_image_centre = state; force_main_configure(); // Force configure of main window - for centalizing code } void pressed_view_focus(int state) { vw_focus_on = state; vw_focus_view(); } void init_view() { vw_width = 1; vw_height = 1; view_showing = FALSE; gtk_signal_connect( GTK_OBJECT(vw_drawing), "configure_event", GTK_SIGNAL_FUNC (vw_configure), NULL ); gtk_signal_connect( GTK_OBJECT(vw_drawing), "expose_event", GTK_SIGNAL_FUNC (vw_expose), NULL ); gtk_signal_connect( GTK_OBJECT(vw_drawing), "button_press_event", GTK_SIGNAL_FUNC (view_window_button), NULL ); gtk_signal_connect( GTK_OBJECT(vw_drawing), "button_release_event", GTK_SIGNAL_FUNC (view_window_button), NULL ); gtk_signal_connect( GTK_OBJECT(vw_drawing), "motion_notify_event", GTK_SIGNAL_FUNC (view_window_motion), NULL ); gtk_widget_set_events (vw_drawing, GDK_ALL_EVENTS_MASK); } //// TEXT TOOL GtkWidget *text_window, *text_font_window, *text_toggle[3], *text_spin[2]; #define PAD_SIZE 4 /* !!! This function invalidates "img" (may free or realloc it) */ int make_text_clipboard(unsigned char *img, int w, int h, int src_bpp) { unsigned char bkg[3], *src, *dest, *tmp, *pix = img, *mask = NULL; int i, l = w *h; int idx, masked, aa, ab, back, dest_bpp = MEM_BPP; idx = (mem_channel == CHN_IMAGE) && (mem_img_bpp == 1); /* Indexed image can't be antialiased */ aa = !idx && inifile_get_gboolean("fontAntialias0", FALSE); ab = inifile_get_gboolean("fontAntialias1", FALSE); back = inifile_get_gint32("fontBackground", 0); // !!! Bug - who said palette is unchanged? bkg[0] = mem_pal[back].red; bkg[1] = mem_pal[back].green; bkg[2] = mem_pal[back].blue; // !!! Inconsistency - why not use mask for utility channels, too? masked = !ab && (mem_channel == CHN_IMAGE); if (masked) { if ((src_bpp == 3) && (dest_bpp == 3)) mask = calloc(1, l); else mask = img , pix = NULL; if (!mask) goto fail; } else if (src_bpp < dest_bpp) pix = NULL; if (mask) /* Set up clipboard mask */ { src = img; dest = mask; for (i = 0; i < l; i++ , src += src_bpp) *dest++ = *src; /* Image is white on black */ if (!aa) mem_threshold(mask, l, 128); } if ((mask == img) && (src_bpp == 3)) /* Release excess memory */ if ((tmp = realloc(mask, l))) mask = img = tmp; if (!pix) pix = malloc(l * dest_bpp); if (!pix) { fail: free(img); return (FALSE); } src = img; dest = pix; /* Utility channel - have inversion instead of masking */ if (mem_channel != CHN_IMAGE) { int i, j = ab ? 0 : 255; for (i = 0; i < l; i++ , src += src_bpp) *dest++ = *src ^ j; /* Image is white on black */ if (!aa) mem_threshold(pix, l, 128); } /* Image with mask */ else if (mask) { int i, j, k = w * dest_bpp, l8 = 8 * dest_bpp, k8 = k * 8; int h8 = h < 8 ? h : 8, w8 = w < 8 ? k : l8; unsigned char *tmp = dest_bpp == 1 ? mem_col_pat : mem_col_pat24; for (j = 0; j < h8; j++) /* First strip */ { dest = pix + w * j * dest_bpp; memcpy(dest, tmp + l8 * j, w8); for (i = l8; i < k; i++ , dest++) dest[l8] = *dest; } src = pix; for (j = 8; j < h; j++ , src += k) /* Repeat strips */ memcpy(src + k8, src, k); } /* Indexed image */ else if (dest_bpp == 1) { int i, j; unsigned char *tmp; for (j = 0; j < h; j++) { tmp = mem_col_pat + (j & 7) * 8; for (i = 0; i < w; i++ , src += src_bpp) *dest++ = *src < 128 ? back : tmp[i & 7]; } } /* Non-antialiased RGB */ else if (!aa) { int i, j; unsigned char *tmp; for (j = 0; j < h; j++) { tmp = mem_col_pat24 + (j & 7) * (8 * 3); for (i = 0; i < w; i++ , src += src_bpp , dest += 3) { unsigned char *t2 = *src < 128 ? bkg : tmp + (i & 7) * 3; dest[0] = t2[0]; dest[1] = t2[1]; dest[2] = t2[2]; } } } /* Background-merged RGB */ else { int i, j; unsigned char *tmp; for (j = 0; j < h; j++) { tmp = mem_col_pat24 + (j & 7) * (8 * 3); for (i = 0; i < w; i++ , src += src_bpp , dest += 3) { unsigned char *t2 = tmp + (i & 7) * 3; int m = *src ^ 255, r = t2[0], g = t2[1], b = t2[2]; int kk; kk = 255 * r + m * (bkg[0] - r); dest[0] = (kk + (kk >> 8) + 1) >> 8; kk = 255 * g + m * (bkg[1] - g); dest[1] = (kk + (kk >> 8) + 1) >> 8; kk = 255 * b + m * (bkg[2] - b); dest[2] = (kk + (kk >> 8) + 1) >> 8; } } } /* Release excess memory */ if ((pix == img) && (dest_bpp < src_bpp)) if ((tmp = realloc(pix, l * dest_bpp))) pix = img = tmp; if ((img != pix) && (img != mask)) free(img); mem_clip_new(w, h, dest_bpp, 0, FALSE); mem_clipboard = pix; mem_clip_mask = mask; return (TRUE); } void render_text( GtkWidget *widget ) { GdkPixmap *text_pixmap; unsigned char *buf; int width, height, have_rgb = 0; #if GTK_MAJOR_VERSION == 2 PangoContext *context; PangoLayout *layout; PangoFontDescription *font_desc; int tx = PAD_SIZE, ty = PAD_SIZE; #if GTK2VERSION >= 6 /* GTK+ 2.6+ */ PangoMatrix matrix = PANGO_MATRIX_INIT; double degs, angle; int w2, h2; int rotate = inifile_get_gboolean( "fontAntialias2", FALSE ); #endif context = gtk_widget_create_pango_context (widget); layout = pango_layout_new( context ); font_desc = pango_font_description_from_string( inifile_get( "lastTextFont", "" ) ); pango_layout_set_font_description( layout, font_desc ); pango_font_description_free( font_desc ); pango_layout_set_text( layout, inifile_get( "textString", "" ), -1 ); #if GTK2VERSION >= 6 /* GTK+ 2.6+ */ if (rotate) // Rotation Toggle { degs = inifile_get_gint32("fontAngle", 0) * 0.01; angle = G_PI*degs/180; pango_matrix_rotate (&matrix, degs); pango_context_set_matrix (context, &matrix); pango_layout_context_changed( layout ); pango_layout_get_pixel_size( layout, &width, &height ); w2 = abs(width * cos(angle)) + abs(height * sin(angle)); h2 = abs(width * sin(angle)) + abs(height * cos(angle)); width = w2; height = h2; } else #endif pango_layout_get_pixel_size( layout, &width, &height ); width += PAD_SIZE*2; height += PAD_SIZE*2; text_pixmap = gdk_pixmap_new(widget->window, width, height, -1); gdk_draw_rectangle(text_pixmap, widget->style->black_gc, TRUE, 0, 0, width, height); gdk_draw_layout(text_pixmap, widget->style->white_gc, tx, ty, layout); g_object_unref( layout ); g_object_unref( context ); #else /* #if GTK_MAJOR_VERSION == 1 */ GdkFont *t_font = gdk_font_load( inifile_get( "lastTextFont", "" ) ); int lbearing, rbearing, f_width, ascent, descent; gdk_string_extents( t_font, inifile_get( "textString", "" ), &lbearing, &rbearing, &f_width, &ascent, &descent ); width = rbearing - lbearing + PAD_SIZE*2; height = ascent + descent + PAD_SIZE*2; text_pixmap = gdk_pixmap_new(widget->window, width, height, -1); gdk_draw_rectangle(text_pixmap, widget->style->black_gc, TRUE, 0, 0, width, height); gdk_draw_string(text_pixmap, t_font, widget->style->white_gc, PAD_SIZE - lbearing, ascent + PAD_SIZE, inifile_get("textString", "")); gdk_font_unref( t_font ); #endif buf = malloc(width * height * 3); if (buf) have_rgb = !!wj_get_rgb_image(widget->window, text_pixmap, buf, 0, 0, width, height); gdk_pixmap_unref(text_pixmap); // REMOVE PIXMAP text_paste = TEXT_PASTE_NONE; if (!have_rgb) free(buf); else have_rgb = make_text_clipboard(buf, width, height, 3); if (have_rgb) text_paste = TEXT_PASTE_GTK; else alert_box(_("Error"), _("Not enough memory to create clipboard"), NULL); } static void paste_text_ok(GtkWidget *widget) { gboolean antialias[3] = { gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(text_toggle[0])), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(text_toggle[1])), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(text_toggle[2])) }; char *t_string = (char *) gtk_font_selection_get_preview_text( GTK_FONT_SELECTION(text_font_window) ), *t_font_name = gtk_font_selection_get_font_name( GTK_FONT_SELECTION(text_font_window) ); #if GTK_MAJOR_VERSION == 1 if (!gtk_font_selection_get_font(GTK_FONT_SELECTION(text_font_window))) return; #endif #if GTK2VERSION >= 6 /* GTK+ 2.6+ */ inifile_set_gint32("fontAngle", rint(read_float_spin(text_spin[1]) * 100.0)); #endif if (mem_channel == CHN_IMAGE) { inifile_set_gint32( "fontBackground", read_spin(text_spin[0])); } inifile_set( "lastTextFont", t_font_name ); inifile_set( "textString", t_string ); inifile_set_gboolean( "fontAntialias0", antialias[0] ); inifile_set_gboolean( "fontAntialias1", antialias[1] ); inifile_set_gboolean( "fontAntialias2", antialias[2] ); render_text(widget); update_stuff(UPD_XCOPY); if (mem_clipboard) pressed_paste(TRUE); gtk_widget_destroy(widget); if (t_font_name) g_free(t_font_name); } void pressed_text() { GtkWidget *vbox, *hbox; text_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Paste Text"), GTK_WIN_POS_CENTER, TRUE ); gtk_window_set_default_size( GTK_WINDOW(text_window), 400, 400 ); vbox = add_vbox(text_window); text_font_window = xpack(vbox, gtk_font_selection_new()); gtk_widget_show(text_font_window); gtk_container_set_border_width (GTK_CONTAINER (text_font_window), 4); accept_ctrl_enter(GTK_FONT_SELECTION(text_font_window)->preview_entry); add_hseparator( vbox, 200, 10 ); hbox = pack5(vbox, gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox); text_toggle[0] = add_a_toggle( _("Antialias"), hbox, inifile_get_gboolean( "fontAntialias0", FALSE ) ); #if defined(U_MTK) || GTK_MAJOR_VERSION == 2 if (mem_img_bpp == 1) #endif gtk_widget_hide(text_toggle[0]); if (mem_channel != CHN_IMAGE) { text_toggle[1] = add_a_toggle( _("Invert"), hbox, inifile_get_gboolean( "fontAntialias1", FALSE ) ); } else { text_toggle[1] = add_a_toggle( _("Background colour ="), hbox, inifile_get_gboolean( "fontAntialias1", FALSE ) ); text_spin[0] = pack5(hbox, add_a_spin( inifile_get_gint32("fontBackground", 0) % mem_cols, 0, mem_cols - 1)); } text_toggle[2] = add_a_toggle( _("Angle of rotation ="), hbox, FALSE ); #if GTK2VERSION >= 6 /* GTK+ 2.6+ */ text_spin[1] = pack5(hbox, add_float_spin( inifile_get_gint32("fontAngle", 0) * 0.01, -360, 360)); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(text_toggle[2]), inifile_get_gboolean( "fontAntialias2", FALSE ) ); #else gtk_widget_hide( text_toggle[2] ); #endif add_hseparator( vbox, 200, 10 ); hbox = pack5(vbox, OK_box(0, text_window, _("Paste Text"), GTK_SIGNAL_FUNC(paste_text_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); gtk_font_selection_set_font_name( GTK_FONT_SELECTION(text_font_window), inifile_get( "lastTextFont", "-misc-fixed-bold-r-normal-*-*-120-*-*-c-*-iso8859-1" ) ); gtk_font_selection_set_preview_text( GTK_FONT_SELECTION(text_font_window), inifile_get( "textString", _("Enter Text Here") ) ); gtk_window_set_transient_for( GTK_WINDOW(text_window), GTK_WINDOW(main_window) ); gtk_widget_show(text_window); gtk_widget_grab_focus( GTK_FONT_SELECTION(text_font_window)->preview_entry ); } mtpaint-3.40/src/shifter.h0000644000175000000620000000126510654662452015055 0ustar muammarstaff/* shifter.h Copyright (C) 2006-2007 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ void pressed_shifter(); mtpaint-3.40/src/icons.h0000644000175000000620000000616111330403631014504 0ustar muammarstaff/* icons.h Copyright (C) 2007-2010 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #if GTK_MAJOR_VERSION == 1 #define XPM_ICON(X) xpm_##X##_xpm #define DEF_XPM_ICON(X) extern char *xpm_##X##_xpm[]; #else /* if GTK_MAJOR_VERSION == 2 */ #define XPM_ICON(X) desc_##X##_xpm #ifdef DEFINE_ICONS #define DEF_XPM_ICON(X) xpm_icon_desc desc_##X##_xpm = { #X, xpm_##X##_xpm }; #else #define DEF_XPM_ICON(X) extern xpm_icon_desc desc_##X##_xpm; #endif extern char *xpm_open_xpm[]; extern char *xpm_new_xpm[]; #endif extern char *icon_xpm[]; DEF_XPM_ICON(brcosa); DEF_XPM_ICON(case); DEF_XPM_ICON(centre); DEF_XPM_ICON(clone); DEF_XPM_ICON(close); DEF_XPM_ICON(copy); DEF_XPM_ICON(cut); DEF_XPM_ICON(down); DEF_XPM_ICON(ellipse2); DEF_XPM_ICON(ellipse); DEF_XPM_ICON(flip_hs); DEF_XPM_ICON(flip_vs); DEF_XPM_ICON(flood); DEF_XPM_ICON(grad_place); DEF_XPM_ICON(hidden); DEF_XPM_ICON(home); DEF_XPM_ICON(lasso); DEF_XPM_ICON(line); DEF_XPM_ICON(mode_blend); DEF_XPM_ICON(mode_cont); DEF_XPM_ICON(mode_csel); DEF_XPM_ICON(mode_mask); DEF_XPM_ICON(mode_opac); DEF_XPM_ICON(mode_tint2); DEF_XPM_ICON(mode_tint); DEF_XPM_ICON(new); DEF_XPM_ICON(newdir); DEF_XPM_ICON(open); DEF_XPM_ICON(paint); DEF_XPM_ICON(pan); DEF_XPM_ICON(paste); DEF_XPM_ICON(polygon); DEF_XPM_ICON(rect1); DEF_XPM_ICON(rect2); DEF_XPM_ICON(redo); DEF_XPM_ICON(rotate_as); DEF_XPM_ICON(rotate_cs); DEF_XPM_ICON(save); DEF_XPM_ICON(select); DEF_XPM_ICON(shuffle); DEF_XPM_ICON(smudge); DEF_XPM_ICON(text); DEF_XPM_ICON(undo); DEF_XPM_ICON(up); DEF_XPM_ICON(cline); DEF_XPM_ICON(layers); //DEF_XPM_ICON(config); extern unsigned char xbm_backslash_bits[], xbm_backslash_mask_bits[], xbm_circle_bits[], xbm_circle_mask_bits[], xbm_clone_bits[], xbm_clone_mask_bits[], xbm_flood_bits[], xbm_flood_mask_bits[], xbm_grad_bits[], xbm_grad_mask_bits[], xbm_horizontal_bits[], xbm_horizontal_mask_bits[], xbm_line_bits[], xbm_line_mask_bits[], xbm_picker_bits[], xbm_picker_mask_bits[], xbm_polygon_bits[], xbm_polygon_mask_bits[], xbm_ring4_bits[], xbm_ring4_mask_bits[], xbm_select_bits[], xbm_select_mask_bits[], xbm_shuffle_bits[], xbm_shuffle_mask_bits[], xbm_slash_bits[], xbm_slash_mask_bits[], xbm_smudge_bits[], xbm_smudge_mask_bits[], xbm_spray_bits[], xbm_spray_mask_bits[], xbm_square_bits[], xbm_square_mask_bits[], xbm_vertical_bits[], xbm_vertical_mask_bits[]; #define xbm_ring4_width 9 #define xbm_ring4_height 9 #define xbm_ring4_x_hot 4 #define xbm_ring4_y_hot 4 #define xbm_picker_width 17 #define xbm_picker_height 17 #define xbm_picker_x_hot 2 #define xbm_picker_y_hot 16 mtpaint-3.40/src/mygtk.c0000644000175000000620000033247211656044062014540 0ustar muammarstaff/* mygtk.c Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "canvas.h" #include "inifile.h" #include "fpick.h" #if GTK_MAJOR_VERSION == 1 #include #endif #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 #include #include #elif defined GDK_WINDOWING_WIN32 #define WIN32_LEAN_AND_MEAN #include #include #endif /// GENERIC WIDGET PRIMITIVES static GtkWidget *spin_new_x(GtkObject *adj, int fpart); GtkWidget *add_a_window( GtkWindowType type, char *title, GtkWindowPosition pos, gboolean modal ) { GtkWidget *win = gtk_window_new(type); gtk_window_set_title(GTK_WINDOW(win), title); gtk_window_set_position(GTK_WINDOW(win), pos); gtk_window_set_modal(GTK_WINDOW(win), modal); return win; } GtkWidget *add_a_button( char *text, int bord, GtkWidget *box, gboolean filler ) { GtkWidget *button = gtk_button_new_with_label(text); gtk_widget_show (button); gtk_box_pack_start (GTK_BOX (box), button, filler, filler, 0); gtk_container_set_border_width (GTK_CONTAINER (button), bord); return button; } GtkWidget *add_a_spin( int value, int min, int max ) { return (spin_new_x(gtk_adjustment_new(value, min, max, 1, 10, 0), 0)); } GtkWidget *add_a_table( int rows, int columns, int bord, GtkWidget *box ) { GtkWidget *table = pack(box, gtk_table_new(rows, columns, FALSE)); gtk_widget_show(table); gtk_container_set_border_width(GTK_CONTAINER(table), bord); return table; } GtkWidget *add_a_toggle( char *label, GtkWidget *box, gboolean value ) { return (pack(box, sig_toggle(label, value, NULL, NULL))); } GtkWidget *add_to_table_l(char *text, GtkWidget *table, int row, int column, int l, int spacing) { GtkWidget *label; label = gtk_label_new(text); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, column, column + l, row, row + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), spacing, spacing); gtk_label_set_justify(GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC (label), 0.0, 0.5); return (label); } GtkWidget *add_to_table(char *text, GtkWidget *table, int row, int column, int spacing) { return (add_to_table_l(text, table, row, column, 1, spacing)); } GtkWidget *to_table(GtkWidget *widget, GtkWidget *table, int row, int column, int spacing) { gtk_table_attach(GTK_TABLE(table), widget, column, column + 1, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, spacing); return (widget); } GtkWidget *to_table_l(GtkWidget *widget, GtkWidget *table, int row, int column, int l, int spacing) { gtk_table_attach(GTK_TABLE(table), widget, column, column + l, row, row + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions) (0), 0, spacing); return (widget); } GtkWidget *spin_to_table(GtkWidget *table, int row, int column, int spacing, int value, int min, int max) { GtkWidget *spin = add_a_spin( value, min, max ); gtk_table_attach(GTK_TABLE(table), spin, column, column+1, row, row+1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, spacing); return (spin); } GtkWidget *float_spin_to_table(GtkWidget *table, int row, int column, int spacing, double value, double min, double max) { GtkWidget *spin = add_float_spin(value, min, max); gtk_table_attach(GTK_TABLE(table), spin, column, column+1, row, row+1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, spacing); return (spin); } void add_hseparator( GtkWidget *widget, int xs, int ys ) { GtkWidget *sep = pack(widget, gtk_hseparator_new()); gtk_widget_show(sep); gtk_widget_set_usize(sep, xs, ys); } //// PROGRESS WINDOW static GtkWidget *progress_window, *progress_bar; static int prog_stop; static void do_cancel_progress() { prog_stop = 1; } static gboolean delete_progress(GtkWidget *widget, GdkEvent *event, gpointer data) { return TRUE; // This stops the user closing the window via the window manager } void progress_init(char *text, int canc) // Initialise progress window { GtkWidget *vbox6, *button_cancel, *viewport; progress_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Please Wait ..."), GTK_WIN_POS_CENTER, TRUE ); gtk_widget_set_usize (progress_window, 400, -2); viewport = gtk_viewport_new (NULL, NULL); gtk_widget_show(viewport); gtk_container_add( GTK_CONTAINER( progress_window ), viewport ); gtk_viewport_set_shadow_type( GTK_VIEWPORT(viewport), GTK_SHADOW_ETCHED_OUT ); vbox6 = add_vbox(viewport); progress_bar = pack(vbox6, gtk_progress_bar_new()); gtk_progress_set_format_string( GTK_PROGRESS (progress_bar), text ); gtk_progress_set_show_text( GTK_PROGRESS (progress_bar), TRUE ); gtk_container_set_border_width (GTK_CONTAINER (vbox6), 10); gtk_widget_show( progress_bar ); if ( canc == 1 ) { add_hseparator( vbox6, -2, 10 ); button_cancel = add_a_button(_("STOP"), 5, vbox6, TRUE); gtk_signal_connect(GTK_OBJECT(button_cancel), "clicked", GTK_SIGNAL_FUNC(do_cancel_progress), NULL); } gtk_signal_connect_object (GTK_OBJECT (progress_window), "delete_event", GTK_SIGNAL_FUNC (delete_progress), NULL); prog_stop = 0; gtk_widget_show( progress_window ); progress_update(0.0); } int progress_update(float val) // Update progress window { if (!progress_window) return (FALSE); gtk_progress_set_percentage( GTK_PROGRESS (progress_bar), val ); handle_events(); return (prog_stop); } void progress_end() // Close progress window { if (progress_window) { gtk_widget_destroy( progress_window ); progress_window = NULL; } } //// ALERT BOX static int alert_result; static void alert_reply(gpointer data) { if (!alert_result) alert_result = (int)data; } int alert_box(char *title, char *message, char *text1, ...) { va_list args; GtkWidget *alert, *button, *label; char *txt; int i = 0; GtkAccelGroup* ag = gtk_accel_group_new(); /* This function must be immune to pointer grabs */ release_grab(); alert = gtk_dialog_new(); gtk_window_set_title( GTK_WINDOW(alert), title ); gtk_window_set_modal( GTK_WINDOW(alert), TRUE ); gtk_window_set_position( GTK_WINDOW(alert), GTK_WIN_POS_CENTER ); gtk_container_set_border_width( GTK_CONTAINER(alert), 6 ); label = gtk_label_new( message ); gtk_label_set_line_wrap( GTK_LABEL(label), TRUE ); gtk_box_pack_start( GTK_BOX(GTK_DIALOG(alert)->vbox), label, TRUE, FALSE, 8 ); gtk_widget_show( label ); txt = text1 ? text1 : _("OK"); va_start(args, text1); while (TRUE) { button = add_a_button(txt, 2, GTK_DIALOG(alert)->action_area, TRUE); if (!i) gtk_widget_add_accelerator(button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(alert_reply), (gpointer)(++i)); if (!text1) break; if (!(txt = va_arg(args, char *))) break; } va_end(args); gtk_signal_connect_object(GTK_OBJECT(alert), "destroy", GTK_SIGNAL_FUNC(alert_reply), (gpointer)(++i)); gtk_window_set_transient_for( GTK_WINDOW(alert), GTK_WINDOW(main_window) ); gtk_widget_show(alert); gdk_window_raise(alert->window); alert_result = 0; gtk_window_add_accel_group(GTK_WINDOW(alert), ag); while (!alert_result) gtk_main_iteration(); if (alert_result != i) gtk_widget_destroy(alert); else alert_result = 1; return (alert_result); } // Add page to notebook GtkWidget *add_new_page(GtkWidget *notebook, char *name) { GtkWidget *page, *label; page = gtk_vbox_new(FALSE, 0); gtk_widget_show(page); label = gtk_label_new(name); gtk_widget_show(label); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, label); return (page); } // Slider-spin combo (practically a new widget class) GtkWidget *mt_spinslide_new(int swidth, int sheight) { GtkWidget *box, *slider, *spin; GtkObject *adj; adj = gtk_adjustment_new(0, 0, 1, 1, 10, 0); box = gtk_hbox_new(FALSE, 0); slider = gtk_hscale_new(GTK_ADJUSTMENT(adj)); gtk_box_pack_start(GTK_BOX(box), slider, swidth < 0, TRUE, 0); gtk_widget_set_usize(slider, swidth, sheight); gtk_scale_set_draw_value(GTK_SCALE(slider), FALSE); gtk_scale_set_digits(GTK_SCALE(slider), 0); spin = spin_new_x(adj, 0); gtk_box_pack_start(GTK_BOX(box), spin, swidth >= 0, TRUE, 2); gtk_widget_show_all(box); return (box); } void mt_spinslide_set_range(GtkWidget *spinslide, int minv, int maxv) { GtkAdjustment *adj = SPINSLIDE_ADJUSTMENT(spinslide); adj->lower = minv; adj->upper = maxv; gtk_adjustment_changed(adj); } int mt_spinslide_get_value(GtkWidget *spinslide) { GtkSpinButton *spin = GTK_SPIN_BUTTON(BOX_CHILD_1(spinslide)); gtk_spin_button_update(spin); return (gtk_spin_button_get_value_as_int(spin)); } /* Different in that this doesn't force slider to integer-value position */ int mt_spinslide_read_value(GtkWidget *spinslide) { GtkSpinButton *spin = GTK_SPIN_BUTTON(BOX_CHILD_1(spinslide)); return (gtk_spin_button_get_value_as_int(spin)); } void mt_spinslide_set_value(GtkWidget *spinslide, int value) { GtkSpinButton *spin = GTK_SPIN_BUTTON(BOX_CHILD_1(spinslide)); gtk_spin_button_set_value(spin, value); } /* void handler(GtkAdjustment *adjustment, gpointer user_data); */ void mt_spinslide_connect(GtkWidget *spinslide, GtkSignalFunc handler, gpointer user_data) { GtkAdjustment *adj = SPINSLIDE_ADJUSTMENT(spinslide); gtk_signal_connect(GTK_OBJECT(adj), "value_changed", handler, user_data); } // Managing batches of radio buttons with minimum of fuss static void wj_radio_toggle(GtkWidget *btn, gpointer idx) { if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btn))) return; *(int *)gtk_object_get_user_data(GTK_OBJECT(btn->parent)) = (int)idx; } /* void handler(GtkWidget *btn, gpointer user_data); */ GtkWidget *wj_radio_pack(char **names, int cnt, int vnum, int idx, gpointer var, GtkSignalFunc handler) { int i, j; GtkWidget *box, *wbox, *button = NULL; GtkSignalFunc hdl = handler; if (!hdl && var) hdl = GTK_SIGNAL_FUNC(wj_radio_toggle); box = wbox = vnum > 0 ? gtk_hbox_new(FALSE, 0) : gtk_vbox_new(FALSE, 0); if (vnum < 2) gtk_object_set_user_data(GTK_OBJECT(wbox), var); for (i = j = 0; (i != cnt) && names[i]; i++) { if (!names[i][0]) continue; button = gtk_radio_button_new_with_label_from_widget( GTK_RADIO_BUTTON_0(button), names[i]); if ((vnum > 1) && !(j % vnum)) { wbox = xpack(box, gtk_vbox_new(FALSE, 0)); gtk_object_set_user_data(GTK_OBJECT(wbox), var); } gtk_container_set_border_width(GTK_CONTAINER(button), 5); pack(wbox, button); if (i == idx) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(button), TRUE); if (hdl) gtk_signal_connect(GTK_OBJECT(button), "toggled", hdl, (gpointer)(i)); j++; } if (hdl != handler) *(int *)var = idx < i ? idx : 0; gtk_widget_show_all(box); return (box); } // Convert window close into a button click ("Cancel" or whatever) static gboolean do_delete_to_click(GtkWidget *widget, GdkEvent *event, gpointer data) { gtk_signal_emit_by_name(GTK_OBJECT(data), "clicked"); return (TRUE); // Click handler can destroy window, or let it be } void delete_to_click(GtkWidget *window, GtkWidget *button) { gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(do_delete_to_click), button); } // Buttons for standard dialogs GtkWidget *OK_box(int border, GtkWidget *window, char *nOK, GtkSignalFunc OK, char *nCancel, GtkSignalFunc Cancel) { GtkWidget *hbox, *ok_button, *cancel_button; GtkAccelGroup* ag = gtk_accel_group_new(); hbox = gtk_hbox_new(TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), border); ok_button = cancel_button = gtk_button_new_with_label(nOK); gtk_container_set_border_width(GTK_CONTAINER(ok_button), 5); gtk_signal_connect_object(GTK_OBJECT(ok_button), "clicked", OK, GTK_OBJECT(window)); if (nCancel) { cancel_button = xpack(hbox, gtk_button_new_with_label(nCancel)); gtk_container_set_border_width(GTK_CONTAINER(cancel_button), 5); gtk_signal_connect_object(GTK_OBJECT(cancel_button), "clicked", Cancel, GTK_OBJECT(window)); } xpack(hbox, ok_button); gtk_widget_add_accelerator(cancel_button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); gtk_widget_add_accelerator(ok_button, "clicked", ag, GDK_Return, 0, (GtkAccelFlags)0); gtk_widget_add_accelerator(ok_button, "clicked", ag, GDK_KP_Enter, 0, (GtkAccelFlags)0); gtk_window_add_accel_group(GTK_WINDOW(window), ag); delete_to_click(window, cancel_button); gtk_object_set_user_data(GTK_OBJECT(hbox), (gpointer)window); gtk_widget_show_all(hbox); return (hbox); } static GtkObject *OK_box_ins(GtkWidget *box, GtkWidget *button) { xpack(box, button); gtk_box_reorder_child(GTK_BOX(box), button, 1); gtk_container_set_border_width(GTK_CONTAINER(button), 5); gtk_widget_show(button); return (GTK_OBJECT(gtk_object_get_user_data(GTK_OBJECT(box)))); } GtkWidget *OK_box_add(GtkWidget *box, char *name, GtkSignalFunc Handler) { GtkWidget *button = gtk_button_new_with_label(name); GtkObject *win = OK_box_ins(box, button); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", Handler, win); return (button); } GtkWidget *OK_box_add_toggle(GtkWidget *box, char *name, GtkSignalFunc Handler) { GtkWidget *button = gtk_toggle_button_new_with_label(name); GtkObject *win = OK_box_ins(box, button); gtk_signal_connect(GTK_OBJECT(button), "toggled", Handler, win); return (button); } // Easier way with spinbuttons int read_spin(GtkWidget *spin) { /* Needed in GTK+2 for late changes */ gtk_spin_button_update(GTK_SPIN_BUTTON(spin)); return (gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin))); } double read_float_spin(GtkWidget *spin) { /* Needed in GTK+2 for late changes */ gtk_spin_button_update(GTK_SPIN_BUTTON(spin)); return (GTK_SPIN_BUTTON(spin)->adjustment->value); } #if (GTK_MAJOR_VERSION == 1) && !U_MTK #define MIN_SPIN_BUTTON_WIDTH 30 /* More-or-less correctly evaluate spinbutton size */ static void spin_size_req(GtkWidget *widget, GtkRequisition *requisition, gpointer user_data) { GtkSpinButton *spin = GTK_SPIN_BUTTON(widget); char num[128]; int l1, l2; num[0] = '0'; sprintf(num + 1, "%.*f", spin->digits, spin->adjustment->lower); l1 = gdk_string_width(widget->style->font, num); sprintf(num + 1, "%.*f", spin->digits, spin->adjustment->upper); l2 = gdk_string_width(widget->style->font, num); if (l1 < l2) l1 = l2; if (l1 > MIN_SPIN_BUTTON_WIDTH) requisition->width += l1 - MIN_SPIN_BUTTON_WIDTH; } #endif static GtkWidget *spin_new_x(GtkObject *adj, int fpart) { GtkWidget *spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, fpart); #if (GTK_MAJOR_VERSION == 1) && !U_MTK gtk_signal_connect_after(GTK_OBJECT(spin), "size_request", GTK_SIGNAL_FUNC(spin_size_req), NULL); #endif gtk_widget_show(spin); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin), TRUE); return (spin); } GtkWidget *add_float_spin(double value, double min, double max) { return (spin_new_x(gtk_adjustment_new(value, min, max, 1, 10, 0), 2)); } /* void handler(GtkAdjustment *adjustment, gpointer user_data); */ void spin_connect(GtkWidget *spin, GtkSignalFunc handler, gpointer user_data) { GtkAdjustment *adj; adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(spin)); gtk_signal_connect(GTK_OBJECT(adj), "value_changed", handler, user_data); } #if GTK_MAJOR_VERSION == 1 void spin_set_range(GtkWidget *spin, int min, int max) { GtkAdjustment *adj = GTK_SPIN_BUTTON(spin)->adjustment; adj->lower = min; adj->upper = max; gtk_adjustment_set_value(adj, adj->value); gtk_adjustment_changed(adj); } #endif // Wrapper for utf8->C and C->utf8 translation char *gtkxncpy(char *dest, const char *src, int cnt, int u) { #if GTK_MAJOR_VERSION == 2 char *c = (u ? g_locale_to_utf8 : g_locale_from_utf8)((gchar *)src, -1, NULL, NULL, NULL); if (c) { if (!dest) return (c); g_strlcpy(dest, c, cnt); g_free(c); } else #endif { if (!dest) return (g_strdup(src)); u = strlen(src); if (u >= cnt) u = cnt - 1; /* Allow for overlapping buffers */ memmove(dest, src, u); dest[u] = 0; } return (dest); } // A more sane replacement for strncat() char *strnncat(char *dest, const char *src, int max) { int l = strlen(dest); if (max > l) strncpy(dest + l, src, max - l - 1); dest[max - 1] = 0; return (dest); } // Add C strings to a string with explicit length char *wjstrcat(char *dest, int max, const char *s0, int l, ...) { va_list args; char *s, *w; int ll; if (!dest) { max = l + 1; va_start(args, l); while ((s = va_arg(args, char *))) max += strlen(s); va_end(args); dest = malloc(max); if (!dest) return (NULL); } va_start(args, l); w = dest; s = (char *)s0; ll = l; while (TRUE) { if (ll >= max) ll = max - 1; memcpy(w, s, ll); w += ll; if ((max -= ll) <= 1) break; s = va_arg(args, char *); if (!s) break; ll = strlen(s); } va_end(args); *w = 0; return (dest); } // Add directory to filename char *file_in_dir(char *dest, const char *dir, const char *file, int cnt) { int dl = strlen(dir); return wjstrcat(dest, cnt, dir, dl - (dir[dl - !!dl] == DIR_SEP), DIR_SEP_STR, file, NULL); } char *file_in_homedir(char *dest, const char *file, int cnt) { return (file_in_dir(dest, get_home_directory(), file, cnt)); } // Extracting widget from GtkTable GtkWidget *table_slot(GtkWidget *table, int row, int col) { GList *curr; for (curr = GTK_TABLE(table)->children; curr; curr = curr->next) { if ((((GtkTableChild *)curr->data)->left_attach == col) && (((GtkTableChild *)curr->data)->top_attach == row)) return (((GtkTableChild *)curr->data)->widget); } return (NULL); } // Packing framed widget GtkWidget *add_with_frame_x(GtkWidget *box, char *text, GtkWidget *widget, int border, int expand) { GtkWidget *frame = gtk_frame_new(text); gtk_widget_show(frame); if (box) gtk_box_pack_start(GTK_BOX(box), frame, !!expand, !!expand, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), border); gtk_container_add(GTK_CONTAINER(frame), widget); return (frame); } GtkWidget *add_with_frame(GtkWidget *box, char *text, GtkWidget *widget) { return (add_with_frame_x(box, text, widget, 5, FALSE)); } // Option menu static void wj_option(GtkMenuItem *menuitem, gpointer user_data) { *(int *)user_data = (int)gtk_object_get_user_data(GTK_OBJECT(menuitem)); } #if GTK_MAJOR_VERSION == 2 /* Cause the size to be properly reevaluated */ void wj_option_realize(GtkWidget *widget, gpointer user_data) { gtk_signal_emit_by_name(GTK_OBJECT(gtk_option_menu_get_menu( GTK_OPTION_MENU(widget))), "selection_done"); } #endif /* void handler(GtkMenuItem *menuitem, gpointer user_data); */ GtkWidget *wj_option_menu(char **names, int cnt, int idx, gpointer var, GtkSignalFunc handler) { int i, j; GtkWidget *opt, *menu, *item; GtkSignalFunc hdl = handler; if (!hdl && var) hdl = GTK_SIGNAL_FUNC(wj_option); opt = gtk_option_menu_new(); menu = gtk_menu_new(); for (i = j = 0; (i != cnt) && names[i]; i++) { if (!names[i][0]) continue; item = gtk_menu_item_new_with_label(names[i]); gtk_object_set_user_data(GTK_OBJECT(item), (gpointer)i); if (hdl) gtk_signal_connect(GTK_OBJECT(item), "activate", hdl, var); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); if (i == idx) j = i; } if (hdl != handler) *(int *)var = idx < i ? idx : 0; gtk_widget_show_all(menu); gtk_widget_show(opt); /* !!! Show now - or size won't be set properly */ gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); gtk_option_menu_set_history(GTK_OPTION_MENU(opt), j); FIX_OPTION_MENU_SIZE(opt); return (opt); } int wj_option_menu_get_history(GtkWidget *optmenu) { optmenu = gtk_option_menu_get_menu(GTK_OPTION_MENU(optmenu)); optmenu = gtk_menu_get_active(GTK_MENU(optmenu)); return ((int)gtk_object_get_user_data(GTK_OBJECT(optmenu))); } // Set minimum size for a widget static void widget_size_req(GtkWidget *widget, GtkRequisition *requisition, gpointer user_data) { int h = (guint32)user_data >> 16, w = (guint32)user_data & 0xFFFF; if (h && (requisition->height < h)) requisition->height = h; if (w && (requisition->width < w)) requisition->width = w; } /* !!! Warning: this function can't extend box containers in their "natural" * direction, because GTK+ takes shortcuts with their allocation, abusing * requisition value. */ void widget_set_minsize(GtkWidget *widget, int width, int height) { guint32 hw; if ((width <= 0) && (height <= 0)) return; hw = (height < 0 ? 0 : height & 0xFFFF) << 16 | (width < 0 ? 0 : width & 0xFFFF); gtk_signal_connect_after(GTK_OBJECT(widget), "size_request", GTK_SIGNAL_FUNC(widget_size_req), (gpointer)hw); } /* This function is a workaround for boxes and the like, wrapping a widget in a * GtkAlignment and setting size on that - or it can be seen as GtkAlignment * widget with extended functionality - WJ */ GtkWidget *widget_align_minsize(GtkWidget *widget, int width, int height) { GtkWidget *align = gtk_alignment_new(0.5, 0.5, 1.0, 1.0); gtk_widget_show(align); gtk_container_add(GTK_CONTAINER(align), widget); widget_set_minsize(align, width, height); return (align); } // Make widget request no less size than before (in one direction) #define KEEPSIZE_KEY "mtPaint.keepsize" static guint keepsize_key; /* And if user manages to change theme on the fly... well, more fool him ;-) */ static void widget_size_keep(GtkWidget *widget, GtkRequisition *requisition, gpointer user_data) { int l, l0; l = (int)gtk_object_get_data_by_id(GTK_OBJECT(widget), keepsize_key); if (user_data) // Adjust height if set, width if clear { if ((l0 = requisition->height) < l) requisition->height = l; } else if ((l0 = requisition->width) < l) requisition->width = l; if (l0 > l) gtk_object_set_data_by_id(GTK_OBJECT(widget), keepsize_key, (gpointer)l0); } /* !!! Warning: this function can't extend box containers in their "natural" * direction, because GTK+ takes shortcuts with their allocation, abusing * requisition value. */ void widget_set_keepsize(GtkWidget *widget, int keep_height) { if (!keepsize_key) keepsize_key = g_quark_from_static_string(KEEPSIZE_KEY); gtk_signal_connect_after(GTK_OBJECT(widget), "size_request", GTK_SIGNAL_FUNC(widget_size_keep), (gpointer)keep_height); } // Signalled toggles static void sig_toggle_toggled(GtkToggleButton *togglebutton, gpointer user_data) { *(int *)user_data = gtk_toggle_button_get_active(togglebutton); } static void make_sig_toggle(GtkWidget *tog, int value, gpointer var, GtkSignalFunc handler) { if (!handler && var) { *(int *)var = value; handler = GTK_SIGNAL_FUNC(sig_toggle_toggled); } gtk_widget_show(tog); gtk_container_set_border_width(GTK_CONTAINER(tog), 5); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tog), value); if (handler) gtk_signal_connect(GTK_OBJECT(tog), "toggled", handler, (gpointer)var); } GtkWidget *sig_toggle(char *label, int value, gpointer var, GtkSignalFunc handler) { GtkWidget *tog = gtk_check_button_new_with_label(label); make_sig_toggle(tog, value, var, handler); return (tog); } GtkWidget *sig_toggle_button(char *label, int value, gpointer var, GtkSignalFunc handler) { GtkWidget *tog = gtk_toggle_button_new_with_label(label); make_sig_toggle(tog, value, var, handler); return (tog); } // Path box static void click_file_browse(GtkWidget *widget, gpointer data) { int flag = FPICK_LOAD; GtkWidget *fs; if ((int)data == FS_SELECT_DIR) flag |= FPICK_DIRS_ONLY; fs = fpick_create((char *)gtk_object_get_user_data(GTK_OBJECT(widget)), flag); gtk_object_set_data(GTK_OBJECT(fs), FS_ENTRY_KEY, BOX_CHILD_0(widget->parent)); fs_setup(fs, (int)data); } GtkWidget *mt_path_box(char *name, GtkWidget *box, char *title, int fsmode) { GtkWidget *hbox, *entry, *button; hbox = gtk_hbox_new(FALSE, 0); gtk_widget_show(hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); add_with_frame(box, name, hbox); entry = xpack5(hbox, gtk_entry_new()); gtk_widget_show(entry); button = add_a_button(_("Browse"), 2, hbox, FALSE); gtk_object_set_user_data(GTK_OBJECT(button), title); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_file_browse), (gpointer)fsmode); return (entry); } // Workaround for GtkCList reordering bug /* This bug is the favorite pet of GNOME developer Behdad Esfahbod * See http://bugzilla.gnome.org/show_bug.cgi?id=400249#c2 */ #if GTK_MAJOR_VERSION == 2 static void clist_drag_fix(GtkWidget *widget, GdkDragContext *drag_context, gpointer user_data) { g_dataset_remove_data(drag_context, "gtk-clist-drag-source"); } void clist_enable_drag(GtkWidget *clist) { gtk_signal_connect(GTK_OBJECT(clist), "drag_begin", GTK_SIGNAL_FUNC(clist_drag_fix), NULL); gtk_signal_connect(GTK_OBJECT(clist), "drag_end", GTK_SIGNAL_FUNC(clist_drag_fix), NULL); gtk_clist_set_reorderable(GTK_CLIST(clist), TRUE); } #else /* GTK1 doesn't have this bug */ void clist_enable_drag(GtkWidget *clist) { gtk_clist_set_reorderable(GTK_CLIST(clist), TRUE); } #endif // Move browse-mode selection in GtkCList without invoking callbacks void clist_reselect_row(GtkCList *clist, int n) { GtkWidget *widget; if (n < 0) return; #if GTK_MAJOR_VERSION == 1 GTK_CLIST_CLASS(((GtkObject *)clist)->klass)->select_row(clist, n, -1, NULL); #else /* if GTK_MAJOR_VERSION == 2 */ GTK_CLIST_GET_CLASS(clist)->select_row(clist, n, -1, NULL); #endif /* !!! Focus fails to follow selection in browse mode - have to move * it here; but it means a full redraw is necessary afterwards */ if (clist->focus_row == n) return; clist->focus_row = n; widget = GTK_WIDGET(clist); if (GTK_WIDGET_HAS_FOCUS(widget) && !clist->freeze_count) gtk_widget_queue_draw(widget); } // Move browse-mode selection in GtkList /* !!! An evil hack for reliably moving focus around in GtkList */ void list_select_item(GtkWidget *list, GtkWidget *item) { GtkWidget *win, *fw = NULL; win = gtk_widget_get_toplevel(list); if (GTK_IS_WINDOW(win)) fw = GTK_WINDOW(win)->focus_widget; /* Focus is somewhere in list - move it, selection will follow */ if (fw && gtk_widget_is_ancestor(fw, list)) gtk_widget_grab_focus(item); else /* Focus is elsewhere - move whatever remains, then */ { /* !!! For simplicity, an undocumented field is used; a bit less hacky * but longer is to set focus child to item, NULL, and item again - WJ */ gtk_container_set_focus_child(GTK_CONTAINER(list), item); GTK_LIST(list)->last_focus_child = item; } } // Properly destroy transient window void destroy_dialog(GtkWidget *window) { /* Needed in Windows to stop GTK+ lowering the main window */ gtk_window_set_transient_for(GTK_WINDOW(window), NULL); gtk_widget_destroy(window); } // Settings notebook GtkWidget *plain_book(GtkWidget **pages, int npages) { GtkWidget *notebook = gtk_notebook_new(); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), FALSE); while (npages--) { *pages = gtk_vbox_new(FALSE, 0); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), *pages, NULL); pages++; } gtk_widget_show_all(notebook); return (notebook); } static void toggle_book(GtkToggleButton *button, GtkNotebook *book) { int i = gtk_toggle_button_get_active(button); gtk_notebook_set_page(book, i ? 1 : 0); } GtkWidget *buttoned_book(GtkWidget **page0, GtkWidget **page1, GtkWidget **button, char *button_label) { GtkWidget *notebook, *pages[2]; notebook = plain_book(pages, 2); *page0 = pages[0]; *page1 = pages[1]; *button = sig_toggle_button(button_label, FALSE, GTK_NOTEBOOK(notebook), GTK_SIGNAL_FUNC(toggle_book)); return (notebook); } // Most common use of boxes GtkWidget *pack(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); return (widget); } GtkWidget *xpack(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_start(GTK_BOX(box), widget, TRUE, TRUE, 0); return (widget); } GtkWidget *pack_end(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_end(GTK_BOX(box), widget, FALSE, FALSE, 0); return (widget); } GtkWidget *pack5(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 5); return (widget); } GtkWidget *xpack5(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_start(GTK_BOX(box), widget, TRUE, TRUE, 5); return (widget); } GtkWidget *pack_end5(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_end(GTK_BOX(box), widget, FALSE, FALSE, 5); return (widget); } // Put vbox into container GtkWidget *add_vbox(GtkWidget *cont) { GtkWidget *box = gtk_vbox_new(FALSE, 0); gtk_widget_show(box); gtk_container_add(GTK_CONTAINER(cont), box); return (box); } // Save/restore window positions void win_store_pos(GtkWidget *window, char *inikey) { char name[128]; gint xywh[4]; int i, l = strlen(inikey); memcpy(name, inikey, l); name[l++] = '_'; name[l + 1] = '\0'; gdk_window_get_size(window->window, xywh + 2, xywh + 3); gdk_window_get_root_origin(window->window, xywh + 0, xywh + 1); for (i = 0; i < 4; i++) { name[l] = "xywh"[i]; inifile_set_gint32(name, xywh[i]); } } void win_restore_pos(GtkWidget *window, char *inikey, int defx, int defy, int defw, int defh) { char name[128]; int i, l = strlen(inikey), xywh[4] = { defx, defy, defw, defh }; memcpy(name, inikey, l); name[l++] = '_'; name[l + 1] = '\0'; for (i = 0; i < 4; i++) { if (xywh[i] < 0) continue; /* Default of -1 means auto-size */ name[l] = "xywh"[i]; xywh[i] = inifile_get_gint32(name, xywh[i]); } gtk_window_set_default_size(GTK_WINDOW(window), xywh[2], xywh[3]); gtk_widget_set_uposition(window, xywh[0], xywh[1]); } // Fix for paned widgets losing focus in GTK+1 #if GTK_MAJOR_VERSION == 1 static void fix_gdk_events(GdkWindow *window) { XWindowAttributes attrs; GdkWindowPrivate *private = (GdkWindowPrivate *)window; if (!private || private->destroyed) return; XGetWindowAttributes(GDK_WINDOW_XDISPLAY(window), private->xwindow, &attrs); XSelectInput(GDK_WINDOW_XDISPLAY(window), private->xwindow, attrs.your_event_mask & ~OwnerGrabButtonMask); } static void paned_realize(GtkWidget *widget, gpointer user_data) { fix_gdk_events(widget->window); fix_gdk_events(GTK_PANED(widget)->handle); } void paned_mouse_fix(GtkWidget *widget) { gtk_signal_connect_after(GTK_OBJECT(widget), "realize", GTK_SIGNAL_FUNC(paned_realize), NULL); } #endif // Init-time bugfixes /* Bugs: GtkViewport size request in GTK+1; GtkHScale breakage in Smooth Theme * Engine in GTK+1; mixing up keys in GTK+2/Windows; opaque focus rectangle in * Gtk-Qt theme engine (v0.8) in GTK+2/X */ #if GTK_MAJOR_VERSION == 1 /* This is gtk_viewport_size_request() from GTK+ 1.2.10 with stupid bugs fixed */ static void gtk_viewport_size_request_fixed(GtkWidget *widget, GtkRequisition *requisition) { GtkBin *bin; GtkRequisition child_requisition; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_VIEWPORT(widget)); g_return_if_fail(requisition != NULL); bin = GTK_BIN(widget); requisition->width = requisition->height = GTK_CONTAINER(widget)->border_width * 2; if (GTK_VIEWPORT(widget)->shadow_type != GTK_SHADOW_NONE) { requisition->width += widget->style->klass->xthickness * 2; requisition->height += widget->style->klass->ythickness * 2; } if (bin->child && GTK_WIDGET_VISIBLE(bin->child)) { gtk_widget_size_request(bin->child, &child_requisition); requisition->width += child_requisition.width; requisition->height += child_requisition.height; } } /* This is for preventing Smooth Engine from ruining horizontal sliders */ static void (*hsizereq)(GtkWidget *widget, GtkRequisition *requisition); static void gtk_hscale_size_request_smooth_fixed(GtkWidget *widget, GtkRequisition *requisition) { int realf = GTK_WIDGET_FLAGS(widget) & GTK_REALIZED; GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); hsizereq(widget, requisition); GTK_WIDGET_SET_FLAGS(widget, realf); } typedef struct { GtkThemeEngine engine; void *library; void *name; void (*init) (GtkThemeEngine *); void (*exit) (void); guint refcount; } GtkThemeEnginePrivate; void gtk_init_bugfixes() { GtkWidget *hs; GtkStyle *st; GtkWidgetClass *wc; char *engine = ""; ((GtkWidgetClass*)gtk_type_class(GTK_TYPE_VIEWPORT))->size_request = gtk_viewport_size_request_fixed; /* Detect if Smooth Engine is active, and fix its bugs */ st = gtk_rc_get_style(hs = gtk_hscale_new(NULL)); if (st && st->engine) engine = ((GtkThemeEnginePrivate *)(st->engine))->name; if (!strcmp(engine, "smooth")) { wc = gtk_type_class(GTK_TYPE_HSCALE); hsizereq = wc->size_request; wc->size_request = gtk_hscale_size_request_smooth_fixed; } gtk_object_sink(GTK_OBJECT(hs)); /* Destroy a floating-ref thing */ } #elif defined GDK_WINDOWING_WIN32 static int win_last_vk; static guint32 win_last_lp; /* Event filter to look at WM_KEYDOWN and WM_SYSKEYDOWN */ static GdkFilterReturn win_keys_peek(GdkXEvent *xevent, GdkEvent *event, gpointer data) { MSG *msg = xevent; if ((msg->message == WM_KEYDOWN) || (msg->message == WM_SYSKEYDOWN)) { win_last_vk = msg->wParam; win_last_lp = msg->lParam; } return (GDK_FILTER_CONTINUE); } void gtk_init_bugfixes() { gdk_window_add_filter(NULL, (GdkFilterFunc)win_keys_peek, NULL); } #else /* if defined GDK_WINDOWING_X11 */ /* Gtk-Qt's author was deluded when he decided he knows how to draw focus; * doing nothing is *FAR* preferable to opaque box over a widget - WJ */ static void fake_draw_focus() { return; } void gtk_init_bugfixes() { GtkWidget *bt; GtkStyleClass *sc; GType qtt; /* Detect if Gtk-Qt engine is active, and fix its bugs */ bt = gtk_button_new(); qtt = g_type_from_name("QtEngineStyle"); if (qtt) { sc = g_type_class_ref(qtt); /* Have to ref to get it to init */ sc->draw_focus = fake_draw_focus; } gtk_object_sink(GTK_OBJECT(bt)); /* Destroy a floating-ref thing */ } #endif // Whatever is needed to move mouse pointer #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 /* Call X */ int move_mouse_relative(int dx, int dy) { XWarpPointer(GDK_WINDOW_XDISPLAY(drawing_canvas->window), None, None, 0, 0, 0, 0, dx, dy); return (TRUE); } #elif defined GDK_WINDOWING_WIN32 /* Call GDI */ int move_mouse_relative(int dx, int dy) { POINT point; if (GetCursorPos(&point)) { SetCursorPos(point.x + dx, point.y + dy); return (TRUE); } else return (FALSE); } #elif GTK2VERSION >= 8 /* GTK+ 2.8+ */ int move_mouse_relative(int dx, int dy) { gint x0, y0; GdkScreen *screen; GdkDisplay *display = gtk_widget_get_display(drawing_canvas); gdk_display_get_pointer(display, &screen, &x0, &y0, NULL); gdk_display_warp_pointer(display, screen, x0 + dx, y0 + dy); return (TRUE); } #else /* Always fail */ int move_mouse_relative(int dx, int dy) { return (FALSE); } #endif // Whatever is needed to map keyval to key #if GTK_MAJOR_VERSION == 1 /* Call X */ guint real_key(GdkEventKey *event) { return (XKeysymToKeycode(GDK_WINDOW_XDISPLAY(drawing_canvas->window), event->keyval)); } guint low_key(GdkEventKey *event) { return (gdk_keyval_to_lower(event->keyval)); } guint keyval_key(guint keyval) { return (XKeysymToKeycode(GDK_WINDOW_XDISPLAY(drawing_canvas->window), keyval)); } #else /* Use GDK */ guint real_key(GdkEventKey *event) { return (event->hardware_keycode); } #ifdef GDK_WINDOWING_WIN32 /* Keypad translation helpers */ static unsigned char keypad_vk[] = { VK_CLEAR, VK_PRIOR, VK_NEXT, VK_END, VK_HOME, VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN, VK_INSERT, VK_DELETE, VK_NUMPAD0, VK_NUMPAD1, VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD4, VK_NUMPAD5, VK_NUMPAD6, VK_NUMPAD7, VK_NUMPAD8, VK_NUMPAD9, VK_DECIMAL, 0 }; static unsigned short keypad_wgtk[] = { GDK_Clear, GDK_Page_Up, GDK_Page_Down, GDK_End, GDK_Home, GDK_Left, GDK_Up, GDK_Right, GDK_Down, GDK_Insert, GDK_Delete, GDK_0, GDK_1, GDK_2, GDK_3, GDK_4, GDK_5, GDK_6, GDK_7, GDK_8, GDK_9, GDK_period, 0 }; static unsigned short keypad_xgtk[] = { GDK_KP_Begin, GDK_KP_Page_Up, GDK_KP_Page_Down, GDK_KP_End, GDK_KP_Home, GDK_KP_Left, GDK_KP_Up, GDK_KP_Right, GDK_KP_Down, GDK_KP_Insert, GDK_KP_Delete, GDK_KP_0, GDK_KP_1, GDK_KP_2, GDK_KP_3, GDK_KP_4, GDK_KP_5, GDK_KP_6, GDK_KP_7, GDK_KP_8, GDK_KP_9, GDK_KP_Decimal, 0 }; guint low_key(GdkEventKey *event) { /* Augment braindead GDK translation by recognizing keypad keys */ if (win_last_vk == event->hardware_keycode) /* Paranoia */ { if (win_last_lp & 0x01000000) /* Extended key */ { if (event->keyval == GDK_Return) return (GDK_KP_Enter); } else /* Normal key */ { unsigned char *cp = strchr(keypad_vk, event->hardware_keycode); if (cp && (event->keyval == keypad_wgtk[cp - keypad_vk])) return (keypad_xgtk[cp - keypad_vk]); } } return (gdk_keyval_to_lower(event->keyval)); } #else /* X11 */ guint low_key(GdkEventKey *event) { return (gdk_keyval_to_lower(event->keyval)); } #endif guint keyval_key(guint keyval) { GdkDisplay *display = gtk_widget_get_display(drawing_canvas); GdkKeymap *keymap = gdk_keymap_get_for_display(display); GdkKeymapKey *key; gint nkeys; if (!gdk_keymap_get_entries_for_keyval(keymap, keyval, &key, &nkeys)) { #ifdef GDK_WINDOWING_WIN32 /* Keypad keys need specialcasing on Windows */ for (nkeys = 0; keypad_xgtk[nkeys] && (keyval != keypad_xgtk[nkeys]); nkeys++); return (keypad_vk[nkeys]); #endif return (0); } if (!nkeys) return (0); keyval = key[0].keycode; g_free(key); return (keyval); } #endif // Interpreting arrow keys int arrow_key(GdkEventKey *event, int *dx, int *dy, int mult) { if ((event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) != GDK_SHIFT_MASK) mult = 1; *dx = *dy = 0; switch (event->keyval) { case GDK_KP_Left: case GDK_Left: *dx = -mult; break; case GDK_KP_Right: case GDK_Right: *dx = mult; break; case GDK_KP_Up: case GDK_Up: *dy = -mult; break; case GDK_KP_Down: case GDK_Down: *dy = mult; break; } return (*dx || *dy); } // Create pixmap cursor GdkCursor *make_cursor(const char *icon, const char *mask, int w, int h, int tip_x, int tip_y) { static GdkColor cfg = { -1, -1, -1, -1 }, cbg = { 0, 0, 0, 0 }; GdkPixmap *icn, *msk; GdkCursor *cursor; icn = gdk_bitmap_create_from_data(NULL, icon, w, h); msk = gdk_bitmap_create_from_data(NULL, mask, w, h); cursor = gdk_cursor_new_from_pixmap(icn, msk, &cfg, &cbg, tip_x, tip_y); gdk_pixmap_unref(icn); gdk_pixmap_unref(msk); return (cursor); } // Menu-like combo box /* Use GtkComboBox when available */ #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ static void wj_combo(GtkComboBox *widget, gpointer user_data) { int i = gtk_combo_box_get_active(widget); if (i >= 0) *(int *)user_data = i; } /* Tweak style settings for combo box */ static void wj_combo_restyle(GtkWidget *cbox) { static int done; if (!done) { gtk_rc_parse_string("style \"mtPaint_cblist\" {\n" "GtkComboBox::appears-as-list = 1\n}\n"); gtk_rc_parse_string("widget \"*.mtPaint_cbox\" " "style \"mtPaint_cblist\"\n"); done = TRUE; } gtk_widget_set_name(cbox, "mtPaint_cbox"); } /* void handler(GtkWidget *combo, gpointer user_data); */ GtkWidget *wj_combo_box(char **names, int cnt, int idx, gpointer var, GtkSignalFunc handler) { GtkWidget *cbox; GtkComboBox *combo; int i; if (idx >= cnt) idx = 0; if (!handler && var) { *(int *)var = idx; handler = GTK_SIGNAL_FUNC(wj_combo); } combo = GTK_COMBO_BOX(cbox = gtk_combo_box_new_text()); wj_combo_restyle(cbox); for (i = 0; i < cnt; i++) gtk_combo_box_append_text(combo, names[i]); gtk_combo_box_set_active(combo, idx); if (handler) gtk_signal_connect(GTK_OBJECT(cbox), "changed", handler, var); return (cbox); } int wj_combo_box_get_history(GtkWidget *combobox) { return (gtk_combo_box_get_active(GTK_COMBO_BOX(combobox))); } #else /* Use GtkCombo before GTK+ 2.4.0 */ /* !!! In GTK+2, this handler is called twice for each change; in GTK+1, * once if using cursor keys, twice if selecting from list */ static void wj_combo(GtkWidget *entry, gpointer handler) { GtkWidget *combo = entry->parent; gpointer user_data; /* GTK+1 updates the entry constantly - wait it out */ #if GTK_MAJOR_VERSION == 1 if (GTK_WIDGET_VISIBLE(GTK_COMBO(combo)->popwin)) return; #endif user_data = gtk_object_get_user_data(GTK_OBJECT(entry)); if (handler) ((void (*)(GtkWidget *, gpointer))handler)(combo, user_data); else { int i = wj_combo_box_get_history(combo); if (i >= 0) *(int *)user_data = i; } } #if GTK_MAJOR_VERSION == 1 /* Notify the main handler that meaningless updates are finished */ static void wj_combo_restart(GtkWidget *widget, GtkCombo *combo) { gtk_signal_emit_by_name(GTK_OBJECT(combo->entry), "changed"); } #endif #if GTK_MAJOR_VERSION == 2 /* Tweak style settings for combo entry */ static void wj_combo_restyle(GtkWidget *entry) { static int done; if (!done) { gtk_rc_parse_string("style \"mtPaint_extfocus\" {\n" "GtkWidget::interior-focus = 0\n}\n"); gtk_rc_parse_string("widget \"*.mtPaint_cbentry\" " "style \"mtPaint_extfocus\"\n"); done = TRUE; } gtk_widget_set_name(entry, "mtPaint_cbentry"); } /* Prevent cursor from appearing */ static gboolean wj_combo_kill_cursor(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { /* !!! Private field - future binary compatibility isn't guaranteed */ GTK_ENTRY(widget)->cursor_visible = FALSE; return (FALSE); } #endif /* void handler(GtkWidget *combo, gpointer user_data); */ GtkWidget *wj_combo_box(char **names, int cnt, int idx, gpointer var, GtkSignalFunc handler) { GtkWidget *cbox; GtkCombo *combo; GtkEntry *entry; GList *list = NULL; int i; if (idx >= cnt) idx = 0; if (!handler && var) *(int *)var = idx; combo = GTK_COMBO(cbox = gtk_combo_new()); #if GTK_MAJOR_VERSION == 2 wj_combo_restyle(combo->entry); gtk_signal_connect(GTK_OBJECT(combo->entry), "expose_event", GTK_SIGNAL_FUNC(wj_combo_kill_cursor), NULL); #endif gtk_combo_set_value_in_list(combo, TRUE, FALSE); for (i = 0; i < cnt; i++) list = g_list_append(list, names[i]); gtk_combo_set_popdown_strings(combo, list); g_list_free(list); gtk_widget_show_all(cbox); entry = GTK_ENTRY(combo->entry); gtk_entry_set_editable(entry, FALSE); gtk_entry_set_text(entry, names[idx]); if (!handler && !var) return (cbox); /* Install signal handler */ gtk_object_set_user_data(GTK_OBJECT(combo->entry), var); gtk_signal_connect(GTK_OBJECT(combo->entry), "changed", GTK_SIGNAL_FUNC(wj_combo), (gpointer)handler); #if GTK_MAJOR_VERSION == 1 gtk_signal_connect(GTK_OBJECT(combo->popwin), "hide", GTK_SIGNAL_FUNC(wj_combo_restart), combo); #endif return (cbox); } int wj_combo_box_get_history(GtkWidget *combobox) { GtkList *list = GTK_LIST(GTK_COMBO(combobox)->list); if (!list->selection || !list->selection->data) return (-1); return(gtk_list_child_position(list, GTK_WIDGET(list->selection->data))); } #endif // Box widget with customizable size handling /* There exist no way to override builtin handlers for GTK_RUN_FIRST signals, * such as size-request and size-allocate; so instead of building multiple * custom widget classes with different resize handling, it's better to build * one with no builtin sizing at all - WJ */ GtkWidget *wj_size_box() { static GtkType size_box_type; GtkWidget *widget; if (!size_box_type) { static const GtkTypeInfo info = { "WJSizeBox", sizeof(GtkBox), sizeof(GtkBoxClass), NULL /* class init */, NULL /* instance init */, NULL, NULL, NULL }; GtkWidgetClass *wc; size_box_type = gtk_type_unique(GTK_TYPE_BOX, &info); wc = gtk_type_class(size_box_type); wc->size_request = NULL; wc->size_allocate = NULL; } widget = gtk_widget_new(size_box_type, NULL); GTK_WIDGET_SET_FLAGS(widget, GTK_NO_WINDOW); #if GTK_MAJOR_VERSION == 2 gtk_widget_set_redraw_on_allocate(widget, FALSE); #endif gtk_widget_show(widget); return (widget); } // Disable visual updates while tweaking container's contents /* This is an evil hack, and isn't guaranteed to work in future GTK+ versions; * still, not providing such a function is a design mistake in GTK+, and it'll * be easier to update this code if it becomes broken sometime in dim future, * than deal with premature updates right here and now - WJ */ typedef struct { int flags, pf, mode; } lock_state; gpointer toggle_updates(GtkWidget *widget, gpointer unlock) { lock_state *state; GtkContainer *cont = GTK_CONTAINER(widget); if (!unlock) /* Locking... */ { state = calloc(1, sizeof(lock_state)); state->mode = cont->resize_mode; cont->resize_mode = GTK_RESIZE_IMMEDIATE; state->flags = GTK_WIDGET_FLAGS(widget); #if GTK_MAJOR_VERSION == 1 GTK_WIDGET_UNSET_FLAGS(widget, GTK_VISIBLE); state->pf = GTK_WIDGET_IS_OFFSCREEN(widget); GTK_PRIVATE_SET_FLAG(widget, GTK_IS_OFFSCREEN); #else /* if GTK_MAJOR_VERSION == 2 */ GTK_WIDGET_UNSET_FLAGS(widget, GTK_VISIBLE | GTK_MAPPED); #endif } else /* Unlocking... */ { state = unlock; cont->resize_mode = state->mode; #if GTK_MAJOR_VERSION == 1 GTK_WIDGET_SET_FLAGS(widget, state->flags & GTK_VISIBLE); if (!state->pf) GTK_PRIVATE_UNSET_FLAG(widget, GTK_IS_OFFSCREEN); #else /* if GTK_MAJOR_VERSION == 2 */ GTK_WIDGET_SET_FLAGS(widget, state->flags & (GTK_VISIBLE | GTK_MAPPED)); #endif free(state); state = NULL; } return (state); } // Drawable to RGB /* This code exists to read back both windows and pixmaps. In GTK+1 pixmap * handling capabilities are next to nonexistent, so a GdkWindow must always * be passed in, to serve as source of everything but actual pixels. * The only exception is when the pixmap passed in is definitely a bitmap. * Parsing GdkImage pixels loosely follows the example of convert_real_slow() * in GTK+2 (gdk/gdkpixbuf-drawable.c) - WJ */ #if GTK_MAJOR_VERSION == 1 unsigned char *wj_get_rgb_image(GdkWindow *window, GdkPixmap *pixmap, unsigned char *buf, int x, int y, int width, int height) { GdkImage *img; GdkColormap *cmap; GdkVisual *vis, fake_vis; GdkColor bw[2], *cols = NULL; unsigned char *dest, *wbuf = NULL; guint32 rmask, gmask, bmask, pix; int mode, rshift, gshift, bshift; int i, j; if (!window) /* No window - we got us a bitmap */ { vis = &fake_vis; vis->type = GDK_VISUAL_STATIC_GRAY; vis->depth = 1; cmap = NULL; } else if (window == (GdkWindow *)&gdk_root_parent) /* Not a proper window */ { vis = gdk_visual_get_system(); cmap = gdk_colormap_get_system(); } else { vis = gdk_window_get_visual(window); cmap = gdk_window_get_colormap(window); } if (!vis) return (NULL); mode = vis->type; if (cmap) cols = cmap->colors; else if ((mode != GDK_VISUAL_TRUE_COLOR) && (vis->depth != 1)) return (NULL); /* Can't handle other types w/o colormap */ if (!buf) buf = wbuf = malloc(width * height * 3); if (!buf) return (NULL); img = gdk_image_get(pixmap ? pixmap : window, x, y, width, height); if (!img) { free(wbuf); return (NULL); } rmask = vis->red_mask; gmask = vis->green_mask; bmask = vis->blue_mask; rshift = vis->red_shift; gshift = vis->green_shift; bshift = vis->blue_shift; if (mode == GDK_VISUAL_TRUE_COLOR) { /* !!! Unlikely to happen, but it's cheap to be safe */ if (vis->red_prec > 8) rshift += vis->red_prec - 8; if (vis->green_prec > 8) gshift += vis->green_prec - 8; if (vis->blue_prec > 8) bshift += vis->blue_prec - 8; } else if (!cmap && (vis->depth == 1)) /* Bitmap */ { /* Make a palette for it */ mode = GDK_VISUAL_PSEUDO_COLOR; bw[0].red = bw[0].green = bw[0].blue = 0; bw[1].red = bw[1].green = bw[1].blue = 65535; cols = bw; } dest = buf; for (i = 0; i < height; i++) for (j = 0; j < width; j++ , dest += 3) { pix = gdk_image_get_pixel(img, j, i); if (mode == GDK_VISUAL_TRUE_COLOR) { dest[0] = (pix & rmask) >> rshift; dest[1] = (pix & gmask) >> gshift; dest[2] = (pix & bmask) >> bshift; } else if (mode == GDK_VISUAL_DIRECT_COLOR) { dest[0] = cols[(pix & rmask) >> rshift].red >> 8; dest[1] = cols[(pix & gmask) >> gshift].green >> 8; dest[2] = cols[(pix & bmask) >> bshift].blue >> 8; } else /* Paletted */ { dest[0] = cols[pix].red >> 8; dest[1] = cols[pix].green >> 8; dest[2] = cols[pix].blue >> 8; } } /* Now extend the precision to 8 bits where necessary */ if (mode == GDK_VISUAL_TRUE_COLOR) { unsigned char xlat[128], *dest; int i, j, k, l = width * height; for (i = 0; i < 3; i++) { k = !i ? vis->red_prec : i == 1 ? vis->green_prec : vis->blue_prec; if (k >= 8) continue; set_xlate(xlat, k); dest = buf + i; for (j = 0; j < l; j++ , dest += 3) *dest = xlat[*dest]; } } gdk_image_destroy(img); return (buf); } #else /* #if GTK_MAJOR_VERSION == 2 */ unsigned char *wj_get_rgb_image(GdkWindow *window, GdkPixmap *pixmap, unsigned char *buf, int x, int y, int width, int height) { GdkColormap *cmap = NULL; GdkPixbuf *pix, *res; unsigned char *wbuf = NULL; if (!buf) buf = wbuf = malloc(width * height * 3); if (!buf) return (NULL); if (pixmap && window) { cmap = gdk_drawable_get_colormap(pixmap); if (!cmap) cmap = gdk_drawable_get_colormap(window); } pix = gdk_pixbuf_new_from_data(buf, GDK_COLORSPACE_RGB, FALSE, 8, width, height, width * 3, NULL, NULL); if (pix) { res = gdk_pixbuf_get_from_drawable(pix, pixmap ? pixmap : window, cmap, x, y, 0, 0, width, height); g_object_unref(pix); if (res) return (buf); } free(wbuf); return (NULL); } #endif // Clipboard #ifdef GDK_WINDOWING_WIN32 /* Detect if current clipboard belongs to something in the program itself; * on Windows, GDK is purposely lying to us about it, so use WinAPI instead */ int internal_clipboard(int which) { DWORD pid; if (which) return (TRUE); // No "PRIMARY" clipboard exists on Windows GetWindowThreadProcessId(GetClipboardOwner(), &pid); return (pid == GetCurrentProcessId()); } #else /* Detect if current clipboard belongs to something in the program itself */ int internal_clipboard(int which) { gpointer widget = NULL; GdkWindow *win = gdk_selection_owner_get( gdk_atom_intern(which ? "PRIMARY" : "CLIPBOARD", FALSE)); if (!win) return (FALSE); // Unknown window gdk_window_get_user_data(win, &widget); return (!!widget); // Real widget or foreign window? } #endif /* While GTK+2 allows for synchronous clipboard handling, it's implemented * through copying the entire clipboard data - and when the data might be * a huge image which mtPaint is bound to allocate *yet again*, this would be * asking for trouble - WJ */ typedef int (*clip_function)(GtkSelectionData *data, gpointer user_data); typedef struct { int flag; clip_function handler; gpointer data; } clip_info; #if GTK_MAJOR_VERSION == 1 static void selection_callback(GtkWidget *widget, GtkSelectionData *data, guint time, clip_info *res) { res->flag = (data->length >= 0) && res->handler(data, res->data); } int process_clipboard(int which, char *what, GtkSignalFunc handler, gpointer data) { clip_info res = { -1, (clip_function)handler, data }; gtk_signal_connect(GTK_OBJECT(main_window), "selection_received", GTK_SIGNAL_FUNC(selection_callback), &res); gtk_selection_convert(main_window, gdk_atom_intern(which ? "PRIMARY" : "CLIPBOARD", FALSE), gdk_atom_intern(what, FALSE), GDK_CURRENT_TIME); while (res.flag == -1) gtk_main_iteration(); gtk_signal_disconnect_by_func(GTK_OBJECT(main_window), GTK_SIGNAL_FUNC(selection_callback), &res); return (res.flag); } static void selection_get_callback(GtkWidget *widget, GtkSelectionData *data, guint info, guint time, gpointer user_data) { clip_function cf = g_dataset_get_data(main_window, gdk_atom_name(data->selection)); if (cf) cf(data, (gpointer)(int)info); } static void selection_clear_callback(GtkWidget *widget, GdkEventSelection *event, gpointer user_data) { clip_function cf = g_dataset_get_data(main_window, gdk_atom_name(event->selection)); if (cf) cf(NULL, (gpointer)0); } // !!! GTK+ 1.2 internal type (gtk/gtkselection.c) typedef struct { GdkAtom selection; GtkTargetList *list; } GtkSelectionTargetList; int offer_clipboard(int which, GtkTargetEntry *targets, int ntargets, GtkSignalFunc handler) { static int connected; GtkSelectionTargetList *slist; GList *list, *tmp; GdkAtom sel = gdk_atom_intern(which ? "PRIMARY" : "CLIPBOARD", FALSE); if (!gtk_selection_owner_set(main_window, sel, GDK_CURRENT_TIME)) return (FALSE); /* Don't have gtk_selection_clear_targets() in GTK+1 - have to * reimplement */ list = gtk_object_get_data(GTK_OBJECT(main_window), "gtk-selection-handlers"); for (tmp = list; tmp; tmp = tmp->next) { if ((slist = tmp->data)->selection != sel) continue; list = g_list_remove_link(list, tmp); gtk_target_list_unref(slist->list); g_free(slist); break; } gtk_object_set_data(GTK_OBJECT(main_window), "gtk-selection-handlers", list); /* !!! Have to resort to this to allow for multiple clipboards in X */ g_dataset_set_data(main_window, which ? "PRIMARY" : "CLIPBOARD", (gpointer)handler); if (!connected) { gtk_signal_connect(GTK_OBJECT(main_window), "selection_get", GTK_SIGNAL_FUNC(selection_get_callback), NULL); gtk_signal_connect(GTK_OBJECT(main_window), "selection_clear_event", GTK_SIGNAL_FUNC(selection_clear_callback), NULL); connected = TRUE; } gtk_selection_add_targets(main_window, sel, targets, ntargets); return (TRUE); } #else /* #if GTK_MAJOR_VERSION == 2 */ static void clipboard_callback(GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data) { clip_info *res = data; res->flag = (selection_data->length >= 0) && res->handler(selection_data, res->data); } int process_clipboard(int which, char *what, GtkSignalFunc handler, gpointer data) { clip_info res = { -1, (clip_function)handler, data }; gtk_clipboard_request_contents(gtk_clipboard_get(which ? GDK_SELECTION_PRIMARY : GDK_SELECTION_CLIPBOARD), gdk_atom_intern(what, FALSE), clipboard_callback, &res); while (res.flag == -1) gtk_main_iteration(); return (res.flag); } static void clipboard_get_callback(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer user_data) { ((clip_function)user_data)(selection_data, (gpointer)(int)info); } static void clipboard_clear_callback(GtkClipboard *clipboard, gpointer user_data) { ((clip_function)user_data)(NULL, (gpointer)0); } int offer_clipboard(int which, GtkTargetEntry *targets, int ntargets, GtkSignalFunc handler) { int i; /* Two attempts, for GTK+2 function can fail for strange reasons */ for (i = 0; i < 2; i++) { if (gtk_clipboard_set_with_data(gtk_clipboard_get(which ? GDK_SELECTION_PRIMARY : GDK_SELECTION_CLIPBOARD), targets, ntargets, clipboard_get_callback, clipboard_clear_callback, (gpointer)handler)) return (TRUE); } return (FALSE); } #endif // Allocate a memory chunk which is freed along with a given widget void *bound_malloc(GtkWidget *widget, int size) { void *mem = g_malloc0(size); if (mem) gtk_signal_connect_object(GTK_OBJECT(widget), "destroy", GTK_SIGNAL_FUNC(g_free), (gpointer)mem); return (mem); } // Gamma correction toggle GtkWidget *gamma_toggle() { return (sig_toggle(_("Gamma corrected"), use_gamma, NULL, NULL)); } // Render stock icons to pixmaps #if GTK_MAJOR_VERSION == 2 static GdkPixbuf *render_stock_pixbuf(GtkWidget *widget, const gchar *stock_id) { GtkIconSet *icon_set; /* !!! Doing this for widget itself in some cases fails (!) */ icon_set = gtk_style_lookup_icon_set(main_window->style, stock_id); if (!icon_set) return (NULL); // !!! Is this "widget" here at all useful, or is "main_window" good enough? gtk_widget_ensure_style(widget); return (gtk_icon_set_render_icon(icon_set, widget->style, gtk_widget_get_direction(widget), GTK_WIDGET_STATE(widget), GTK_ICON_SIZE_SMALL_TOOLBAR, widget, NULL)); } GdkPixmap *render_stock_pixmap(GtkWidget *widget, const gchar *stock_id, GdkBitmap **mask) { GdkPixmap *pmap; GdkPixbuf *buf; buf = render_stock_pixbuf(widget, stock_id); if (!buf) return (NULL); gdk_pixbuf_render_pixmap_and_mask_for_colormap(buf, gtk_widget_get_colormap(widget), &pmap, mask, 127); g_object_unref(buf); return (pmap); } #endif // Image widget /* !!! GtkImage is broken on GTK+ 2.12.9 at least, with regard to pixmaps - * background gets corrupted when widget is made insensitive, so GtkPixmap is * the only choice in that case - WJ */ GtkWidget *xpm_image(XPM_TYPE xpm) { GdkPixmap *icon, *mask; GtkWidget *widget; #if GTK_MAJOR_VERSION == 2 GdkPixbuf *buf; char name[256]; snprintf(name, sizeof(name), "mtpaint_%s", (char *)xpm[0]); buf = render_stock_pixbuf(main_window, name); if (buf) /* Found a themed icon - use it */ { widget = gtk_image_new_from_pixbuf(buf); g_object_unref(buf); gtk_widget_show(widget); return (widget); } /* Fall back to builtin XPM icon */ icon = gdk_pixmap_create_from_xpm_d(main_window->window, &mask, NULL, (char **)xpm[1]); #else /* if GTK_MAJOR_VERSION == 1 */ icon = gdk_pixmap_create_from_xpm_d(main_window->window, &mask, NULL, xpm); #endif widget = gtk_pixmap_new(icon, mask); gdk_pixmap_unref(icon); gdk_pixmap_unref(mask); gtk_widget_show(widget); return (widget); } // Release outstanding pointer grabs int release_grab() { GtkWidget *grab = gtk_grab_get_current(); int res = gdk_pointer_is_grabbed(); if (grab) gtk_grab_remove(grab); if (res) gdk_pointer_ungrab(GDK_CURRENT_TIME); return (res || grab); } // Frame widget with passthrough scrolling /* !!! Windows builds of GTK+ are made with G_ENABLE_DEBUG, which means also * marshallers checking what passes through. Since "OBJECT" is, from their * point of view, not "POINTER", we need our own marshaller without the checks, * or our "set-scroll-adjustments" handlers won't receive anything but NULLs. * Just in case someone does the same on Unix, we use our marshaller with GTK+2 * regardless of the host OS - WJ */ /* #if defined GDK_WINDOWING_WIN32 */ #if GTK_MAJOR_VERSION == 2 /* Function autogenerated by "glib-genmarshal" utility, then improved a bit - WJ */ #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer static void unchecked_gtk_marshal_VOID__POINTER_POINTER(GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data) { void (*callback)(gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); gpointer data1, data2; if (n_param_values != 3) return; data1 = data2 = g_value_peek_pointer(param_values + 0); if (G_CCLOSURE_SWAP_DATA(closure)) data1 = closure->data; else data2 = closure->data; callback = marshal_data ? marshal_data : ((GCClosure *)closure)->callback; callback(data1, g_marshal_value_peek_pointer(param_values + 1), g_marshal_value_peek_pointer(param_values + 2), data2); } #undef gtk_marshal_NONE__POINTER_POINTER #define gtk_marshal_NONE__POINTER_POINTER unchecked_gtk_marshal_VOID__POINTER_POINTER #endif #define WJFRAME(obj) GTK_CHECK_CAST(obj, wjframe_get_type(), wjframe) #define IS_WJFRAME(obj) GTK_CHECK_TYPE(obj, wjframe_get_type()) typedef struct { GtkBin bin; // Parent class GtkAdjustment *adjustments[2]; } wjframe; typedef struct { GtkBinClass parent_class; void (*set_scroll_adjustments)(wjframe *frame, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); } wjframeClass; static GtkBinClass *bin_class; static GtkType wjframe_type; #define WJFRAME_SHADOW 1 static GtkType wjframe_get_type(); static void wjframe_realize(GtkWidget *widget) { GdkWindowAttr attrs; int border = GTK_CONTAINER(widget)->border_width; GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); /* Make widget window */ attrs.x = widget->allocation.x + border; attrs.y = widget->allocation.y + border; attrs.width = widget->allocation.width - 2 * border; attrs.height = widget->allocation.height - 2 * border; attrs.window_type = GDK_WINDOW_CHILD; attrs.wclass = GDK_INPUT_OUTPUT; attrs.visual = gtk_widget_get_visual(widget); attrs.colormap = gtk_widget_get_colormap(widget); // Window exists only to render the shadow attrs.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK; widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attrs, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP); gdk_window_set_user_data(widget->window, widget); widget->style = gtk_style_attach(widget->style, widget->window); /* Background clear is for wimps :-) */ gdk_window_set_back_pixmap(widget->window, NULL, FALSE); // !!! Do this instead if the widget is ever used for non-canvaslike stuff // gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); } static void wjframe_paint(GtkWidget *widget, GdkRectangle *area) { GdkWindow *window = widget->window; GdkGC *light, *dark; gint w, h; int x1, y1; if (!window || !widget->style) return; gdk_window_get_size(window, &w, &h); #if 0 /* !!! Useless with canvaslike widgets */ if ((w > WJFRAME_SHADOW * 2) && (h > WJFRAME_SHADOW * 2)) gtk_paint_flat_box(widget->style, window, widget->state, GTK_SHADOW_NONE, area, widget, NULL, WJFRAME_SHADOW, WJFRAME_SHADOW, w - WJFRAME_SHADOW * 2, h - WJFRAME_SHADOW * 2); #endif /* State, shadow, and widget type are hardcoded */ light = widget->style->light_gc[GTK_STATE_NORMAL]; dark = widget->style->dark_gc[GTK_STATE_NORMAL]; gdk_gc_set_clip_rectangle(light, area); gdk_gc_set_clip_rectangle(dark, area); x1 = w - 1; y1 = h - 1; gdk_draw_line(window, light, 0, y1, x1, y1); gdk_draw_line(window, light, x1, 0, x1, y1); gdk_draw_line(window, dark, 0, 0, x1, 0); gdk_draw_line(window, dark, 0, 0, 0, y1); gdk_gc_set_clip_rectangle(light, NULL); gdk_gc_set_clip_rectangle(dark, NULL); } #if GTK_MAJOR_VERSION == 1 static void wjframe_draw(GtkWidget *widget, GdkRectangle *area) { GdkRectangle tmp, child; GtkBin *bin = GTK_BIN(widget); int border = GTK_CONTAINER(widget)->border_width; if (!area || !GTK_WIDGET_DRAWABLE(widget)) return; tmp = *area; tmp.x -= border; tmp.y -= border; wjframe_paint(widget, &tmp); if (bin->child && gtk_widget_intersect(bin->child, &tmp, &child)) gtk_widget_draw(bin->child, &child); } static gboolean wjframe_expose(GtkWidget *widget, GdkEventExpose *event) { GtkBin *bin = GTK_BIN(widget); if (!GTK_WIDGET_DRAWABLE(widget)) return (FALSE); wjframe_paint(widget, &event->area); if (bin->child && GTK_WIDGET_NO_WINDOW(bin->child)) { GdkEventExpose tmevent = *event; if (gtk_widget_intersect(bin->child, &event->area, &tmevent.area)) gtk_widget_event(bin->child, (GdkEvent *)&tmevent); } return (FALSE); } #else /* if GTK_MAJOR_VERSION == 2 */ static gboolean wjframe_expose(GtkWidget *widget, GdkEventExpose *event) { if (!GTK_WIDGET_DRAWABLE(widget)) return (FALSE); wjframe_paint(widget, &event->area); GTK_WIDGET_CLASS(bin_class)->expose_event(widget, event); return (FALSE); } #endif static void wjframe_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkRequisition req; GtkBin *bin = GTK_BIN(widget); int border = GTK_CONTAINER(widget)->border_width; requisition->width = requisition->height = (WJFRAME_SHADOW + border) * 2; if (bin->child && GTK_WIDGET_VISIBLE(bin->child)) { gtk_widget_size_request(bin->child, &req); requisition->width += req.width; requisition->height += req.height; } } static void wjframe_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { GtkAllocation alloc; GtkBin *bin = GTK_BIN(widget); int border = GTK_CONTAINER(widget)->border_width; widget->allocation = *allocation; alloc.x = alloc.y = WJFRAME_SHADOW; alloc.width = MAX(allocation->width - (WJFRAME_SHADOW + border) * 2, 0); alloc.height = MAX(allocation->height - (WJFRAME_SHADOW + border) * 2, 0); if (GTK_WIDGET_REALIZED(widget)) gdk_window_move_resize(widget->window, allocation->x + border, allocation->y + border, allocation->width - border * 2, allocation->height - border * 2); if (bin->child) gtk_widget_size_allocate(bin->child, &alloc); } static void wjframe_set_adjustments(wjframe *frame, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) { if (hadjustment) gtk_object_ref(GTK_OBJECT(hadjustment)); if (frame->adjustments[0]) gtk_object_unref(GTK_OBJECT(frame->adjustments[0])); frame->adjustments[0] = hadjustment; if (vadjustment) gtk_object_ref(GTK_OBJECT(vadjustment)); if (frame->adjustments[1]) gtk_object_unref(GTK_OBJECT(frame->adjustments[1])); frame->adjustments[1] = vadjustment; } static void wjframe_set_scroll_adjustments(wjframe *frame, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) { GtkBin *bin = GTK_BIN(frame); if ((hadjustment == frame->adjustments[0]) && (vadjustment == frame->adjustments[1])) return; wjframe_set_adjustments(frame, hadjustment, vadjustment); if (bin->child) gtk_widget_set_scroll_adjustments(bin->child, hadjustment, vadjustment); } static void wjframe_add(GtkContainer *container, GtkWidget *child) { wjframe *frame = WJFRAME(container); GtkBin *bin = GTK_BIN(container); GtkWidget *widget = GTK_WIDGET(container); if (bin->child) return; bin->child = child; gtk_widget_set_parent(child, widget); /* Set only existing adjustments */ if (frame->adjustments[0] || frame->adjustments[1]) gtk_widget_set_scroll_adjustments(child, frame->adjustments[0], frame->adjustments[1]); #if GTK_MAJOR_VERSION == 1 if (GTK_WIDGET_REALIZED(widget)) gtk_widget_realize(child); if (GTK_WIDGET_VISIBLE(widget) && GTK_WIDGET_VISIBLE(child)) { if (GTK_WIDGET_MAPPED(widget)) gtk_widget_map(child); gtk_widget_queue_resize(child); } #endif } static void wjframe_remove(GtkContainer *container, GtkWidget *child) { wjframe *frame = WJFRAME(container); GtkBin *bin = GTK_BIN(container); if (!child || (bin->child != child)) return; /* Remove only existing adjustments */ if (frame->adjustments[0] || frame->adjustments[1]) gtk_widget_set_scroll_adjustments(child, NULL, NULL); GTK_CONTAINER_CLASS(bin_class)->remove(container, child); } static void wjframe_destroy(GtkObject *object) { wjframe_set_adjustments(WJFRAME(object), NULL, NULL); GTK_OBJECT_CLASS(bin_class)->destroy(object); } static void wjframe_class_init(wjframeClass *class) { GtkWidgetClass *wclass = GTK_WIDGET_CLASS(class); GtkContainerClass *cclass = GTK_CONTAINER_CLASS(class); bin_class = gtk_type_class(GTK_TYPE_BIN); GTK_OBJECT_CLASS(class)->destroy = wjframe_destroy; #if GTK_MAJOR_VERSION == 1 wclass->draw = wjframe_draw; #endif wclass->realize = wjframe_realize; wclass->expose_event = wjframe_expose; wclass->size_request = wjframe_size_request; wclass->size_allocate = wjframe_size_allocate; // !!! Default "style_set" handler can reenable background clear wclass->style_set = NULL; cclass->add = wjframe_add; cclass->remove = wjframe_remove; class->set_scroll_adjustments = wjframe_set_scroll_adjustments; wclass->set_scroll_adjustments_signal = gtk_signal_new( "set_scroll_adjustments", GTK_RUN_LAST, wjframe_type, GTK_SIGNAL_OFFSET(wjframeClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); } static void wjframe_init(wjframe *frame) { GTK_WIDGET_UNSET_FLAGS(frame, GTK_NO_WINDOW); #if GTK_MAJOR_VERSION == 2 // !!! Would only waste time, with canvaslike child widgets GTK_WIDGET_UNSET_FLAGS(frame, GTK_DOUBLE_BUFFERED); #endif frame->adjustments[0] = frame->adjustments[1] = NULL; } static GtkType wjframe_get_type() { if (!wjframe_type) { static const GtkTypeInfo wjframe_info = { "wjFrame", sizeof(wjframe), sizeof(wjframeClass), (GtkClassInitFunc)wjframe_class_init, (GtkObjectInitFunc)wjframe_init, NULL, NULL, NULL }; wjframe_type = gtk_type_unique(GTK_TYPE_BIN, &wjframe_info); } return (wjframe_type); } GtkWidget *wjframe_new() { return (gtk_widget_new(wjframe_get_type(), NULL)); } void add_with_wjframe(GtkWidget *bin, GtkWidget *widget) { GtkWidget *frame = wjframe_new(); gtk_widget_show(frame); gtk_container_add(GTK_CONTAINER(frame), widget); gtk_container_add(GTK_CONTAINER(bin), frame); } // Scrollable canvas widget #define WJCANVAS(obj) GTK_CHECK_CAST(obj, wjcanvas_get_type(), wjcanvas) #define IS_WJCANVAS(obj) GTK_CHECK_TYPE(obj, wjcanvas_get_type()) typedef struct { GtkWidget widget; // Parent class GtkAdjustment *adjustments[2]; GdkGC *scroll_gc; // For scrolling in GTK+1 int xy[4]; // Viewport int size[2]; // Requested (virtual) size int resize; // Resize was requested int resizing; // Requested resize is happening guint32 scrolltime; // For autoscroll rate-limiting } wjcanvas; typedef struct { GtkWidgetClass parent_class; void (*set_scroll_adjustments)(wjcanvas *canvas, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); } wjcanvasClass; static GtkWidgetClass *widget_class; static GtkType wjcanvas_type; static GtkType wjcanvas_get_type(); static void wjcanvas_send_configure(GtkWidget *widget) { #if GTK2VERSION >= 2 /* GTK+ 2.2+ */ GdkEvent *event = gdk_event_new(GDK_CONFIGURE); event->configure.window = g_object_ref(widget->window); event->configure.send_event = TRUE; event->configure.x = widget->allocation.x; event->configure.y = widget->allocation.y; event->configure.width = widget->allocation.width; event->configure.height = widget->allocation.height; gtk_widget_event(widget, event); gdk_event_free(event); #else /* GTK+ 1.x or 2.0 */ GdkEventConfigure event; event.type = GDK_CONFIGURE; event.window = widget->window; event.send_event = TRUE; event.x = widget->allocation.x; event.y = widget->allocation.y; event.width = widget->allocation.width; event.height = widget->allocation.height; gdk_window_ref(event.window); gtk_widget_event(widget, (GdkEvent *)&event); gdk_window_unref(event.window); #endif } static void wjcanvas_realize(GtkWidget *widget) { GdkWindowAttr attrs; GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); attrs.x = widget->allocation.x; attrs.y = widget->allocation.y; attrs.width = widget->allocation.width; attrs.height = widget->allocation.height; attrs.window_type = GDK_WINDOW_CHILD; attrs.wclass = GDK_INPUT_OUTPUT; attrs.visual = gtk_widget_get_visual(widget); attrs.colormap = gtk_widget_get_colormap(widget); // Add the same events as GtkViewport does attrs.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK; widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attrs, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP); gdk_window_set_user_data(widget->window, widget); #if GTK_MAJOR_VERSION == 1 fix_gdk_events(widget->window); WJCANVAS(widget)->scroll_gc = gdk_gc_new(widget->window); gdk_gc_set_exposures(WJCANVAS(widget)->scroll_gc, TRUE); #endif widget->style = gtk_style_attach(widget->style, widget->window); gdk_window_set_back_pixmap(widget->window, NULL, FALSE); /* Replicate behaviour of GtkDrawingCanvas */ wjcanvas_send_configure(widget); } #if GTK_MAJOR_VERSION == 1 static void wjcanvas_unrealize(GtkWidget *widget) { wjcanvas *canvas = WJCANVAS(widget); gdk_gc_destroy(canvas->scroll_gc); canvas->scroll_gc = NULL; if (widget_class->unrealize) widget_class->unrealize(widget); } #endif static int wjcanvas_readjust(wjcanvas *canvas, int which) { GtkWidget *widget = GTK_WIDGET(canvas); GtkAdjustment *adj = canvas->adjustments[which]; int sz, wp; double oldv, newv; oldv = adj->value; wp = which ? widget->allocation.height : widget->allocation.width; sz = canvas->size[which]; if (sz < wp) sz = wp; adj->page_size = wp; adj->step_increment = wp * 0.1; adj->page_increment = wp * 0.9; adj->lower = 0; adj->upper = sz; adj->value = newv = oldv < 0.0 ? 0.0 : oldv > sz - wp ? sz - wp : oldv; return (newv != oldv); } static void wjcanvas_set_extents(wjcanvas *canvas) { GtkWidget *widget = GTK_WIDGET(canvas); canvas->xy[2] = (canvas->xy[0] = ADJ2INT(canvas->adjustments[0])) + widget->allocation.width; canvas->xy[3] = (canvas->xy[1] = ADJ2INT(canvas->adjustments[1])) + widget->allocation.height; } #if GTK_MAJOR_VERSION == 1 static void wjcanvas_send_expose(GtkWidget *widget, int x, int y, int w, int h) { GdkEventExpose event; event.type = GDK_EXPOSE; event.send_event = TRUE; event.window = widget->window; event.area.x = x; event.area.y = y; event.area.width = w; event.area.height = h; event.count = 0; gdk_window_ref(event.window); gtk_widget_event(widget, (GdkEvent *)&event); gdk_window_unref(event.window); } #endif static void wjcanvas_scroll(GtkWidget *widget, int *oxy) { wjcanvas *canvas = WJCANVAS(widget); int nxy[4], rxy[4], fulldraw; if (!GTK_WIDGET_DRAWABLE(widget)) return; // No use if (canvas->resizing) return; // No reason copy4(nxy, canvas->xy); if (!((oxy[0] ^ nxy[0]) | (oxy[1] ^ nxy[1]))) return; // No scrolling /* Scroll or redraw? */ fulldraw = !clip(rxy, nxy[0], nxy[1], nxy[2], nxy[3], oxy); #if GTK_MAJOR_VERSION == 1 /* Check for resize - GTK+1 operates with ForgetGravity */ if ((oxy[2] - oxy[0] - nxy[2] + nxy[0]) | (oxy[3] - oxy[1] - nxy[3] + nxy[1])) return; // A full expose event should be queued anyway /* Check for in-flight draw ops */ if (GTK_WIDGET_FULLDRAW_PENDING(widget)) return; fulldraw |= GTK_WIDGET_REDRAW_PENDING(widget); // Updating draws in queue might be possible, but sure is insanely hard #endif if (fulldraw) gtk_widget_queue_draw(widget); // Just redraw everything else // Scroll { #if GTK_MAJOR_VERSION == 1 GdkEvent *event; gdk_window_copy_area(widget->window, canvas->scroll_gc, rxy[0] - nxy[0], rxy[1] - nxy[1], widget->window, rxy[0] - oxy[0], rxy[1] - oxy[1], rxy[2] - rxy[0], rxy[3] - rxy[1]); /* Have to process GraphicsExpose events before next scrolling */ while ((event = gdk_event_get_graphics_expose(widget->window))) { gtk_widget_event(widget, event); if (event->expose.count == 0) { gdk_event_free(event); break; } gdk_event_free(event); } /* Now draw the freed-up part(s) */ if (rxy[1] > nxy[1]) wjcanvas_send_expose(widget, 0, 0, nxy[2] - nxy[0], rxy[1] - nxy[1]); if (rxy[3] < nxy[3]) wjcanvas_send_expose(widget, 0, rxy[3] - nxy[1], nxy[2] - nxy[0], nxy[3] - rxy[3]); if (rxy[0] > nxy[0]) wjcanvas_send_expose(widget, 0, rxy[1] - nxy[1], rxy[0] - nxy[0], rxy[3] - rxy[1]); if (rxy[2] < nxy[2]) wjcanvas_send_expose(widget, rxy[2] - nxy[0], rxy[1] - nxy[1], nxy[2] - rxy[2], rxy[3] - rxy[1]); #elif defined GDK_WINDOWING_WIN32 /* !!! On Windows, gdk_window_scroll() had been badly broken in * GTK+ 2.6.5, then fixed in 2.8.10, but with changed behaviour * with regard to screen updates. * Unlike all that, my own window scrolling code here behaves * consistently :-) - WJ */ GdkRegion *tmp; int dx = oxy[0] - nxy[0], dy = oxy[1] - nxy[1]; /* Adjust the pending update region, let system add the rest * through WM_PAINT (but, in Wine WM_PAINTs can lag behind) */ if ((tmp = gdk_window_get_update_area(widget->window))) { gdk_region_offset(tmp, dx, dy); gdk_window_invalidate_region(widget->window, tmp, FALSE); gdk_region_destroy(tmp); } /* Tell Windows to scroll window AND send us invalidations */ ScrollWindowEx(GDK_WINDOW_HWND(widget->window), dx, dy, NULL, NULL, NULL, NULL, SW_INVALIDATE); /* Catch the invalidations; this cures Wine, while on Windows * just improves render consistency a bit. * And needs by-region expose to not waste a lot of work - WJ */ while (TRUE) { GdkEvent *event = gdk_event_get_graphics_expose(widget->window); if (!event) break; /* !!! The above function is buggy in GTK+2/Win32: it * doesn't ref the window, so we must do it here - WJ */ gdk_window_ref(widget->window); gdk_window_invalidate_region(widget->window, event->expose.region, FALSE); gdk_event_free(event); } /* And tell GTK+ to redraw it */ gdk_window_process_updates(widget->window, FALSE); #else gdk_window_scroll(widget->window, oxy[0] - nxy[0], oxy[1] - nxy[1]); #endif } /* !!! _Maybe_ we need gdk_window_process_updates(widget->window, FALSE) here * in GTK+2 - but then, maybe we don't; only practice will tell. * Rule of thumb is, you need atrociously slow render to make forced updates * useful - otherwise, they just create a slowdown. - WJ */ } static void wjcanvas_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { wjcanvas *canvas = WJCANVAS(widget); int hchg, vchg, conf, oxy[4]; /* Don't send useless configure events */ conf = canvas->resize | (allocation->width ^ widget->allocation.width) | (allocation->height ^ widget->allocation.height); canvas->resizing = canvas->resize; canvas->resize = FALSE; copy4(oxy, canvas->xy); widget->allocation = *allocation; hchg = wjcanvas_readjust(canvas, 0); vchg = wjcanvas_readjust(canvas, 1); wjcanvas_set_extents(canvas); if (GTK_WIDGET_REALIZED(widget)) { gdk_window_move_resize(widget->window, allocation->x, allocation->y, allocation->width, allocation->height); wjcanvas_scroll(widget, oxy); /* Replicate behaviour of GtkDrawingCanvas */ if (conf) wjcanvas_send_configure(widget); } gtk_adjustment_changed(canvas->adjustments[0]); gtk_adjustment_changed(canvas->adjustments[1]); if (hchg) gtk_adjustment_value_changed(canvas->adjustments[0]); if (vchg) gtk_adjustment_value_changed(canvas->adjustments[1]); canvas->resizing = FALSE; } /* We do scrolling in both directions at once if possible, to avoid ultimately * useless repaint ops and associated flickers - WJ */ static void wjcanvas_adjustment_value_changed(GtkAdjustment *adjustment, gpointer data) { GtkWidget *widget = data; wjcanvas *canvas; int oxy[4]; if (!GTK_IS_ADJUSTMENT(adjustment) || !IS_WJCANVAS(data)) return; canvas = WJCANVAS(data); copy4(oxy, canvas->xy); wjcanvas_set_extents(canvas); // Set new window extents wjcanvas_scroll(widget, oxy); } static void wjcanvas_drop_adjustment(wjcanvas *canvas, int which) { GtkAdjustment **slot = canvas->adjustments + which; if (*slot) { GtkObject *adj = GTK_OBJECT(*slot); gtk_signal_disconnect_by_func(adj, GTK_SIGNAL_FUNC(wjcanvas_adjustment_value_changed), canvas); gtk_object_unref(adj); *slot = NULL; } } static GtkAdjustment *wjcanvas_prepare_adjustment(wjcanvas *canvas, GtkAdjustment *adjustment) { GtkObject *adj; if (!adjustment) adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 0, 0, 0, 0)); adj = GTK_OBJECT(adjustment); gtk_object_ref(adj); gtk_object_sink(adj); gtk_signal_connect(adj, "value_changed", GTK_SIGNAL_FUNC(wjcanvas_adjustment_value_changed), (gpointer)canvas); return (adjustment); } static void wjcanvas_set_adjustment(wjcanvas *canvas, int which, GtkAdjustment *adjustment) { int changed; wjcanvas_drop_adjustment(canvas, which); adjustment = wjcanvas_prepare_adjustment(canvas, adjustment); canvas->adjustments[which] = adjustment; changed = wjcanvas_readjust(canvas, which); gtk_adjustment_changed(adjustment); if (changed) gtk_adjustment_value_changed(adjustment); else wjcanvas_adjustment_value_changed(adjustment, canvas); // Readjust anyway } static void wjcanvas_set_scroll_adjustments(wjcanvas *canvas, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) { if (canvas->adjustments[0] != hadjustment) wjcanvas_set_adjustment(canvas, 0, hadjustment); if (canvas->adjustments[1] != vadjustment) wjcanvas_set_adjustment(canvas, 1, vadjustment); } static void wjcanvas_destroy(GtkObject *object) { wjcanvas *canvas = WJCANVAS(object); wjcanvas_drop_adjustment(canvas, 0); wjcanvas_drop_adjustment(canvas, 1); GTK_OBJECT_CLASS(widget_class)->destroy(object); } static void wjcanvas_class_init(wjcanvasClass *class) { GtkWidgetClass *wclass = GTK_WIDGET_CLASS(class); widget_class = gtk_type_class(GTK_TYPE_WIDGET); GTK_OBJECT_CLASS(class)->destroy = wjcanvas_destroy; wclass->realize = wjcanvas_realize; #if GTK_MAJOR_VERSION == 1 wclass->unrealize = wjcanvas_unrealize; #endif wclass->size_allocate = wjcanvas_size_allocate; // !!! Default "style_set" handler can reenable background clear wclass->style_set = NULL; class->set_scroll_adjustments = wjcanvas_set_scroll_adjustments; wclass->set_scroll_adjustments_signal = gtk_signal_new( "set_scroll_adjustments", GTK_RUN_LAST, wjcanvas_type, GTK_SIGNAL_OFFSET(wjcanvasClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); } static void wjcanvas_init(wjcanvas *canvas) { GTK_WIDGET_UNSET_FLAGS(canvas, GTK_NO_WINDOW); #if GTK_MAJOR_VERSION == 2 GTK_WIDGET_UNSET_FLAGS(canvas, GTK_DOUBLE_BUFFERED); gtk_widget_set_redraw_on_allocate(GTK_WIDGET(canvas), FALSE); #endif /* Install fake adjustments */ canvas->adjustments[0] = wjcanvas_prepare_adjustment(canvas, NULL); canvas->adjustments[1] = wjcanvas_prepare_adjustment(canvas, NULL); } static GtkType wjcanvas_get_type() { if (!wjcanvas_type) { static const GtkTypeInfo wjcanvas_info = { "wjCanvas", sizeof(wjcanvas), sizeof(wjcanvasClass), (GtkClassInitFunc)wjcanvas_class_init, (GtkObjectInitFunc)wjcanvas_init, NULL, NULL, NULL }; wjcanvas_type = gtk_type_unique(GTK_TYPE_WIDGET, &wjcanvas_info); } return (wjcanvas_type); } GtkWidget *wjcanvas_new() { return (gtk_widget_new(wjcanvas_get_type(), NULL)); } void wjcanvas_size(GtkWidget *widget, int width, int height) { wjcanvas *canvas; if (!IS_WJCANVAS(widget)) return; canvas = WJCANVAS(widget); if ((canvas->size[0] == width) && (canvas->size[1] == height)) return; canvas->size[0] = width; canvas->size[1] = height; canvas->resize = TRUE; #if GTK_MAJOR_VERSION == 1 /* !!! The fields are limited to 16-bit signed, and the values aren't */ widget->requisition.width = MIN(width, 32767); widget->requisition.height = MIN(height, 32767); #else /* if GTK_MAJOR_VERSION == 2 */ widget->requisition.width = width; widget->requisition.height = height; #endif gtk_widget_queue_resize(widget); } void wjcanvas_get_vport(GtkWidget *widget, int *vport) { copy4(vport, WJCANVAS(widget)->xy); } static int wjcanvas_offset(GtkAdjustment *adj, int dv) { double nv, up; int step, dw = dv; step = (int)(adj->step_increment + 0.5); if (step) { dw = abs(dw) + step - 1; dw -= dw % step; if (dv < 0) dw = -dw; } up = adj->upper - adj->page_size; nv = adj->value + dw; if (nv > up) nv = up; if (nv < 0.0) nv = 0.0; up = adj->value; adj->value = nv; return (up != nv); } int wjcanvas_scroll_in(GtkWidget *widget, int x, int y) { wjcanvas *canvas = WJCANVAS(widget); int dx = 0, dy = 0; if (!canvas->adjustments[0] || !canvas->adjustments[1]) return (FALSE); if (x < canvas->xy[0]) dx = (x < 0 ? 0 : x) - canvas->xy[0]; else if (x >= canvas->xy[2]) dx = (x >= canvas->size[0] ? canvas->size[0] : x + 1) - canvas->xy[2]; if (y < canvas->xy[1]) dy = (y < 0 ? 0 : y) - canvas->xy[1]; else if (y >= canvas->xy[3]) dy = (y >= canvas->size[1] ? canvas->size[1] : y + 1) - canvas->xy[3]; if (!(dx | dy)) return (FALSE); dx = wjcanvas_offset(canvas->adjustments[0], dx); dy = wjcanvas_offset(canvas->adjustments[1], dy); if (dx) gtk_adjustment_value_changed(canvas->adjustments[0]); if (dy) gtk_adjustment_value_changed(canvas->adjustments[1]); return (dx | dy); } #define WJCANVAS_SCROLL_LIMIT 333 /* 3 steps/second */ /* If mouse moved outside canvas, scroll canvas & warp cursor back in */ int wjcanvas_bind_mouse(GtkWidget *widget, GdkEventMotion *event, int x, int y) { wjcanvas *canvas = WJCANVAS(widget); int oldv[4]; copy4(oldv, canvas->xy); x += oldv[0]; y += oldv[1]; if ((x >= oldv[0]) && (x < oldv[2]) && (y >= oldv[1]) && (y < oldv[3])) return (FALSE); /* Limit scrolling rate for absolute pointing devices */ #if GTK_MAJOR_VERSION == 1 if ((event->source != GDK_SOURCE_MOUSE) && #else /* if GTK_MAJOR_VERSION == 2 */ if ((event->device->source != GDK_SOURCE_MOUSE) && #endif (event->time < canvas->scrolltime + WJCANVAS_SCROLL_LIMIT)) return (FALSE); if (!wjcanvas_scroll_in(widget, x, y)) return (FALSE); canvas->scrolltime = event->time; return (move_mouse_relative(oldv[0] - canvas->xy[0], oldv[1] - canvas->xy[1])); } // Focusable pixmap widget #define WJPIXMAP(obj) GTK_CHECK_CAST(obj, wjpixmap_get_type(), wjpixmap) #define IS_WJPIXMAP(obj) GTK_CHECK_TYPE(obj, wjpixmap_get_type()) // !!! Implement 2nd cursor later !!! typedef struct { GtkWidget widget; // Parent class GdkWindow *pixwindow; int width, height; // Requested pixmap size int xc, yc; int focused_cursor; GdkRectangle pm, cr; GdkPixmap *pixmap, *cursor; GdkBitmap *cmask; } wjpixmap; static GtkType wjpixmap_type; static GtkType wjpixmap_get_type(); static void wjpixmap_position(wjpixmap *pix) { int x, y, w, h; x = pix->widget.allocation.width; pix->pm.width = w = pix->width <= x ? pix->width : x; pix->pm.x = (x - w) / 2 + pix->widget.allocation.x; y = pix->widget.allocation.height; pix->pm.height = h = pix->height <= y ? pix->height : y; pix->pm.y = (y - h) / 2 + pix->widget.allocation.y; } static void wjpixmap_realize(GtkWidget *widget) { wjpixmap *pix = WJPIXMAP(widget); GdkWindowAttr attrs; GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); widget->window = gtk_widget_get_parent_window(widget); gdk_window_ref(widget->window); wjpixmap_position(pix); attrs.x = pix->pm.x; attrs.y = pix->pm.y; attrs.width = pix->pm.width; attrs.height = pix->pm.height; attrs.window_type = GDK_WINDOW_CHILD; attrs.wclass = GDK_INPUT_OUTPUT; attrs.visual = gtk_widget_get_visual(widget); attrs.colormap = gtk_widget_get_colormap(widget); // Add the same events as GtkEventBox does attrs.event_mask = gtk_widget_get_events(widget) | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK; pix->pixwindow = gdk_window_new(widget->window, &attrs, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP); gdk_window_set_user_data(pix->pixwindow, widget); #if GTK_MAJOR_VERSION == 1 fix_gdk_events(pix->pixwindow); #endif gdk_window_set_back_pixmap(pix->pixwindow, NULL, FALSE); widget->style = gtk_style_attach(widget->style, widget->window); } static void wjpixmap_unrealize(GtkWidget *widget) { wjpixmap *pix = WJPIXMAP(widget); if (pix->pixwindow) { gdk_window_set_user_data(pix->pixwindow, NULL); gdk_window_destroy(pix->pixwindow); pix->pixwindow = NULL; } if (widget_class->unrealize) widget_class->unrealize(widget); } static void wjpixmap_map(GtkWidget *widget) { wjpixmap *pix = WJPIXMAP(widget); if (widget_class->map) widget_class->map(widget); if (pix->pixwindow) gdk_window_show(pix->pixwindow); } static void wjpixmap_unmap(GtkWidget *widget) { wjpixmap *pix = WJPIXMAP(widget); if (pix->pixwindow) gdk_window_hide(pix->pixwindow); if (widget_class->unmap) widget_class->unmap(widget); } static void wjpixmap_size_request(GtkWidget *widget, GtkRequisition *requisition) { wjpixmap *pix = WJPIXMAP(widget); gint xp, yp; #if GTK_MAJOR_VERSION == 1 xp = widget->style->klass->xthickness * 2 + 4; yp = widget->style->klass->ythickness * 2 + 4; #else gtk_widget_style_get(GTK_WIDGET (widget), "focus-line-width", &xp, "focus-padding", &yp, NULL); yp = (xp + yp) * 2 + 2; xp = widget->style->xthickness * 2 + yp; yp = widget->style->ythickness * 2 + yp; #endif requisition->width = pix->width + xp; requisition->height = pix->height + yp; } static void wjpixmap_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { wjpixmap *pix = WJPIXMAP(widget); widget->allocation = *allocation; wjpixmap_position(pix); if (GTK_WIDGET_REALIZED(widget)) gdk_window_move_resize(pix->pixwindow, pix->pm.x, pix->pm.y, pix->pm.width, pix->pm.height); } static void wjpixmap_paint(GtkWidget *widget, int inner, GdkRectangle *area) { wjpixmap *pix = WJPIXMAP(widget); GdkRectangle cdest; #if GTK_MAJOR_VERSION == 1 /* Preparation */ gdk_gc_set_clip_rectangle(widget->style->black_gc, area); #endif if (!inner) // Drawing borders { #if GTK_MAJOR_VERSION == 1 gdk_window_clear_area(widget->window, area->x, area->y, area->width, area->height); #endif /* Frame */ gdk_draw_rectangle(widget->window, widget->style->black_gc, FALSE, pix->pm.x - 1, pix->pm.y - 1, pix->pm.width + 1, pix->pm.height + 1); /* Focus rectangle */ if (GTK_WIDGET_HAS_FOCUS(widget)) gtk_paint_focus(widget->style, widget->window, #if GTK_MAJOR_VERSION == 2 GTK_WIDGET_STATE(widget), #endif area, widget, NULL, widget->allocation.x, widget->allocation.y, widget->allocation.width - 1, widget->allocation.height - 1); } while (inner) // Drawing pixmap & cursor { /* Contents pixmap */ gdk_draw_pixmap(pix->pixwindow, widget->style->black_gc, pix->pixmap, area->x, area->y, area->x, area->y, area->width, area->height); /* Cursor pixmap */ if (!pix->cursor) break; if (pix->focused_cursor && !GTK_WIDGET_HAS_FOCUS(widget)) break; if (!gdk_rectangle_intersect(&pix->cr, area, &cdest)) break; if (pix->cmask) { gdk_gc_set_clip_mask(widget->style->black_gc, pix->cmask); gdk_gc_set_clip_origin(widget->style->black_gc, pix->cr.x, pix->cr.y); } gdk_draw_pixmap(pix->pixwindow, widget->style->black_gc, pix->cursor, cdest.x - pix->cr.x, cdest.y - pix->cr.y, cdest.x, cdest.y, cdest.width, cdest.height); if (pix->cmask) { gdk_gc_set_clip_mask(widget->style->black_gc, NULL); gdk_gc_set_clip_origin(widget->style->black_gc, 0, 0); } break; } #if GTK_MAJOR_VERSION == 1 /* Cleanup */ gdk_gc_set_clip_rectangle(widget->style->black_gc, NULL); #endif } static gboolean wjpixmap_expose(GtkWidget *widget, GdkEventExpose *event) { if (GTK_WIDGET_DRAWABLE(widget)) wjpixmap_paint(widget, event->window != widget->window, &event->area); return (FALSE); } #if GTK_MAJOR_VERSION == 1 static void wjpixmap_draw(GtkWidget *widget, GdkRectangle *area) { wjpixmap *pix = WJPIXMAP(widget); GdkRectangle ir; if (!GTK_WIDGET_DRAWABLE(widget)) return; /* If inner window is touched */ if (gdk_rectangle_intersect(area, &pix->pm, &ir)) { ir.x -= pix->pm.x; ir.y -= pix->pm.y; wjpixmap_paint(widget, TRUE, &ir); /* If outer window isn't */ if (!((area->width - ir.width) | (area->height - ir.height))) return; } wjpixmap_paint(widget, FALSE, area); } static void wjpixmap_draw_focus(GtkWidget *widget) { gtk_widget_draw(widget, NULL); } static gint wjpixmap_focus_event(GtkWidget *widget, GdkEventFocus *event) { if (event->in) GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS); gtk_widget_draw_focus(widget); return (FALSE); } #endif static void wjpixmap_destroy(GtkObject *object) { wjpixmap *pix = WJPIXMAP(object); if (pix->pixmap) gdk_pixmap_unref(pix->pixmap); if (pix->cursor) gdk_pixmap_unref(pix->cursor); if (pix->cmask) gdk_bitmap_unref(pix->cmask); /* !!! Unlike attached handler, default handler can get called twice */ pix->pixmap = pix->cursor = pix->cmask = NULL; GTK_OBJECT_CLASS(widget_class)->destroy(object); } static void wjpixmap_class_init(GtkWidgetClass *class) { widget_class = gtk_type_class(GTK_TYPE_WIDGET); GTK_OBJECT_CLASS(class)->destroy = wjpixmap_destroy; class->realize = wjpixmap_realize; class->unrealize = wjpixmap_unrealize; class->map = wjpixmap_map; class->unmap = wjpixmap_unmap; #if GTK_MAJOR_VERSION == 1 class->draw = wjpixmap_draw; class->draw_focus = wjpixmap_draw_focus; class->focus_in_event = class->focus_out_event = wjpixmap_focus_event; #endif class->expose_event = wjpixmap_expose; class->size_request = wjpixmap_size_request; class->size_allocate = wjpixmap_size_allocate; } static GtkType wjpixmap_get_type() { if (!wjpixmap_type) { static const GtkTypeInfo wjpixmap_info = { "wjPixmap", sizeof(wjpixmap), sizeof(GtkWidgetClass), (GtkClassInitFunc)wjpixmap_class_init, // (GtkObjectInitFunc)wjpixmap_init, NULL, /* No instance init */ NULL, NULL, NULL }; wjpixmap_type = gtk_type_unique(GTK_TYPE_WIDGET, &wjpixmap_info); } return (wjpixmap_type); } GtkWidget *wjpixmap_new(int width, int height) { GtkWidget *widget = gtk_widget_new(wjpixmap_get_type(), NULL); wjpixmap *pix = WJPIXMAP(widget); GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS | GTK_NO_WINDOW); pix->width = width; pix->height = height; return (widget); } /* Must be called first to init, and afterwards to access pixmap */ GdkPixmap *wjpixmap_pixmap(GtkWidget *widget) { wjpixmap *pix = WJPIXMAP(widget); if (!pix->pixmap) { GdkWindow *win = NULL; int depth = -1; if (GTK_WIDGET_REALIZED(widget)) win = widget->window; else depth = gtk_widget_get_visual(widget)->depth; pix->pixmap = gdk_pixmap_new(win, pix->width, pix->height, depth); } return (pix->pixmap); } void wjpixmap_draw_rgb(GtkWidget *widget, int x, int y, int w, int h, unsigned char *rgb, int step) { wjpixmap *pix = WJPIXMAP(widget); if (!pix->pixmap) return; gdk_draw_rgb_image(pix->pixmap, widget->style->black_gc, x, y, w, h, GDK_RGB_DITHER_NONE, rgb, step); #if GTK_MAJOR_VERSION == 1 gtk_widget_queue_draw_area(widget, x + pix->pm.x, y + pix->pm.y, w, h); #else /* if GTK_MAJOR_VERSION == 2 */ if (pix->pixwindow) { GdkRectangle wr = { x, y, w, h }; gdk_window_invalidate_rect(pix->pixwindow, &wr, FALSE); } #endif } void wjpixmap_fill_rgb(GtkWidget *widget, int x, int y, int w, int h, int rgb) { GdkGCValues sv; wjpixmap *pix = WJPIXMAP(widget); if (!pix->pixmap) return; gdk_gc_get_values(widget->style->black_gc, &sv); gdk_rgb_gc_set_foreground(widget->style->black_gc, rgb); gdk_draw_rectangle(pix->pixmap, widget->style->black_gc, TRUE, x, y, w, h); gdk_gc_set_foreground(widget->style->black_gc, &sv.foreground); #if GTK_MAJOR_VERSION == 1 gtk_widget_queue_draw_area(widget, x + pix->pm.x, y + pix->pm.y, w, h); #else /* if GTK_MAJOR_VERSION == 2 */ if (pix->pixwindow) { GdkRectangle wr = { x, y, w, h }; gdk_window_invalidate_rect(pix->pixwindow, &wr, FALSE); } #endif } void wjpixmap_move_cursor(GtkWidget *widget, int x, int y) { wjpixmap *pix = WJPIXMAP(widget); GdkRectangle pm, ocr, tcr1, tcr2, *rcr = NULL; int dx = x - pix->xc, dy = y - pix->yc; if (!(dx | dy)) return; ocr = pix->cr; pix->cr.x += dx; pix->cr.y += dy; pix->xc = x; pix->yc = y; if (!pix->pixmap || !pix->cursor) return; if (pix->focused_cursor && !GTK_WIDGET_HAS_FOCUS(widget)) return; /* Anything visible? */ if (!GTK_WIDGET_VISIBLE(widget)) return; pm = pix->pm; pm.x = pm.y = 0; if (gdk_rectangle_intersect(&ocr, &pm, &tcr1)) rcr = &tcr1; if (gdk_rectangle_intersect(&pix->cr, &pm, &tcr2)) { if (rcr) gdk_rectangle_union(&tcr1, &tcr2, rcr = &ocr); else rcr = &tcr2; } if (!rcr) return; /* Both positions invisible */ #if GTK_MAJOR_VERSION == 1 gtk_widget_queue_draw_area(widget, rcr->x + pix->pm.x, rcr->y + pix->pm.y, rcr->width, rcr->height); #else /* if GTK_MAJOR_VERSION == 2 */ if (pix->pixwindow) gdk_window_invalidate_rect(pix->pixwindow, rcr, FALSE); #endif } void wjpixmap_set_cursor(GtkWidget *widget, char *image, char *mask, int width, int height, int hot_x, int hot_y, int focused) { wjpixmap *pix = WJPIXMAP(widget); if (pix->cursor) gdk_pixmap_unref(pix->cursor); if (pix->cmask) gdk_bitmap_unref(pix->cmask); pix->cursor = pix->cmask = NULL; pix->focused_cursor = focused; if (image) { GdkWindow *win = NULL; int depth = -1; if (GTK_WIDGET_REALIZED(widget)) win = widget->window; else depth = gtk_widget_get_visual(widget)->depth; pix->cursor = gdk_pixmap_create_from_data(win, image, width, height, depth, &widget->style->white, &widget->style->black); pix->cr.x = pix->xc - hot_x; pix->cr.y = pix->yc - hot_y; pix->cr.width = width; pix->cr.height = height; if (mask) pix->cmask = gdk_bitmap_create_from_data(win, mask, width, height); } /* Optimizing redraw in a rare operation is useless */ if (pix->pixmap) gtk_widget_queue_draw(widget); } void wjpixmap_cursor(GtkWidget *widget, int *x, int *y) { wjpixmap *pix = WJPIXMAP(widget); if (pix->cursor) *x = pix->xc , *y = pix->yc; else *x = *y = 0; } /* Translate allocation-relative coords to pixmap-relative */ int wjpixmap_rxy(GtkWidget *widget, int x, int y, int *xr, int *yr) { wjpixmap *pix = WJPIXMAP(widget); if (!pix->pixmap) return (FALSE); x -= pix->pm.x - widget->allocation.x; y -= pix->pm.y - widget->allocation.y; *xr = x; *yr = y; return ((x >= 0) && (x < pix->pm.width) && (y >= 0) && (y < pix->pm.height)); } // Repaint expose region #if GTK_MAJOR_VERSION == 2 // !!! For now, repaint_func() is expected to know widget & window to repaint void repaint_expose(GdkEventExpose *event, int *vport, repaint_func repaint, int cost) { GdkRectangle *rects; gint nrects; int i, sz, dx = vport[0], dy = vport[1]; gdk_region_get_rectangles(event->region, &rects, &nrects); for (i = sz = 0; i < nrects; i++) sz += rects[i].width * rects[i].height; /* Don't bother with regions if not worth it */ if (event->area.width * event->area.height - sz > cost * (nrects - 1)) { for (i = 0; i < nrects; i++) repaint(rects[i].x + dx, rects[i].y + dy, rects[i].width, rects[i].height); } else repaint(event->area.x + dx, event->area.y + dy, event->area.width, event->area.height); g_free(rects); } #endif // Track updates of multiple widgets (by whatever means necessary) /* void handler(GtkWidget *widget) */ void track_updates(GtkSignalFunc handler, GtkWidget *widget, ...) { va_list args; GtkWidget *w; va_start(args, widget); for (w = widget; w; w = va_arg(args, GtkWidget *)) { if (GTK_IS_SPIN_BUTTON(w)) { GtkAdjustment *adj = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(w)); gtk_signal_connect_object(GTK_OBJECT(adj), "value_changed", handler, GTK_OBJECT(w)); } else if (GTK_IS_TOGGLE_BUTTON(w)) gtk_signal_connect( GTK_OBJECT(w), "toggled", handler, NULL); else if (GTK_IS_ENTRY(w)) gtk_signal_connect( GTK_OBJECT(w), "changed", handler, NULL); // !!! Add other widget types here } va_end(args); } // Convert pathname to absolute char *resolve_path(char *buf, int buflen, char *path) { char wbuf[PATHBUF], *tmp, *tm2, *src, *dest; int ch, dot, dots; /* Relative name to absolute */ #ifdef WIN32 tm2 = "\\"; getcwd(wbuf, PATHBUF - 1); if ((path[0] == '/') || (path[0] == '\\')) wbuf[2] = '\0'; else if (path[1] != ':'); else if ((path[2] != '/') && (path[2] != '\\')) { char tbuf[PATHBUF]; tbuf[0] = path[0]; tbuf[1] = ':'; tbuf[2] = '\0'; if (!chdir(tbuf)) getcwd(tbuf, PATHBUF - 1); chdir(wbuf); memcpy(wbuf, tbuf, PATHBUF); path += 2; } else *(tm2 = wbuf) = '\0'; tmp = g_strconcat(wbuf, tm2, path, NULL); #else wbuf[0] = '\0'; if (path[0] != '/') getcwd(wbuf, PATHBUF - 1); tmp = g_strconcat(wbuf, DIR_SEP_STR, path, NULL); #endif /* Canonicalize path the way "realpath -s" does, i.e., symlinks * followed by ".." will get resolved wrong - WJ */ src = dest = tmp; dots = dot = 0; while (TRUE) { ch = *src++; #ifdef WIN32 if (ch == '/') ch = DIR_SEP; #endif if (ch == '.') dots += dot; else if (!ch || (ch == DIR_SEP)) { if ((dots > 0) && (dots < 4)) /* // /./ /../ */ { dest -= dots; if (dots == 3) /* /../ */ { *dest = '\0'; if ((tm2 = strrchr(tmp, DIR_SEP))) dest = tm2; } /* Do not lose trailing separator */ if (!ch) *dest++ = DIR_SEP; } dots = dot = 1; } else dots = dot = 0; *dest++ = ch; if (!ch) break; } /* Return the result */ if (buf) { strncpy(buf, tmp, buflen); buf[buflen - 1] = 0; g_free(tmp); tmp = buf; } return (tmp); } // A (better) substitute for fnmatch(), in case one is needed /* One is necessary in case of Win32 or GTK+ 2.0/2.2 */ #if defined(WIN32) || ((GTK_MAJOR_VERSION == 2) && (GTK2VERSION < 4)) #ifdef WIN32 /* Convert everything to lowercase */ static gunichar nxchar(const char **str) { gunichar c = g_utf8_get_char(*str); *str = g_utf8_next_char(*str); return (g_unichar_tolower(c)); } /* Slash isn't an escape char in Windows */ #define UNQUOTE_CHAR(C,P) #else static gunichar nxchar(const char **str) { gunichar c = g_utf8_get_char(*str); *str = g_utf8_next_char(*str); return (c); } #define UNQUOTE_CHAR(C,P) if ((C) == '\\') (C) = nxchar(P) #endif static int match_char_set(const char **maskp, gunichar cs) { const char *mask = *maskp; gunichar ch, cstart, cend; int inv; ch = *mask; if ((inv = (ch == '^') | (ch == '!'))) mask++; ch = nxchar(&mask); while (TRUE) { UNQUOTE_CHAR(ch, &mask); if (!ch) return (0); // Failed cstart = cend = ch; if ((*mask == '-') && (mask[1] != ']')) { mask++; ch = nxchar(&mask); UNQUOTE_CHAR(ch, &mask); if (!ch) return (0); // Failed cend = ch; } if ((cs >= cstart) && (cs <= cend)) { if (inv) return (-1); // Didn't match while ((ch = nxchar(&mask)) != ']') { UNQUOTE_CHAR(ch, &mask); if (!ch) return (0); // Failed } break; } ch = nxchar(&mask); if (ch != ']') continue; if (!inv) return (-1); // Didn't match break; } *maskp = mask; return (1); // Matched } /* The limiting of recursion to one level in this algorithm is based on the * observation that in case of a "*X*Y" subsequence, moving a match for "X" to * the right can not improve the outcome - so only the part after the last * encountered star may ever need to be rematched at another position - WJ */ int wjfnmatch(const char *mask, const char *str, int utf) { char *xmask, *xstr; const char *nstr, *omask, *wmask, *tstr = NULL, *tmask = NULL; gunichar ch, cs, cw; int res, ret = FALSE; /* Convert locale to utf8 */ if (!utf) { mask = xmask = g_locale_to_utf8((gchar *)mask, -1, NULL, NULL, NULL); str = xstr = g_locale_to_utf8((gchar *)str, -1, NULL, NULL, NULL); // Fail the match if conversion failed if (!xmask || !xstr) return (FALSE); } while (TRUE) { nstr = str; cs = nxchar(&nstr); if (!cs) break; omask = mask; ch = nxchar(&mask); if ((cs == DIR_SEP) && (ch != cs)) goto nomatch; if (ch == '?') { str = nstr; continue; } if (ch == '[') { str = nstr; res = match_char_set(&mask, cs); if (res < 0) goto nomatch; if (!res) goto fail; continue; } if (ch == '*') { while (TRUE) { omask = mask; ch = nxchar(&mask); if (!ch) { ret = !strchr(str, DIR_SEP); goto fail; } if (ch == '*') continue; if (ch != '?') break; cs = nxchar(&str); if (!cs || (cs == DIR_SEP)) goto fail; } } else { str = nstr; UNQUOTE_CHAR(ch, &mask); if (ch == cs) continue; nomatch: if (!tmask) goto fail; omask = mask = tmask; str = tstr; ch = nxchar(&mask); } cw = ch; UNQUOTE_CHAR(ch, &mask); if (!ch) goto fail; // Escape char at end of mask wmask = mask; while (TRUE) { cs = nxchar(&str); if (!cs || ((cs == DIR_SEP) && (ch != cs))) goto fail; if (cw == '[') { res = match_char_set(&mask, cs); if (res > 0) break; if (!res) goto fail; mask = wmask; } else if (ch == cs) break; } tmask = omask; tstr = str; } while ((ch = nxchar(&mask)) == '*'); ret = !ch; fail: if (!utf) { g_free(xmask); g_free(xstr); } return (ret); } #endif // Replace '/' path separators #ifdef WIN32 void reseparate(char *str) { while ((str = strchr(str, '/'))) *str++ = DIR_SEP; } #endif // Prod the focused spinbutton, if any, to finally update its value void update_window_spin(GtkWidget *window) { #if GTK_MAJOR_VERSION == 1 gtk_container_focus(GTK_CONTAINER(window), GTK_DIR_TAB_FORWARD); #else gtk_widget_child_focus(window, GTK_DIR_TAB_FORWARD); #endif } // Process event queue void handle_events() { int i = 20; /* To prevent endless waiting */ while ((i-- > 0) && gtk_events_pending()) gtk_main_iteration(); } // Make GtkEntry accept Ctrl+Enter as a character static gboolean convert_ctrl_enter(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if (((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter)) && (event->state & GDK_CONTROL_MASK)) { #if GTK_MAJOR_VERSION == 1 GtkEditable *edit = GTK_EDITABLE(widget); gint pos = edit->current_pos; gtk_editable_delete_selection(edit); gtk_editable_insert_text(edit, "\n", 1, &pos); edit->current_pos = pos; #else gtk_signal_emit_by_name(GTK_OBJECT(widget), "insert_at_cursor", "\n"); #endif return (TRUE); } return (FALSE); } void accept_ctrl_enter(GtkWidget *entry) { gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(convert_ctrl_enter), NULL); } // Grab/ungrab input int do_grab(int mode, GtkWidget *widget, GdkCursor *cursor) { int owner_events = mode != GRAB_FULL; #if GTK_MAJOR_VERSION == 1 if (!widget->window) return (FALSE); if (gdk_keyboard_grab(widget->window, owner_events, GDK_CURRENT_TIME)) return (FALSE); if (gdk_pointer_grab(widget->window, owner_events, GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK, NULL, cursor, GDK_CURRENT_TIME)) { gdk_keyboard_ungrab(GDK_CURRENT_TIME); return (FALSE); } #else /* #if GTK_MAJOR_VERSION == 2 */ guint32 time; if (!widget->window) return (FALSE); time = gtk_get_current_event_time(); if (gdk_keyboard_grab(widget->window, owner_events, time) != GDK_GRAB_SUCCESS) return (FALSE); if (gdk_pointer_grab(widget->window, owner_events, GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK, NULL, cursor, time) != GDK_GRAB_SUCCESS) { gdk_display_keyboard_ungrab(gtk_widget_get_display(widget), time); return (FALSE); } #endif if (mode != GRAB_PROGRAM) gtk_grab_add(widget); return (TRUE); } void undo_grab(GtkWidget *widget) { #if GTK_MAJOR_VERSION == 1 gdk_keyboard_ungrab(GDK_CURRENT_TIME); gdk_pointer_ungrab(GDK_CURRENT_TIME); #else /* #if GTK_MAJOR_VERSION == 2 */ guint32 time = gtk_get_current_event_time(); GdkDisplay *display = gtk_widget_get_display(widget); gdk_display_keyboard_ungrab(display, time); gdk_display_pointer_ungrab(display, time); #endif gtk_grab_remove(widget); } #if GTK_MAJOR_VERSION == 1 // Workaround for crazy GTK+1 resize handling /* !!! GTK+1 may "short-circuit" a resize just redoing an existing allocation - * unless resize is queued on a toplevel and NOT from within its check_resize * handler. As all size_request and size_allocate handlers ARE called from * within it, here is a way to postpone queuing till after it finishes - WJ */ #define RESIZE_KEY "mtPaint.resize" static guint resize_key; static void repeat_resize(GtkContainer *cont, gpointer user_data) { GtkObject *obj = GTK_OBJECT(cont); if (gtk_object_get_data_by_id(obj, resize_key) != (gpointer)2) return; gtk_object_set_data_by_id(obj, resize_key, (gpointer)1); gtk_widget_queue_resize(GTK_WIDGET(cont)); } void force_resize(GtkWidget *widget) { GtkObject *obj = GTK_OBJECT(gtk_widget_get_toplevel(widget)); if (!resize_key) resize_key = g_quark_from_static_string(RESIZE_KEY); if (!gtk_object_get_data_by_id(obj, resize_key)) gtk_signal_connect_after(obj, "check_resize", GTK_SIGNAL_FUNC(repeat_resize), NULL); gtk_object_set_data_by_id(obj, resize_key, (gpointer)2); } // Workaround for broken GTK_SHADOW_NONE viewports in GTK+1 /* !!! gtk_viewport_draw() adjusts for shadow thickness even with shadow * disabled, resulting in lower right boundary left undrawn; easiest fix is * to set thickness to 0 for such widgets - WJ */ void vport_noshadow_fix(GtkWidget *widget) { static GtkStyle *defstyle; GtkStyleClass *class; if (!defstyle) { defstyle = gtk_style_new(); class = g_malloc(sizeof(GtkStyleClass)); memcpy(class, defstyle->klass, sizeof(GtkStyleClass)); defstyle->klass = class; class->xthickness = class->ythickness = 0; } gtk_widget_set_style(widget, defstyle); } #endif // Threading helpers #if 0 /* Not needed for now - GTK+/Win32 still isn't thread-safe anyway */ //#ifdef U_THREADS /* The following is a replacement for gdk_threads_add_*() functions - which are * useful, but hadn't been implemented before GTK+ 2.12 - WJ */ #if GTK_MAJOR_VERSION == 1 /* With GLib 1.2, a g_source_is_destroyed()-like check cannot be done from * outside GLib, so thread-safety is limited (see GTK+ bug #321866) */ typedef struct { GSourceFunc callback; gpointer user_data; } dispatch_info; static gboolean do_dispatch(dispatch_info *info) { gboolean res; gdk_threads_enter(); res = info->callback(info->user_data); gdk_threads_leave(); return (res); } guint threads_idle_add_priority(gint priority, GtkFunction function, gpointer data) { dispatch_info *disp = g_malloc(sizeof(dispatch_info)); disp->callback = function; disp->user_data = data; return (g_idle_add_full(priority, (GSourceFunc)do_dispatch, disp, (GDestroyNotify)g_free)); } guint threads_timeout_add(guint32 interval, GSourceFunc function, gpointer data) { dispatch_info *disp = g_malloc(sizeof(dispatch_info)); disp->callback = function; disp->user_data = data; return (g_timeout_add_full(G_PRIORITY_DEFAULT, interval, (GSourceFunc)do_dispatch, disp, (GDestroyNotify)g_free)); } #else /* if GTK_MAJOR_VERSION == 2 */ static GSourceFuncs threads_timeout_funcs, threads_idle_funcs; static gboolean threads_timeout_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { gboolean res = FALSE; gdk_threads_enter(); /* The test below is what g_source_is_destroyed() in GLib 2.12+ does */ if (source->flags & G_HOOK_FLAG_ACTIVE) res = g_timeout_funcs.dispatch(source, callback, user_data); gdk_threads_leave(); return (res); } static gboolean threads_idle_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { gboolean res = FALSE; gdk_threads_enter(); /* The test below is what g_source_is_destroyed() in GLib 2.12+ does */ if (source->flags & G_HOOK_FLAG_ACTIVE) res = g_idle_funcs.dispatch(source, callback, user_data); gdk_threads_leave(); return (res); } guint threads_timeout_add(guint32 interval, GSourceFunc function, gpointer data) { GSource *source = g_timeout_source_new(interval); guint id; if (!threads_timeout_funcs.dispatch) { threads_timeout_funcs = g_timeout_funcs; threads_timeout_funcs.dispatch = threads_timeout_dispatch; } source->source_funcs = &threads_timeout_funcs; g_source_set_callback(source, function, data, NULL); id = g_source_attach(source, NULL); g_source_unref(source); return (id); } guint threads_idle_add_priority(gint priority, GtkFunction function, gpointer data) { GSource *source = g_idle_source_new(); guint id; if (!threads_idle_funcs.dispatch) { threads_idle_funcs = g_idle_funcs; threads_idle_funcs.dispatch = threads_idle_dispatch; } source->source_funcs = &threads_idle_funcs; if (priority != G_PRIORITY_DEFAULT_IDLE) g_source_set_priority(source, priority); g_source_set_callback(source, function, data, NULL); id = g_source_attach(source, NULL); g_source_unref(source); return (id); } #endif #endif // Maybe this will be needed someday... #if 0 /* This transmutes a widget into one of different type. If the two types aren't * bit-for-bit compatible, Bad Things (tm) will happen - WJ */ static void steal_widget(GtkWidget *widget, GtkType wrapper_type) { #if GTK_MAJOR_VERSION == 1 GTK_OBJECT(widget)->klass = gtk_type_class(wrapper_type); #else G_OBJECT(widget)->g_type_instance.g_class = gtk_type_class(wrapper_type); #endif } #endif mtpaint-3.40/src/global.h0000644000175000000620000000146310654662452014651 0ustar muammarstaff/* global.h Copyright (C) 2005 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #ifdef U_NLS #include #define _(text) gettext(text) #define __(text) gettext(text) #else #define _(text) text #define __(text) text #endif mtpaint-3.40/src/cpick.h0000644000175000000620000000166710747122514014501 0ustar muammarstaff/* cpick.h Copyright (C) 2008 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ GtkWidget *cpick_create(); int cpick_get_colour(GtkWidget *w, int *opacity); void cpick_set_colour(GtkWidget *w, int rgb, int opacity); void cpick_set_colour_previous(GtkWidget *w, int rgb, int opacity); void cpick_set_opacity_visibility( GtkWidget *w, int visible ); mtpaint-3.40/src/font.c0000644000175000000620000013615711677125534014364 0ustar muammarstaff/* font.c Copyright (C) 2007-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #ifdef U_FREETYPE #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "viewer.h" #include "canvas.h" #include "inifile.h" #include "font.h" #include #include #include FT_FREETYPE_H #if (GTK_MAJOR_VERSION == 1) && defined(U_NLS) #include #endif /* ----------------------------------------------------------------- | Definitions & Structs | ----------------------------------------------------------------- */ #define MT_TEXT_MONO 1 /* Force mono rendering */ #define MT_TEXT_ROTATE_NN 2 /* Use nearest neighbour rotation on bitmap fonts */ #define MT_TEXT_OBLIQUE 4 /* Apply Oblique matrix transformation to scalable fonts */ #define FONTSEL_KEY "mtfontsel" #define FONT_INDEX_FILENAME ".mtpaint_fonts" #define TX_TOGG_ANTIALIAS 0 #define TX_TOGG_BACKGROUND 1 #define TX_TOGG_ANGLE 2 #define TX_TOGG_OBLIQUE 3 #define TX_TOGGS 4 #define TX_SPIN_BACKGROUND 0 #define TX_SPIN_ANGLE 1 #define TX_SPIN_SIZE 2 #define TX_SPINS 3 #define CLIST_FONTNAME 0 #define CLIST_FONTSTYLE 1 #define CLIST_FONTSIZE 2 #define CLIST_FONTFILE 3 #define CLIST_DIRECTORIES 4 #define FONTSEL_CLISTS 5 #define FONTSEL_CLISTS_MAXCOL 3 #define TX_ENTRY_TEXT 0 #define TX_ENTRY_DIRECTORY 1 #define TX_ENTRIES 2 #define TX_MAX_DIRS 100 typedef struct filenameNODE filenameNODE; struct filenameNODE { char *filename; // Filename of font int face_index; // Face index within font file filenameNODE *next; // Pointer to next filename, NULL=no more }; typedef struct sizeNODE sizeNODE; struct sizeNODE { int size; // Font size. 0=Scalable filenameNODE *filename; // Pointer to first filename sizeNODE *next; // Pointer to next size, NULL=no more }; typedef struct styleNODE styleNODE; struct styleNODE { char *style_name; // Style name sizeNODE *size; // Pointer to first size of this font styleNODE *next; // Pointer to next style, NULL=no more }; typedef struct fontNODE fontNODE; struct fontNODE { char *font_name; // Font name int directory; // Which directory is this font in? styleNODE *style; // Pointer to first style of this font fontNODE *next; // Pointer to next font family, NULL=no more }; typedef struct { int sort_column, // Which column is being sorted in Font clist preview_w, preview_h, // Preview area geometry update[FONTSEL_CLISTS] // Delayed update flags ; GtkWidget *window, // Font selection window *clist[FONTSEL_CLISTS], // All clists *sort_arrows[FONTSEL_CLISTS_MAXCOL], *toggle[TX_TOGGS], // Toggle buttons *spin[TX_SPINS], // Spin buttons *entry[TX_ENTRIES], // Text entries *preview_area // Preview drawing area ; unsigned char *preview_rgb; // Preview image in RGB memory GtkSortType sort_direction; // Sort direction of Font name clist fontNODE *head_node; // Pointer to head node styleNODE *current_style_node; // Current style node head sizeNODE *current_size_node; // Current size node head filenameNODE *current_filename_node; // Current filename node head } mtfontsel; static wjmem *font_mem; static fontNODE *global_font_node; static char *font_text; /* ----------------------------------------------------------------- | FreeType Rendering Code | ----------------------------------------------------------------- */ static void ft_draw_bitmap( unsigned char *mem, int w, FT_Bitmap *bitmap, FT_Int x, FT_Int y, int ppb ) { unsigned char *dest = mem + y * w + x, *src = bitmap->buffer; int i, j; for (j = 0; j < bitmap->rows; j++) { if (ppb == 1) // 8 bits per pixel greyscale { // memcpy(dest, src, bitmap->width); for (i = 0; i < bitmap->width; i++) dest[i] |= src[i]; } else if (ppb == 8) // 1 bit per pixel mono { for (i = 0; i < bitmap->width; i++) dest[i] |= (((int)src[i >> 3] >> (~i & 7)) & 1) * 255; } dest += w; src += bitmap->pitch; } } static inline void extend(int *rxy, int x0, int y0, int x1, int y1) { if (x0 < rxy[0]) rxy[0] = x0; if (y0 < rxy[1]) rxy[1] = y0; if (x1 > rxy[2]) rxy[2] = x1; if (y1 > rxy[3]) rxy[3] = y1; } /* Render text to a new chunk of memory. NULL return = failure, otherwise points to memory. int characters required to print unicode strings correctly. */ static unsigned char *mt_text_render( char *text, int characters, char *filename, char *encoding, double size, int face_index, double angle, int flags, int *width, int *height ) { unsigned char *mem = NULL; #ifdef WIN32 const char *txtp1; #else char *txtp1; #endif char *txtp2; double ca, sa, angle_r = angle / 180 * M_PI; int bx, by, bw, bh, bits, ppb, fix_w, fix_h, scalable; int Y1, Y2, X1, X2, ll, line, xflag; int minxy[4] = { MAX_WIDTH, MAX_HEIGHT, -MAX_WIDTH, -MAX_HEIGHT }; size_t s, ssize1 = characters, ssize2 = characters * 4 + 5; iconv_t cd; FT_Library library; FT_Face face; FT_Matrix matrix; FT_Vector pen, uninit_(pen0); FT_Error error; FT_UInt glyph_index; FT_Int32 unichar, *txt2, *tmp2; FT_Int32 load_flags = FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT; //printf("\n%s %i %s %s %f %i %f %i\n", text, characters, filename, encoding, size, face_index, angle, flags); if ( flags & MT_TEXT_MONO ) load_flags |= FT_LOAD_TARGET_MONO; if (characters < 1) return NULL; error = FT_Init_FreeType( &library ); if (error) return NULL; error = FT_New_Face( library, filename, face_index, &face ); if (error) goto fail2; scalable = FT_IS_SCALABLE(face); if (!scalable) { ca = 1.0; sa = 0.0; // Transform, if any, is for later /* !!! Linux .pcf fonts require requested height to match ppem rounded up; * Windows .fon fonts, conversely, require width & height. So we try both - WJ */ fix_w = face->available_sizes[0].width; fix_h = face->available_sizes[0].height; error = FT_Set_Pixel_Sizes(face, fix_w, fix_h); if (error) { fix_w = (face->available_sizes[0].x_ppem + 32) >> 6; fix_h = (face->available_sizes[0].y_ppem + 32) >> 6; error = FT_Set_Pixel_Sizes(face, fix_w, fix_h); } if (error) goto fail1; // !!! FNT fonts have special support in FreeType - maybe use it? Y1 = face->size->metrics.ascender; Y2 = face->size->metrics.descender; } else { ca = cos(angle_r); sa = sin(angle_r); /* Ignore embedded bitmaps if transforming the font */ if (angle_r) load_flags |= FT_LOAD_NO_BITMAP; matrix.yy = matrix.xx = (FT_Fixed)(ca * 0x10000L); matrix.xy = -(matrix.yx = (FT_Fixed)(sa * 0x10000L)); if (flags & MT_TEXT_OBLIQUE) { matrix.xy = (FT_Fixed)((0.25 * ca - sa) * 0x10000L); matrix.yy = (FT_Fixed)((0.25 * sa + ca) * 0x10000L); load_flags |= FT_LOAD_NO_BITMAP; } error = FT_Set_Char_Size( face, size*64, 0, 0, 0 ); if (error) goto fail1; Y1 = FT_MulFix(face->ascender, face->size->metrics.y_scale); Y2 = FT_MulFix(face->descender, face->size->metrics.y_scale); } txt2 = calloc(1, ssize2 + 4); if (!txt2) goto fail1; txtp1 = text; txtp2 = (char *)txt2; /* !!! To handle non-Unicode fonts properly, is just too costly; * instead we map 'em to ISO 8859-1 and hope for the best - WJ */ if (FT_Select_Charmap(face, FT_ENCODING_UNICODE)) FT_Set_Charmap(face, face->charmaps[0]); // Fallback /* Convert input string to UTF-32, using native byte order */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN cd = iconv_open("UTF-32LE", encoding); #else /* G_BYTE_ORDER == G_BIG_ENDIAN */ cd = iconv_open("UTF-32BE", encoding); #endif if ( cd == (iconv_t)(-1) ) goto fail0; s = iconv(cd, &txtp1, &ssize1, &txtp2, &ssize2); iconv_close(cd); if (s < 0) goto fail0; characters = (txtp2 - (char *)txt2) / sizeof(*txt2); // Converted length txt2[characters] = 0; // Terminate the line xflag = X1 = X2 = 0; while (TRUE) { pen.x = pen.y = 0; ll = line = 0; tmp2 = txt2; while (TRUE) { unichar = *tmp2++; if (!unichar || (unichar == 0x0A)) // EOL or newline { // Remember right boundary if (ll && face->glyph) { int tx = pen.x - pen0.x - face->glyph->advance.x; int ty = pen.y - pen0.y - face->glyph->advance.y; int tdx = face->glyph->metrics.horiBearingX + face->glyph->metrics.width - 64; /* Project pen offset onto rotated X axis */ tdx += tx * ca + ty * sa; if (tdx > X2) X2 = tdx; } if (!unichar) break; ll = (Y1 - Y2) * ++line; pen.x = ll * sa; pen.y = ll * -ca; ll = 0; // Reset horizontal index continue; } glyph_index = FT_Get_Char_Index(face, unichar); if (scalable) // Cannot rotate fixed fonts FT_Set_Transform(face, &matrix, &pen); error = FT_Load_Glyph( face, glyph_index, load_flags ); if ( error ) continue; // Remember left boundary if (!ll++) { int tx = face->glyph->metrics.horiBearingX; if (!xflag++) X1 = X2 = tx; // First glyph if (tx < X1) X1 = tx; pen0 = pen; } switch (face->glyph->bitmap.pixel_mode) { case FT_PIXEL_MODE_GRAY: ppb = 1; break; case FT_PIXEL_MODE_GRAY2: ppb = 2; break; case FT_PIXEL_MODE_GRAY4: ppb = 4; break; case FT_PIXEL_MODE_MONO: ppb = 8; break; default: continue; // Unsupported mode } bx = face->glyph->bitmap_left; by = -face->glyph->bitmap_top; bw = face->glyph->bitmap.width; bh = face->glyph->bitmap.rows; bits = bw && bh; // Bitmap glyphs don't get offset by FreeType if (!scalable || (bits && !face->glyph->outline.n_points)) { bx += pen.x >> 6; by -= pen.y >> 6; } pen.x += face->glyph->advance.x; pen.y += face->glyph->advance.y; // Remember bitmap bounds if (!mem && bits) extend(minxy, bx, by, bx + bw - 1, by + bh - 1); // Draw bitmap onto clipboard memory in pass 1 if (mem) ft_draw_bitmap(mem, *width, &face->glyph->bitmap, bx - minxy[0], by - minxy[1], ppb); } if (mem) break; // Done /* Adjust bounds for full-height rectangle; ignore possible * rounding issues, for their effect is purely visual - WJ */ by = Y2 + (Y2 - Y1) * line; while (TRUE) { bx = X1; while (TRUE) { int Ax, Ay; Ax = bx * ca - by * sa; if (Ax < 0) Ax = -(-Ax / 64); else Ax = (Ax + 63) / 64; if (Ax < minxy[0]) minxy[0] = Ax; if (Ax > minxy[2]) minxy[2] = Ax; Ay = by * ca + bx * sa; if (Ay < 0) Ay = (63 - Ay) / 64; else Ay = -(Ay / 64); if (Ay < minxy[1]) minxy[1] = Ay; if (Ay > minxy[3]) minxy[3] = Ay; if (bx == X2) break; bx = X2; } if (by == Y1) break; // Done by = Y1; } // Set up new clipboard mem = calloc(1, (*width = minxy[2] - minxy[0] + 1) * (*height = minxy[3] - minxy[1] + 1)); if (!mem) break; // Allocation failed so bail out } if (mem && !scalable && (angle!=0 || size>=2) ) // Rotate/Scale the bitmap font { chanlist old_img = {NULL, NULL, NULL, NULL}, new_img = {NULL, NULL, NULL, NULL}; int nw, nh, ow = *width, oh = *height, ch = CHN_MASK, smooth = FALSE, // FALSE=nearest neighbour, TRUE=smooth scale = size // Scale factor ; if ( scale >= 2 ) // Scale the bitmap up { nw = ow*scale; nh = oh*scale; old_img[ch] = mem; new_img[ch] = calloc( 1, nw*nh ); if ( new_img[ch] ) { if ( !mem_image_scale_real(old_img, ow, oh, 1, new_img, nw, nh, 0, FALSE, FALSE) ) { mem = new_img[ch]; free( old_img[ch] ); // Scaling succeeded *width = nw; *height = nh; ow = nw; oh = nh; } else { free( new_img[ch] ); // Scaling failed } } } if ( angle != 0 ) { mem_rotate_geometry(ow, oh, angle, &nw, &nh); if ( !(flags & MT_TEXT_ROTATE_NN) ) // Smooth rotation requested smooth = TRUE; old_img[ch] = mem; new_img[ch] = calloc( 1, nw*nh ); if ( new_img[ch] ) { //printf("old = %i,%i new = %i,%i\n", ow, oh, nw, nh); mem_rotate_free_real(old_img, new_img, ow, oh, nw, nh, 1, -angle, smooth, FALSE, FALSE, TRUE); mem = new_img[ch]; *width = nw; *height = nh; free( old_img[ch] ); } } } fail0: free(txt2); fail1: FT_Done_Face(face); fail2: FT_Done_FreeType(library); return mem; } /* ----------------------------------------------------------------- | Font Indexing Code | ----------------------------------------------------------------- */ #define SIZE_SHIFT 10 #define MAXLEN 256 #define SLOT_FONT 0 #define SLOT_DIR 1 #define SLOT_STYLE 2 #define SLOT_SIZE 3 #define SLOT_FILENAME 4 #define SLOT_TOT 5 static void trim_tab( char *buf, char *txt) { char *st; buf[0] = 0; if (txt) strncpy0(buf, txt, MAXLEN); for ( st=buf; st[0]!=0; st++ ) if ( st[0]=='\t' ) st[0]=' '; if ( buf[0] == 0 ) snprintf(buf, MAXLEN, "_None"); } static void font_dir_search(FT_Library *ft_lib, int dirnum, FILE *fp, char *dir) { // Search given directory for font files - recursively traverse directories FT_Face face; DIR *dp; struct dirent *ep; struct stat buf; char full_name[PATHBUF], tmp[2][MAXLEN]; int face_index; dp = opendir(dir); if (!dp) return; while ( (ep = readdir(dp)) ) { file_in_dir(full_name, dir, ep->d_name, PATHBUF); if ( stat(full_name, &buf)<0 ) continue; // Get file details #ifdef WIN32 if ( S_ISDIR(buf.st_mode) ) #else if ( ep->d_type == DT_DIR || S_ISDIR(buf.st_mode) ) #endif { // Subdirectory so recurse if (strcmp(ep->d_name, ".") && strcmp(ep->d_name, "..")) font_dir_search( ft_lib, dirnum, fp, full_name ); continue; } // File so see if its a font for ( face_index = 0; !FT_New_Face( *ft_lib, full_name, face_index, &face ); face_index++ ) { int size_type = 0; if (!FT_IS_SCALABLE(face)) size_type = face->available_sizes[0].height + (face->available_sizes[0].width << SIZE_SHIFT) + (face_index << (SIZE_SHIFT * 2)); // I use a tab character as a field delimeter, so replace any in the strings with a space trim_tab( tmp[0], face->family_name ); trim_tab( tmp[1], face->style_name ); fprintf(fp, "%s\t%i\t%s\t%i\t%s\n", tmp[0], dirnum, tmp[1], size_type, full_name); if ( (face_index+1) >= face->num_faces ) { FT_Done_Face(face); break; } FT_Done_Face(face); } } closedir(dp); } static void font_index_create(char *filename, char **dir_in) { // dir_in points to NULL terminated sequence of directories to search for fonts FT_Library library; int i; FILE *fp; if (FT_Init_FreeType(&library)) return; if ((fp = fopen(filename, "w"))) { for (i = 0; dir_in[i]; i++) font_dir_search(&library, i, fp, dir_in[i]); fclose(fp); } FT_Done_FreeType(library); } static void font_mem_clear() // Empty whole structure from memory { free(font_text); font_text = NULL; wjmemfree(font_mem); font_mem = NULL; global_font_node = NULL; } #define newNODE(X) wjmalloc(font_mem, sizeof(X), ALIGNOF(X)) static int font_mem_add(char *font, int dirn, char *style, int fsize, char *filename) {// Add new font data to memory structure. Returns TRUE if successful. int bm_index; fontNODE *fo; styleNODE *st; sizeNODE *ze; filenameNODE *fl; bm_index = fsize >> SIZE_SHIFT * 2; fsize &= (1 << SIZE_SHIFT * 2) - 1; for (fo = global_font_node; fo; fo = fo->next) { if (!strcmp(fo->font_name, font) && (fo->directory == dirn)) break; // Font family+directory already exists } if (!fo) // Set up new structure as no match currently exists { fo = newNODE(fontNODE); if (!fo) return (FALSE); // Memory failure fo->next = global_font_node; global_font_node = fo; fo->directory = dirn; fo->font_name = font; /* Its more efficient to load the newest font family/style/size as the new head because when checking subsequent new items, its more likely that the next match will be the head (or near it). If you add the new item to the end of the list you are ensuring that wasted searches will happen as the more likely match will be at the end. MT 22-8-2007 */ } for (st = fo->style; st; st = st->next) { if (!strcmp(st->style_name, style)) break; // Font style already exists } if (!st) // Set up new structure as no match currently exists { st = newNODE(styleNODE); if (!st) return (FALSE); // Memory failure st->next = fo->style; fo->style = st; // New head style st->style_name = style; } for (ze = st->size; ze; ze = ze->next) { if ( ze->size == fsize ) break; // Font size already exists } if (!ze) // Set up new structure { ze = newNODE(sizeNODE); if (!ze) return (FALSE); // Memory failure ze->next = st->size; st->size = ze; // New head size ze->size = fsize; } /* Always create a new filename node. If any filenames are duplicates we don't care. If the user is stupid enough to pass dupicates then they must have their stupidity shown to them in glorious technicolour so they don't do it again! ;-) MT 24-8-2007 */ fl = newNODE(filenameNODE); if (!fl) return (FALSE); // Memory failure fl->next = ze->filename; // Old first filename (maybe NULL) ze->filename = fl; // This is the new first filename fl->filename = filename; fl->face_index = bm_index; return (TRUE); } static void font_index_load(char *filename) { char *buf, *tmp, *tail, *slots[SLOT_TOT]; int i, dir, size; font_mem = wjmemnew(0, 0); font_text = slurp_file(filename); if (!font_mem || !font_text) { font_mem_clear(); return; } for (buf = font_text + 1; *buf; buf = tmp) { buf += strspn(buf, "\r\n"); if (!*buf) break; tmp = buf + strcspn(buf, "\r\n"); if (*tmp) *tmp++ = 0; for (i = 0; i < SLOT_TOT; i++) { slots[i] = buf; buf += strcspn(buf, "\t"); if (*buf) *buf++ = 0; } dir = strtol(slots[SLOT_DIR], &tail, 10); if (*tail) break; size = strtol(slots[SLOT_SIZE], &tail, 10); if (*tail) break; if (!font_mem_add(slots[0], dir, slots[2], size, slots[4])) { // Memory failure font_mem_clear(); return; } } } #if 0 static void font_index_display(struct fontNODE *head) { int families=0, styles=0, sizes=0, filenames=0; fontNODE *fo = head; styleNODE *st; sizeNODE *ze; filenameNODE *fl; size_t nspace = 0, sspace = 0; while (fo) { printf("%s (%i)\n", fo->font_name, fo->directory); nspace += strlen(fo->font_name) + 1; sspace += sizeof(*fo); families ++; st = fo->style; while (st) { printf("\t%s\n", st->style_name); nspace += strlen(st->style_name) + 1; sspace += sizeof(*st); styles ++; ze = st->size; while (ze) { printf("\t\t%i x %i\n", ze->size % (1<size >> SIZE_SHIFT) % (1<filename; while (fl) { printf("\t\t\t%3i %s\n", fl->face_index, fl->filename); nspace += strlen(fl->filename) + 1; sspace += sizeof(*fl); filenames++; fl = fl->next; } ze = ze->next; } st = st->next; } fo = fo->next; } printf("\nMemory Used\t%'zu + %'zu (%.1fK)\n" "Font Families\t%i\nFont Styles\t%i\nFont Sizes\t%i\nFont Filenames\t%i\n\n", nspace, sspace, (double)(nspace + sspace) / 1024, families, styles, sizes, filenames); } #endif /* ----------------------------------------------------------------- | GTK+ Front End Code | ----------------------------------------------------------------- */ static unsigned char *render_to_1bpp(int *w, int *h) { double angle = 0; unsigned char *text_1bpp; int flags = 0, size = 1; if ( inifile_get_gboolean( "fontTypeBitmap", TRUE ) ) size = inifile_get_gint32( "fontSizeBitmap", 1 ); else size = inifile_get_gint32( "fontSize", 12 ); if ( mem_img_bpp == 1 || !inifile_get_gboolean( "fontAntialias0", TRUE ) ) { flags |= MT_TEXT_MONO; flags |= MT_TEXT_ROTATE_NN; // RGB image without AA = nearest neighbour rotation } if ( inifile_get_gboolean( "fontAntialias3", TRUE ) ) flags |= MT_TEXT_OBLIQUE; if ( inifile_get_gboolean( "fontAntialias2", FALSE ) ) angle = ((double)inifile_get_gint32( "fontAngle", 0 ))/100; text_1bpp = mt_text_render( inifile_get( "textString", "" ), strlen( inifile_get( "textString", "" ) ), inifile_get( "lastTextFilename", "" ), #if GTK_MAJOR_VERSION == 1 #ifdef U_NLS nl_langinfo(CODESET), // this only works on international version of mtPaint, as setlocale is needed #else "ISO-8859-1", // Non-international verson so it must be this #endif #else /* if GTK_MAJOR_VERSION == 2 */ "UTF-8", #endif size, inifile_get_gint32( "lastTextFace", 0 ), angle, flags, w, h ); return text_1bpp; } static void font_preview_update(mtfontsel *fp) // Re-render the preview text and update it { unsigned char *text_1bpp; int w=1, h=1; if ( !fp ) return; if ( fp->preview_rgb ) // Remove old rendering { free( fp->preview_rgb ); fp->preview_rgb = NULL; } text_1bpp = render_to_1bpp(&w, &h); if ( text_1bpp ) { fp->preview_rgb = calloc( 1, 3*w*h ); if ( fp->preview_rgb ) { int i, j = w*h; unsigned char *src = text_1bpp, *dest = fp->preview_rgb; for ( i=0; ipreview_w = w; fp->preview_h = h; } free( text_1bpp ); //printf("font preview update %i x %i\n", w, h); } gtk_widget_set_usize( fp->preview_area, w, h ); gtk_widget_queue_draw( fp->preview_area ); // Show the world the fruits of my hard labour! ;-) // FIXME - GTK+1 has rendering problems when the area becomes smaller - old artifacts are left behind } static void font_gui_create_index(char *filename) // Create index file with settings from ~/.mtpaint { char buf[128], *dirs[TX_MAX_DIRS + 1]; int i, j = inifile_get_gint32("font_dirs", 0 ); memset(dirs, 0, sizeof(dirs)); for ( i=0; iwindow, "paste_text_window"); gtk_widget_destroy( fp->window ); if (fp->preview_rgb) free(fp->preview_rgb); free(fp); } void ft_render_text() // FreeType equivalent of render_text() { unsigned char *text_1bpp; int w=1, h=1; text_1bpp = render_to_1bpp(&w, &h); if (text_1bpp && make_text_clipboard(text_1bpp, w, h, 1)) text_paste = TEXT_PASTE_FT; else text_paste = TEXT_PASTE_NONE; } static void update_clist(mtfontsel *mem, int cl, int what) { GtkWidget *w = mem->clist[cl]; GtkCList *clist = GTK_CLIST(w); if (!GTK_WIDGET_MAPPED(w)) /* Is frozen anyway */ { what += (what & 1) * 3; // Flag a waiting refresh mem->update[cl] |= what; return; } what |= mem->update[cl]; mem->update[cl] = 0; if (what & 4) /* Do a delayed refresh */ { gtk_clist_freeze(clist); gtk_clist_thaw(clist); } if ((what & 2) && clist->selection) /* Do a scroll */ gtk_clist_moveto(clist, (int)(clist->selection->data), 0, 0.5, 0); } static void font_clist_update(GtkWidget *clist, gpointer user_data) { mtfontsel *mem = gtk_object_get_data(GTK_OBJECT(clist), FONTSEL_KEY); int cl = (int)user_data; update_clist(mem, cl, 0); } static void font_clist_centralise(mtfontsel *mem) { int i; /* Ensure selections are visible and central */ for (i = 0; i < FONTSEL_CLISTS; i++) update_clist(mem, i, 2); } static void read_font_controls(mtfontsel *fp) { int i; char txt[128]; inifile_set("textString", (char *)gtk_entry_get_text(GTK_ENTRY(fp->entry[TX_ENTRY_TEXT]))); for ( i=0; itoggle[i]))); } inifile_set_gint32("fontAngle", rint(read_float_spin(fp->spin[TX_SPIN_ANGLE]) * 100.0)); if ( inifile_get_gboolean( "fontTypeBitmap", TRUE ) ) inifile_set_gint32("fontSizeBitmap", read_spin(fp->spin[TX_SPIN_SIZE])); else inifile_set_gint32("fontSize", read_spin(fp->spin[TX_SPIN_SIZE]) ); if (mem_channel == CHN_IMAGE) inifile_set_gint32( "fontBackground", read_spin(fp->spin[TX_SPIN_BACKGROUND])); } static gint paste_text_ok( GtkWidget *widget, GdkEvent *event, gpointer data ) { mtfontsel *fp = gtk_object_get_data(GTK_OBJECT(widget), FONTSEL_KEY); if ( !fp ) return FALSE; read_font_controls(fp); ft_render_text(); if (mem_clipboard) pressed_paste(TRUE); delete_text( widget, data ); return FALSE; } static void font_clist_adjust_cols(mtfontsel *mem, int cl) { GtkCList *clist = GTK_CLIST(mem->clist[cl]); int i; /* Adjust column widths for new data */ for (i = 0; i < FONTSEL_CLISTS_MAXCOL; i++) { gtk_clist_set_column_width(clist, i, 5 + gtk_clist_optimal_column_width(clist, i)); } } static void populate_font_clist( mtfontsel *mem, int cl ) { int i, j, row, select_row = -1, real_size = 0; char txt[32], buf[128], buf2[256]; gchar *row_text[FONTSEL_CLISTS_MAXCOL] = {NULL, NULL, NULL}; GtkCList *clist = GTK_CLIST(mem->clist[cl]); gtk_clist_freeze(clist); gtk_clist_clear(clist); if (cl == CLIST_FONTNAME) { fontNODE *fn = mem->head_node; char *last_font_name = inifile_get( "lastFontName", "" ); int last_font_name_dir = inifile_get_gint32( "lastFontNameDir", 0 ), last_font_name_bitmap = inifile_get_gint32( "lastFontNameBitmap", 0 ), bitmap_font; while (fn) { snprintf(txt, 32, "%3i", 1+fn->directory); gtkuncpy(buf2, fn->font_name, 256); // Transfer to UTF-8 in GTK+2 row_text[2] = buf2; row_text[1] = NULL; row_text[0] = txt; if ( fn->style->size->size != 0 ) { row_text[1] = "B"; bitmap_font = 1; } else bitmap_font = 0; row = gtk_clist_append(clist, row_text); gtk_clist_set_row_data(clist, row, (gpointer)fn); if ( !strcmp(fn->font_name, last_font_name) && last_font_name_dir == fn->directory && last_font_name_bitmap == bitmap_font ) select_row = row; fn = fn->next; } } else if (cl == CLIST_FONTSTYLE) { static const char *default_styles[] = { "Regular", "Medium", "Book", "Roman", NULL }; char *last_font_style = inifile_get( "lastFontStyle", "" ); styleNODE *sn = mem->current_style_node; int default_row = -1; while (sn) { gtkuncpy(buf2, sn->style_name, 256); // Transfer to UTF-8 in GTK+2 row_text[0] = buf2; row = gtk_clist_append(clist, row_text); gtk_clist_set_row_data(clist, row, (gpointer)sn); for ( i=0; default_styles[i]; i++ ) { if ( !strcmp(sn->style_name, default_styles[i] ) ) default_row = row; if ( !strcmp(sn->style_name, last_font_style ) ) { select_row = row; } } if ( select_row < 0 ) select_row = default_row; // Last style not found so use default sn = sn->next; } } else if (cl == CLIST_FONTSIZE) { sizeNODE *zn = mem->current_size_node; int old_bitmap_geometry = inifile_get_gint32( "lastfontBitmapGeometry", 0 ); if ( zn && zn->size == 0 ) // Scalable font so populate with selection { static const unsigned char sizes[] = { 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 32, 36, 40, 48, 56, 64, 72, 0 }; int last_size = inifile_get_gint32("fontSize", 12); for ( i=0; sizes[i]>0 ; i++ ) { snprintf(txt, 32, "%2i", sizes[i]); row_text[0] = txt; row = gtk_clist_append(clist, row_text); gtk_clist_set_row_data(clist, row, (gpointer)zn); if ( sizes[i] == last_size ) select_row = row; } real_size = last_size; } else while (zn) { i = (zn->size >> SIZE_SHIFT ) % (1<size % (1<size ) select_row = row; zn = zn->next; } } else if (cl == CLIST_FONTFILE) { filenameNODE *fn = mem->current_filename_node; char *s, *last_filename = inifile_get( "lastTextFilename", "" ); while (fn) { s = strrchr(fn->filename, DIR_SEP); if (!s) s = fn->filename; else s++; gtkuncpy(buf2, s, 256); // Transfer to UTF-8 in GTK+2 snprintf(txt, 32, "%3i", fn->face_index); row_text[0] = buf2; row_text[1] = txt; row = gtk_clist_append(clist, row_text); gtk_clist_set_row_data(clist, row, (gpointer)fn); if ( !strcmp(fn->filename, last_filename) ) select_row = row; fn = fn->next; } } else if (cl == CLIST_DIRECTORIES) { j = inifile_get_gint32("font_dirs", 0 ); for ( i=0; i=0 ) // Select chosen item _before_ the sort { gtk_clist_select_row(clist, select_row, 0); gtk_clist_sort(clist); //printf("current selection = %i\n", (int) (GTK_CLIST(mem->clist[cl])->selection->data) ); } else // Select 1st item _after_ the sort { gtk_clist_sort(clist); gtk_clist_select_row(clist, 0, 0); } gtk_clist_thaw(clist); update_clist(mem, cl, 3); if ( real_size ) gtk_spin_button_set_value( GTK_SPIN_BUTTON( mem->spin[TX_SPIN_SIZE] ), real_size ); // This hack is needed to ensure any scalable size that is not in clist is correctly chosen } static void click_add_font_dir(GtkWidget *widget, gpointer user) { int i = inifile_get_gint32("font_dirs", 0 ); char txt[PATHBUF], buf[32]; gchar *row_text[FONTSEL_CLISTS_MAXCOL] = {NULL, NULL, NULL}; mtfontsel *fp = user; row_text[1] = (gchar *)gtk_entry_get_text( GTK_ENTRY(fp->entry[TX_ENTRY_DIRECTORY]) ); gtkncpy( txt, row_text[1], PATHBUF); if ( strlen(txt)>0 && iclist[CLIST_DIRECTORIES]), row_text ); i++; inifile_set_gint32("font_dirs", i ); } } static void click_remove_font_dir(GtkWidget *widget, gpointer user) { char txt[32], txt2[32]; int i, delete_row = -1, row_tot = inifile_get_gint32("font_dirs", 0 ); mtfontsel *fp = user; GtkCList *clist = GTK_CLIST(fp->clist[CLIST_DIRECTORIES]); if (clist->selection) delete_row = (int)(clist->selection->data); if ((delete_row < 0) || (delete_row >= row_tot)) return; gtk_clist_remove(clist, delete_row); // Delete current row in clist for ( i=delete_row; i<(row_tot-1); i++) { // Re-number clist numbers in first column snprintf(txt, 32, "%3i", i+1); gtk_clist_set_text(clist, i, 0, txt); // Re-work inifile items snprintf(txt, 32, "font_dir%i", i); snprintf(txt2, 32, "font_dir%i", i+1); inifile_set( txt, inifile_get(txt2, "") ); } snprintf(txt, 32, "font_dir%i", row_tot-1); // Flush last (unwanted) item inifile inifile_set( txt, "" ); inifile_get( txt, "" ); inifile_set_gint32("font_dirs", row_tot-1 ); } static void click_create_font_index(GtkWidget *widget, gpointer user) { mtfontsel *fp = user; if ( inifile_get_gint32("font_dirs", 0 ) > 0 ) { int i; char txt[PATHBUF]; file_in_homedir(txt, FONT_INDEX_FILENAME, PATHBUF); font_gui_create_index(txt); // Create new index file for (i=0; i<=CLIST_FONTFILE; i++ ) // Empty all clists gtk_clist_clear( GTK_CLIST(fp->clist[i]) ); font_mem_clear(); // Empty memory of current nodes font_index_load(txt); fp->head_node = global_font_node; fp->current_style_node = NULL; // Now empty fp->current_size_node = NULL; // Now empty fp->current_filename_node = NULL; // Now empty // Populate clists populate_font_clist(fp, CLIST_FONTNAME); font_clist_adjust_cols(fp, CLIST_FONTNAME); // Needed to ensure all fonts visible font_clist_centralise(fp); } else alert_box(_("Error"), _("You must select at least one directory to search for fonts."), NULL); } static void silent_update_size_spin( mtfontsel *fp ) { GtkAdjustment *adj = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON(fp->spin[TX_SPIN_SIZE]) ); int size; if ( inifile_get_gboolean( "fontTypeBitmap", TRUE ) ) size = inifile_get_gint32("fontSizeBitmap", 1 ); else size = inifile_get_gint32("fontSize", 12 ); // We must block update events before setting the size spin button to void double updates gtk_signal_handler_block_by_data( GTK_OBJECT(adj), (gpointer)fp ); gtk_spin_button_set_value( GTK_SPIN_BUTTON( fp->spin[TX_SPIN_SIZE] ), size ); gtk_signal_handler_unblock_by_data( GTK_OBJECT(adj), (gpointer)fp ); } static void font_clist_select_row(GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer user) { mtfontsel *fp = gtk_object_get_data(GTK_OBJECT(clist), FONTSEL_KEY); void *rd = gtk_clist_get_row_data(clist, row); int cl = (int) user; //printf("fp = %i row = %i user = %i\n", (int) fp, row, (int) user); if (!fp || !rd) return; if (cl == CLIST_FONTNAME) { fontNODE *fn = rd; int bitmap_font = !!fn->style->size->size; inifile_set_gboolean( "fontTypeBitmap", bitmap_font ); gtk_widget_set_sensitive( fp->toggle[TX_TOGG_OBLIQUE], !bitmap_font ); silent_update_size_spin( fp ); // Update size spin fp->current_style_node = fn->style; // New style head node // fp->current_size_node = NULL; // Now invalid // fp->current_filename_node = NULL; // Now invalid populate_font_clist( fp, CLIST_FONTSTYLE ); // Update style list inifile_set( "lastFontName", fn->font_name ); inifile_set_gint32( "lastFontNameDir", fn->directory ); inifile_set_gint32( "lastFontNameBitmap", bitmap_font ); } else if (cl == CLIST_FONTSTYLE) { styleNODE *sn = rd; fp->current_size_node = sn->size; // New size head node // fp->current_filename_node = NULL; // Now invalid populate_font_clist( fp, CLIST_FONTSIZE ); inifile_set( "lastFontStyle", sn->style_name ); } else if (cl == CLIST_FONTSIZE) { sizeNODE *zn = rd; gchar *celltext; if (!gtk_clist_get_text(clist, row, 0, &celltext)); // Error else if (!zn->size) // Scalable so remember size { int j; sscanf(celltext, "%i", &j); inifile_set_gint32( "fontSize", j ); silent_update_size_spin( fp ); // Update size spin } else // Non-Scalable so remember index { inifile_set_gint32( "lastfontBitmapGeometry", zn->size ); } fp->current_filename_node = zn->filename; // New filename head node populate_font_clist( fp, CLIST_FONTFILE ); // Update filename list } else if (cl == CLIST_FONTFILE) { filenameNODE *fn = rd; inifile_set( "lastTextFilename", fn->filename ); inifile_set_gint32( "lastTextFace", fn->face_index ); font_preview_update( fp ); // Update the font preview area } } static void font_clist_column_button( GtkWidget *widget, gint col, gpointer user) { mtfontsel *fp = gtk_object_get_data(GTK_OBJECT(widget), FONTSEL_KEY); int cl = (int) user; GtkSortType direction; if (!fp) return; //printf("cl=%i\n", cl); // reverse the sorting direction if the list is already sorted by this col if ( fp->sort_column == col ) direction = (fp->sort_direction == GTK_SORT_ASCENDING ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING); else { direction = GTK_SORT_ASCENDING; gtk_widget_hide( fp->sort_arrows[fp->sort_column] ); // Hide old arrow gtk_widget_show( fp->sort_arrows[col] ); // Show new arrow fp->sort_column = col; } gtk_arrow_set(GTK_ARROW( fp->sort_arrows[col] ), direction == GTK_SORT_ASCENDING ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING, GTK_SHADOW_IN); fp->sort_direction = direction; gtk_clist_set_sort_type( GTK_CLIST(fp->clist[cl]), direction ); gtk_clist_set_sort_column( GTK_CLIST(fp->clist[cl]), col ); gtk_clist_sort( GTK_CLIST(fp->clist[cl]) ); } static GtkWidget *make_font_clist(int i, mtfontsel *mem) { static const int clist_text_cols[FONTSEL_CLISTS] = { 3, 1, 1, 2, 2 }; char *clist_text_titles[FONTSEL_CLISTS][FONTSEL_CLISTS_MAXCOL] = { { "", "", _("Font") }, { _("Style"), "", "" }, { _("Size"), "", "" }, { _("Filename"), _("Face"), "" }, { "", _("Directory"), "" } }; GtkWidget *w, *scrolledwindow, *temp_hbox; GtkCList *clist; int j; scrolledwindow = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), i == CLIST_FONTNAME ? GTK_POLICY_NEVER : GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); mem->clist[i] = w = gtk_clist_new(clist_text_cols[i]); gtk_container_add(GTK_CONTAINER(scrolledwindow), w); gtk_object_set_data(GTK_OBJECT(w), FONTSEL_KEY, mem); if (i == CLIST_FONTSTYLE) gtk_widget_set_usize(w, 100, -2); clist = GTK_CLIST(w); for (j = 0; j < clist_text_cols[i]; j++) { temp_hbox = gtk_hbox_new( FALSE, 0 ); pack(temp_hbox, gtk_label_new(clist_text_titles[i][j])); gtk_widget_show_all(temp_hbox); if (i == CLIST_FONTNAME) mem->sort_arrows[j] = pack_end(temp_hbox, gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_IN)); gtk_clist_set_column_widget(clist, j, temp_hbox); gtk_clist_set_column_resizeable(clist, j, FALSE); if (i == CLIST_FONTSIZE) gtk_clist_set_column_justification( clist, j, GTK_JUSTIFY_CENTER); } if ( i == CLIST_FONTNAME ) { mem->sort_column = 2; gtk_widget_show( mem->sort_arrows[mem->sort_column] ); // Show sort arrow gtk_clist_set_sort_column(clist, mem->sort_column); gtk_arrow_set(GTK_ARROW( mem->sort_arrows[mem->sort_column] ), ( mem->sort_direction == GTK_SORT_ASCENDING ? GTK_ARROW_DOWN : GTK_ARROW_UP), GTK_SHADOW_IN); gtk_signal_connect(GTK_OBJECT(clist), "click_column", GTK_SIGNAL_FUNC(font_clist_column_button), (gpointer)i); } else { #if GTK_MAJOR_VERSION == 1 for (j = 0; j < clist_text_cols[i]; j++) gtk_clist_column_title_passive(clist, j); #else /* if GTK_MAJOR_VERSION == 2 */ gtk_clist_column_titles_passive(clist); #endif } gtk_clist_column_titles_show(clist); gtk_clist_set_selection_mode(clist, GTK_SELECTION_BROWSE); gtk_signal_connect(GTK_OBJECT(clist), "select_row", GTK_SIGNAL_FUNC(font_clist_select_row), (gpointer)i); /* This will apply delayed updates when they can take effect */ gtk_signal_connect_after(GTK_OBJECT(clist), "map", GTK_SIGNAL_FUNC(font_clist_update), (gpointer)i); return (scrolledwindow); } static void init_font_lists() // LIST INITIALIZATION { char txt[PATHBUF]; /* Get font directories if we don't have any */ if (inifile_get_gint32("font_dirs", 0) <= 0) { #ifdef WIN32 int new_dirs = 1; char *windir = getenv("WINDIR"); file_in_dir(txt, windir && *windir ? windir : "C:\\WINDOWS", "Fonts", PATHBUF); inifile_set("font_dir0", txt); #else int new_dirs = 0; FILE *fp; char buf[4096], buf2[128], *s; if (!(fp = fopen("/etc/X11/xorg.conf", "r"))) fp = fopen("/etc/X11/XF86Config", "r"); // If these files are not found the user will have to manually enter directories if (fp) { while (fgets(buf, 4090, fp)) { s = strstr(buf, "FontPath"); if (!s) continue; s = strstr(buf, ":unscaled\""); if (!s) s = strrchr(buf, '"'); if (!s) continue; *s = '\0'; s = strchr(buf, '"'); if (!s) continue; snprintf(buf2, 128, "font_dir%i", new_dirs); inifile_set(buf2, s + 1); if (++new_dirs >= TX_MAX_DIRS) break; } fclose(fp); } if (!new_dirs && (fp = fopen("/etc/fonts/fonts.conf", "r"))) { char *s1, *s2; for (s1 = NULL; s1 || (s1 = fgets(buf, 4090, fp)); s1 = s2) { s2 = strstr(s1, ""); if (!s2) continue; *s2 = '\0'; s2 += 6; s = strstr(s1, ""); if (!s) continue; snprintf(buf2, 128, "font_dir%i", new_dirs); inifile_set(buf2, s + 5); if (++new_dirs >= TX_MAX_DIRS) break; } fclose(fp); } /* Add user's font directory */ file_in_homedir(txt, ".fonts", PATHBUF); snprintf(buf2, 128, "font_dir%i", new_dirs++); inifile_set(buf2, txt); #endif inifile_set_gint32("font_dirs", new_dirs); } file_in_homedir(txt, FONT_INDEX_FILENAME, PATHBUF); font_index_load(txt); // Does a valid ~/.mtpaint_fonts index exist? if (!global_font_node) // Index file not loaded { font_gui_create_index(txt); font_index_load(txt); // Try for second and last time } } static gboolean preview_expose_event(GtkWidget *widget, GdkEventExpose *event) { int x = event->area.x, y = event->area.y; int w = event->area.width, h = event->area.height; int w2, h2; mtfontsel *fp = gtk_object_get_data(GTK_OBJECT(widget), FONTSEL_KEY); if (!fp || !fp->preview_rgb) return (FALSE); #if GTK_MAJOR_VERSION == 1 /* !!! GTK+2 clears background automatically */ gdk_window_clear_area(widget->window, x, y, w, h); #endif w2 = fp->preview_w - x; if (w > w2) w = w2; h2 = fp->preview_h - y; if (h > h2) h = h2; if ((w < 1) || (h < 1)) return (FALSE); gdk_draw_rgb_image(widget->window, widget->style->black_gc, x, y, w, h, GDK_RGB_DITHER_NONE, fp->preview_rgb + (y * fp->preview_w + x) * 3, fp->preview_w * 3); return (FALSE); } static void font_entry_changed(GtkWidget *widget, gpointer user) // A GUI entry has changed { mtfontsel *fp = user; read_font_controls(fp); font_preview_update(fp); // Update the font preview area } void pressed_mt_text() { int i; mtfontsel *mem; GtkWidget *vbox, *vbox2, *hbox, *notebook, *page, *scrolledwindow; GtkWidget *button, *entry, *preview; GdkColor *c; GtkRcStyle *rc; GtkAccelGroup* ag = gtk_accel_group_new(); if ( !global_font_node ) init_font_lists(); mem = calloc(1, sizeof(mtfontsel)); mem->head_node = global_font_node; mem->window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Paste Text"), GTK_WIN_POS_NONE, TRUE ); // gtk_window_set_default_size( GTK_WINDOW(mem->window), 400, 450 ); win_restore_pos(mem->window, "paste_text_window", 0, 0, 400, 450); gtk_object_set_data(GTK_OBJECT(mem->window), FONTSEL_KEY, mem); //printf("mem = %i\n", (int)mem); notebook = gtk_notebook_new(); gtk_container_add (GTK_CONTAINER (mem->window), notebook); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP); // TAB 1 - TEXT page = add_new_page(notebook, _("Text")); hbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (page), hbox); vbox = pack5(hbox, gtk_vbox_new(FALSE, 0)); xpack5(vbox, make_font_clist(CLIST_FONTNAME, mem)); vbox = xpack5(hbox, gtk_vbox_new(FALSE, 0)); hbox = xpack5(vbox, gtk_hbox_new(FALSE, 0)); xpack5(hbox, make_font_clist(CLIST_FONTSTYLE, mem)); vbox2 = xpack(hbox, gtk_vbox_new(FALSE, 0)); xpack(vbox2, make_font_clist(CLIST_FONTSIZE, mem)); mem->spin[TX_SPIN_SIZE] = pack(vbox2, add_a_spin(inifile_get_gint32("fontSize", 12), 1, 500)); #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ gtk_entry_set_alignment( GTK_ENTRY(&(GTK_SPIN_BUTTON( mem->spin[TX_SPIN_SIZE] )->entry)), 0.5); #endif xpack5(hbox, make_font_clist(CLIST_FONTFILE, mem)); // Text entry box hbox = gtk_hbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); add_with_frame(vbox, _("Text"), hbox); mem->entry[TX_ENTRY_TEXT] = entry = xpack(hbox, gtk_entry_new()); gtk_entry_set_text(GTK_ENTRY(entry), inifile_get("textString", _("Enter Text Here"))); gtk_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(font_entry_changed), (gpointer)mem); accept_ctrl_enter(entry); // PREVIEW AREA hbox = gtk_hbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); add_with_frame_x(vbox, _("Preview"), hbox, 5, TRUE); scrolledwindow = xpack(hbox, gtk_scrolled_window_new(NULL, NULL)); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); mem->preview_area = preview = gtk_drawing_area_new(); gtk_object_set_data(GTK_OBJECT(preview), FONTSEL_KEY, mem); gtk_drawing_area_size(GTK_DRAWING_AREA(preview), 1, 1); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), preview); gtk_signal_connect(GTK_OBJECT(preview), "expose_event", GTK_SIGNAL_FUNC(preview_expose_event), NULL); /* Set background color */ #if GTK_MAJOR_VERSION == 1 rc = gtk_rc_style_new(); #else /* if GTK_MAJOR_VERSION == 2 */ rc = gtk_widget_get_modifier_style(preview); #endif c = &rc->bg[GTK_STATE_NORMAL]; c->pixel = 0; c->red = c->green = c->blue = mem_background * 257; rc->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BG; gtk_widget_modify_style(preview, rc); #if GTK_MAJOR_VERSION == 1 gtk_rc_style_unref(rc); #endif // TOGGLES hbox = pack(vbox, gtk_hbox_new(FALSE, 0)); mem->toggle[TX_TOGG_ANTIALIAS] = add_a_toggle( _("Antialias"), hbox, inifile_get_gboolean( "fontAntialias0", TRUE ) ); if (mem_channel != CHN_IMAGE) { mem->toggle[TX_TOGG_BACKGROUND] = add_a_toggle( _("Invert"), hbox, inifile_get_gboolean( "fontAntialias1", FALSE ) ); } else { mem->toggle[TX_TOGG_BACKGROUND] = add_a_toggle( _("Background colour ="), hbox, inifile_get_gboolean( "fontAntialias1", FALSE ) ); mem->spin[TX_SPIN_BACKGROUND] = pack5(hbox, add_a_spin( inifile_get_gint32("fontBackground", 0) % mem_cols, 0, mem_cols - 1)); } hbox = pack(vbox, gtk_hbox_new(FALSE, 0)); mem->toggle[TX_TOGG_OBLIQUE] = add_a_toggle( _("Oblique"), hbox, inifile_get_gboolean( "fontAntialias3", FALSE ) ); mem->toggle[TX_TOGG_ANGLE] = add_a_toggle( _("Angle of rotation ="), hbox, FALSE ); mem->spin[TX_SPIN_ANGLE] = pack5(hbox, add_float_spin( inifile_get_gint32("fontAngle", 0) * 0.01, -360, 360)); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(mem->toggle[TX_TOGG_ANGLE]), inifile_get_gboolean( "fontAntialias2", FALSE ) ); for ( i=0; itoggle[i]), "toggled", GTK_SIGNAL_FUNC(font_entry_changed), (gpointer)mem); for ( i=0; ispin[i]) spin_connect(mem->spin[i], GTK_SIGNAL_FUNC(font_entry_changed), (gpointer)mem); add_hseparator( vbox, 200, 10 ); hbox = pack5(vbox, OK_box(0, mem->window, _("Paste Text"), GTK_SIGNAL_FUNC(paste_text_ok), _("Close"), GTK_SIGNAL_FUNC(delete_text))); // TAB 2 - DIRECTORIES page = add_new_page(notebook, _("Font Directories")); vbox = add_vbox(page); xpack5(vbox, make_font_clist(CLIST_DIRECTORIES, mem)); mem->entry[TX_ENTRY_DIRECTORY] = mt_path_box(_("New Directory"), vbox, _("Select Directory"), FS_SELECT_DIR); add_hseparator( vbox, 200, 10 ); hbox = pack5(vbox, gtk_hbox_new(FALSE, 0)); button = add_a_button(_("Close"), 5, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(delete_text), mem); gtk_widget_add_accelerator (button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags) 0); button = add_a_button(_("Add"), 5, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_add_font_dir), mem); button = add_a_button(_("Remove"), 5, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_remove_font_dir), mem); button = add_a_button(_("Create Index"), 5, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_create_font_index), mem); populate_font_clist(mem, CLIST_FONTNAME); populate_font_clist(mem, CLIST_DIRECTORIES); font_clist_adjust_cols(mem, CLIST_FONTNAME); // Needed to ensure all fonts visible font_clist_centralise(mem); // Ensure each list is shown properly if (mem_img_bpp == 1) gtk_widget_hide(mem->toggle[TX_TOGG_ANTIALIAS]); gtk_window_set_transient_for( GTK_WINDOW(mem->window), GTK_WINDOW(main_window) ); gtk_widget_show_all(mem->window); gtk_window_add_accel_group(GTK_WINDOW (mem->window), ag); gtk_widget_grab_focus( mem->entry[TX_ENTRY_TEXT] ); // font_index_display(mem->head_node); } #endif /* U_FREETYPE */ mtpaint-3.40/src/thread.h0000644000175000000620000000543711626320223014650 0ustar muammarstaff/* thread.h Copyright (C) 2009-2011 Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ // Thread control block typedef struct tcb tcb; struct tcb { volatile int stop; // Signal to stop volatile int progress; // Progress counter volatile int stopped; // Stopped state int index; // Thread index int count; // Number of threads int step0, nsteps; // Work allocated to this thread int tsteps; // Total amount of work - set only for thread 0 tcb **threads; // Pointers to all tcbs void *data; // Parameters & buffers structure for function }; // Thread array header typedef struct { int count; tcb *threads[1]; } threaddata; // Thread function type typedef void (*thread_func)(tcb *thread); // Configure max number of threads to launch int maxthreads; // Prepare memory structures for threads' use threaddata *talloc(int flags, int tmax, void *data, int dsize, ...); // Launch threads and wait for their exiting void launch_threads(thread_func thread, threaddata *tdata, char *title, int total); #ifdef U_THREADS // Show threading status int threads_running; // Estimate how many threads is enough for image int image_threads(int w, int h); // Update progressbar from main thread int thread_progress(tcb *thread); // Track a thread's progress static inline int thread_step(tcb *thread, int i, int tlim, int steps) { thread->progress = i; if (thread->index) return (thread->stop); if ((i * steps) % tlim < tlim - steps) return (FALSE); return (thread_progress(thread)); } // Report that thread's work is done static inline void thread_done(tcb *thread) { thread->stopped = TRUE; } // Define a static mutex #define DEF_MUTEX(name) static GStaticMutex name = G_STATIC_MUTEX_INIT // Lock a static mutex #define LOCK_MUTEX(name) \ if (threads_running) g_static_mutex_lock(&name) // Unlock a static mutex #define UNLOCK_MUTEX(name) \ if (threads_running) g_static_mutex_unlock(&name) #else /* Only one actual thread */ #define image_threads(w,h) 1 static inline int thread_step(tcb *thread, int i, int tlim, int steps) { if ((i * steps) % tlim < tlim - steps) return (FALSE); return (progress_update((float)i / tlim)); } #define thread_done(thread) #define DEF_MUTEX(name) #define LOCK_MUTEX(name) #define UNLOCK_MUTEX(name) #endif mtpaint-3.40/src/fpick.h0000644000175000000620000000205211257645116014476 0ustar muammarstaff/* fpick.h Copyright (C) 2007-2009 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define FPICK_ENTRY 1 #define FPICK_LOAD 2 #define FPICK_DIRS_ONLY 4 GtkWidget *fpick_create(char *title, int flags); void fpick_destroy(GtkWidget *fp); void fpick_setup(GtkWidget *fp, GtkWidget *xtra, GtkSignalFunc ok_fn, GtkSignalFunc cancel_fn); void fpick_get_filename(GtkWidget *fp, char *buf, int len, int raw); void fpick_set_filename(GtkWidget *fp, char *name, int raw); mtpaint-3.40/src/channels.h0000644000175000000620000000255110753312352015172 0ustar muammarstaff/* channels.h Copyright (C) 2006-2008 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ int overlay_alpha; int hide_image; int RGBA_mode; unsigned char channel_rgb[NUM_CHANNELS][3]; unsigned char channel_opacity[NUM_CHANNELS]; unsigned char channel_inv[NUM_CHANNELS]; unsigned char channel_fill[NUM_CHANNELS]; unsigned char channel_col_[2][NUM_CHANNELS]; #define channel_col_A channel_col_[0] #define channel_col_B channel_col_[1] int channel_dis[NUM_CHANNELS]; void pressed_channel_create(int channel); void pressed_channel_delete(); void pressed_channel_edit(int state, int channel); void pressed_channel_disable(int state, int channel); void pressed_threshold(); void pressed_unassociate(); void pressed_channel_toggle(int state, int what); void pressed_RGBA_toggle(int state); mtpaint-3.40/src/fpick.c0000644000175000000620000012256711654523074014506 0ustar muammarstaff/* fpick.c Copyright (C) 2007-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "fpick.h" #ifdef U_FPICK_MTPAINT /* mtPaint fpicker */ #include "inifile.h" #include "memory.h" #include "png.h" // Needed by canvas.h #include "canvas.h" #include "toolbar.h" #include "mainwindow.h" #include "icons.h" #define FP_DATA_KEY "mtPaint.fp_data" #define FP_BACKUP_KEY "mtPaint.fp_backup" #define FPICK_ICON_UP 0 #define FPICK_ICON_HOME 1 #define FPICK_ICON_DIR 2 #define FPICK_ICON_HIDDEN 3 #define FPICK_ICON_CASE 4 #define FPICK_ICON_TOT 5 #define FPICK_COMBO_ITEMS 16 #define FPICK_CLIST_COLS 4 #define FPICK_CLIST_COLS_HIDDEN 2 // Used for sorting file/directory names #define FPICK_CLIST_NAME 0 #define FPICK_CLIST_SIZE 1 #define FPICK_CLIST_TYPE 2 #define FPICK_CLIST_DATE 3 #define FPICK_CLIST_H_UC 4 #define FPICK_CLIST_H_C 5 // ------ Main Data Structure ------ typedef struct { int allow_files, // Allow the user to select files/directories allow_dirs, sort_column, // Which column is being sorted in clist show_hidden ; char combo_items[FPICK_COMBO_ITEMS][PATHTXT], // UTF8 in GTK+2 /* Must be DIR_SEP terminated at all times */ txt_directory[PATHBUF], // Current directory - Normal C string txt_mask[PATHTXT] // Filter mask - UTF8 in GTK+2 ; GtkWidget *window, // Main window *ok_button, // OK button *cancel_button, // Cancel button *main_vbox, // For extra widgets *toolbar, // Toolbar *icons[FPICK_ICON_TOT], // Icons *combo, // List at top holding recent directories *combo_entry, // Directory entry area in combo *clist, // Containing list of files/directories *sort_arrows[FPICK_CLIST_COLS+FPICK_CLIST_COLS_HIDDEN], // Column sort arrows *file_entry // Text entry box for filename ; GtkSortType sort_direction; // Sort direction of clist GList *combo_list; // List of combo items } fpicker; static int case_insensitive; #if GTK_MAJOR_VERSION == 1 #define _GNU_SOURCE #include #undef _GNU_SOURCE #ifndef FNM_CASEFOLD #define FNM_CASEFOLD 0 #endif #define fpick_fnmatch(mask, str) !fnmatch(mask, str, FNM_PATHNAME | \ (case_insensitive ? FNM_CASEFOLD : 0)) #elif (GTK_MAJOR_VERSION == 2) && (GTK2VERSION < 4) /* GTK+ 2.0/2.2 */ #define fpick_fnmatch(mask, str) wjfnmatch(mask, str, TRUE) #endif /* !!! The code below manipulates undocumented internals of GtkCList, to work * around its lack of row hiding functionality; thankfully, internals of this * "deprecated and unmaintained" widget are very unlikely to change - WJ */ static void fpick_clist_drop_backup(GtkCList *clist) { GtkObject *obj = GTK_OBJECT(clist); GList *backup = gtk_object_get_data(obj, FP_BACKUP_KEY); if (!backup) return; clist->row_list = g_list_concat(clist->row_list, backup); clist->row_list_end = g_list_last(clist->row_list); gtk_object_set_data(obj, FP_BACKUP_KEY, NULL); } static void fpick_clist_clear(GtkCList *clist) { fpick_clist_drop_backup(clist); gtk_clist_clear(clist); } static void fpick_clist_scroll(GtkCList *clist) // Scroll to selected row { gtk_clist_moveto(clist, clist->focus_row, -1, 0.5, 0.5); } static void fpick_clist_repattern(GtkCList *clist, const char *pattern) { GtkObject *obj = GTK_OBJECT(clist); GList *tmp, *backup, *cur, *res, *pos = NULL; int n = 0; #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ GtkFileFilter *filt = gtk_file_filter_new(); GtkFileFilterInfo info; gtk_file_filter_add_pattern(filt, pattern); info.contains = GTK_FILE_FILTER_DISPLAY_NAME; #endif /* Stop updates & redraws */ gtk_clist_freeze(clist); /* Get backed-up contents */ backup = gtk_object_get_data(obj, FP_BACKUP_KEY); /* Clean selection if any */ if (clist->selection) { int n = GPOINTER_TO_INT(clist->selection->data); pos = g_list_nth(clist->row_list, n); gtk_clist_unselect_row(clist, n, -1); } /* Clear list but save its contents */ cur = g_list_concat(clist->row_list, backup); clist->row_list = NULL; gtk_clist_clear(clist); /* Filter the contents */ backup = res = NULL; while (cur) { GtkCListRow *row = cur->data; char *name = GTK_CELL_TEXT(row->cell[FPICK_CLIST_NAME])->text; GList **lst = &res; /* Add node to output list */ tmp = cur; cur = cur->next; tmp->prev = NULL; /* Filter files, let directories pass */ if (GTK_CELL_TEXT(row->cell[FPICK_CLIST_SIZE])->text[0] && pattern[0] && #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ (info.display_name = name , !gtk_file_filter_filter(filt, &info))) #else !fpick_fnmatch(pattern, name)) #endif lst = &backup; /* Add node to backup list */ else n++; if ((tmp->next = *lst)) tmp->next->prev = tmp; *lst = tmp; } /* Re-add filtered contents */ clist->row_list = res; clist->row_list_end = g_list_last(res); clist->rows = n; gtk_object_set_data(obj, FP_BACKUP_KEY, backup); /* Sort the list */ gtk_clist_sort(clist); /* Reselect the previously selected row if possible */ n = g_list_position(clist->row_list, pos); if (n < 0) n = 0; clist_reselect_row(clist, n); // Avoid "select_row" signal emission /* Let it be redrawn */ gtk_clist_thaw(clist); #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ gtk_object_sink(GTK_OBJECT(filt)); #endif } static void fpick_sort_files(fpicker *win) { GtkCList *clist = GTK_CLIST(win->clist); gtk_clist_set_sort_type(clist, win->sort_direction); gtk_clist_set_sort_column(clist, win->sort_column); gtk_clist_sort(clist); /* No selection yet */ if (!clist->selection) clist_reselect_row(clist, 0); else { /* !!! Evil hack using undocumented widget internals: widget implementor * forgot to move focus along with selection, so we do it here - WJ */ clist->focus_row = GPOINTER_TO_INT(clist->selection->data); if (GTK_WIDGET_HAS_FOCUS(win->clist)) gtk_widget_queue_draw(win->clist); } } /* *** A WORD OF WARNING *** * Collating string comparison functions consider letter case only *AFTER* * letter itself for any (usable) value of LC_COLLATE except LC_COLLATE=C, and * in that latter case, order by character codepoint which frequently is * unrelated to alphabetical ordering. And on GTK+1 with multibyte charset, * casefolding will break down horribly, too. * What this means in practice: don't expect anything sane out of alphabetical * sorting outside of strict ASCII, and don't expect anything sane out of * case-sensitive sorting at all. - WJ */ #if GTK_MAJOR_VERSION == 1 /* Returns a string which can be used as key for case-insensitive sort; * input string is in locale encoding in GTK+1, in UTF-8 in GTK+2 */ static char *isort_key(char *src) { char *s; s = g_strdup(src); g_strdown(s); // !!! Consider replicating g_utf8_collate_key(), based on strxfrm() return (s); } /* "strkeycmp" is for sort keys, "strcollcmp" for displayable strings */ #define strkeycmp strcoll #define strcollcmp strcoll #else /* if GTK_MAJOR_VERSION == 2 */ static char *isort_key(char *src) { char *s; src = g_utf8_casefold(src, -1); s = g_utf8_collate_key(src, -1); g_free(src); return (s); } #define strkeycmp strcmp #define strcollcmp g_utf8_collate #endif /* !!! Expects that "txt" points to PATHBUF-sized buffer */ static void fpick_cleanse_path(char *txt) // Clean up null terminated path { char *src, *dest; #ifdef WIN32 // Unify path separators reseparate(txt); #endif // Expand home directory if ((txt[0] == '~') && (txt[1] == DIR_SEP)) { src = file_in_homedir(NULL, txt + 2, PATHBUF); strncpy0(txt, src, PATHBUF - 1); free(src); } // Remove multiple consecutive occurences of DIR_SEP if ((dest = src = strstr(txt, DIR_SEP_STR DIR_SEP_STR))) { while (*src) { if (*src == DIR_SEP) while (src[1] == DIR_SEP) src++; *dest++ = *src++; } *dest++ = '\0'; } } static gint fpick_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { static const signed char sort_order[] = { FPICK_CLIST_NAME, FPICK_CLIST_DATE, FPICK_CLIST_SIZE, -1 }; GtkCListRow *r1 = (GtkCListRow *)ptr1, *r2 = (GtkCListRow *)ptr2; unsigned char *s1, *s2; int c = clist->sort_column, bits = 0, lvl = 0, d = 0; /* "/ .." Directory always goes first, and conveniently it is also the * one and only GTK_CELL_TEXT in an entire column */ d = r1->cell[FPICK_CLIST_NAME].type - r2->cell[FPICK_CLIST_NAME].type; if (GTK_CELL_TEXT > GTK_CELL_PIXTEXT) d = -d; if (d) return (clist->sort_type == GTK_SORT_DESCENDING ? -d : d); /* Directories have empty size column, and always go before files */ s1 = GTK_CELL_TEXT(r1->cell[FPICK_CLIST_SIZE])->text; s2 = GTK_CELL_TEXT(r2->cell[FPICK_CLIST_SIZE])->text; if (!s1[0] ^ !s2[0]) { d = (int)s1[0] - s2[0]; return (clist->sort_type == GTK_SORT_DESCENDING ? -d : d); } while (c >= 0) { if (bits & (1 << c)) { c = sort_order[lvl++]; continue; } bits |= 1 << c; s1 = GTK_CELL_TEXT(r1->cell[c])->text; s2 = GTK_CELL_TEXT(r2->cell[c])->text; switch (c) { case FPICK_CLIST_TYPE: if ((d = strcollcmp(s1, s2))) break; continue; case FPICK_CLIST_SIZE: if ((d = strcmp(s1, s2))) break; continue; case FPICK_CLIST_DATE: if ((d = strcmp(s2, s1))) break; // Newest first continue; default: case FPICK_CLIST_NAME: c = case_insensitive ? FPICK_CLIST_H_UC : FPICK_CLIST_H_C; continue; case FPICK_CLIST_H_UC: case FPICK_CLIST_H_C: if ((d = strkeycmp(s1, s2))) break; c = FPICK_CLIST_H_C; continue; } break; } return (d); } static void fpick_column_button(GtkCList *clist, gint column, gpointer user_data) { fpicker *fp = user_data; GtkSortType direction; if ((column < 0) || (column >= FPICK_CLIST_COLS)) return; // reverse the sorting direction if the list is already sorted by this col if ( fp->sort_column == column ) direction = (fp->sort_direction == GTK_SORT_ASCENDING ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING); else // Different column clicked so use default value for that column { direction = GTK_SORT_ASCENDING; gtk_widget_hide( fp->sort_arrows[fp->sort_column] ); // Hide old arrow gtk_widget_show( fp->sort_arrows[column] ); // Show new arrow fp->sort_column = column; } gtk_arrow_set(GTK_ARROW(fp->sort_arrows[column]), direction == GTK_SORT_ASCENDING ? GTK_ARROW_DOWN : GTK_ARROW_UP, GTK_SHADOW_IN); fp->sort_direction = direction; fpick_sort_files(fp); fpick_clist_scroll(GTK_CLIST(fp->clist)); // Scroll to selected row } static void fpick_directory_new(fpicker *win, char *name) // Register directory in combo { int i; char txt[PATHTXT]; gtkuncpy(txt, name, PATHTXT); // !!! Shuffle list items, not strings !!! for ( i=0 ; i<(FPICK_COMBO_ITEMS-1); i++ ) // Does this text already exist in the list? if ( !strcmp(txt, win->combo_items[i]) ) break; for ( ; i>0; i-- ) // Shuffle items down as needed strncpy(win->combo_items[i], win->combo_items[i-1], PATHTXT); strncpy(win->combo_items[0], txt, PATHTXT); // Add item to list gtk_combo_set_popdown_strings( GTK_COMBO(win->combo), win->combo_list ); gtk_entry_set_text( GTK_ENTRY(win->combo_entry), txt ); } #ifdef WIN32 #include #define WIN32_LEAN_AND_MEAN #include static int fpick_scan_drives(fpicker *fp) // Scan drives, populate widgets { static char *empty_row[FPICK_CLIST_COLS + FPICK_CLIST_COLS_HIDDEN] = { "", "", "", "", "", "" }, ws[4] = "C:\\"; char *cp, buf[PATHBUF]; // More than enough for 26 4-char strings GtkCList *clist = GTK_CLIST(fp->clist); GdkPixmap *icon; GdkBitmap *mask; int row, cdrive = 0, idx = 0; /* Get the current drive letter */ if (fp->txt_directory[1] == ':') cdrive = fp->txt_directory[0]; if (!cdrive) { if (GetCurrentDirectory(sizeof(buf), buf) && (buf[1] == ':')) cdrive = buf[0]; } cdrive = toupper(cdrive); fp->txt_directory[0] = '\0'; gtk_entry_set_text(GTK_ENTRY(fp->combo_entry), ""); // Just clear it GetLogicalDriveStrings(sizeof(buf), buf); icon = gdk_pixmap_create_from_xpm_d(main_window->window, &mask, NULL, xpm_open_xpm); gtk_clist_freeze(clist); fpick_clist_clear(clist); for (cp = buf; *cp; cp += strlen(cp) + 1) { ws[0] = toupper(cp[0]); row = gtk_clist_append(clist, empty_row); gtk_clist_set_pixtext(clist, row, FPICK_CLIST_NAME, ws, 4, icon, mask); if (ws[0] == cdrive) idx = row; } clist_reselect_row(clist, idx); fpick_sort_files(fp); gtk_clist_thaw(clist); fpick_clist_scroll(clist); // Scroll to selected row gdk_pixmap_unref(icon); gdk_pixmap_unref(mask); return (TRUE); } #endif /* Scan directory, populate widgets; return 1 if success, 0 if total failure, * -1 if failed with original dir and scanned a different one */ static int fpick_scan_directory(fpicker *win, char *name, char *select) { static char nothing[] = ""; DIR *dp; struct dirent *ep; struct stat buf; char *cp, *src, *dest, *parent = NULL; char full_name[PATHBUF], *row_txt[FPICK_CLIST_COLS + FPICK_CLIST_COLS_HIDDEN], txt_name[PATHTXT], txt_size[64], txt_date[64], tmp_txt[64]; GtkCList *clist = GTK_CLIST(win->clist); GdkPixmap *icons[2]; GdkBitmap *masks[2]; int i, l, len, row, fail, idx = -1, res = 1; icons[0] = icons[1] = NULL; masks[0] = masks[1] = NULL; #ifdef GTK_STOCK_DIRECTORY icons[1] = render_stock_pixmap(win->clist, GTK_STOCK_DIRECTORY, &masks[1]); #endif #ifdef GTK_STOCK_FILE icons[0] = render_stock_pixmap(win->clist, GTK_STOCK_FILE, &masks[0]); #endif if (!icons[1]) icons[1] = gdk_pixmap_create_from_xpm_d( main_window->window, &masks[1], NULL, xpm_open_xpm); if (!icons[0]) icons[0] = gdk_pixmap_create_from_xpm_d( main_window->window, &masks[0], NULL, xpm_new_xpm); row_txt[FPICK_CLIST_SIZE] = txt_size; row_txt[FPICK_CLIST_DATE] = txt_date; strncpy0(full_name, name, PATHBUF - 1); len = strlen(full_name); /* Ensure the invariant */ if (!len || (full_name[len - 1] != DIR_SEP)) full_name[len++] = DIR_SEP , full_name[len] = 0; /* Step up the path till a searchable dir is found */ fail = 0; while (!(dp = opendir(full_name))) { res = -1; // Remember that original path was invalid full_name[len - 1] = 0; cp = strrchr(full_name, DIR_SEP); // Try to go one level up if (cp) len = cp - full_name + 1; // No luck - restart with current dir else if (!fail++) { getcwd(full_name, PATHBUF - 1); len = strlen(full_name); full_name[len++] = DIR_SEP; } // If current dir hasn't helped either, give up else return (0); full_name[len] = 0; } /* If we're going up the path and want to show from where */ if (!select) { if (!strncmp(win->txt_directory, full_name, len) && win->txt_directory[len]) { cp = strchr(win->txt_directory + len, DIR_SEP); // Guaranteed parent = win->txt_directory + len; select = parent = g_strndup(parent, cp - parent); } } /* If we've nothing to show */ else if (!select[0]) select = NULL; strncpy(win->txt_directory, full_name, PATHBUF); fpick_directory_new(win, full_name); // Register directory in combo gtk_clist_freeze(clist); fpick_clist_clear(clist); // Empty the list if (strcmp(full_name, DIR_SEP_STR)) // Have a parent dir to move to? { row_txt[FPICK_CLIST_NAME] = DIR_SEP_STR " .."; row_txt[FPICK_CLIST_TYPE] = row_txt[FPICK_CLIST_H_UC] = row_txt[FPICK_CLIST_H_C] = ""; txt_size[0] = txt_date[0] = '\0'; gtk_clist_append(clist, row_txt ); } while ( (ep = readdir(dp)) ) { full_name[len] = 0; strnncat(full_name, ep->d_name, PATHBUF); // Error getting file details if (stat(full_name, &buf) < 0) continue; if (!win->show_hidden && (ep->d_name[0] == '.')) continue; strftime(txt_date, 60, "%Y-%m-%d %H:%M.%S", localtime(&buf.st_mtime) ); row_txt[FPICK_CLIST_TYPE] = nothing; #ifdef WIN32 if ( S_ISDIR(buf.st_mode) ) #else if ( ep->d_type == DT_DIR || S_ISDIR(buf.st_mode) ) #endif { // Subdirectory if (!win->allow_dirs) continue; // Don't look at '.' or '..' if (!strcmp(ep->d_name, ".") || !strcmp(ep->d_name, "..")) continue; gtkuncpy(txt_name, ep->d_name, PATHTXT); txt_size[0] = '\0'; } else { // File if (!win->allow_files) continue; gtkuncpy(txt_name, ep->d_name, PATHTXT); #ifdef WIN32 l = snprintf(tmp_txt, 64, "%I64u", (unsigned long long)buf.st_size); #else l = snprintf(tmp_txt, 64, "%llu", (unsigned long long)buf.st_size); #endif memset(txt_size, ' ', 20); dest = txt_size + 20; *dest-- = '\0'; for (src = tmp_txt + l - 1; src - tmp_txt > 2; ) { *dest-- = *src--; *dest-- = *src--; *dest-- = *src--; *dest-- = ','; } while (src - tmp_txt >= 0) *dest-- = *src--; cp = strrchr(txt_name, '.'); if (cp && (cp != txt_name) && cp[1]) { #if GTK_MAJOR_VERSION == 1 g_strup(row_txt[FPICK_CLIST_TYPE] = g_strdup(cp + 1)); #else row_txt[FPICK_CLIST_TYPE] = g_utf8_strup(cp + 1, -1); #endif } } #if GTK_MAJOR_VERSION == 1 row_txt[FPICK_CLIST_H_C] = txt_name; #else /* if GTK_MAJOR_VERSION == 2 */ row_txt[FPICK_CLIST_H_C] = g_utf8_collate_key(txt_name, -1); #endif row_txt[FPICK_CLIST_H_UC] = isort_key(txt_name); row_txt[FPICK_CLIST_NAME] = ""; // No use to set name just to reset again row = gtk_clist_append(clist, row_txt ); g_free(row_txt[FPICK_CLIST_H_UC]); i = !txt_size[0]; gtk_clist_set_pixtext(clist, row, FPICK_CLIST_NAME, txt_name, 4, icons[i], masks[i]); /* Remember which row has matching name */ if (select && !strcmp(ep->d_name, select)) idx = row; if (row_txt[FPICK_CLIST_TYPE] != nothing) g_free(row_txt[FPICK_CLIST_TYPE]); #if GTK_MAJOR_VERSION == 2 g_free(row_txt[FPICK_CLIST_H_C]); #endif } g_free(parent); clist_reselect_row(clist, idx); /* Apply file mask if present, just sort otherwise */ if (!win->txt_mask[0]) fpick_sort_files(win); else fpick_clist_repattern(clist, win->txt_mask); gtk_clist_thaw(clist); fpick_clist_scroll(clist); // Scroll to selected row // !!! Incomplete redraws only happen on Windows, but let's make sure gtk_widget_queue_draw(win->clist); closedir(dp); gdk_pixmap_unref(icons[0]); gdk_pixmap_unref(icons[1]); if (masks[0]) gdk_pixmap_unref(masks[0]); if (masks[1]) gdk_pixmap_unref(masks[1]); return (res); } static void fpick_enter_dir_via_list(fpicker *fp, char *name) { char ndir[PATHBUF], *c; int l; strncpy(ndir, fp->txt_directory, PATHBUF); l = strlen(ndir); if (!strcmp(name, "..")) // Go to parent directory { if (l && (ndir[l - 1] == DIR_SEP)) ndir[--l] = '\0'; c = strrchr(ndir, DIR_SEP); if (c) *c = '\0'; else /* Already in root directory */ { #ifdef WIN32 fpick_scan_drives(fp); #endif return; } } else gtkncpy(ndir + l, name, PATHBUF - l); fpick_cleanse_path(ndir); fpick_scan_directory(fp, ndir, NULL); // Enter new directory } static char *get_fname(GtkCList *clist, int row) { char *txt = NULL; if (gtk_clist_get_cell_type(clist, row, FPICK_CLIST_NAME) == GTK_CELL_TEXT) return (".."); gtk_clist_get_pixtext(clist, row, FPICK_CLIST_NAME, &txt, NULL, NULL, NULL); return (txt); } static void fpick_select_row(GtkCList *clist, gint row, gint col, GdkEventButton *event, gpointer user_data) { fpicker *fp = user_data; char *txt_name, *txt_size; int dclick = event && (event->type == GDK_2BUTTON_PRESS); txt_name = get_fname(clist, row); gtk_clist_get_text(clist, row, FPICK_CLIST_SIZE, &txt_size); if ( !txt_name ) return; if (!txt_size[0]) // Directory selected { // Double click on directory so try to enter it if (dclick) fpick_enter_dir_via_list(fp, txt_name); } else // File selected { gtk_entry_set_text(GTK_ENTRY(fp->file_entry), txt_name); // Double click on file, so press OK button if (dclick) gtk_button_clicked(GTK_BUTTON(fp->ok_button)); } } /* Return 1 if changed directory, 0 if directory was the same, -1 if tried * to change but failed */ static int fpick_enter_dirname(fpicker *fp, const char *name, int l) { char txt[PATHBUF], *ctxt; int res = 0; name = name ? g_strndup(name, l) : g_strdup(gtk_entry_get_text(GTK_ENTRY(fp->combo_entry))); gtkncpy(txt, name, PATHBUF); fpick_cleanse_path(txt); // Path might have been entered manually if (strcmp(txt, fp->txt_directory) && // Only do something if the directory is new ((res = fpick_scan_directory(fp, txt, NULL)) <= 0)) { // Directory doesn't exist so tell user ctxt = g_strdup_printf(_("Could not access directory %s"), name); alert_box(_("Error"), ctxt, NULL); g_free(ctxt); res = res < 0 ? 1 : -1; } g_free((char *)name); return (res); } static void fpick_combo_changed(GtkWidget *widget, gpointer user_data) { fpick_enter_dirname(user_data, NULL, 0); } static void fpick_dialog_fn(char *key) { *(key - *key) = *key; } static void fpick_file_dialog(fpicker *fp, int row) { char keys[] = { 0, 1, 2, 3, 4 }; char fnm[PATHBUF], *tmp, *fname = NULL, *snm = NULL; GtkWidget *win, *button, *label, *entry; GtkCList *clist = GTK_CLIST(fp->clist); GtkAccelGroup *ag = gtk_accel_group_new(); int uninit_(l), res; if (row >= 0) /* Doing things to existing file */ { fname = get_fname(clist, row); if (!strcmp(fname, "..")) return; // Up-dir #ifdef WIN32 if (fname[1] == ':') return; // Drive #endif } win = gtk_dialog_new(); if (fname) sprintf(tmp = fnm, "%s / %s", _("Delete"), _("Rename")); else tmp = _("Create Directory"); gtk_window_set_title(GTK_WINDOW(win), tmp); gtk_window_set_modal(GTK_WINDOW(win), TRUE); gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER); gtk_container_set_border_width(GTK_CONTAINER(win), 6); gtk_signal_connect_object(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(fpick_dialog_fn), (gpointer)(keys + 1)); label = gtk_label_new(fname ? _("Enter the new filename") : _("Enter the name of the new directory")); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(win)->vbox), label, TRUE, FALSE, 8); entry = xpack5(GTK_DIALOG(win)->vbox, gtk_entry_new_with_max_length(PATHBUF)); if (fname) gtk_entry_set_text(GTK_ENTRY(entry), fname); button = add_a_button(_("Cancel"), 2, GTK_DIALOG(win)->action_area, TRUE); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(win)); gtk_widget_add_accelerator(button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); if (fname) { button = add_a_button(_("Delete"), 2, GTK_DIALOG(win)->action_area, TRUE); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(fpick_dialog_fn), (gpointer)(keys + 2)); } button = add_a_button(fname ? _("Rename") : _("Create"), 2, GTK_DIALOG(win)->action_area, TRUE ); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(fpick_dialog_fn), (gpointer)(keys + (fname ? 3 : 4))); gtk_widget_add_accelerator(button, "clicked", ag, GDK_KP_Enter, 0, (GtkAccelFlags)0); gtk_widget_add_accelerator(button, "clicked", ag, GDK_Return, 0, (GtkAccelFlags)0); gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(main_window)); gtk_widget_show_all(win); gdk_window_raise(win->window); gtk_widget_grab_focus(entry); gtk_window_add_accel_group(GTK_WINDOW(win), ag); while (!keys[0]) gtk_main_iteration(); res = keys[0]; if (res > 1) { strncpy(fnm, fp->txt_directory, PATHBUF); l = strlen(fnm); gtkncpy(fnm + l, gtk_entry_get_text(GTK_ENTRY(entry)), PATHBUF - l); gtk_widget_destroy(win); if (fname) { // The source name SHOULD NOT get truncated, ever char *ts = gtkncpy(NULL, fname, 0); snm = g_strconcat(fp->txt_directory, ts, NULL); g_free(ts); } } tmp = NULL; if (res == 2) // Delete file or directory { char *ts = g_strdup_printf(_("Do you really want to delete \"%s\" ?"), fname); int r = alert_box(_("Warning"), ts, _("No"), _("Yes"), NULL); g_free(ts); if (r == 2) { if (remove(snm)) tmp = _("Unable to delete"); } } else if (res == 3) // Rename file or directory { if (rename(snm, fnm)) tmp = _("Unable to rename"); } else if (res == 4) // Create directory { #ifdef WIN32 if (mkdir(fnm)) #else if (mkdir(fnm, 0777)) #endif tmp = _("Unable to create directory"); } g_free(snm); if (tmp) alert_box(_("Error"), tmp, NULL); else if (res > 1) { if (row >= 0) /* Deleted/renamed a file - move down */ { if (++row >= clist->rows) row = clist->rows - 2; tmp = gtkncpy(fnm, get_fname(clist, row), PATHBUF); } else tmp = fnm + l; /* Created a directory - move to it */ fpick_scan_directory(fp, fp->txt_directory, tmp); } } static gboolean fpick_key_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { fpicker *fp = user_data; GtkCList *clist = GTK_CLIST(fp->clist); GList *list; char *txt_name, *txt_size; int row = 0; switch (event->keyval) { case GDK_End: case GDK_KP_End: row = clist->rows - 1; case GDK_Home: case GDK_KP_Home: clist->focus_row = row; gtk_clist_select_row(clist, row, 0); gtk_clist_moveto(clist, row, 0, 0.5, 0.5); return (TRUE); case GDK_Return: case GDK_KP_Enter: break; #if GTK_MAJOR_VERSION == 1 /* !!! Just having ESC as accelerator isn't enough in GTK+1 */ case GDK_Escape: gtk_button_clicked(GTK_BUTTON(fp->cancel_button)); return (TRUE); #endif default: return (FALSE); } if (!(list = clist->selection)) return (FALSE); row = GPOINTER_TO_INT(list->data); txt_name = get_fname(clist, row); if (!txt_name) return (TRUE); gtk_clist_get_text(clist, row, FPICK_CLIST_SIZE, &txt_size); /* Directory selected */ if (!txt_size[0]) fpick_enter_dir_via_list(fp, txt_name); /* File selected */ else gtk_button_clicked(GTK_BUTTON(fp->ok_button)); return (TRUE); } static gboolean fpick_click_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { fpicker *fp = user_data; GtkCList *clist = GTK_CLIST(fp->clist); gint row, col; if ((event->button != 3) || (event->type != GDK_BUTTON_PRESS)) return (FALSE); if (!gtk_clist_get_selection_info(clist, event->x, event->y, &row, &col)) return (FALSE); if (clist->focus_row != row) clist_reselect_row(clist, row); if (clist->focus_row < 0) return (TRUE); fpick_file_dialog(fp, clist->focus_row); return (TRUE); } #undef _ #define _(X) X static toolbar_item fpick_bar[] = { { _("Up"), -1, FPICK_ICON_UP, 0, XPM_ICON(up) }, { _("Home"), -1, FPICK_ICON_HOME, 0, XPM_ICON(home) }, { _("Create New Directory"), -1, FPICK_ICON_DIR, 0, XPM_ICON(newdir) }, { _("Show Hidden Files"), 0, FPICK_ICON_HIDDEN, 0, XPM_ICON(hidden) }, { _("Case Insensitive Sort"), 0, FPICK_ICON_CASE, 0, XPM_ICON(case) }, { NULL }}; #undef _ #define _(X) __(X) static void fpick_iconbar_click(GtkWidget *widget, gpointer user_data); static GtkWidget *fpick_toolbar(GtkWidget **wlist) { GtkWidget *toolbar; #if GTK_MAJOR_VERSION == 1 toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); #endif #if GTK_MAJOR_VERSION == 2 toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); #endif fill_toolbar(GTK_TOOLBAR(toolbar), fpick_bar, wlist, GTK_SIGNAL_FUNC(fpick_iconbar_click), NULL); gtk_widget_show(toolbar); return toolbar; } static void fpick_wildcard(GtkButton *button, gpointer user_data) { fpicker *fp = user_data; char *ctxt, *ds, *nm, *mask = fp->txt_mask; ctxt = (char *)gtk_entry_get_text(GTK_ENTRY(fp->file_entry)); /* Presume filename if called by user pressing "OK", pattern otherwise */ if (button) { /* First, check if user had changed directory in the combo */ if (fpick_enter_dirname(fp, NULL, 0)) ctxt = NULL; /* If file entry is hidden anyway */ else if (!fp->allow_files) return; /* Filename must have some chars and no wildcards in it */ else if (ctxt[0] && !ctxt[strcspn(ctxt, "?*")]) return; /* Don't let pattern pass as filename */ gtk_signal_emit_stop_by_name(GTK_OBJECT(button), "clicked"); /* Don't do anything else for directory change */ if (!ctxt) return; } /* Do we have directory in here? */ ds = strrchr(ctxt, DIR_SEP); #ifdef WIN32 /* Allow '/' separator too */ if ((nm = strrchr(ds ? ds : ctxt, '/'))) ds = nm; #endif /* Store filename pattern */ nm = ds ? ds + 1 : ctxt; strncpy0(mask, nm, PATHTXT - 1); if (mask[0] && !strchr(mask, '*')) { /* Add a '*' at end if one isn't present in string */ int l = strlen(mask); mask[l++] = '*'; mask[l] = '\0'; } /* Have directory - enter it */ if (ds && (fpick_enter_dirname(fp, ctxt, ds + 1 - ctxt) > 0)) { // Opened a new dir - skip redisplay gtk_entry_set_text(GTK_ENTRY(fp->file_entry), nm); // Cut dir off } else { /* Torture GtkCList into displaying only files that match pattern */ fpick_clist_repattern(GTK_CLIST(fp->clist), mask); fpick_clist_scroll(GTK_CLIST(fp->clist)); // Scroll to selected row } } /* "Tab completion" for entry field, like in GtkFileSelection */ static gboolean fpick_entry_key(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if (event->keyval != GDK_Tab) return (FALSE); #if GTK_MAJOR_VERSION == 1 /* Return value alone doesn't stop GTK1 from running other handlers */ gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event"); #endif fpick_wildcard(NULL, user_data); return (TRUE); } GtkWidget *fpick_create(char *title, int flags) // Initialize file picker { static const short col_width[FPICK_CLIST_COLS] = {250, 64, 80, 150}; char txt[64], *col_titles[FPICK_CLIST_COLS + FPICK_CLIST_COLS_HIDDEN] = { "", "", "", "", "", "" }; GtkWidget *vbox1, *hbox1, *scrolledwindow1, *temp_hbox; GtkAccelGroup* ag = gtk_accel_group_new(); fpicker *res = calloc(1, sizeof(fpicker)); int i, w, l; if (!res) return NULL; col_titles[FPICK_CLIST_NAME] = _("Name"); col_titles[FPICK_CLIST_SIZE] = _("Size"); col_titles[FPICK_CLIST_TYPE] = _("Type"); col_titles[FPICK_CLIST_DATE] = _("Modified"); case_insensitive = inifile_get_gboolean("fpick_case_insensitive", TRUE ); res->show_hidden = inifile_get_gboolean("fpick_show_hidden", FALSE ); res->sort_direction = GTK_SORT_ASCENDING; res->sort_column = 0; res->allow_files = res->allow_dirs = TRUE; res->txt_directory[0] = '\0'; res->window = add_a_window( GTK_WINDOW_TOPLEVEL, title, GTK_WIN_POS_NONE, TRUE ); gtk_object_set_data(GTK_OBJECT(res->window), FP_DATA_KEY, res); win_restore_pos(res->window, "fs_window", 0, 0, 550, 500); vbox1 = add_vbox(res->window); hbox1 = pack5(vbox1, gtk_hbox_new(FALSE, 0)); // ------- Combo Box ------- res->combo = xpack5(hbox1, gtk_combo_new()); gtk_combo_disable_activate(GTK_COMBO(res->combo)); res->combo_entry = GTK_COMBO(res->combo)->entry; for ( i=0; icombo_items[i], inifile_get(txt, ""), PATHTXT); res->combo_list = g_list_append( res->combo_list, res->combo_items[i] ); } gtk_combo_set_popdown_strings( GTK_COMBO(res->combo), res->combo_list ); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(res->combo)->popwin), "hide", GTK_SIGNAL_FUNC(fpick_combo_changed), res); gtk_signal_connect(GTK_OBJECT(res->combo_entry), "activate", GTK_SIGNAL_FUNC(fpick_combo_changed), res); // !!! Show things now - toolbars in GTK+1 mishandle show_all gtk_widget_show_all(vbox1); // ------- Toolbar ------- res->toolbar = pack5(hbox1, fpick_toolbar(res->icons)); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(res->icons[FPICK_ICON_HIDDEN]), res->show_hidden ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(res->icons[FPICK_ICON_CASE]), case_insensitive ); gtk_object_set_data( GTK_OBJECT(res->toolbar), FP_DATA_KEY, res ); // Set this after setting the toggles so any events are ignored // ------- CLIST - File List ------- hbox1 = xpack5(vbox1, gtk_hbox_new(FALSE, 0)); scrolledwindow1 = xpack5(hbox1, gtk_scrolled_window_new(NULL, NULL)); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_widget_show_all(hbox1); res->clist = gtk_clist_new(FPICK_CLIST_COLS + FPICK_CLIST_COLS_HIDDEN); gtk_clist_set_compare_func(GTK_CLIST(res->clist), fpick_compare); gtk_signal_connect(GTK_OBJECT(res->clist), "destroy", GTK_SIGNAL_FUNC(fpick_clist_drop_backup), NULL); for (i = 0; i < (FPICK_CLIST_COLS + FPICK_CLIST_COLS_HIDDEN); i++) { if ( i>=FPICK_CLIST_COLS ) // Hide the extra sorting columns gtk_clist_set_column_visibility( GTK_CLIST( res->clist ), i, FALSE ); temp_hbox = gtk_hbox_new( FALSE, 0 ); if ( i == FPICK_CLIST_TYPE || i == FPICK_CLIST_SIZE ) pack_end(temp_hbox, gtk_label_new(col_titles[i])); else if ( i == FPICK_CLIST_NAME ) pack(temp_hbox, gtk_label_new(col_titles[i])); else xpack(temp_hbox, gtk_label_new(col_titles[i])); gtk_widget_show_all(temp_hbox); res->sort_arrows[i] = pack_end(temp_hbox, gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_IN)); if ((i == FPICK_CLIST_SIZE) || (i == FPICK_CLIST_TYPE)) gtk_clist_set_column_justification(GTK_CLIST(res->clist), i, GTK_JUSTIFY_RIGHT ); else if (i == FPICK_CLIST_DATE) gtk_clist_set_column_justification(GTK_CLIST(res->clist), i, GTK_JUSTIFY_CENTER ); gtk_clist_set_column_widget(GTK_CLIST(res->clist), i, temp_hbox); GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(res->clist)->column[i].button, GTK_CAN_FOCUS); } gtk_widget_show( res->sort_arrows[0] ); // Show first arrow gtk_clist_column_titles_show( GTK_CLIST(res->clist) ); gtk_clist_set_selection_mode( GTK_CLIST(res->clist), GTK_SELECTION_BROWSE ); gtk_container_add(GTK_CONTAINER( scrolledwindow1 ), res->clist); gtk_widget_show( res->clist ); gtk_signal_connect(GTK_OBJECT(res->clist), "click_column", GTK_SIGNAL_FUNC(fpick_column_button), res); gtk_signal_connect(GTK_OBJECT(res->clist), "select_row", GTK_SIGNAL_FUNC(fpick_select_row), res); gtk_signal_connect(GTK_OBJECT(res->clist), "key_press_event", GTK_SIGNAL_FUNC(fpick_key_event), res); gtk_signal_connect(GTK_OBJECT(res->clist), "button_press_event", GTK_SIGNAL_FUNC(fpick_click_event), res); // ------- Extra widget section ------- gtk_widget_show(res->main_vbox = pack5(vbox1, gtk_vbox_new(FALSE, 0))); // ------- Entry Box ------- hbox1 = pack5(vbox1, gtk_hbox_new(FALSE, 0)); res->file_entry = xpack5(hbox1, gtk_entry_new_with_max_length(PATHBUF)); gtk_widget_show_all(hbox1); gtk_signal_connect(GTK_OBJECT(res->file_entry), "key_press_event", GTK_SIGNAL_FUNC(fpick_entry_key), res); // ------- Buttons ------- hbox1 = pack5(vbox1, gtk_hbox_new(FALSE, 0)); res->ok_button = pack_end5(hbox1, gtk_button_new_with_label(_("OK"))); gtk_widget_set_usize(res->ok_button, 100, -1); // gtk_widget_add_accelerator (res->ok_button, "clicked", ag, GDK_KP_Enter, 0, (GtkAccelFlags) 0); // gtk_widget_add_accelerator (res->ok_button, "clicked", ag, GDK_Return, 0, (GtkAccelFlags) 0); gtk_signal_connect(GTK_OBJECT(res->ok_button), "clicked", GTK_SIGNAL_FUNC(fpick_wildcard), res); res->cancel_button = pack_end5(hbox1, gtk_button_new_with_label(_("Cancel"))); gtk_widget_set_usize(res->cancel_button, 100, -1); gtk_widget_add_accelerator (res->cancel_button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags) 0); gtk_widget_show_all(hbox1); gtk_window_add_accel_group(GTK_WINDOW (res->window), ag); gtk_signal_connect_object(GTK_OBJECT(res->file_entry), "activate", GTK_SIGNAL_FUNC(gtk_button_clicked), GTK_OBJECT(res->ok_button)); if ( flags & FPICK_ENTRY ) gtk_widget_grab_focus(res->file_entry); else gtk_widget_grab_focus(res->clist); if ( flags & FPICK_DIRS_ONLY ) { res->allow_files = FALSE; gtk_widget_hide(res->file_entry); } /* Ensure enough space for pixmaps */ gtk_widget_realize(res->clist); gtk_clist_set_row_height(GTK_CLIST(res->clist), 0); if (GTK_CLIST(res->clist)->row_height < 16) gtk_clist_set_row_height(GTK_CLIST(res->clist), 16); /* Ensure width */ for (i = 0; i < FPICK_CLIST_COLS; i++) { sprintf(txt, "fpick_col%i", i + 1); w = inifile_get_gint32(txt, col_width[i]); // if ((i == FPICK_CLIST_SIZE) || (i == FPICK_CLIST_DATE)) if (i == FPICK_CLIST_SIZE) { #if GTK_MAJOR_VERSION == 1 l = gdk_string_width(res->clist->style->font, #else /* if GTK_MAJOR_VERSION == 2 */ l = gdk_string_width(gtk_style_get_font(res->clist->style), #endif "8,888,888,888"); if (w < l) w = l; } gtk_clist_set_column_width(GTK_CLIST(res->clist), i, w); } return (res->window); } void fpick_set_filename(GtkWidget *fp, char *name, int raw) { fpicker *win = gtk_object_get_data(GTK_OBJECT(fp), FP_DATA_KEY); char txt[PATHTXT], *c; if (!raw) { /* Ensure that path is absolute */ resolve_path(txt, PATHBUF, name); /* Separate the filename */ c = strrchr(txt, DIR_SEP); *c++ = '\0'; // Scan directory, populate boxes if successful if (!fpick_scan_directory(win, txt, "")) return; /* Name is in locale encoding on input */ name = gtkuncpy(txt, c, PATHTXT); } gtk_entry_set_text(GTK_ENTRY(win->file_entry), name); } void fpick_destroy(GtkWidget *fp) // Destroy structures and release memory { fpicker *win = gtk_object_get_data(GTK_OBJECT(fp), FP_DATA_KEY); GtkCListColumn *col = GTK_CLIST(win->clist)->column; char txt[64], buf[PATHBUF]; int i; for ( i=0; icombo_items[i], PATHBUF); sprintf(txt, "fpick_dir_%i", i); inifile_set(txt, buf); } for ( i=0; ishow_hidden ); free(win); destroy_dialog(fp); } static void fpick_iconbar_click(GtkWidget *widget, gpointer user_data) { toolbar_item *item = user_data; fpicker *fp = gtk_object_get_data(GTK_OBJECT(widget->parent), FP_DATA_KEY); char nm[PATHBUF], fnm[PATHBUF]; if (!fp) return; switch (item->ID) { case FPICK_ICON_UP: fpick_enter_dir_via_list(fp, ".."); break; case FPICK_ICON_HOME: gtkncpy(nm, gtk_entry_get_text(GTK_ENTRY(fp->file_entry)), PATHBUF); file_in_homedir(fnm, nm, PATHBUF); fpick_set_filename(fp->window, fnm, FALSE); break; case FPICK_ICON_DIR: fpick_file_dialog(fp, -1); break; case FPICK_ICON_HIDDEN: fp->show_hidden = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); fpick_scan_directory(fp, fp->txt_directory, ""); break; case FPICK_ICON_CASE: case_insensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); fpick_sort_files(fp); fpick_clist_scroll(GTK_CLIST(fp->clist)); // Scroll to selected row break; } } void fpick_setup(GtkWidget *fp, GtkWidget *xtra, GtkSignalFunc ok_fn, GtkSignalFunc cancel_fn) { fpicker *fpick = gtk_object_get_data(GTK_OBJECT(fp), FP_DATA_KEY); gtk_signal_connect_object(GTK_OBJECT(fpick->ok_button), "clicked", ok_fn, GTK_OBJECT(fp)); gtk_signal_connect_object(GTK_OBJECT(fpick->cancel_button), "clicked", cancel_fn, GTK_OBJECT(fp)); delete_to_click(fpick->window, fpick->cancel_button); pack(fpick->main_vbox, xtra); } void fpick_get_filename(GtkWidget *fp, char *buf, int len, int raw) { fpicker *fpick = gtk_object_get_data(GTK_OBJECT(fp), FP_DATA_KEY); char *txt = (char *)gtk_entry_get_text(GTK_ENTRY(fpick->file_entry)); if (raw) strncpy0(buf, txt, len); #if GTK_MAJOR_VERSION == 1 /* Same encoding everywhere */ else snprintf(buf, len, "%s%s", fpick->txt_directory, txt); #else /* Convert filename to locale */ else { txt = gtkncpy(NULL, txt, PATHBUF); snprintf(buf, len, "%s%s", fpick->txt_directory, txt); g_free(txt); } #endif } #endif /* mtPaint fpicker */ #ifdef U_FPICK_GTKFILESEL /* GtkFileSelection based dialog */ GtkWidget *fpick_create(char *title, int flags) { GtkWidget *fp = gtk_file_selection_new(title); if ( flags & FPICK_DIRS_ONLY ) { gtk_widget_hide(GTK_WIDGET(GTK_FILE_SELECTION(fp)->selection_entry)); gtk_widget_set_sensitive(GTK_WIDGET(GTK_FILE_SELECTION(fp)->file_list), FALSE); // Don't let the user select files } return (fp); } void fpick_destroy(GtkWidget *fp) { destroy_dialog(fp); } void fpick_setup(GtkWidget *fp, GtkWidget *xtra, GtkSignalFunc ok_fn, GtkSignalFunc cancel_fn) { #if GTK_MAJOR_VERSION == 1 GtkAccelGroup* ag = gtk_accel_group_new(); #endif gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(fp)->ok_button), "clicked", ok_fn, GTK_OBJECT(fp)); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(fp)->cancel_button), "clicked", cancel_fn, GTK_OBJECT(fp)); delete_to_click(fp, GTK_FILE_SELECTION(fp)->cancel_button); pack(GTK_FILE_SELECTION(fp)->main_vbox, xtra); #if GTK_MAJOR_VERSION == 1 /* No builtin accelerators - add our own */ gtk_widget_add_accelerator(GTK_FILE_SELECTION(fp)->cancel_button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); gtk_window_add_accel_group(GTK_WINDOW(fp), ag); #endif } void fpick_get_filename(GtkWidget *fp, char *buf, int len, int raw) { char *fname = (char *)gtk_entry_get_text(GTK_ENTRY( GTK_FILE_SELECTION(fp)->selection_entry)); if (raw) strncpy0(buf, fname, len); else { #ifdef WIN32 /* Widget returns filename in UTF8 */ gtkncpy(buf, gtk_file_selection_get_filename(GTK_FILE_SELECTION(fp)), len); #else strncpy0(buf, gtk_file_selection_get_filename(GTK_FILE_SELECTION(fp)), len); #endif /* Make sure directory paths end with DIR_SEP */ if (fname[0]) return; raw = strlen(buf); if (!raw || (buf[raw - 1] != DIR_SEP)) { if (raw > len - 2) raw = len - 2; buf[raw] = DIR_SEP; buf[raw + 1] = '\0'; } } } void fpick_set_filename(GtkWidget *fp, char *name, int raw) { if (raw) gtk_entry_set_text(GTK_ENTRY( GTK_FILE_SELECTION(fp)->selection_entry), name); #ifdef WIN32 /* Widget wants filename in UTF8 */ else { name = gtkuncpy(NULL, name, 0); gtk_file_selection_set_filename(GTK_FILE_SELECTION(fp), name); g_free(name); } #else else gtk_file_selection_set_filename(GTK_FILE_SELECTION(fp), name); #endif } #endif /* GtkFileSelection based dialog */ mtpaint-3.40/src/layer.h0000644000175000000620000000663311560040431014511 0ustar muammarstaff/* layer.h Copyright (C) 2005-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define MAX_LAYERS 100 #define LAYERS_HEADER "# mtPaint layers" #define LAYERS_VERSION 1 #define ANIMATION_HEADER "# mtPaint animation" #define MAX_POS_SLOTS 100 #define LAYER_NAMELEN 35 /// GLOBALS typedef struct { int frame, x, y, opacity, effect; } ani_slot; typedef struct { image_info image_; image_state state_; ani_slot ani_pos[MAX_POS_SLOTS]; } layer_image; // All as per memory.h definitions typedef struct { char name[LAYER_NAMELEN]; // Layer text name int x, y, opacity; // Position of layer, opacity % int visible; // Show layer layer_image *image; // Pointer to image data - malloc'd when created, free'd after } layer_node; GtkWidget *layers_box, *layers_window; layer_node layer_table[MAX_LAYERS+1]; // Table of layer info int layers_total, // Layers currently in use layer_selected, // Layer currently selected in the layers window layers_changed; // 0=Unchanged char layers_filename[PATHBUF]; // Current filename for layers file int show_layers_main, // Show all layers in main window layers_pastry_cut; // Pastry cut layers in view area (for animation previews) /// PROCEDURES void layers_init(); layer_image *alloc_layer(int w, int h, int bpp, int cmask, image_info *src); void pressed_layers(); void pressed_paste_layer(); gboolean delete_layers_window(); void create_layers_box(); int load_layers( char *file_name ); int save_layers( char *file_name ); void layer_press_save(); int layer_save_composite(char *fname, ls_settings *settings); int load_to_layers(char *file_name, int ftype, int ani_mode); #define update_main_with_new_layer() update_stuff(UPD_LAYER) void layers_notify_changed(); void layer_copy_from_main( int l ); // Copy info from main image to layer void layer_copy_to_main( int l ); // Copy info from layer to main image void layer_refresh_list(); void layer_press_remove_all(); int check_layers_for_changes(); int check_layers_all_saved(); void move_layer_relative(int l, int change_x, int change_y); // Move a layer & update window labels void layer_new(int w, int h, int bpp, int cols, png_color *pal, int cmask); // *Silently* add layer, return success int layer_add(int w, int h, int bpp, int cols, png_color *pal, int cmask); void layer_show_new(); // Show the last added layer void layer_delete(int item); // *Silently* delete layer void layer_choose( int l ); // Select a new layer from the list void layer_add_composite(); // Composite layers to new (invisible) layer void shift_layer(int val); // Move layer up or down void layer_press_duplicate(); void layer_press_centre(); // Center layer on background void layer_press_delete(); // Delete current layer void string_chop( char *txt ); int read_file_num(FILE *fp, char *txt); void layer_show_trans(); // Update transparency in layers window mtpaint-3.40/src/layer.c0000644000175000000620000010751311652524075014520 0ustar muammarstaff/* layer.c Copyright (C) 2005-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "mygtk.h" #include "memory.h" #include "png.h" #include "layer.h" #include "mainwindow.h" #include "otherwindow.h" #include "canvas.h" #include "inifile.h" #include "global.h" #include "viewer.h" #include "ani.h" #include "channels.h" #include "toolbar.h" #include "icons.h" // Layer toolbar buttons #define LTB_NEW 0 #define LTB_RAISE 1 #define LTB_LOWER 2 #define LTB_DUP 3 #define LTB_CENTER 4 #define LTB_DEL 5 #define LTB_CLOSE 6 #define TOTAL_ICONS_LAYER 7 int layers_total, // Layers currently being used layer_selected, // Layer currently selected in the layers window layers_changed; // 0=Unchanged char layers_filename[PATHBUF]; // Current filename for layers file int show_layers_main, // Show all layers in main window layers_pastry_cut; // Pastry cut layers in view area (for animation previews) // !!! Always follow adding/changing layer's image_info by update_undo() layer_node layer_table[MAX_LAYERS + 1]; // Table of layer info static void layer_clear_slot(int l, int visible) { memset(layer_table + l, 0, sizeof(layer_node)); layer_table[l].opacity = 100; layer_table[l].visible = visible; } void layers_init() { layer_clear_slot(0, TRUE); strncpy0(layer_table[0].name, _("Background"), LAYER_NAMELEN); layer_table[0].image = calloc(1, sizeof(layer_image)); } /* Allocate layer image, its channels and undo stack * !!! Must be followed by update_undo() after setting up image is done */ layer_image *alloc_layer(int w, int h, int bpp, int cmask, image_info *src) { layer_image *lim; lim = calloc(1, sizeof(layer_image)); if (!lim) return (NULL); if (init_undo(&lim->image_.undo_, mem_undo_depth) && mem_alloc_image(src ? AI_COPY : 0, &lim->image_, w, h, bpp, cmask, src)) return (lim); free(lim->image_.undo_.items); free(lim); return (NULL); } static void repaint_layer(int l) // Repaint layer in view/main window { layer_node *t = layer_table + l; image_info *image; int lx, ly, lw, lh; image = l == layer_selected ? &mem_image : &t->image->image_; lw = image->width; lh = image->height; lx = t->x; ly = t->y; if (layer_selected) { lx -= layer_table[layer_selected].x; ly -= layer_table[layer_selected].y; } vw_update_area(lx, ly, lw, lh); if (show_layers_main) main_update_area(lx, ly, lw, lh); } static void repaint_layers() { if (show_layers_main) gtk_widget_queue_draw(drawing_canvas); if (view_showing) gtk_widget_queue_draw(vw_drawing); } /// LAYERS WINDOW GtkWidget *layers_box, *layers_window; typedef struct { GtkWidget *item, *name, *toggle; } layer_item; static GtkWidget *layer_list, *entry_layer_name, *layer_x, *layer_y, *layer_spin, *layer_slider, *layer_tools[TOTAL_ICONS_LAYER]; static layer_item layer_list_data[MAX_LAYERS + 1]; static int layers_initialized; // Indicates if initializing is complete static int layers_sensitive(int state) { int res; if (!layers_box) return (TRUE); res = GTK_WIDGET_SENSITIVE(layers_box); gtk_widget_set_sensitive(layers_box, state); /* Delayed action - selection could not be moved while insensitive */ if (!res && state) list_select_item(layer_list, layer_list_data[layer_selected].item); return (res); } static void layers_update_titlebar() // Update filename in titlebar { char txt[300], txt2[PATHTXT]; if (!layers_window) return; // Don't bother if window is not showing gtkuncpy(txt2, layers_filename, PATHTXT); snprintf(txt, 290, "%s %s %s", _("Layers"), layers_changed ? _("(Modified)") : "-", txt2[0] ? txt2 : _("Untitled")); gtk_window_set_title(GTK_WINDOW(layers_window), txt); } void layers_notify_changed() // Layers have just changed - update vars as needed { if ( layers_changed != 1 ) { layers_changed = 1; layers_update_titlebar(); } } static void layers_notify_unchanged() // Layers have just been unchanged (saved) - update vars as needed { if ( layers_changed != 0 ) { layers_changed = 0; layers_update_titlebar(); } } void layer_copy_from_main( int l ) // Copy info from main image to layer { layer_image *lp = layer_table[l].image; lp->image_ = mem_image; lp->state_ = mem_state; lp->image_.undo_.size = 0; // Invalidate update_undo(&lp->image_); // Safety net } void layer_copy_to_main( int l ) // Copy info from layer to main image { layer_image *lp = layer_table[l].image; mem_image = lp->image_; mem_state = lp->state_; } static void layer_select_slot(int slot) { /* !!! Selection gets stuck if tried to move it while insensitive */ if (layers_box && GTK_WIDGET_SENSITIVE(layers_box)) list_select_item(layer_list, layer_list_data[slot].item); } void shift_layer(int val) { layer_node temp; int i, j, x, y, newbkg, lv = layer_selected + val; if ((lv < 0) || (lv > layers_total)) return; // Cannot move layer_copy_from_main(layer_selected); temp = layer_table[layer_selected]; layer_table[layer_selected] = layer_table[lv]; layer_table[lv] = temp; newbkg = (layer_selected == 0) || (lv == 0); layer_selected = lv; /* Background layer changed - shift the entire stack */ if (newbkg) { x = layer_table[0].x; y = layer_table[0].y; for (i = 0; i <= layers_total; i++) { layer_table[i].x -= x; layer_table[i].y -= y; } } // Updated 2 list items - Text name + visible toggle for (i = layer_selected , j = 0; j < 2; i -= val , j++) { gtk_label_set_text(GTK_LABEL(layer_list_data[i].name), layer_table[i].name); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(layer_list_data[i].toggle), layer_table[i].visible); } layer_select_slot(layer_selected); layers_notify_changed(); if (newbkg) // Background layer changed { vw_realign(); repaint_layers(); } else repaint_layer(layer_selected); // Regular layer shifted } void layer_show_new() { layer_copy_from_main(layer_selected); layer_copy_to_main(layer_selected = layers_total); update_main_with_new_layer(); layers_notify_changed(); if (layers_box) { layer_item *l = layer_list_data + layers_total; layer_node *t = layer_table + layers_total; // Disable new/duplicate if we have max layers if (layers_total >= MAX_LAYERS) { gtk_widget_set_sensitive(layer_tools[LTB_NEW], FALSE); gtk_widget_set_sensitive(layer_tools[LTB_DUP], FALSE); } gtk_widget_show(l->item); gtk_widget_set_sensitive(l->item, TRUE); // Enable list item gtk_label_set_text(GTK_LABEL(l->name), t->name ); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l->toggle), t->visible); layer_select_slot(layers_total); } } int layer_add(int w, int h, int bpp, int cols, png_color *pal, int cmask) { layer_image *lim; if (layers_total >= MAX_LAYERS) return (FALSE); lim = alloc_layer(w, h, bpp, cmask, NULL); if (!lim) { memory_errors(1); return (FALSE); } lim->state_.xbm_hot_x = lim->state_.xbm_hot_y = -1; lim->state_.channel = lim->image_.img[mem_channel] ? mem_channel : CHN_IMAGE; lim->image_.trans = -1; lim->image_.cols = cols; if (pal) mem_pal_copy(lim->image_.pal, pal); else mem_bw_pal(lim->image_.pal, 0, cols - 1); init_istate(&lim->state_, &lim->image_); update_undo(&lim->image_); layers_total++; layer_clear_slot(layers_total, TRUE); layer_table[layers_total].image = lim; /* Start with fresh animation data if new */ if (layers_total == 1) ani_init(); return (TRUE); } /* !!! No calling GTK+ until after updating the structures - we don't need a * recursive call in the middle of it (possible on a slow machine) - WJ */ void layer_new(int w, int h, int bpp, int cols, png_color *pal, int cmask) { if (layer_add(w, h, bpp, cols, pal, cmask)) layer_show_new(); } /* !!! Same as above: modify structures, *then* show results - WJ */ void layer_press_duplicate() { layer_image *lim, *ls; if (layers_total >= MAX_LAYERS) return; lim = alloc_layer(0, 0, 0, 0, &mem_image); if (!lim) { memory_errors(1); return; } // Copy layer info layer_copy_from_main(layer_selected); layers_total++; layer_table[layers_total] = layer_table[layer_selected]; layer_table[layers_total].image = lim; ls = layer_table[layer_selected].image; lim->state_ = ls->state_; mem_pal_copy(lim->image_.pal, ls->image_.pal); lim->image_.cols = ls->image_.cols; lim->image_.trans = ls->image_.trans; update_undo(&lim->image_); // Copy across position data memcpy(lim->ani_pos, ls->ani_pos, sizeof(lim->ani_pos)); layer_show_new(); } void layer_delete(int item) { layer_image *lp = layer_table[item].image; int i; mem_free_image(&lp->image_, FREE_ALL); free(lp); // If deleted item is not at the end shuffle rest down for (i = item; i < layers_total; i++) layer_table[i] = layer_table[i + 1]; memset(layer_table + layers_total, 0, sizeof(layer_node)); layers_total--; } void layer_refresh_list() { static int in_refresh; int i; if (!layers_box) return; // As befits a refresh, this should show the final state if (in_refresh) { in_refresh |= 2; return; } while (TRUE) { in_refresh = 1; for (i = 0; i <= layers_total; i++) { layer_item *l = layer_list_data + i; layer_node *t = layer_table + i; gtk_widget_show(l->item); gtk_widget_set_sensitive(l->item, TRUE); gtk_label_set_text(GTK_LABEL(l->name), t->name); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l->toggle), t->visible); } for (; i <= MAX_LAYERS; i++) // Disable items { layer_item *l = layer_list_data + i; gtk_widget_hide(l->item); gtk_widget_set_sensitive(l->item, FALSE); } gtk_widget_set_sensitive(layer_tools[LTB_RAISE], layer_selected < layers_total); gtk_widget_set_sensitive(layer_tools[LTB_NEW], layers_total < MAX_LAYERS); gtk_widget_set_sensitive(layer_tools[LTB_DUP], layers_total < MAX_LAYERS); if (in_refresh < 2) break; } in_refresh = 0; } void layer_press_delete() { char txt[256]; int i; if (!layer_selected) return; // Deleting background is forbidden snprintf(txt, 256, _("Do you really want to delete layer %i (%s) ?"), layer_selected, layer_table[layer_selected].name ); i = alert_box(_("Warning"), txt, _("No"), _("Yes"), NULL); if ((i != 2) || (check_for_changes() == 1)) return; layer_copy_from_main(layer_selected); layer_copy_to_main(--layer_selected); layer_delete(layer_selected + 1); layer_select_slot(layer_selected); layer_refresh_list(); layers_notify_changed(); update_main_with_new_layer(); } static void layer_show_position() { layer_node *t = layer_table + layer_selected; int oldinit = layers_initialized; if (!layers_box) return; layers_initialized = FALSE; gtk_spin_button_set_value(GTK_SPIN_BUTTON(layer_x), t->x); gtk_spin_button_set_value(GTK_SPIN_BUTTON(layer_y), t->y); layers_initialized = oldinit; } void layer_show_trans() { GtkSpinButton *spin; int n; if (!layers_box) return; spin = GTK_SPIN_BUTTON(layer_spin); n = layer_selected ? mem_xpm_trans : -1; if (gtk_spin_button_get_value_as_int(spin) != n) { int oldinit = layers_initialized; layers_initialized = FALSE; gtk_spin_button_set_value(spin, n); layers_initialized = oldinit; } } void layer_press_centre() { if (!layer_selected) return; // Nothing to do layer_table[layer_selected].x = layer_table[0].image->image_.width / 2 - mem_width / 2; layer_table[layer_selected].y = layer_table[0].image->image_.height / 2 - mem_height / 2; layer_show_position(); layers_notify_changed(); repaint_layers(); } /* Return 1 if some layers are modified, 2 if some are nameless, 3 if both, * 0 if neither */ static int layers_changed_tot() { image_info *image; int j, k; for (j = k = 0; k <= layers_total; k++) // Check each layer for mem_changed { image = k == layer_selected ? &mem_image : &layer_table[k].image->image_; j |= !!image->changed + !image->filename * 2; } return (j); } int check_layers_for_changes() // 1=STOP, 2=IGNORE, -10=NOT CHANGED { if (!(layers_changed_tot() + layers_changed)) return (-10); return (alert_box(_("Warning"), _("One or more of the layers contains changes that have not been saved. Do you really want to lose these changes?"), _("Cancel Operation"), _("Lose Changes"), NULL)); } static void layer_update_filename( char *name ) { strncpy(layers_filename, name, PATHBUF); layers_changed = 1; // Forces update of titlebar layers_notify_unchanged(); } static void layers_free_all() { layer_node *t; if (layers_total && layer_selected) // Copy over layer 0 { layer_copy_from_main(layer_selected); layer_copy_to_main(0); layer_selected = 0; } for (t = layer_table + layers_total; t != layer_table; t--) { mem_free_image(&t->image->image_, FREE_ALL); free(t->image); } memset(layer_table + 1, 0, sizeof(layer_node) * MAX_LAYERS); layers_total = 0; layers_filename[0] = 0; layers_changed = 0; } void string_chop( char *txt ) { char *cp = txt + strlen(txt) - 1; // Chop off unwanted non ASCII characters at end while ((cp - txt >= 0) && ((unsigned char)*cp < 32)) *cp-- = 0; } int read_file_num(FILE *fp, char *txt) { int i; if (!fgets(txt, 32, fp)) return -987654321; sscanf(txt, "%i", &i); return i; } int load_layers( char *file_name ) { layer_node *t; layer_image *lim2; char tin[300], load_name[PATHBUF], *c; int i, j, k, kk, sens; int layers_to_read = -1, /*layer_file_version = -1,*/ lfail = 0, lplen = 0; FILE *fp; c = strrchr(file_name, DIR_SEP); if (c) lplen = c - file_name + 1; // Try to save text file, return -1 if failure if ((fp = fopen(file_name, "r")) == NULL) goto fail; if (!fgets(tin, 32, fp)) goto fail2; string_chop( tin ); if ( strcmp( tin, LAYERS_HEADER ) != 0 ) goto fail2; // Bad header i = read_file_num(fp, tin); if ( i==-987654321 ) goto fail2; // layer_file_version = i; if ( i>LAYERS_VERSION ) goto fail2; // Version number must be compatible i = read_file_num(fp, tin); if ( i==-987654321 ) goto fail2; layers_to_read = i < MAX_LAYERS ? i : MAX_LAYERS; sens = layers_sensitive(FALSE); if (layers_total) layers_free_all(); // Remove all current layers if any for ( i=0; i<=layers_to_read; i++ ) { // Read filename, strip end chars & try to load (if name length > 0) fgets(tin, 256, fp); string_chop(tin); wjstrcat(load_name, PATHBUF, file_name, lplen, tin, NULL); k = 1; j = detect_image_format(load_name); if ((j > 0) && (j != FT_NONE) && (j != FT_LAYERS1)) k = load_image(load_name, FS_LAYER_LOAD, j) != 1; if (k) /* Failure - skip this layer */ { for ( j=0; j<7; j++ ) read_file_num(fp, tin); lfail++; continue; } /* Update image variables after load */ t = layer_table + layers_total; lim2 = t->image; // !!! No old name so no fuss with saving it lim2->image_.filename = strdup(load_name); fgets(tin, 256, fp); string_chop(tin); strncpy0(t->name, tin, LAYER_NAMELEN); k = read_file_num(fp, tin); t->visible = k > 0; t->x = read_file_num(fp, tin); t->y = read_file_num(fp, tin); kk = read_file_num(fp, tin); k = read_file_num(fp, tin); lim2->image_.trans = kk <= 0 ? -1 : k < 0 ? 0 : k > 255 ? 255 : k; k = read_file_num(fp, tin); t->opacity = k < 1 ? 1 : k > 100 ? 100 : k; init_istate(&lim2->state_, &lim2->image_); if (!layers_total++) layer_copy_to_main(0); // Update mem_state } if (layers_total) layers_total--; layer_refresh_list(); layer_choose(layers_total); /* Read in animation data - only if all layers loaded OK * (to do otherwise is likely to result in SIGSEGV) */ if (!lfail) ani_read_file(fp); fclose(fp); layers_sensitive(sens); layer_update_filename( file_name ); if (lfail) /* There were failures */ { snprintf(tin, 300, _("%d layers failed to load"), lfail); alert_box(_("Error"), tin, NULL); } return 1; // Success fail2: fclose(fp); fail: return -1; } int load_to_layers(char *file_name, int ftype, int ani_mode) { char *buf, *tail; image_frame *frm; image_info *image; image_state *state; layer_node *t; layer_image *lim; frameset fset; int anim = file_formats[ftype].flags & FF_ANIM; int i, j, l, dx, dy, sens, res, res0, lname; /* Create buffer for name mangling */ lname = strlen(file_name); buf = malloc(lname + 64); if (!buf) return (FILE_MEM_ERROR); strcpy(buf, file_name); tail = buf + lname; /* Remove old layers, load new frames */ sens = layers_sensitive(FALSE); if (layers_total) layers_free_all(); // Remove all current layers res = res0 = load_frameset(&fset, ani_mode, file_name, FS_LAYER_LOAD, ftype); if (!fset.cnt) /* Failure - we have no image */ { if (res == FILE_LIB_ERROR) res = -1; // Failure is complete } else /* Got some frames - convert into layers */ { l = 0; // Start from layer 0 if (anim) /* Animation */ { /* Create an empty indexed background of 0th frame's size */ frm = fset.frames; do_new_one(frm->width, frm->height, 256, mem_pal_def, 1, FALSE); l = 1; // Frames start from layer 1 } for (i = 0; i < fset.cnt; i++ , l++) { frm = fset.frames + i; t = layer_table + l; res = FILE_MEM_ERROR; if (!l) // Layer 0 aka current image { if (mem_new(frm->width, frm->height, frm->bpp, 0)) break; layer_copy_from_main(0); } else { if (!(t->image = alloc_layer(frm->width, frm->height, frm->bpp, 0, NULL))) break; } res = res0; lim = t->image; t->visible = !anim; t->opacity = 100; image = &lim->image_; state = &lim->state_; /* Move frame data to image */ memcpy(image->img, frm->img, sizeof(chanlist)); memset(frm->img, 0, sizeof(chanlist)); image->trans = frm->trans; mem_pal_copy(image->pal, frm->pal ? frm->pal : fset.pal ? fset.pal : mem_pal_def); image->cols = frm->cols; t->x = frm->x; t->y = frm->y; update_undo(image); /* Create a name for this frame */ sprintf(tail, ".%03d", i); // !!! No old name so no fuss with saving it image->filename = strdup(buf); init_istate(state, image); if (!l) layer_copy_to_main(0); // Update everything } layers_total = l ? l - 1 : 0; if (anim) { // !!! These legacy things need be replaced by a per-layer field preserved_gif_delay = ani_gif_delay = fset.frames[0].delay; /* Build animation cycle for these layers */ memset(ani_cycle_table, 0, sizeof(ani_cycle_table)); ani_frame1 = ani_cycle_table[0].frame0 = 1; ani_frame2 = ani_cycle_table[0].frame1 = i - 1; ani_cycle_table[0].len = i - 1; for (j = 1; j < i; j++) ani_cycle_table[0].layers[j - 1] = j; /* Center the first frame over background */ dx = (mem_width - layer_table[1].image->image_.width) / 2; dy = (mem_height - layer_table[1].image->image_.height) / 2; for (j = 1; j < i; j++) { layer_table[j].x += dx; layer_table[j].y += dy; } /* Display 1st layer in sequence */ layer_table[1].visible = TRUE; layer_copy_from_main(0); layer_copy_to_main(layer_selected = 1); } update_main_with_new_layer(); } mem_free_frames(&fset); layer_refresh_list(); layers_sensitive(sens); // This also selects current slot /* Name change so that layers file would not overwrite the source */ strcpy(tail, ".txt"); layer_update_filename(buf); free(buf); return (res); } /* Convert absolute filename 'file' into one relative to prefix */ static void parse_filename(char *dest, char *prefix, char *file, int len) { int i, k; /* # of chars that match at start */ for (i = 0; (i < len) && (prefix[i] == file[i]); i++); if (!i || (i == len)) /* Complete match, or no match at all */ strncpy(dest, file + i, PATHBUF); else /* Partial match */ { dest[0] = 0; /* Count number of DIR_SEP encountered on and after point i in * 'prefix', add a '../' for each found */ for (k = i; k < len; k++) { if (prefix[k] == DIR_SEP) strnncat(dest, ".." DIR_SEP_STR, PATHBUF); } /* nip backwards on 'file' from i to previous DIR_SEP or * beginning and ... */ for (k = i; (k >= 0) && (file[k] != DIR_SEP); k--); /* ... add rest of 'file' */ strnncat(dest, file + k + 1, PATHBUF); } } int layer_save_composite(char *fname, ls_settings *settings) { image_info *image; unsigned char *layer_rgb; int w, h, res=0; image = layer_selected ? &layer_table[0].image->image_ : &mem_image; w = image->width; h = image->height; layer_rgb = malloc(w * h * 3); if (layer_rgb) { view_render_rgb(layer_rgb, 0, 0, w, h, 1); // Render layer settings->img[CHN_IMAGE] = layer_rgb; settings->width = w; settings->height = h; settings->bpp = 3; if (layer_selected) /* Set up background transparency */ { res = image->trans; settings->xpm_trans = res; settings->rgb_trans = res < 0 ? -1 : PNG_2_INT(image->pal[res]); } res = save_image(fname, settings); free( layer_rgb ); } else memory_errors(1); return res; } void layer_add_composite() { layer_image *lim; image_info *image = layer_selected ? &layer_table[0].image->image_ : &mem_image; if (layers_total >= MAX_LAYERS) return; if (layer_add(image->width, image->height, 3, image->cols, image->pal, CMASK_IMAGE)) { /* Render to an invisible layer */ layer_table[layers_total].visible = FALSE; lim = layer_table[layers_total].image; view_render_rgb(lim->image_.img[CHN_IMAGE], 0, 0, image->width, image->height, 1); /* Copy background's transparency */ lim->image_.trans = image->trans; /* Activate the result */ layer_show_new(); } else memory_errors(1); } int save_layers( char *file_name ) { layer_node *t; char comp_name[PATHBUF], *c, *msg; int i, l = 0, xpm; FILE *fp; layer_copy_from_main(layer_selected); c = strrchr(file_name, DIR_SEP); if (c) l = c - file_name + 1; // Try to save text file, return -1 if failure if ((fp = fopen(file_name, "w")) == NULL) goto fail; fprintf( fp, "%s\n%i\n%i\n", LAYERS_HEADER, LAYERS_VERSION, layers_total ); for ( i=0; i<=layers_total; i++ ) { t = layer_table + i; parse_filename(comp_name, file_name, t->image->image_.filename, l); fprintf( fp, "%s\n", comp_name ); xpm = t->image->image_.trans; fprintf(fp, "%s\n%i\n%i\n%i\n%i\n%i\n%i\n", t->name, t->visible, t->x, t->y, xpm >= 0, xpm, t->opacity); } ani_write_file(fp); // Write animation data fclose(fp); layer_update_filename( file_name ); register_file( file_name ); // Recently used file list / last directory return 1; // Success fail: c = gtkuncpy(NULL, layers_filename, 0); msg = g_strdup_printf(_("Unable to save file: %s"), c); alert_box(_("Error"), msg, NULL); g_free(msg); g_free(c); return -1; } int check_layers_all_saved() { if (layers_changed_tot() < 2) return (0); alert_box(_("Warning"), _("One or more of the image layers has not been saved. You must save each image individually before saving the layers text file in order to load this composite image in the future."), NULL); return (1); } void layer_press_save() { if (!layers_filename[0]) file_selector(FS_LAYER_SAVE); else if (!check_layers_all_saved()) save_layers(layers_filename); } void layer_press_remove_all() { int i = check_layers_for_changes(); if (i < 0) i = alert_box(_("Warning"), _("Do you really want to delete all of the layers?"), _("No"), _("Yes"), NULL); if (i != 2) return; layers_free_all(); layer_select_slot(0); layer_refresh_list(); update_main_with_new_layer(); } static void layer_tog_visible(GtkToggleButton *togglebutton, gpointer user_data) { int j = (int)user_data; if (!layers_initialized) return; layer_table[j].visible = gtk_toggle_button_get_active(togglebutton); layers_notify_changed(); repaint_layer(j); } static void layer_main_toggled(GtkToggleButton *togglebutton, gpointer user_data) { show_layers_main = gtk_toggle_button_get_active(togglebutton); update_stuff(UPD_RENDER); } static void layer_inputs_changed(GtkObject *thing, gpointer user_data) { layer_node *t = layer_table + layer_selected; const char *nname; int dx, dy; if (!layers_initialized) return; layers_notify_changed(); switch ((int)user_data) { case 0: // Name entry nname = gtk_entry_get_text(GTK_ENTRY(entry_layer_name)); strncpy0(t->name, nname, LAYER_NAMELEN); gtk_label_set_text(GTK_LABEL(layer_list_data[layer_selected].name), t->name); break; // No need to redraw case 1: // Position spin dx = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(layer_x)) - t->x; dy = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(layer_y)) - t->y; if (dx | dy) move_layer_relative(layer_selected, dx, dy); break; case 2: // Opacity slider t->opacity = mt_spinslide_get_value(layer_slider); repaint_layer(layer_selected); break; case 3: // Transparency spin mem_set_trans(gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(layer_spin))); break; } } void layer_choose(int l) // Select a new layer from the list { if ((l > layers_total) || (l < 0) || (l == layer_selected)) return; // Copy image info to layer table before we change layer_copy_from_main(layer_selected); layer_copy_to_main(layer_selected = l); update_main_with_new_layer(); layer_select_slot(l); } static void layer_select(GtkList *list, GtkWidget *widget, gpointer user_data) { layer_node *t; int j; if (!layers_initialized) return; j = (int)gtk_object_get_user_data(GTK_OBJECT(widget)); if (j > layers_total) return; layers_initialized = FALSE; if (j != layer_selected) /* Move data before doing anything else */ { layer_copy_from_main(layer_selected); layer_copy_to_main(layer_selected = j); update_main_with_new_layer(); } t = layer_table + j; gtk_entry_set_text(GTK_ENTRY(entry_layer_name), t->name ); gtk_widget_set_sensitive(layer_tools[LTB_RAISE], j < layers_total); gtk_widget_set_sensitive(layer_tools[LTB_LOWER], j); gtk_widget_set_sensitive(layer_tools[LTB_DEL], j); gtk_widget_set_sensitive(layer_tools[LTB_CENTER], j); gtk_widget_set_sensitive(layer_spin, j); gtk_widget_set_sensitive(layer_slider, j); gtk_widget_set_sensitive(layer_x, j); gtk_widget_set_sensitive(layer_y, j); mt_spinslide_set_value(layer_slider, j ? t->opacity : 100); layer_show_position(); layer_show_trans(); // !!! May cause list to be stuck in drag mode (release handled before press?) // while (gtk_events_pending()) gtk_main_iteration(); layers_initialized = TRUE; } gboolean delete_layers_window() { // No deletion if no window, or inside a sensitive action if (!layers_window || !layers_initialized) return (TRUE); // Stop user prematurely exiting while drag 'n' drop loading if (!GTK_WIDGET_SENSITIVE(layers_box)) return (TRUE); layers_initialized = FALSE; win_store_pos(layers_window, "layers"); gtk_widget_hide(layers_window); // Butcher it when out of sight :-) dock_undock(DOCK_LAYERS, TRUE); gtk_widget_destroy(layers_window); layers_window = NULL; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_LAYER]), FALSE); // Ensure it's unchecked layers_initialized = !!layers_box; // It may be docked now return (FALSE); } void pressed_paste_layer() { layer_image *lim; unsigned char *dest; int i, j, k, chan = mem_channel, cmask = CMASK_IMAGE; if (layers_total >= MAX_LAYERS) { alert_box(_("Error"), _("You cannot add any more layers."), NULL); return; } /* No way to put RGB clipboard into utility channel */ if (mem_clip_bpp == 3) chan = CHN_IMAGE; if ((mem_clip_alpha || mem_clip_mask) && !channel_dis[CHN_ALPHA]) cmask = CMASK_RGBA; cmask |= CMASK_FOR(chan); if (!layer_add(mem_clip_w, mem_clip_h, mem_clip_bpp, mem_cols, mem_pal, cmask)) return; // Failed layer_table[layers_total].x = mem_clip_x; layer_table[layers_total].y = mem_clip_y; lim = layer_table[layers_total].image; lim->state_ = mem_state; lim->state_.channel = chan; j = mem_clip_w * mem_clip_h; memcpy(lim->image_.img[chan], mem_clipboard, j * mem_clip_bpp); /* Image channel with alpha */ dest = lim->image_.img[CHN_ALPHA]; if (dest && (chan == CHN_IMAGE)) { /* Fill alpha channel */ if (mem_clip_alpha) memcpy(dest, mem_clip_alpha, j); else memset(dest, 255, j); } /* Image channel with mask */ if (mem_clip_mask && (chan == CHN_IMAGE)) { /* Mask image - fill unselected part with color A */ dest = lim->image_.img[CHN_IMAGE]; k = mem_clip_bpp == 1 ? mem_col_A : mem_col_A24.red; for (i = 0; i < j; i++ , dest += mem_clip_bpp) { if (mem_clip_mask[i]) continue; dest[0] = k; if (mem_clip_bpp == 1) continue; dest[1] = mem_col_A24.green; dest[2] = mem_col_A24.blue; } } /* Utility channel with mask */ dest = lim->image_.img[CHN_ALPHA]; if (chan != CHN_IMAGE) dest = lim->image_.img[chan]; if (dest && mem_clip_mask) { /* Mask the channel */ for (i = 0; i < j; i++) { k = dest[i] * mem_clip_mask[i]; dest[i] = (k + (k >> 8) + 1) >> 8; } } set_new_filename(layers_total, NULL); layer_show_new(); // pressed_layers(); view_show(); } void move_layer_relative(int l, int change_x, int change_y) // Move a layer & update window labels { image_info *image = l == layer_selected ? &mem_image : &layer_table[l].image->image_; int lx = layer_table[l].x, ly = layer_table[l].y, lw, lh; layer_table[l].x += change_x; layer_table[l].y += change_y; if (change_x < 0) lx += change_x; if (change_y < 0) ly += change_y; lw = image->width + abs(change_x); lh = image->height + abs(change_y); if (layer_selected) { lx -= layer_table[layer_selected].x; ly -= layer_table[layer_selected].y; } layers_notify_changed(); if (l == layer_selected) { layer_show_position(); // All layers get moved while the current one stays still if (show_layers_main) update_stuff(UPD_RENDER); } else if (show_layers_main) main_update_area(lx, ly, lw, lh); vw_update_area(lx, ly, lw, lh); } #undef _ #define _(X) X static toolbar_item layer_bar[] = { { _("New Layer"), -1, LTB_NEW, 0, XPM_ICON(new), ACT_LR_ADD, LR_NEW }, { _("Raise"), -1, LTB_RAISE, 0, XPM_ICON(up), ACT_LR_SHIFT, 1 }, { _("Lower"), -1, LTB_LOWER, 0, XPM_ICON(down), ACT_LR_SHIFT, -1 }, { _("Duplicate Layer"), -1, LTB_DUP, 0, XPM_ICON(copy), ACT_LR_ADD, LR_DUP }, { _("Centralise Layer"), -1, LTB_CENTER, 0, XPM_ICON(centre), ACT_LR_CENTER, 0 }, { _("Delete Layer"), -1, LTB_DEL, 0, XPM_ICON(cut), ACT_LR_DEL, 0 }, { _("Close Layers Window"), -1, LTB_CLOSE, 0, XPM_ICON(close), DLG_LAYERS, 1 }, { NULL }}; #undef _ #define _(X) __(X) /* Create toolbar for layers window */ static GtkWidget *layer_toolbar(GtkWidget **wlist) { GtkWidget *toolbar; #if GTK_MAJOR_VERSION == 1 toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); #endif #if GTK_MAJOR_VERSION == 2 toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); #endif fill_toolbar(GTK_TOOLBAR(toolbar), layer_bar, wlist, NULL, NULL); gtk_widget_show(toolbar); return toolbar; } void create_layers_box() { GtkWidget *vbox, *hbox, *table, *label, *tog, *scrolledwindow, *item; char txt[32]; int i; layers_initialized = FALSE; layers_box = vbox = gtk_vbox_new(FALSE, 0); gtk_widget_show(vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); scrolledwindow = xpack(vbox, gtk_scrolled_window_new(NULL, NULL)); gtk_widget_show (scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); layer_list = gtk_list_new (); gtk_signal_connect( GTK_OBJECT(layer_list), "select_child", GTK_SIGNAL_FUNC(layer_select), NULL ); gtk_widget_show (layer_list); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), layer_list); gtk_container_set_focus_vadjustment(GTK_CONTAINER(layer_list), gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolledwindow))); for (i = MAX_LAYERS; i >= 0; i--) { hbox = gtk_hbox_new(FALSE, 3); layer_list_data[i].item = item = gtk_list_item_new(); gtk_object_set_user_data(GTK_OBJECT(item), (gpointer)i); gtk_container_add(GTK_CONTAINER(layer_list), item); gtk_container_add(GTK_CONTAINER(item), hbox); sprintf(txt, "%i", i); label = pack(hbox, gtk_label_new(txt)); gtk_widget_set_usize (label, 40, -2); gtk_misc_set_alignment( GTK_MISC(label), 0.5, 0.5 ); label = xpack(hbox, gtk_label_new("")); gtk_misc_set_alignment( GTK_MISC(label), 0, 0.5 ); layer_list_data[i].name = label; tog = pack(hbox, gtk_check_button_new_with_label("")); layer_list_data[i].toggle = tog; gtk_widget_show_all(item); if (i == 0) gtk_widget_set_sensitive(tog, FALSE); else gtk_signal_connect(GTK_OBJECT(tog), "toggled", GTK_SIGNAL_FUNC(layer_tog_visible), (gpointer)i); } for (i = 0; i <= layers_total; i++) { gtk_label_set_text(GTK_LABEL(layer_list_data[i].name), layer_table[i].name); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(layer_list_data[i].toggle), layer_table[i].visible); } for (; i <= MAX_LAYERS; i++) { gtk_widget_hide(layer_list_data[i].item); gtk_widget_set_sensitive(layer_list_data[i].item, FALSE); layer_table[i].image = NULL; // Needed for checks later } gtk_list_set_selection_mode(GTK_LIST(layer_list), GTK_SELECTION_BROWSE); pack(vbox, layer_toolbar(layer_tools)); if (layers_total >= MAX_LAYERS) // Hide new/duplicate if we have max layers { gtk_widget_set_sensitive(layer_tools[LTB_NEW], FALSE); gtk_widget_set_sensitive(layer_tools[LTB_DUP], FALSE); } table = add_a_table( 4, 3, 5, vbox ); gtk_table_set_row_spacings (GTK_TABLE (table), 5); gtk_table_set_col_spacings (GTK_TABLE (table), 5); add_to_table( _("Layer Name"), table, 0, 0, 0 ); add_to_table( _("Position"), table, 1, 0, 0 ); add_to_table( _("Opacity"), table, 2, 0, 0 ); label = gtk_label_new(_("Transparent Colour")); gtk_widget_show(label); to_table_l(label, table, 3, 0, 2, 0); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); entry_layer_name = gtk_entry_new_with_max_length(LAYER_NAMELEN - 1); gtk_widget_set_usize(entry_layer_name, 100, -2); gtk_widget_show(entry_layer_name); to_table_l(entry_layer_name, table, 0, 1, 2, 0); gtk_signal_connect(GTK_OBJECT(entry_layer_name), "changed", GTK_SIGNAL_FUNC(layer_inputs_changed), (gpointer)0); layer_x = spin_to_table(table, 1, 1, 0, 0, -MAX_WIDTH, MAX_WIDTH); layer_y = spin_to_table(table, 1, 2, 0, 0, -MAX_HEIGHT, MAX_HEIGHT); spin_connect(layer_x, GTK_SIGNAL_FUNC(layer_inputs_changed), (gpointer)1); spin_connect(layer_y, GTK_SIGNAL_FUNC(layer_inputs_changed), (gpointer)1); layer_slider = mt_spinslide_new(-2, -2); mt_spinslide_set_range(layer_slider, 0, 100); gtk_table_attach(GTK_TABLE(table), layer_slider, 1, 3, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); mt_spinslide_connect(layer_slider, GTK_SIGNAL_FUNC(layer_inputs_changed), (gpointer)2); mt_spinslide_set_value(layer_slider, layer_table[layer_selected].opacity); layer_spin = spin_to_table(table, 3, 2, 0, 0, -1, 255); spin_connect(layer_spin, GTK_SIGNAL_FUNC(layer_inputs_changed), (gpointer)3); pack(vbox, sig_toggle(_("Show all layers in main window"), show_layers_main, NULL, GTK_SIGNAL_FUNC(layer_main_toggled))); /* !!! Select *before* show - otherwise it's nontrivial (try & see) */ layers_initialized = TRUE; layer_select_slot(layer_selected); /* Make widget to report its demise */ gtk_signal_connect(GTK_OBJECT(layers_box), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &layers_box); /* Keep the invariant */ gtk_widget_ref(layers_box); gtk_object_sink(GTK_OBJECT(layers_box)); } void pressed_layers() { GtkAccelGroup *ag; if (layers_window) return; // Already have it open layers_window = add_a_window(GTK_WINDOW_TOPLEVEL, "", GTK_WIN_POS_NONE, FALSE); win_restore_pos(layers_window, "layers", 0, 0, 400, 400); layers_update_titlebar(); dock_undock(DOCK_LAYERS, FALSE); gtk_container_add(GTK_CONTAINER(layers_window), layers_box); gtk_widget_unref(layers_box); ag = gtk_accel_group_new(); gtk_widget_add_accelerator(layer_tools[LTB_CLOSE], "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); gtk_signal_connect_object(GTK_OBJECT(layers_window), "delete_event", GTK_SIGNAL_FUNC(delete_layers_window), NULL); gtk_window_set_transient_for(GTK_WINDOW(layers_window), GTK_WINDOW(main_window)); gtk_widget_show(layers_window); gtk_window_add_accel_group(GTK_WINDOW(layers_window), ag); } mtpaint-3.40/src/csel.c0000644000175000000620000003777211626535756014354 0ustar muammarstaff/* csel.c Copyright (C) 2006-2011 Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "otherwindow.h" #include "channels.h" #include "csel.h" #include "thread.h" /* Use sRGB gamma if defined, ITU-R 709 gamma otherwise */ /* From my point of view, ITU-R 709 is a better model of a real CRT */ // #define SRGB /* Use distorted L*X*N* model; the distortion possibly makes it better for * * smaller colour differences, but at extrema, error becomes unacceptable */ // #define DISTORT_LXN #define CIENUM 8192 #define EXPNUM 1024 #define EXPLOW (-0.1875) csel_info *csel_data; int csel_preview = 0x00FF00, csel_preview_a = 128, csel_overlay; double gamma256[256], gamma64[64]; double midgamma256[256]; #ifndef NATIVE_DOUBLES float Fgamma256[256]; #endif static float CIE[CIENUM + 2]; static float EXP[EXPNUM]; /* This nightmarish code does conversion from CIE XYZ into my own perceptually * uniform colour space L*X*N*. To produce it, I combined McAdam's colour space * and CIE lightness function, like it was done for L*u*v* space - the result * is a bitch to evaluate and impossible to reverse, but works much better * than both L*a*b and L*u*v for colour comparison - WJ */ static double wXN[2]; static void xyz2XN(double *XN, double x, double y, double z) { double xyz = x + y + z; double k, xk, yk, sxk; /* Black is a darker white ;) */ if (xyz == 0.0) { XN[0] = wXN[0]; XN[1] = wXN[1]; return; } k = 10.0 / (x * 2.4 + y * 34.0 + xyz); xk = x * k; yk = y * k; sxk = sqrt(xk); XN[0] = (xk * xk * (3751.0 - xk * xk * 10.0) - yk * yk * (520.0 - yk * 13295.0) + xk * yk * (32327.0 - xk * 25491.0 - yk * 41672.0 + xk * xk * 10.0) - sxk * 5227.0 + sqrt(sxk) * 2952.0) / 900.0; #ifndef DISTORT_LXN /* Do transform properly */ k = 10.0 / (y * 4.2 - x + xyz); #else /* This equation is incorrect, but I felt that in reality it's better - * it compresses the colour plane so that green and blue are farther * from red than from each other, which conforms to human perception. * Yet for pure colours, distortion tends to become too high. - WJ */ k = 10.0 / (y * 5.2 - x + xyz); #endif xk = x * k; yk = y * k; XN[1] = (yk * (404.0 - yk * (185.0 - yk * 52.0)) + xk * (69.0 - yk * (yk * (69.0 - yk * 30.0) + xk * 3.0))) / 900.0; } static inline double CIElum(double x) { int n; x *= CIENUM; n = x; return (CIE[n] + (CIE[n + 1] - CIE[n]) * (x - n)); } static inline double exp10(double x) { int n; x = (x - EXPLOW) * (EXPNUM + EXPNUM); n = x; return (EXP[n] + (EXP[n + 1] - EXP[n]) * (x - n)); } /* MinGW has cube root function, glibc hasn't */ #ifndef WIN32 #define cbrt(X) pow((X), 1.0 / 3.0) #endif #define XX1 (16.0 / 116.0) #define XX2 ((116.0 * 116.0) / (24.0 * 24.0 * 3.0)) #define XX3 ((24.0 * 24.0 * 24.0) / (116.0 * 116.0 * 116.0)) static inline double CIEpow(double x) { return ((x > XX3) ? cbrt(x) : x * XX2 + XX1); } static double rxyz[3], gxyz[3], bxyz[3], wy; void rgb2LXN(double *tmp, double r, double g, double b) { double x = r * rxyz[0] + g * gxyz[0] + b * bxyz[0]; double y = r * rxyz[1] + g * gxyz[1] + b * bxyz[1]; double z = r * rxyz[2] + g * gxyz[2] + b * bxyz[2]; double L = CIElum(y); // double L = CIEpow(y) * 116.0 - 16.0; double XN[2]; xyz2XN(XN, x, y, z); /* Luminance's range must be near to chrominance's _diameter_ */ #ifndef DISTORT_LXN /* As recommended in literature (but sqrt(3) may be better) */ tmp[0] = L * 2.0; #else /* As felt good in practice */ tmp[0] = L * M_SQRT2; #endif tmp[1] = (XN[0] - wXN[0]) * L * 13.0; tmp[2] = (XN[1] - wXN[1]) * L * 13.0; } /* Get subjective brightness measure, by using Ware-Cowan formula */ double rgb2B(double r, double g, double b) { double x = r * rxyz[0] + g * gxyz[0] + b * bxyz[0]; double y = r * rxyz[1] + g * gxyz[1] + b * bxyz[1]; double z = r * rxyz[2] + g * gxyz[2] + b * bxyz[2]; z += x + y; if (z <= 0.0) return (y); z = 1.0 / z; x *= z; z *= y; /* It's not Z now, but y */ z = 0.256 + (-0.184 + (-2.527 + 4.656 * x * x + 4.657 * z * z * z) * x) * z; y *= exp10(z) * wy; return (y > 1.0 ? 1.0 : y); } #if 0 /* Disable while not in use */ void rgb2Lab(double *tmp, double r, double g, double b) { double x = r * rxyz[0] + g * gxyz[0] + b * bxyz[0]; double y = r * rxyz[1] + g * gxyz[1] + b * bxyz[1]; double z = r * rxyz[2] + g * gxyz[2] + b * bxyz[2]; double L = CIElum(y); tmp[0] = L; tmp[1] = (CIElum(x * (WHITE_Y / WHITE_X)) - L) * (500.0 / 116.0); tmp[2] = (L - CIElum(z * (WHITE_Y / (1.0 - WHITE_X - WHITE_Y))) * (200.0 / 116.0); } #endif /* ITU-R 709 */ #define RED_X 0.640 #define RED_Y 0.330 #define GREEN_X 0.300 #define GREEN_Y 0.600 #define BLUE_X 0.150 #define BLUE_Y 0.060 #if 1 /* 6500K whitepoint (D65) */ #define WHITE_X 0.3127 #define WHITE_Y 0.3290 /* Some, like lcms, use y=0.3291, but that isn't how ITU-R BT.709-5 defines D65, * but instead how SMPTE 240M does - WJ */ #else /* 9300K whitepoint */ #define WHITE_X 0.2848 #define WHITE_Y 0.2932 #endif static inline double det(double x1, double y1, double x2, double y2, double x3, double y3) { return ((y1 - y2) * x3 + (y2 - y3) * x1 + (y3 - y1) * x2); } static void make_rgb_xyz(void) { double rgbdet = det(RED_X, RED_Y, GREEN_X, GREEN_Y, BLUE_X, BLUE_Y) * WHITE_Y; double wr = det(WHITE_X, WHITE_Y, GREEN_X, GREEN_Y, BLUE_X, BLUE_Y) / rgbdet; double wg = det(RED_X, RED_Y, WHITE_X, WHITE_Y, BLUE_X, BLUE_Y) / rgbdet; double wb = det(RED_X, RED_Y, GREEN_X, GREEN_Y, WHITE_X, WHITE_Y) / rgbdet; rxyz[0] = RED_X * wr; rxyz[1] = RED_Y * wr; rxyz[2] = (1.0 - RED_X - RED_Y) * wr; gxyz[0] = GREEN_X * wg; gxyz[1] = GREEN_Y * wg; gxyz[2] = (1.0 - GREEN_X - GREEN_Y) * wg; bxyz[0] = BLUE_X * wb; bxyz[1] = BLUE_Y * wb; bxyz[2] = (1.0 - BLUE_X - BLUE_Y) * wb; xyz2XN(wXN, WHITE_X / WHITE_Y, 1.0, (1 - WHITE_X - WHITE_Y) / WHITE_Y); /* Normalize brightness of white */ wy = 1.0 / exp10(0.256 + (-0.184 + (-2.527 + 4.656 * WHITE_X * WHITE_X + 4.657 * WHITE_Y * WHITE_Y * WHITE_Y) * WHITE_X) * WHITE_Y); } #ifdef SRGB #define GAMMA_POW 2.4 #define GAMMA_OFS 0.055 #if 1 /* Standard */ #define GAMMA_SPLIT 0.04045 #define GAMMA_DIV 12.92 #else /* C1 continuous */ #define GAMMA_SPLIT 0.03928 #define GAMMA_DIV 12.92321 #endif #define KGAMMA 800 #define KGAMMA64K 12900 #else /* ITU-R 709 */ #define GAMMA_POW (1.0 / 0.45) #define GAMMA_OFS 0.099 #define GAMMA_SPLIT 0.081 #define GAMMA_DIV 4.5 #define KGAMMA 300 #define KGAMMA64K 4550 #endif static void make_gamma(double *Gamma, int cnt) { int i, k; double mult = 1.0 / (double)(cnt - 1); k = (int)(GAMMA_SPLIT * (cnt - 1)) + 1; for (i = k; i < cnt; i++) { Gamma[i] = pow(((double)i * mult + GAMMA_OFS) / (1.0 + GAMMA_OFS), GAMMA_POW); } mult /= GAMMA_DIV; for (i = 0; i < k; i++) { Gamma[i] = (double)i * mult; } } int kgamma256 = KGAMMA * 4; unsigned char ungamma256[KGAMMA * 4 + 1]; static void make_ungamma(double *Gamma, double *Midgamma, unsigned char *Ungamma, int kgamma, int cnt) { int i, j, k = 0; Midgamma[0] = 0.0; for (i = 1; i < cnt; i++) { Midgamma[i] = (Gamma[i - 1] + Gamma[i]) / 2.0; j = Midgamma[i] * kgamma; for (; k < j; k++) Ungamma[k] = i - 1; } for (; k <= kgamma; k++) Ungamma[k] = cnt - 1; } /* 16-bit gamma correction */ static double gamma64K[255 * 4 + 2]; static double gammaslope64K[255 * 4 + 1]; static unsigned short ungamma64K[KGAMMA64K + 1]; #if 0 /* Disable while not in use */ double gamma65536(int idx) { int n; idx *= 4; n = idx / 257; return ((idx % 257) * (1.0 / 257.0) * (gamma64K[n + 1] - gamma64K[n]) + gamma64K[n]); } int ungamma65536(double v) { int n = ungamma64K[(int)(v * KGAMMA64K)]; n -= v < gamma64K[n]; return ((int)((n + (v - gamma64K[n]) * gammaslope64K[n]) * 64.25 + 0.5)); } #endif double gamma65281(int idx) { int n; n = idx >> 6; return ((idx & 0x3F) * (1.0 / 64.0) * (gamma64K[n + 1] - gamma64K[n]) + gamma64K[n]); } int ungamma65281(double v) { int n = ungamma64K[(int)(v * KGAMMA64K)]; n -= v < gamma64K[n]; return ((int)((n + (v - gamma64K[n]) * gammaslope64K[n]) * 64.0 + 0.5)); } static void make_ungamma64K() { int i, j, k = 0; for (i = 1; i < 255 * 4 + 1; i++) { gammaslope64K[i - 1] = 1.0 / (gamma64K[i] - gamma64K[i - 1]); j = gamma64K[i] * KGAMMA64K; for (; k < j; k++) ungamma64K[k] = i - 1; } gammaslope64K[255 * 4] = 0.0; for (; k <= KGAMMA64K; k++) ungamma64K[k] = 255 * 4; } static void make_CIE(void) { int i; for (i = 0; i < CIENUM; i++) { CIE[i] = CIEpow(i * (1.0 / CIENUM)) * 116.0 - 16.0; } CIE[CIENUM] = CIE[CIENUM + 1] = 100.0; } static void make_EXP(void) { int i; for (i = 0; i < EXPNUM; i++) { EXP[i] = exp(M_LN10 * (i * (0.5 / EXPNUM) + EXPLOW)); } } void init_cols(void) { make_gamma(gamma64K, 255 * 4 + 1); gamma64K[255 * 4 + 1] = 1.0; make_gamma(gamma256, 256); make_gamma(gamma64, 64); make_ungamma64K(); make_ungamma(gamma256, midgamma256, ungamma256, kgamma256, 256); make_CIE(); make_EXP(); make_rgb_xyz(); #ifndef NATIVE_DOUBLES /* Fill reduced-precision gamma table */ { int i; for (i = 0; i < 256; i++) Fgamma256[i] = gamma256[i]; } #endif } /* Get L*X*N* triple */ void get_lxn(double *lxn, int col) { rgb2LXN(lxn, gamma256[INT_2_R(col)], gamma256[INT_2_G(col)], gamma256[INT_2_B(col)]); } /* Get hue vector (0..1529) */ static double get_vect(int col) { static int ixx[5] = {0, 1, 2, 0, 1}; int rgb[3] = {INT_2_R(col), INT_2_G(col), INT_2_B(col)}; int c1, c2, minc, midc, maxc; if (!((rgb[0] ^ rgb[1]) | (rgb[0] ^ rgb[2]))) return (0.0); c2 = rgb[2] < rgb[0] ? (rgb[1] < rgb[2] ? 2 : 0) : (rgb[0] < rgb[1] ? 1 : 2); minc = rgb[ixx[c2 + 2]]; midc = rgb[ixx[c2 + 1]]; c1 = midc > rgb[c2]; midc -= c1 ? rgb[c2] : minc; maxc = rgb[ixx[c2 + c1]] - minc; return ((c2 + c2 + c1) * 255 + midc * 255 / (double)maxc); } /* Answer which pixels are masked through selectivity */ int csel_scan(int start, int step, int cnt, unsigned char *mask, unsigned char *img, csel_info *info) { unsigned char res = 0; double d, dist = 0.0, lxn[3]; int i, j, k, l, jj, st3 = step * 3; DEF_MUTEX(csel_lock); // To prevent concurrent writes to *info LOCK_MUTEX(csel_lock); cnt = start + step * (cnt - 1) + 1; if (!mask) { mask = &res - start; cnt = start + 1; } if (mem_img_bpp == 1) /* Indexed image */ { for (i = start; i < cnt; i += step) { j = img[i]; k = PNG_2_INT(mem_pal[j]); if (info->pcache[j] != k) { info->pcache[j] = k; if (info->mode == 0) /* Sphere mode */ { get_lxn(lxn, k); dist = (lxn[0] - info->clxn[0]) * (lxn[0] - info->clxn[0]) + (lxn[1] - info->clxn[1]) * (lxn[1] - info->clxn[1]) + (lxn[2] - info->clxn[2]) * (lxn[2] - info->clxn[2]); } else if (info->mode == 1) /* Angle mode */ { dist = fabs(get_vect(k) - info->cvec); if (dist > 765.0) dist = 1530.0 - dist; } else if (info->mode == 2) /* Cube mode */ { l = abs(INT_2_R(info->center) - INT_2_R(k)); jj = abs(INT_2_G(info->center) - INT_2_G(k)); if (l < jj) l = jj; jj = abs(INT_2_B(info->center) - INT_2_B(k)); dist = l > jj ? l : jj; } if (dist <= info->range2) info->pmap[j >> 5] |= 1 << (j & 31); } if (((info->pmap[j >> 5] >> (j & 31)) ^ info->invert) & 1) mask[i] |= 255; } } else if (info->mode == 0) /* RGB image, sphere mode */ { img += start * 3; for (i = start; i < cnt; i += step , img += st3) { k = MEM_2_INT(img, 0) - info->cbase; if (k & 0xFFC0C0C0) /* Coarse map */ { j = ((img[0] & 0xFC) << 6) + (img[1] & 0xFC) + (img[2] >> 6); k = (img[2] >> 1) & 0x1E; } else /* Fine map */ { j = ((k & 0x3F0000) >> 8) + ((k & 0x3F00) >> 6) + ((k & 0x3F) >> 4) + CMAPSIZE; k = (k + k) & 0x1E; } l = (info->colormap[j] >> k) & 3; if (!l) /* Not mapped */ { if (j < CMAPSIZE) rgb2LXN(lxn, gamma64[img[0] >> 2], gamma64[img[1] >> 2], gamma64[img[2] >> 2]); else rgb2LXN(lxn, gamma256[img[0]], gamma256[img[1]], gamma256[img[2]]); dist = (lxn[0] - info->clxn[0]) * (lxn[0] - info->clxn[0]) + (lxn[1] - info->clxn[1]) * (lxn[1] - info->clxn[1]) + (lxn[2] - info->clxn[2]) * (lxn[2] - info->clxn[2]); l = dist <= info->range2 ? 3 : 2; info->colormap[j] |= l << k; } if ((l ^ info->invert) & 1) mask[i] |= 255; } } else if (info->mode == 1) /* RGB image, angle mode */ { static int ixx[5] = {0, 1, 2, 0, 1}; img += start * 3; for (i = start; i < cnt; i += step , img += st3) { k = img[2] < img[0] ? (img[1] < img[2] ? 2 : 0) : (img[0] < img[1] ? 1 : 2); j = (img[ixx[k]] << 8) + img[ixx[k + 1]] - img[ixx[k + 2]] * 257; l = (info->colormap[j >> 3] >> ((j & 7) << 2)) & 0xF; if (!l) /* Not mapped */ { /* Map 3 sectors at once */ d = get_vect(j << 8) - info->cvec; for (jj = 1; jj < 8; jj += jj) { dist = fabs(d); d += 510.0; if (dist > 765.0) dist = 1530.0 - dist; if (dist <= info->range2) l += jj; } info->colormap[j >> 3] |= (l + 8) << ((j & 7) << 2); } if (((l >> k) ^ info->invert) & 1) mask[i] |= 255; } } else if (info->mode == 2) /* RGB image, cube mode */ { j = INT_2_R(info->center); k = INT_2_G(info->center); l = INT_2_B(info->center); jj = info->invert & 1; img += start * 3; for (i = start; i < cnt; i += step , img += st3) { if (((abs(j - img[0]) <= info->irange) && (abs(k - img[1]) <= info->irange) && (abs(l - img[2]) <= info->irange)) ^ jj) mask[i] |= 255; } } UNLOCK_MUTEX(csel_lock); return (res); } /* Evaluate range */ double csel_eval(int mode, int center, int limit) { double cw[3], lw[3], cwv, lwv, r2; int i, j, k, ir; switch (mode) { case 0: /* L*X*N* spherical */ get_lxn(cw, center); get_lxn(lw, limit); r2 = (lw[0] - cw[0]) * (lw[0] - cw[0]) + (lw[1] - cw[1]) * (lw[1] - cw[1]) + (lw[2] - cw[2]) * (lw[2] - cw[2]); return (sqrt(r2)); case 1: /* RGB angular */ cwv = get_vect(center); lwv = get_vect(limit); r2 = fabs(lwv - cwv); if (r2 > 765.0) r2 = 1530.0 - r2; return (r2); case 2: /* RGB cubic */ i = abs(INT_2_R(center) - INT_2_R(limit)); j = abs(INT_2_G(center) - INT_2_G(limit)); k = abs(INT_2_B(center) - INT_2_B(limit)); ir = i > j ? i : j; if (ir < k) ir = k; return ((double)ir); } return (0.0); } /* Clear bitmaps and setup extra vars */ void csel_reset(csel_info *info) { int i, j, k, l; memset(info->colormap, 0, sizeof(info->colormap)); memset(info->pmap, 0, sizeof(info->pmap)); memset(info->pcache, 255, sizeof(info->pcache)); switch (info->mode) { case 0: /* L*X*N* sphere */ get_lxn(info->clxn, info->center); info->range2 = info->range * info->range; /* Find fine-precision base */ l = info->center & 0xFCFCFC; i = INT_2_R(l); j = INT_2_G(l); k = INT_2_B(l); i = i > 32 ? i - 32 : 0; j = j > 32 ? j - 32 : 0; k = k > 32 ? k - 32 : 0; info->cbase = RGB_2_INT(i, j, k); break; case 1: /* RGB angular */ info->cvec = get_vect(info->center); info->range2 = info->range; break; case 2: /* RGB cubic */ info->irange = info->range2 = (int)(info->range); break; } if (info->center_a < info->limit_a) { info->amin = info->center_a; info->amax = info->limit_a; } else { info->amax = info->center_a; info->amin = info->limit_a; } } /* Set center at A, limit at B */ void csel_init() { csel_info *info; info = ALIGN(calloc(1, sizeof(csel_info) + sizeof(double))); if (!info) { memory_errors(1); return; } info->center = PNG_2_INT(mem_col_A24); info->limit = PNG_2_INT(mem_col_B24); info->center_a = channel_col_A[CHN_ALPHA]; info->limit_a = channel_col_B[CHN_ALPHA]; info->range = csel_eval(0, info->center, info->limit); csel_reset(info); csel_data = info; } mtpaint-3.40/src/prefs.c0000644000175000000620000006157511656044226014531 0ustar muammarstaff/* prefs.c Copyright (C) 2005-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "canvas.h" #include "inifile.h" #include "viewer.h" #include "mainwindow.h" #include "thread.h" #include "prefs.h" /// PREFERENCES WINDOW GtkWidget *prefs_window, *prefs_status[STATUS_ITEMS]; static GtkWidget *spinbutton_maxmem, *spinbutton_maxundo, *spinbutton_commundo; #ifdef U_THREADS static GtkWidget *spinbutton_threads; #endif static GtkWidget *spinbutton_greys, *spinbutton_nudge, *spinbutton_pan; static GtkWidget *spinbutton_trans, *spinbutton_hotx, *spinbutton_hoty, *spinbutton_jpeg, *spinbutton_jp2, *spinbutton_png, *spinbutton_recent, *spinbutton_silence; static GtkWidget *checkbutton_tgaRLE, *checkbutton_tga565, *checkbutton_tgadef, *checkbutton_undo; #ifdef U_LCMS static GtkWidget *checkbutton_icc; #endif static GtkWidget *checkbutton_paste, *checkbutton_cursor, *checkbutton_exit, *checkbutton_quit; static GtkWidget *checkbutton_zoom[4], // zoom 100%, wheel, optimize cheq, disable trans *checkbutton_commit, *checkbutton_center, *checkbutton_gamma; #if GTK_MAJOR_VERSION == 2 static GtkWidget *checkbutton_menuicons, *entry_theme; #endif static GtkWidget *clipboard_entry, *entry_handbook[2], *entry_def[2]; static GtkWidget *check_tablet[3], *hscale_tablet[3], *label_tablet_device, *label_tablet_pressure; static char *tablet_ini[] = { "tablet_value_size", "tablet_value_flow", "tablet_value_opacity" }, *tablet_ini2[] = { "tablet_use_size", "tablet_use_flow", "tablet_use_opacity" }; #if GTK_MAJOR_VERSION == 1 static GdkDeviceInfo *tablet_device; #endif #if GTK_MAJOR_VERSION == 2 static GdkDevice *tablet_device; #endif static GtkWidget *inputd; int tablet_working; // Has the device been initialized? int tablet_tool_use[3]; // Size, flow, opacity float tablet_tool_factor[3]; // Size, flow, opacity #ifdef U_NLS #define PREF_LANGS 21 char *pref_lang_ini_code[PREF_LANGS] = { "system", "zh_CN.utf8", "zh_TW.utf8", "cs_CZ", "nl_NL", "en_GB", "fr_FR", "gl_ES", "de_DE", "hu_HU", "it_IT", "ja_JP.utf8", "pl_PL", "pt_PT", "pt_BR", "ru_RU", "sk_SK", "es_ES", "sv_SE", "tl_PH", "tr_TR" }; int pref_lang; #endif static gboolean expose_tablet_preview(GtkWidget *widget, GdkEventExpose *event) { gdk_draw_rectangle(widget->window, widget->style->white_gc, TRUE, event->area.x, event->area.y, event->area.width, event->area.height); return (FALSE); } static void delete_inputd() { int i, j; char txt[32]; #if GTK_MAJOR_VERSION == 1 GdkDeviceInfo *dev = tablet_device; #else /* #if GTK_MAJOR_VERSION == 2 */ GdkDevice *dev = GTK_INPUT_DIALOG (inputd)->current_device; #endif if ( tablet_working ) // Store tablet settings in INI file for future session { inifile_set( "tablet_name", dev->name ); inifile_set_gint32( "tablet_mode", dev->mode ); for ( i=0; inum_axes; i++ ) { #if GTK_MAJOR_VERSION == 1 j = dev->axes[i]; #else /* #if GTK_MAJOR_VERSION == 2 */ j = dev->axes[i].use; #endif sprintf(txt, "tablet_axes_v%i", i); inifile_set_gint32( txt, j ); } } gtk_widget_destroy(inputd); inputd = NULL; } static void delete_prefs(GtkWidget *widget) { if (inputd) delete_inputd(); destroy_dialog(prefs_window); gtk_widget_set_sensitive(menu_widgets[MENU_PREFS], TRUE); clipboard_entry = NULL; } static void tablet_update_pressure( double pressure ) { char txt[64]; sprintf(txt, "%s = %.2f", _("Pressure"), pressure); gtk_label_set_text( GTK_LABEL(label_tablet_pressure), txt ); } static void tablet_update_device( char *device ) { char txt[64]; sprintf(txt, "%s = %s", _("Current Device"), device); gtk_label_set_text( GTK_LABEL(label_tablet_device), txt ); } #if GTK_MAJOR_VERSION == 1 static void tablet_gtk1_newdevice(devid) // Get new device info { GList *dlist = gdk_input_list_devices(); GdkDeviceInfo *device = NULL; tablet_device = NULL; while ( dlist != NULL ) { device = dlist->data; if ( device->deviceid == devid ) // Device found { tablet_device = device; break; } dlist = dlist->next; } } static void tablet_enable_device(GtkInputDialog *inputdialog, guint32 devid) { tablet_gtk1_newdevice(devid); if ( tablet_device != NULL ) { tablet_working = TRUE; tablet_update_device( tablet_device->name ); } else tablet_working = FALSE; } static void tablet_disable_device(GtkInputDialog *inputdialog, guint32 devid) { tablet_working = FALSE; tablet_update_device( "NONE" ); } #endif #if GTK_MAJOR_VERSION == 2 static void tablet_enable_device(GtkInputDialog *inputdialog, GdkDevice *deviceid, gpointer user_data) { tablet_working = TRUE; tablet_update_device( deviceid->name ); tablet_device = deviceid; } static void tablet_disable_device(GtkInputDialog *inputdialog, GdkDevice *deviceid, gpointer user_data) { tablet_working = FALSE; tablet_update_device( "NONE" ); } #endif static void conf_tablet(GtkWidget *widget) { GtkWidget *close; GtkAccelGroup* ag; if (inputd) return; // Stops multiple dialogs being opened inputd = gtk_input_dialog_new(); gtk_window_set_position(GTK_WINDOW(inputd), GTK_WIN_POS_CENTER); close = GTK_INPUT_DIALOG(inputd)->close_button; gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(delete_inputd), NULL); ag = gtk_accel_group_new(); gtk_widget_add_accelerator(close, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); delete_to_click(inputd, close); gtk_signal_connect(GTK_OBJECT(inputd), "enable-device", GTK_SIGNAL_FUNC(tablet_enable_device), NULL); gtk_signal_connect(GTK_OBJECT(inputd), "disable-device", GTK_SIGNAL_FUNC(tablet_disable_device), NULL); if (GTK_INPUT_DIALOG(inputd)->keys_list) gtk_widget_hide(GTK_INPUT_DIALOG(inputd)->keys_list); if (GTK_INPUT_DIALOG(inputd)->keys_listbox) gtk_widget_hide(GTK_INPUT_DIALOG(inputd)->keys_listbox); gtk_widget_hide(GTK_INPUT_DIALOG(inputd)->save_button); gtk_widget_show(inputd); gtk_window_add_accel_group(GTK_WINDOW(inputd), ag); } static void prefs_apply(GtkWidget *widget) { char path[PATHBUF]; int i, j, xpm_trans; for ( i=0; ibutton == 1) { #if GTK_MAJOR_VERSION == 1 pressure = event->pressure; #endif #if GTK_MAJOR_VERSION == 2 gdk_event_get_axis ((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure); #endif tablet_update_pressure( pressure ); } return TRUE; } static gboolean tablet_preview_motion(GtkWidget *widget, GdkEventMotion *event) { gdouble pressure = 0.0; GdkModifierType state; #if GTK_MAJOR_VERSION == 1 if (event->is_hint) { gdk_input_window_get_pointer (event->window, event->deviceid, NULL, NULL, &pressure, NULL, NULL, &state); } else { pressure = event->pressure; state = event->state; } #else /* #if GTK_MAJOR_VERSION == 2 */ if (event->is_hint) gdk_device_get_state (event->device, event->window, NULL, &state); else state = event->state; gdk_event_get_axis ((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure); #endif if (state & GDK_BUTTON1_MASK) tablet_update_pressure( pressure ); return TRUE; } /* Try to avoid scrolling - request full size of contents */ static void pref_scroll_size_req(GtkWidget *widget, GtkRequisition *requisition, gpointer user_data) { GtkWidget *child = GTK_BIN(widget)->child; if (child && GTK_WIDGET_VISIBLE(child)) { GtkRequisition wreq; int n, border = GTK_CONTAINER(widget)->border_width * 2; gtk_widget_get_child_requisition(child, &wreq); n = wreq.width + border; if (requisition->width < n) requisition->width = n; n = wreq.height + border; if (requisition->height < n) requisition->height = n; } } void pressed_preferences() { int i; #ifdef U_NLS char *pref_langs[PREF_LANGS] = { _("Default System Language"), _("Chinese (Simplified)"), _("Chinese (Taiwanese)"), _("Czech"), _("Dutch"), _("English (UK)"), _("French"), _("Galician"), _("German"), _("Hungarian"), _("Italian"), _("Japanese"), _("Polish"), _("Portuguese"), _("Portuguese (Brazilian)"), _("Russian"), _("Slovak"), _("Spanish"), _("Swedish"), _("Tagalog"), _("Turkish") }; #endif GtkWidget *vbox3, *hbox4, *table3, *table4, *drawingarea_tablet; GtkWidget *button1, *notebook1, *page, *vbox_2, *label, *scroll; char *tab_tex2[] = { _("Transparency index"), _("XBM X hotspot"), _("XBM Y hotspot"), _("JPEG Save Quality (100=High)"), _("JPEG2000 Compression (0=Lossless)"), _("PNG Compression (0=None)"), _("Recently Used Files"), _("Progress bar silence limit") }; char *stat_tex[] = { _("Canvas Geometry"), _("Cursor X,Y"), _("Pixel [I] {RGB}"), _("Selection Geometry"), _("Undo / Redo") }, *tablet_txt[] = { _("Size"), _("Flow"), _("Opacity") }; char txt[PATHTXT]; // Make sure the user can only open 1 prefs window gtk_widget_set_sensitive(menu_widgets[MENU_PREFS], FALSE); prefs_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Preferences"), GTK_WIN_POS_CENTER, FALSE ); // Let user and WM make window smaller - contents are scrollable gtk_window_set_policy(GTK_WINDOW(prefs_window), TRUE, TRUE, FALSE); vbox3 = add_vbox(prefs_window); /// SETUP SCROLLING scroll = xpack(vbox3, gtk_scrolled_window_new(NULL, NULL)); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_signal_connect(GTK_OBJECT(scroll), "size_request", GTK_SIGNAL_FUNC(pref_scroll_size_req), NULL); /// SETUP NOTEBOOK notebook1 = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook1), GTK_POS_LEFT); // gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook1), TRUE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll), notebook1); gtk_viewport_set_shadow_type(GTK_VIEWPORT(GTK_BIN(scroll)->child), GTK_SHADOW_NONE); gtk_widget_show_all(scroll); vport_noshadow_fix(GTK_BIN(scroll)->child); /// ---- TAB1 - GENERAL page = add_new_page(notebook1, _("General")); #ifdef U_THREADS table3 = add_a_table(4, 2, 10, page); add_to_table(_("Max threads (0 to autodetect)"), table3, 3, 0, 5); spinbutton_threads = spin_to_table(table3, 3, 1, 5, maxthreads, 0, 256); #else table3 = add_a_table(3, 2, 10, page); #endif /// TABLE TEXT add_to_table(_("Max memory used for undo (MB)"), table3, 0, 0, 5); add_to_table(_("Max undo levels"), table3, 1, 0, 5); add_to_table(_("Communal layer undo space (%)"), table3, 2, 0, 5); /// TABLE SPINBUTTONS spinbutton_maxmem = spin_to_table(table3, 0, 1, 5, mem_undo_limit, 1, 2048); spinbutton_maxundo = spin_to_table(table3, 1, 1, 5, mem_undo_depth & ~1, MIN_UNDO & ~1, MAX_UNDO & ~1); spinbutton_commundo = spin_to_table(table3, 2, 1, 5, mem_undo_common, 0, 100); checkbutton_gamma = add_a_toggle(_("Use gamma correction by default"), page, use_gamma); checkbutton_zoom[2] = add_a_toggle( _("Optimize alpha chequers"), page, chequers_optimize ); checkbutton_zoom[3] = add_a_toggle( _("Disable view window transparencies"), page, opaque_view ); /// LANGUAGE SWITCHBOX #ifdef U_NLS vbox_2 = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox_2), 5); label = pack(vbox_2, gtk_label_new( _("Select preferred language translation\n\n" "You will need to restart mtPaint\nfor this to take full effect"))); for (i = 0; i < PREF_LANGS; i++) { if (!strcmp(pref_lang_ini_code[i], inifile_get("languageSETTING", "system"))) break; } pack(vbox_2, wj_option_menu(pref_langs, PREF_LANGS, i, &pref_lang, NULL)); gtk_widget_show_all(vbox_2); add_with_frame(page, _("Language"), vbox_2); #endif /// ---- TAB2 - INTERFACE page = add_new_page(notebook1, _("Interface")); table3 = add_a_table(3, 2, 10, page); /// TABLE TEXT add_to_table(_("Greyscale backdrop"), table3, 0, 0, 5); add_to_table(_("Selection nudge pixels"), table3, 1, 0, 5); add_to_table(_("Max Pan Window Size"), table3, 2, 0, 5); /// TABLE SPINBUTTONS spinbutton_greys = spin_to_table(table3, 0, 1, 5, mem_background, 0, 255); spinbutton_nudge = spin_to_table(table3, 1, 1, 5, mem_nudge, 2, MAX_WIDTH); spinbutton_pan = spin_to_table(table3, 2, 1, 5, max_pan, 64, 256); checkbutton_paste = add_a_toggle( _("Display clipboard while pasting"), page, show_paste ); checkbutton_cursor = add_a_toggle( _("Mouse cursor = Tool"), page, cursor_tool ); checkbutton_exit = add_a_toggle( _("Confirm Exit"), page, inifile_get_gboolean("exitToggle", FALSE) ); checkbutton_quit = add_a_toggle( _("Q key quits mtPaint"), page, q_quit ); checkbutton_commit = add_a_toggle(_("Changing tool commits paste"), page, paste_commit); checkbutton_center = add_a_toggle(_("Centre tool settings dialogs"), page, inifile_get_gboolean("centerSettings", TRUE)); checkbutton_zoom[0] = add_a_toggle( _("New image sets zoom to 100%"), page, inifile_get_gboolean("zoomToggle", FALSE) ); #if GTK_MAJOR_VERSION == 2 checkbutton_zoom[1] = add_a_toggle( _("Mouse Scroll Wheel = Zoom"), page, inifile_get_gboolean("scrollwheelZOOM", FALSE) ); checkbutton_menuicons = add_a_toggle(_("Use menu icons"), page, show_menu_icons); #endif /// ---- TAB3 - FILES page = add_new_page(notebook1, _("Files")); table4 = add_a_table(7, 2, 10, page); for (i = 0; i < 8; i++) add_to_table(tab_tex2[i], table4, i, 0, 4); // !!! TODO: Change this into table-driven & see if code size decreases !!! spinbutton_trans = spin_to_table(table4, 0, 1, 4, mem_xpm_trans, -1, mem_cols - 1); spinbutton_hotx = spin_to_table(table4, 1, 1, 4, mem_xbm_hot_x, -1, mem_width - 1); spinbutton_hoty = spin_to_table(table4, 2, 1, 4, mem_xbm_hot_y, -1, mem_height - 1); spinbutton_jpeg = spin_to_table(table4, 3, 1, 4, jpeg_quality, 0, 100); spinbutton_jp2 = spin_to_table(table4, 4, 1, 4, jp2_rate, 0, 100); spinbutton_png = spin_to_table(table4, 5, 1, 4, png_compression, 0, 9); spinbutton_recent = spin_to_table(table4, 6, 1, 4, recent_files, 0, MAX_RECENT); spinbutton_silence = spin_to_table(table4, 7, 1, 4, silence_limit, 0, 28); checkbutton_tgaRLE = add_a_toggle(_("TGA RLE Compression"), page, tga_RLE); checkbutton_tga565 = add_a_toggle(_("Read 16-bit TGAs as 5:6:5 BGR"), page, tga_565); checkbutton_tgadef = add_a_toggle(_("Write TGAs in bottom-up row order"), page, tga_defdir); checkbutton_undo = add_a_toggle(_("Undoable image loading"), page, undo_load); #ifdef U_LCMS checkbutton_icc = add_a_toggle(_("Apply colour profile"), page, apply_icc); #endif /// ---- TAB4 - PATHS page = add_new_page(notebook1, _("Paths")); clipboard_entry = mt_path_box(_("Clipboard Files"), page, _("Select Clipboard File"), FS_CLIP_FILE); gtkuncpy(txt, mem_clip_file, PATHTXT); gtk_entry_set_text(GTK_ENTRY(clipboard_entry), txt); entry_handbook[0] = mt_path_box(_("HTML Browser Program"), page, _("Select Browser Program"), FS_SELECT_FILE); gtkuncpy(txt, inifile_get(HANDBOOK_BROWSER_INI, ""), PATHTXT); gtk_entry_set_text(GTK_ENTRY(entry_handbook[0]), txt); entry_handbook[1] = mt_path_box(_("Location of Handbook index"), page, _("Select Handbook Index File"), FS_SELECT_FILE); gtkuncpy(txt, inifile_get(HANDBOOK_LOCATION_INI, ""), PATHTXT); gtk_entry_set_text(GTK_ENTRY(entry_handbook[1]), txt); entry_def[0] = mt_path_box(_("Default Palette"), page, _("Select Default Palette"), FS_SELECT_FILE); gtkuncpy(txt, inifile_get(DEFAULT_PAL_INI, ""), PATHTXT); gtk_entry_set_text(GTK_ENTRY(entry_def[0]), txt); entry_def[1] = mt_path_box(_("Default Patterns"), page, _("Select Default Patterns File"), FS_SELECT_FILE); gtkuncpy(txt, inifile_get(DEFAULT_PAT_INI, ""), PATHTXT); gtk_entry_set_text(GTK_ENTRY(entry_def[1]), txt); #if GTK_MAJOR_VERSION == 2 entry_theme = mt_path_box(_("Default Theme"), page, _("Select Default Theme File"), FS_SELECT_FILE); gtkuncpy(txt, inifile_get(DEFAULT_THEME_INI, ""), PATHTXT); gtk_entry_set_text(GTK_ENTRY(entry_theme), txt); #endif /// ---- TAB5 - STATUS BAR page = add_new_page(notebook1, _("Status Bar")); for ( i=0; iname : "NONE"); } void init_tablet() // Set up variables { int i; char *devname, txt[64]; GList *dlist; #if GTK_MAJOR_VERSION == 1 GdkDeviceInfo *device = NULL; gint use; #endif #if GTK_MAJOR_VERSION == 2 GdkDevice *device = NULL; GdkAxisUse use; #endif if (tablet_working) // User has got tablet working in past so try to initialize it { tablet_working = FALSE; devname = inifile_get( "tablet_name", "?" ); // Device name last used #if GTK_MAJOR_VERSION == 1 dlist = gdk_input_list_devices(); #endif #if GTK_MAJOR_VERSION == 2 dlist = gdk_devices_list(); #endif while ( dlist != NULL ) { device = dlist->data; if ( strcmp(device->name, devname ) == 0 ) { // Previously used device was found #if GTK_MAJOR_VERSION == 1 gdk_input_set_mode(device->deviceid, inifile_get_gint32("tablet_mode", 0)); #endif #if GTK_MAJOR_VERSION == 2 gdk_device_set_mode(device, inifile_get_gint32("tablet_mode", 0)); #endif for ( i=0; inum_axes; i++ ) { sprintf(txt, "tablet_axes_v%i", i); use = inifile_get_gint32( txt, GDK_AXIS_IGNORE ); #if GTK_MAJOR_VERSION == 1 device->axes[i] = use; gdk_input_set_axes(device->deviceid, device->axes); #endif #if GTK_MAJOR_VERSION == 2 gdk_device_set_axis_use(device, i, use); #endif } tablet_device = device; tablet_working = TRUE; // Success! break; } dlist = dlist->next; // Not right device so look for next one } } for ( i=0; i<3; i++ ) { tablet_tool_use[i] = inifile_get_gboolean( tablet_ini2[i], FALSE ); tablet_tool_factor[i] = ((float) inifile_get_gint32( tablet_ini[i], 100 )) / 100; } } mtpaint-3.40/src/inifile.h0000644000175000000620000000414511647100515015016 0ustar muammarstaff/* inifile.h Copyright (C) 2007-2011 Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ typedef struct { int sec, key, defv; char *value; short type, flags; } inislot; typedef struct { char *sblock[3]; inislot *slots; gint32 *hash; int count, slen, maxloop; guint32 hmask, seed[2]; } inifile; /* Core functions */ int new_ini(inifile *inip); void forget_ini(inifile *inip); int read_ini(inifile *inip, char *fname, int itype); int write_ini(inifile *inip, char *fname, char *header); int ini_setstr(inifile *inip, int section, char *key, char *value); int ini_setint(inifile *inip, int section, char *key, int value); int ini_setbool(inifile *inip, int section, char *key, int value); char *ini_getstr(inifile *inip, int section, char *key, char *defv); int ini_getint(inifile *inip, int section, char *key, int defv); int ini_getbool(inifile *inip, int section, char *key, int defv); int ini_setsection(inifile *inip, int section, char *key); int ini_getsection(inifile *inip, int section, char *key); /* File functions */ char *slurp_file(char *fname); char *get_home_directory(void); char *extend_path(const char *path); /* Compatibility functions */ void inifile_init(char *system_ini, char *user_ini); void inifile_quit(); char *inifile_get(char *setting, char *defaultValue); int inifile_get_gint32(char *setting, int defaultValue); int inifile_get_gboolean(char *setting, int defaultValue); int inifile_set(char *setting, char *value); int inifile_set_gint32(char *setting, int value); int inifile_set_gboolean(char *setting, int value); mtpaint-3.40/src/mainwindow.h0000644000175000000620000002001411627213015015542 0ustar muammarstaff/* mainwindow.h Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ /* Keyboard action codes */ #define ACTMOD_DUMMY -1 /* Means action is done already */ enum { // To let constants renumber themselves when adding new ones ACT_QUIT = 1, ACT_ZOOM, ACT_VIEW, ACT_PAN, ACT_CROP, ACT_SWAP_AB, ACT_TOOL, ACT_SEL_MOVE, ACT_OPAC, ACT_LR_MOVE, ACT_ESC, ACT_COMMIT, ACT_RCLICK, ACT_ARROW, ACT_A, ACT_B, ACT_CHANNEL, ACT_VWZOOM, ACT_SAVE, ACT_FACTION, ACT_LOAD_RECENT, ACT_UNDO, ACT_REDO, ACT_COPY, ACT_PASTE, ACT_COPY_PAL, ACT_PASTE_PAL, ACT_LOAD_CLIP, ACT_SAVE_CLIP, ACT_TBAR, ACT_DOCK, ACT_CENTER, ACT_GRID, ACT_SNAP, ACT_VWWIN, ACT_VWSPLIT, ACT_VWFOCUS, ACT_FLIP_V, ACT_FLIP_H, ACT_ROTATE, ACT_SELECT, ACT_LASSO, ACT_OUTLINE, ACT_ELLIPSE, ACT_SEL_FLIP_V, ACT_SEL_FLIP_H, ACT_SEL_ROT, ACT_RAMP, ACT_SEL_ALPHA_AB, ACT_SEL_ALPHAMASK, ACT_SEL_MASK_AB, ACT_SEL_MASK, ACT_PAL_DEF, ACT_PAL_MASK, ACT_DITHER_A, ACT_PAL_MERGE, ACT_PAL_CLEAN, ACT_ISOMETRY, ACT_CHN_DIS, ACT_SET_RGBA, ACT_SET_OVERLAY, ACT_LR_SAVE, ACT_LR_ADD, ACT_LR_DEL, ACT_DOCS, ACT_REBIND_KEYS, ACT_MODE, ACT_LR_SHIFT, ACT_LR_CENTER, DLG_BRCOSA, DLG_CHOOSER, DLG_SCALE, DLG_SIZE, DLG_NEW, DLG_FSEL, DLG_FACTIONS, DLG_TEXT, DLG_TEXT_FT, DLG_LAYERS, DLG_INDEXED, DLG_ROTATE, DLG_INFO, DLG_PREFS, DLG_COLORS, DLG_PAL_SIZE, DLG_PAL_SORT, DLG_PAL_SHIFTER, DLG_FILTER, DLG_CHN_DEL, DLG_ANI, DLG_ANI_VIEW, DLG_ANI_KEY, DLG_ANI_KILLKEY, DLG_ABOUT, DLG_SKEW, DLG_FLOOD, DLG_SMUDGE, DLG_GRAD, DLG_STEP, DLG_FILT, DLG_TRACE, DLG_PICK_GRAD, DLG_SEGMENT, FILT_2RGB, FILT_INVERT, FILT_GREY, FILT_EDGE, FILT_DOG, FILT_SHARPEN, FILT_UNSHARP, FILT_SOFTEN, FILT_GAUSS, FILT_FX, FILT_BACT, FILT_THRES, FILT_UALPHA, FILT_KUWAHARA, ACT_TEST /* Reserved for testing things */ }; // New layer sources for ACT_LR_ADD #define LR_NEW 0 #define LR_DUP 1 #define LR_PASTE 2 #define LR_COMP 3 int wtf_pressed(GdkEventKey *event); void action_dispatch(int action, int mode, int state, int kbd); /* Widget dependence flags */ #define NEED_UNDO 0x0001 #define NEED_REDO 0x0002 #define NEED_CROP 0x0004 #define NEED_MARQ 0x0008 #define NEED_SEL 0x0010 #define NEED_CLIP 0x0020 #define NEED_24 0x0040 #define NEED_NOIDX 0x0080 #define NEED_IDX 0x0100 #define NEED_LASSO 0x0200 #define NEED_ACLIP 0x0400 #define NEED_CHAN 0x0800 #define NEED_RGBA 0x1000 #define NEED_PCLIP 0x2000 #define NEED_SEL2 (NEED_SEL | NEED_LASSO) #define NEED_PSEL (NEED_MARQ | NEED_PCLIP) #define NEED_LAS2 (NEED_LASSO | NEED_PCLIP) void mapped_dis_add(GtkWidget *widget, int actmap); void mapped_item_state(int statemap); // Change state of preset menu items /* Notable menu items */ enum { MENU_FACTION1 = 1, MENU_FACTION2, MENU_FACTION3, MENU_FACTION4, MENU_FACTION5, MENU_FACTION6, MENU_FACTION7, MENU_FACTION8, MENU_FACTION9, MENU_FACTION10, MENU_FACTION11, MENU_FACTION12, MENU_FACTION13, MENU_FACTION14, MENU_FACTION15, MENU_FACTION_S, MENU_RECENT_S, MENU_RECENT1, MENU_RECENT2, MENU_RECENT3, MENU_RECENT4, MENU_RECENT5, MENU_RECENT6, MENU_RECENT7, MENU_RECENT8, MENU_RECENT9, MENU_RECENT10, MENU_RECENT11, MENU_RECENT12, MENU_RECENT13, MENU_RECENT14, MENU_RECENT15, MENU_RECENT16, MENU_RECENT17, MENU_RECENT18, MENU_RECENT19, MENU_RECENT20, MENU_TBMAIN, MENU_TBTOOLS, MENU_TBSET, MENU_SHOWPAL, MENU_SHOWSTAT, MENU_CENTER, MENU_SHOWGRID, MENU_VIEW, MENU_VWFOCUS, MENU_LAYER, MENU_PREFS, MENU_CHAN0, MENU_CHAN1, MENU_CHAN2, MENU_CHAN3, MENU_DCHAN0, MENU_DCHAN1, MENU_DCHAN2, MENU_DCHAN3, MENU_RGBA, MENU_HELP, MENU_DOCK, TOTAL_MENU_IDS }; #define MAX_RECENT 20 /// TRACING IMAGE unsigned char *bkg_rgb; int bkg_x, bkg_y, bkg_w, bkg_h, bkg_scale, bkg_flag; int config_bkg(int src); // 0 = unchanged, 1 = none, 2 = image, 3 = clipboard /// GRID /* !!! Indices 0-2 are hardcoded in draw_grid() */ #define GRID_NORMAL 0 /* Normal/image grid */ #define GRID_BORDER 1 #define GRID_TRANS 2 /* For transparency */ #define GRID_TILE 3 #define GRID_SEGMENT 4 #define GRID_MAX 5 int grid_rgb[GRID_MAX]; // Grid colors to use int mem_show_grid; // Boolean show toggle int mem_grid_min; // Minimum zoom to show it at int color_grid; // If to use grid coloring int show_tile_grid; // Tile grid toggle int tgrid_x0, tgrid_y0; // Tile grid origin int tgrid_dx, tgrid_dy; // Tile grid spacing int tgrid_snap; // Coordinates snap toggle /* Snap coordinate pair to tile grid (floored) */ void snap_xy(int *xy); const unsigned char greyz[2]; // For opacity squares #define DOCK_CLINE 0 #define DOCK_SETTINGS 1 #define DOCK_LAYERS 2 #define DOCK_TOTAL 3 #define DOCKABLE() ((files_passed > 1) + !layers_window + !toolbar_boxes[TOOLBAR_SETTINGS]) char *channames[NUM_CHANNELS + 1], *allchannames[NUM_CHANNELS + 1]; char *cspnames[NUM_CSPACES]; GtkWidget *main_window, *main_split, *drawing_palette, *drawing_canvas, *vbox_right, *vw_scrolledwindow, *scrolledwindow_canvas, *menu_widgets[TOTAL_MENU_IDS], *dock_pane, *dock_area; int view_image_only, viewer_mode, drag_index, q_quit, cursor_tool; int show_menu_icons, paste_commit; int files_passed, drag_index_vals[2], cursor_corner, show_dock, use_gamma; char **file_args; extern char mem_clip_file[]; void var_init(); // Load INI variables void string_init(); // Translate static strings void main_init(); // Initialise and display the main window void draw_rgb(int x, int y, int w, int h, unsigned char *rgb, int step, rgbcontext *ctx); void draw_poly(int *xy, int cnt, int shift, int x00, int y00, rgbcontext *ctx); void canvas_size(int *w, int *h); // Get zoomed canvas size void prepare_line_clip(int *lxy, int *vxy, int scale); // Map clipping rectangle to line-space void main_update_area(int x, int y, int w, int h); // Update x,y,w,h area of current image void repaint_canvas( int px, int py, int pw, int ph ); // Redraw area of canvas void repaint_perim(rgbcontext *ctx); // Draw perimeter around mouse cursor void clear_perim(); // Clear perimeter around mouse cursor void setup_row(int x0, int width, double czoom, int mw, int xpm, int opac, int bpp, png_color *pal); void render_row(unsigned char *rgb, chanlist base_img, int x, int y, chanlist xtra_img); void overlay_row(unsigned char *rgb, chanlist base_img, int x, int y, chanlist xtra_img); void stop_line(); void change_to_tool(int icon); void spot_undo(int mode); // Take snapshot for undo void set_cursor(); // Set mouse cursor int check_for_changes(); // 1=STOP, 2=IGNORE, 10=ESCAPE, -10=NOT CHECKED // Try to save file + warn if error + return < 0 if fail int gui_save(char *filename, ls_settings *settings); // Load system clipboard like a file, return TRUE if successful int import_clipboard(int mode); void pressed_select(int all); void pressed_opacity(int opacity); void pressed_value(int value); int check_zoom_keys(int act_m); int check_zoom_keys_real(int act_m); void zoom_in(); void zoom_out(); void setup_language(); // Change language // Image/palette has just changed - update vars as needed void notify_changed(); // Image has just been unchanged: saved to file, or loaded if "filename" is NULL void notify_unchanged(char *filename); void update_titlebar(); // Update filename in titlebar void force_main_configure(); // Force reconfigure of main drawing area - for centralizing code void set_image(gboolean state); // Toggle image access (nestable) int dock_focused(); // Check if focus is inside dock window void dock_undock(int what, int state); // Move stuff into or out of dock mtpaint-3.40/src/prefs.h0000644000175000000620000000205511254231236014513 0ustar muammarstaff/* prefs.h Copyright (C) 2005-2009 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define HANDBOOK_BROWSER_INI "docsBrowser" #define HANDBOOK_LOCATION_INI "docsLocation" #define DEFAULT_PAL_INI "defaultPalette" #define DEFAULT_PAT_INI "defaultPatterns" #define DEFAULT_THEME_INI "defaultTheme" int tablet_working, tablet_tool_use[3]; // Size, flow, opacity float tablet_tool_factor[3]; // Size, flow, opacity void pressed_preferences(); void init_tablet(); // Set up variables mtpaint-3.40/src/otherwindow.c0000644000175000000620000031040411647074734015756 0ustar muammarstaff/* otherwindow.c Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "otherwindow.h" #include "png.h" #include "mainwindow.h" #include "viewer.h" #include "inifile.h" #include "canvas.h" #include "layer.h" #include "wu.h" #include "ani.h" #include "channels.h" #include "toolbar.h" #include "csel.h" #include "font.h" #include "cpick.h" #include "icons.h" /// NEW IMAGE WINDOW int im_type, new_window_type = 0; GtkWidget *new_window; GtkWidget *spinbutton_height, *spinbutton_width, *spinbutton_cols, *tog_undo; gint delete_new( GtkWidget *widget, GdkEvent *event, gpointer data ) { gtk_widget_destroy(new_window); return FALSE; } void reset_tools() { if (!mem_img[mem_channel]) mem_channel = CHN_IMAGE; // Safety first pressed_select(FALSE); // To prevent automatic paste change_to_tool(DEFAULT_TOOL_ICON); init_istate(&mem_state, &mem_image); memset(channel_col_A, 255, NUM_CHANNELS); memset(channel_col_B, 0, NUM_CHANNELS); tool_opacity = 255; // Set opacity to 100% to start with if (inifile_get_gboolean("zoomToggle", FALSE)) can_zoom = 1; // Always start at 100% update_stuff(UPD_RESET | UPD_ALL); } void do_new_chores(int undo) { set_new_filename(layer_selected, NULL); if (layers_total) layers_notify_changed(); // No reason to reset tools in undoable mode if (!undo) reset_tools(); else update_stuff(UPD_ALL); } int do_new_one(int nw, int nh, int nc, png_color *pal, int bpp, int undo) { int res = 0; nw = nw < MIN_WIDTH ? MIN_WIDTH : nw > MAX_WIDTH ? MAX_WIDTH : nw; nh = nh < MIN_HEIGHT ? MIN_HEIGHT : nh > MAX_HEIGHT ? MAX_HEIGHT : nh; mem_cols = nc < 2 ? 2 : nc > 256 ? 256 : nc; /* Check memory for undo */ if (undo) undo = !undo_next_core(UC_CREATE | UC_GETMEM, nw, nh, bpp, CMASK_IMAGE); /* Create undo frame if requested */ if (undo) { undo_next_core(UC_DELETE, nw, nh, bpp, CMASK_ALL); undo = !!(mem_img[CHN_IMAGE] = calloc(1, nw * nh * bpp)); } /* Create image anew if all else fails */ if (!undo) { res = mem_new( nw, nh, bpp, CMASK_IMAGE ); if (res) memory_errors(1); // Not enough memory! } /* *Now* prepare and update palette */ if (pal) mem_pal_copy(mem_pal, pal); else mem_bw_pal(mem_pal, 0, nc - 1); update_undo(&mem_image); do_new_chores(undo); return (res); } static int clip_to_layer(int layer) { image_info *img; image_state *state; int cmask, undo = undo_load; cmask = cmask_from(mem_clip.img); if (layer == layer_selected) { if (undo) undo = !undo_next_core(UC_CREATE | UC_GETMEM, mem_clip_w, mem_clip_h, mem_clip_bpp, cmask); if (undo) undo_next_core(UC_DELETE, mem_clip_w, mem_clip_h, mem_clip_bpp, CMASK_ALL); else mem_free_image(&mem_image, FREE_IMAGE); img = &mem_image; state = &mem_state; } else { img = &layer_table[layer].image->image_; state = &layer_table[layer].image->state_; *state = mem_state; mem_free_image(img, FREE_IMAGE); mem_pal_copy(img->pal, mem_pal); img->cols = mem_cols; img->trans = mem_xpm_trans; } if (!mem_alloc_image(AI_COPY, img, 0, 0, 0, 0, &mem_clip)) return (0); update_undo(img); state->channel = CHN_IMAGE; return (1); } static void create_new(GtkWidget *widget) { png_color *pal = im_type == 1 ? NULL : mem_pal_def; int nw, nh, nc, err = 1, bpp; nw = read_spin(spinbutton_width); nh = read_spin(spinbutton_height); nc = read_spin(spinbutton_cols); if (!new_window_type) undo_load = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(tog_undo)); if (im_type == 4) /* Screenshot */ { #if GTK_MAJOR_VERSION == 1 gdk_window_lower( main_window->window ); gdk_window_lower( new_window->window ); gdk_flush(); handle_events(); // Wait for minimize sleep(1); // Wait a second for screen to redraw #else /* #if GTK_MAJOR_VERSION == 2 */ gtk_window_set_transient_for( GTK_WINDOW(new_window), NULL ); gdk_window_iconify( new_window->window ); gdk_window_iconify( main_window->window ); gdk_flush(); handle_events(); // Wait for minimize g_usleep(400000); // Wait 0.4 of a second for screen to redraw #endif // Use current layer if (!new_window_type) { err = load_image(NULL, FS_PNG_LOAD, undo_load ? FT_PIXMAP | FTM_UNDO : FT_PIXMAP); if (err == 1) { do_new_chores(undo_load); notify_changed(); } } // Add new layer else if (layer_add(0, 0, 1, 0, mem_pal_def, 0)) { err = load_image(NULL, FS_LAYER_LOAD, FT_PIXMAP); if (err == 1) layer_show_new(); else layer_delete(layers_total); } #if GTK_MAJOR_VERSION == 2 gdk_window_deiconify( main_window->window ); #endif gdk_window_raise( main_window->window ); } if (im_type == 3) /* Clipboard */ { // Use current layer if (!new_window_type) { err = import_clipboard(FS_PNG_LOAD); if ((err != 1) && mem_clipboard) err = clip_to_layer(layer_selected); if (err == 1) { do_new_chores(undo_load); notify_changed(); } } // Add new layer else if (layer_add(0, 0, 1, 0, mem_pal_def, 0)) { err = import_clipboard(FS_LAYER_LOAD); if ((err != 1) && mem_clipboard) err = clip_to_layer(layers_total); if (err == 1) layer_show_new(); else layer_delete(layers_total); } } /* Fallthrough if error */ if (err != 1) im_type = 0; /* RGB / Greyscale / Indexed */ bpp = im_type == 0 ? 3 : 1; if (im_type > 2); // Successfully done above else if (new_window_type == 1) // Layer layer_new(nw, nh, bpp, nc, pal, CMASK_IMAGE); else // Image { /* Nothing to undo if image got deleted already */ err = do_new_one(nw, nh, nc, pal, bpp, undo_load && mem_img[CHN_IMAGE]); if (err > 0) { /* System was unable to allocate memory for * image, using 8x8 instead */ nw = mem_width; nh = mem_height; } inifile_set_gint32("lastnewWidth", nw ); inifile_set_gint32("lastnewHeight", nh ); inifile_set_gint32("lastnewCols", nc ); inifile_set_gint32("lastnewType", im_type ); } gtk_widget_destroy(new_window); } void generic_new_window(int type) // 0=New image, 1=New layer { char *rad_txt[] = {_("24 bit RGB"), _("Greyscale"), _("Indexed Palette"), _("From Clipboard"), _("Grab Screenshot")}, *title_txt[] = {_("New Image"), _("New Layer")}; GtkWidget *vbox1, *table1; int w = mem_width, h = mem_height, c = mem_cols; if (!type && (check_for_changes() == 1)) return; new_window_type = type; new_window = add_a_window( GTK_WINDOW_TOPLEVEL, title_txt[type], GTK_WIN_POS_CENTER, TRUE ); vbox1 = add_vbox(new_window); table1 = add_a_table( 3, 2, 5, vbox1 ); if (!type) { w = inifile_get_gint32("lastnewWidth", DEFAULT_WIDTH); h = inifile_get_gint32("lastnewHeight", DEFAULT_HEIGHT); c = inifile_get_gint32("lastnewCols", 256); im_type = inifile_get_gint32("lastnewType", 2); if ( im_type<0 || im_type>2 ) im_type = 0; } else im_type = 3 - mem_img_bpp; spinbutton_width = spin_to_table(table1, 0, 1, 5, w, MIN_WIDTH, MAX_WIDTH); spinbutton_height = spin_to_table(table1, 1, 1, 5, h, MIN_WIDTH, MAX_HEIGHT); spinbutton_cols = spin_to_table(table1, 2, 1, 5, c, 2, 256); add_to_table( _("Width"), table1, 0, 0, 5 ); add_to_table( _("Height"), table1, 1, 0, 5 ); add_to_table( _("Colours"), table1, 2, 0, 5 ); xpack(vbox1, wj_radio_pack(rad_txt, 5, 0, im_type, &im_type, NULL)); tog_undo = type ? NULL : add_a_toggle(_("Undoable"), vbox1, undo_load); add_hseparator( vbox1, 200, 10 ); pack(vbox1, OK_box(5, new_window, _("Create"), GTK_SIGNAL_FUNC(create_new), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); gtk_window_set_transient_for( GTK_WINDOW(new_window), GTK_WINDOW(main_window) ); gtk_widget_show (new_window); } /// PATTERN & BRUSH CHOOSER WINDOW static GtkWidget *pat_window, *draw_pat; static int pat_brush; static unsigned char *mem_patch; #define PAL_SLOT_SIZE 10 static unsigned char *render_color_grid(int w, int h, int cellsize, int channel) { unsigned char *rgb, *tmp; int i, j, k, col, row; row = w * 3; rgb = calloc(1, h * row); if (!rgb) return (NULL); for (col = i = 0; i < h; i += cellsize) { tmp = rgb + i * row; for (j = 0; j < row; j += cellsize * 3 , col++) { if (channel == CHN_IMAGE) /* Palette as such */ { if (col < mem_cols) /* Draw only existing colors */ { tmp[j + 0] = mem_pal[col].red; tmp[j + 1] = mem_pal[col].green; tmp[j + 2] = mem_pal[col].blue; } } else if (channel >= 0) /* Utility */ { k = channel_rgb[channel][0] * col; tmp[j + 0] = (k + (k >> 8) + 1) >> 8; k = channel_rgb[channel][1] * col; tmp[j + 1] = (k + (k >> 8) + 1) >> 8; k = channel_rgb[channel][2] * col; tmp[j + 2] = (k + (k >> 8) + 1) >> 8; } else /* Opacity */ { tmp[j + 0] = tmp[j + 1] = tmp[j + 2] = col; } for (k = j + 3; k < j + cellsize * 3 - 3; k++) tmp[k] = tmp[k - 3]; } for (j = i + 1; j < i + cellsize - 1; j++) memcpy(rgb + j * row, tmp, row); } return (rgb); } static gboolean delete_pat(GtkWidget *widget) { gtk_widget_destroy(widget); if (pat_brush != CHOOSE_BRUSH) free(mem_patch); mem_patch = NULL; pat_window = NULL; return (FALSE); } static gboolean key_pat(GtkWidget *widget, GdkEventKey *event) { /* xine-ui sends bogus keypresses so don't delete on this */ if (!XINE_FAKERY(event->keyval)) delete_pat(widget); return (TRUE); } static gboolean click_pat(GtkWidget *widget, GdkEventButton *event) { int pat_no, mx = event->x, my = event->y; if (pat_brush == CHOOSE_COLOR) { int ab; if (!(ab = event->button == 3) && (event->button != 1)) return (FALSE); // Only left or right click pat_no = mx / PAL_SLOT_SIZE + 16 * (my / PAL_SLOT_SIZE); pat_no = pat_no < 0 ? 0 : pat_no >= mem_cols ? mem_cols - 1 : pat_no; mem_col_[ab] = pat_no; mem_col_24[ab] = mem_pal[pat_no]; update_stuff(UPD_AB); } else if (event->button != 1) return (FALSE); // Left click only else if (pat_brush == CHOOSE_PATTERN) { pat_no = mx / (8 * 4 + 4) + PATTERN_GRID_W * (my / (8 * 4 + 4)); pat_no = pat_no < 0 ? 0 : pat_no >= PATTERN_GRID_W * PATTERN_GRID_H ? PATTERN_GRID_W * PATTERN_GRID_H - 1 : pat_no; mem_tool_pat = pat_no; update_stuff(UPD_PAT); } else /* if (pat_brush == CHOOSE_BRUSH) */ { pat_no = mx / (PATCH_WIDTH/9) + 9*( my / (PATCH_HEIGHT/9) ); pat_no = pat_no < 0 ? 0 : pat_no > 80 ? 80 : pat_no; mem_set_brush(pat_no); change_to_tool(TTB_PAINT); update_stuff(UPD_BRUSH); } return (TRUE); } static gboolean expose_pat(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { int w = (int)user_data; gdk_draw_rgb_image( draw_pat->window, draw_pat->style->black_gc, event->area.x, event->area.y, event->area.width, event->area.height, GDK_RGB_DITHER_NONE, mem_patch + 3 * (event->area.x + w * event->area.y), w * 3); return (TRUE); } void choose_pattern(int typ) // Bring up pattern chooser (0) or brush (1) { int w, h; if (pat_window) return; // Already displayed pat_brush = typ; pat_window = add_a_window(GTK_WINDOW_POPUP, _("Pattern Chooser"), GTK_WIN_POS_MOUSE, TRUE); gtk_container_set_border_width(GTK_CONTAINER(pat_window), 4); draw_pat = gtk_drawing_area_new(); if (typ == CHOOSE_PATTERN) { mem_patch = render_patterns(); w = PATTERN_GRID_W * (8 * 4 + 4); h = PATTERN_GRID_H * (8 * 4 + 4); } else if (typ == CHOOSE_BRUSH) { mem_patch = mem_brushes; w = PATCH_WIDTH; h = PATCH_HEIGHT; } else /* if (typ == CHOOSE_COLOR) */ { w = h = 16 * PAL_SLOT_SIZE - 1; mem_patch = render_color_grid(w, w, PAL_SLOT_SIZE, CHN_IMAGE); } gtk_widget_set_usize(draw_pat, w, h); gtk_container_add(GTK_CONTAINER(pat_window), draw_pat); gtk_signal_connect(GTK_OBJECT(draw_pat), "expose_event", GTK_SIGNAL_FUNC(expose_pat), (gpointer)w); gtk_signal_connect(GTK_OBJECT(draw_pat), "button_press_event", GTK_SIGNAL_FUNC(click_pat), NULL); /* !!! Given the window is modal, this makes it closeable by button * release anywhere over mtPaint's main window - WJ */ gtk_signal_connect(GTK_OBJECT(pat_window), "button_release_event", GTK_SIGNAL_FUNC(delete_pat), NULL); gtk_signal_connect(GTK_OBJECT(pat_window), "key_press_event", GTK_SIGNAL_FUNC(key_pat), NULL); gtk_widget_set_events(draw_pat, GDK_ALL_EVENTS_MASK); gtk_widget_show_all(pat_window); } /// ADD COLOURS TO PALETTE WINDOW static int do_add_cols(GtkWidget *spin, gpointer fdata) { int i; i = read_spin(spin); if (i != mem_cols) { spot_undo(UNDO_PAL); if (i > mem_cols) memset(mem_pal + mem_cols, 0, (i - mem_cols) * sizeof(png_color)); mem_cols = i; update_stuff(UPD_ADDPAL); } return TRUE; } void pressed_add_cols() { GtkWidget *spin = add_a_spin(256, 2, 256); filter_window(_("Set Palette Size"), spin, do_add_cols, NULL, FALSE); } /* Generic code to handle UI needs of common image transform tasks */ typedef struct { GtkWidget *cont; filter_hook func; gpointer data; } filter_wrap; void run_filter(GtkWidget *widget, gpointer user_data) { filter_wrap *fw = gtk_object_get_user_data(GTK_OBJECT(widget)); if (fw->func(fw->cont, fw->data)) destroy_dialog(widget); update_stuff(UPD_IMG); } void filter_window(gchar *title, GtkWidget *content, filter_hook filt, gpointer fdata, int istool) { filter_wrap *fw; GtkWidget *win, *vbox; GtkWindowPosition pos = istool && !inifile_get_gboolean("centerSettings", TRUE) ? GTK_WIN_POS_MOUSE : GTK_WIN_POS_CENTER; win = add_a_window(GTK_WINDOW_TOPLEVEL, title, pos, TRUE); fw = bound_malloc(win, sizeof(filter_wrap)); gtk_object_set_user_data(GTK_OBJECT(win), (gpointer)fw); gtk_window_set_default_size(GTK_WINDOW(win), 300, -1); fw->cont = content; fw->func = filt; fw->data = fdata; vbox = add_vbox(win); add_hseparator(vbox, -2, 10); pack5(vbox, content); add_hseparator(vbox, -2, 10); pack(vbox, OK_box(0, win, _("Apply"), GTK_SIGNAL_FUNC(run_filter), _("Cancel"), GTK_SIGNAL_FUNC(destroy_dialog))); gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(main_window)); gtk_widget_show(win); } /// BACTERIA EFFECT static int do_bacteria(GtkWidget *spin, gpointer fdata) { int i; i = read_spin(spin); spot_undo(UNDO_FILT); mem_bacteria(i); mem_undo_prepare(); return FALSE; } void pressed_bacteria() { GtkWidget *spin = add_a_spin(10, 1, 100); filter_window(_("Bacteria Effect"), spin, do_bacteria, NULL, FALSE); } /// SORT PALETTE COLOURS static GtkWidget *spal_window, *spal_spins[2], *spal_rev; int spal_mode; static void click_spal_apply() { int index1, index2, reverse; reverse = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(spal_rev)); inifile_set_gboolean( "palrevSort", reverse ); index1 = read_spin(spal_spins[0]); index2 = read_spin(spal_spins[1]); if ( index1 == index2 ) return; spot_undo(UNDO_XPAL); mem_pal_sort(spal_mode, index1, index2, reverse); mem_undo_prepare(); update_stuff(UPD_TPAL); } static void click_spal_ok() { click_spal_apply(); gtk_widget_destroy(spal_window); } void pressed_sort_pal() { char *rad_txt[] = { _("Hue"), _("Saturation"), _("Luminance"), _("Brightness"), _("Distance to A"), _("Red"), _("Green"), _("Blue"), _("Projection to A->B"), _("Frequency")}; GtkWidget *vbox1, *hbox3, *table1; spal_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Sort Palette Colours"), GTK_WIN_POS_CENTER, TRUE ); vbox1 = add_vbox(spal_window); table1 = add_a_table(2, 2, 5, vbox1); spal_spins[0] = spin_to_table(table1, 0, 1, 5, 0, 0, mem_cols - 1); spal_spins[1] = spin_to_table(table1, 1, 1, 5, mem_cols - 1, 0, mem_cols - 1); add_to_table( _("Start Index"), table1, 0, 0, 5 ); add_to_table( _("End Index"), table1, 1, 0, 5 ); table1 = pack(vbox1, wj_radio_pack(rad_txt, mem_img_bpp == 3 ? 9 : 10, 5, spal_mode, &spal_mode, NULL)); gtk_container_set_border_width(GTK_CONTAINER(table1), 5); spal_rev = add_a_toggle(_("Reverse Order"), vbox1, inifile_get_gboolean("palrevSort", FALSE)); add_hseparator( vbox1, 200, 10 ); /* Cancel / Apply / OK */ hbox3 = pack(vbox1, OK_box(5, spal_window, _("OK"), GTK_SIGNAL_FUNC(click_spal_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); OK_box_add(hbox3, _("Apply"), GTK_SIGNAL_FUNC(click_spal_apply)); gtk_widget_show (spal_window); } /// BRIGHTNESS-CONTRAST-SATURATION WINDOW #define BRCOSA_ITEMS 6 #define BRCOSA_POSTERIZE 3 #define BRCOSA_INDEX(i) (((i) == BRCOSA_POSTERIZE) && posterize_mode ? \ BRCOSA_ITEMS : (i)) static GtkWidget *brcosa_window, *brcosa_view, // Auto-preview toggle *brcosa_img, *brcosa_clip, *brcosa_pal, // What is affected *brcosa_rgb[3], *brcosa_spins[BRCOSA_ITEMS], *brcosa_pspins[2], // Palette limits *brcosa_buttons[5]; static int brcosa_values[BRCOSA_ITEMS], brcosa_pal_lim[2], brcosa_values_default[BRCOSA_ITEMS + 1] = {0, 0, 0, 8, 100, 0, 256}; int mem_preview, mem_preview_clip, brcosa_auto; png_color brcosa_palette[256]; // Set 4 brcosa button as sensitive if the user has assigned changes static void brcosa_buttons_sensitive() { int i, state; if (!brcosa_buttons[0]) return; for (state = i = 0; i < BRCOSA_ITEMS; i++) state |= brcosa_values[i] != brcosa_values_default[BRCOSA_INDEX(i)]; for (i = 2; i < 5; i++) gtk_widget_set_sensitive(brcosa_buttons[i], state); } static void click_brcosa_preview(GtkWidget *widget) { int i, j, update = 0; int do_pal = FALSE; // RGB palette processing mem_pal_copy(mem_pal, brcosa_palette); // Get back normal palette if (mem_img_bpp == 3) { do_pal = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(brcosa_pal)); // If user has just cleared toggle if (!do_pal && (widget == brcosa_pal)) update = UPD_PAL; } for (i = 0; i < BRCOSA_ITEMS; i++) mem_prev_bcsp[i] = brcosa_values[i]; for (i = 0; i < 3; i++) { mem_brcosa_allow[i] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(brcosa_rgb[i])); } if ((mem_img_bpp == 1) || do_pal) { j = brcosa_pal_lim[0] > brcosa_pal_lim[1]; transform_pal(mem_pal, brcosa_palette, brcosa_pal_lim[j], brcosa_pal_lim[j ^ 1]); update |= UPD_PAL; } if (mem_img_bpp == 3) update |= UPD_RENDER; if (update) update_stuff(update); } static void brcosa_pal_lim_change() { int i; for (i = 0; i < 2; i++) brcosa_pal_lim[i] = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(brcosa_pspins[i])); click_brcosa_preview(NULL); // Update everything } static void click_brcosa_preview_toggle() { if (!brcosa_buttons[0]) return; // Traps call during initialisation brcosa_auto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(brcosa_view)); if (brcosa_auto) { click_brcosa_preview(NULL); gtk_widget_hide(brcosa_buttons[1]); } else gtk_widget_show(brcosa_buttons[1]); } static void click_brcosa_RGB_toggle(GtkToggleButton *button, gpointer user_data) { *(int *)user_data = gtk_toggle_button_get_active(button); click_brcosa_preview(NULL); } static void brcosa_spinslide_moved(GtkAdjustment *adj, gpointer user_data) { brcosa_values[(int)user_data] = ADJ2INT(adj); brcosa_buttons_sensitive(); if (brcosa_auto) click_brcosa_preview(NULL); } static void delete_brcosa() { // If in RGB mode this is required to disable live preview mem_preview = mem_preview_clip = FALSE; gtk_widget_destroy(brcosa_window); } static gboolean click_brcosa_cancel() { mem_pal_copy(mem_pal, brcosa_palette); delete_brcosa(); update_stuff(mem_img_bpp == 3 ? UPD_PAL | UPD_RENDER : UPD_PAL); return (FALSE); } static void click_brcosa_apply(GtkWidget *widget) { unsigned char *mask = NULL, *mask0, *tmp; int i, j; mem_pal_copy(mem_pal, brcosa_palette); for (i = j = 0; i < BRCOSA_ITEMS; i++) j |= brcosa_values[i] ^ brcosa_values_default[BRCOSA_INDEX(i)]; if (!j) return; // Nothing changed from default state spot_undo(UNDO_COL); click_brcosa_preview(NULL); // This modifies palette if (mem_preview && (mem_img_bpp == 3)) { mask = malloc(mem_width); if (mask) // This modifies image { mask0 = NULL; if (!channel_dis[CHN_MASK]) mask0 = mem_img[CHN_MASK]; tmp = mem_img[CHN_IMAGE]; for (i = 0; i < mem_height; i++) { prep_mask(0, 1, mem_width, mask, mask0, tmp); do_transform(0, 1, mem_width, mask, tmp, tmp); if (mask0) mask0 += mem_width; tmp += mem_width * 3; } free(mask); } } if (mem_preview_clip && (mem_img_bpp == 3) && (mem_clip_bpp == 3)) { // This modifies clipboard do_transform(0, 1, mem_clip_w * mem_clip_h, NULL, mem_clipboard, mem_clipboard); } mem_undo_prepare(); // Disable preview for final update if (!widget) mem_preview = mem_preview_clip = FALSE; update_stuff(mask ? UPD_PAL | UPD_IMG : UPD_PAL); if (widget) // Don't need this when clicking OK { // Reload palette and redo preview mem_pal_copy(brcosa_palette, mem_pal); click_brcosa_preview(NULL); } } static void click_brcosa_show_toggle(GtkWidget *widget, gpointer data) { int toggle = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); inifile_set_gboolean("transcol_show", toggle); (toggle ? gtk_widget_show : gtk_widget_hide)(GTK_WIDGET(data)); } /* static void click_brcosa_store() { } */ static void click_brcosa_ok() { click_brcosa_apply(NULL); delete_brcosa(); } static void click_brcosa_reset() { int i; mem_pal_copy(mem_pal, brcosa_palette); for (i = 0; i < BRCOSA_ITEMS; i++) { mt_spinslide_set_value(brcosa_spins[i], brcosa_values_default[BRCOSA_INDEX(i)]); } update_stuff(mem_img_bpp == 3 ? UPD_PAL | UPD_RENDER : UPD_PAL); } static void brcosa_posterize_changed(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *spin = brcosa_spins[BRCOSA_POSTERIZE]; int i, v, oldv = posterize_mode; posterize_mode = (int)gtk_object_get_user_data(GTK_OBJECT(menuitem)); if (!oldv ^ !posterize_mode) // From/to bitwise { v = mt_spinslide_read_value(spin); if (oldv)// To bitwise { for (i = 0 , v -= 1; v ; i++ , v >>= 1); v = i; } else v = 1 << v; // From bitwise mt_spinslide_set_range(spin, oldv ? 1 : 2, oldv ? 8 : 256); mt_spinslide_set_value(spin, v); } else if (brcosa_auto) click_brcosa_preview(NULL); } void pressed_brcosa() { static int mins[] = {-255, -100, -100, 1, 20, -1529, 2}, maxs[] = {255, 100, 100, 8, 500, 1529, 256}, order[] = {1, 2, 3, 5, 0, 4}; char *rgb_txt[] = { _("Red"), _("Green"), _("Blue") }; char *tab_txt[] = { _("Brightness"), _("Contrast"), _("Saturation"), _("Posterize"), _("Gamma"), _("Hue") }; char *pos_txt[] = { _("Bitwise"), _("Truncated"), _("Rounded") }; GtkWidget *vbox, *table, *table2, *hbox, *button; GtkAccelGroup* ag = gtk_accel_group_new(); int i, j; mem_pal_copy(brcosa_palette, mem_pal); // Remember original palette for (i = 0; i < BRCOSA_ITEMS; i++) mem_prev_bcsp[i] = brcosa_values_default[i]; /* Enables preview_toggle code to detect an initialisation call * (should not happen now, but let's play it safe) */ brcosa_buttons[0] = NULL; mem_preview = TRUE; // If in RGB mode this is required to enable live preview brcosa_window = add_a_window(GTK_WINDOW_TOPLEVEL, _("Transform Colour"), GTK_WIN_POS_MOUSE, TRUE); gtk_window_set_policy(GTK_WINDOW(brcosa_window), FALSE, FALSE, TRUE); // Automatically grow/shrink window vbox = add_vbox(brcosa_window); table2 = add_a_table(6, 2, 10, vbox ); for (i = 0; i < BRCOSA_ITEMS; i++) { j = BRCOSA_INDEX(i); add_to_table(tab_txt[i], table2, order[i], 0, 0); brcosa_values[i] = brcosa_values_default[j]; brcosa_spins[i] = mt_spinslide_new(255, 20); gtk_table_attach(GTK_TABLE(table2), brcosa_spins[i], 1, 2, order[i], order[i] + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); mt_spinslide_set_range(brcosa_spins[i], mins[j], maxs[j]); mt_spinslide_set_value(brcosa_spins[i], brcosa_values[i]); mt_spinslide_connect(brcosa_spins[i], GTK_SIGNAL_FUNC(brcosa_spinslide_moved), (gpointer)i); } /// MIDDLE SECTION add_hseparator(vbox, -2, 10); hbox = pack(vbox, gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox); table = add_a_table(4, 4, 0, vbox); button = add_a_toggle(_("Show Detail"), hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "toggled", GTK_SIGNAL_FUNC(click_brcosa_show_toggle), table); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), inifile_get_gboolean("transcol_show", FALSE)); #if 0 button = gtk_button_new_with_label(_("Store Values")); gtk_widget_show (button); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 4); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_brcosa_store), NULL); #endif /// OPTIONAL SECTION add_to_table(_("Posterize type"), table, 0, 0, 5); to_table_l(wj_option_menu(pos_txt, 3, posterize_mode, &posterize_mode, GTK_SIGNAL_FUNC(brcosa_posterize_changed)), table, 0, 1, 2, 0); if (mem_img_bpp == 1) add_to_table(_("Palette"), table, 2, 0, 5); else { brcosa_pal = sig_toggle(_("Palette"), FALSE, NULL, GTK_SIGNAL_FUNC(click_brcosa_preview)); to_table(brcosa_pal, table, 2, 0, 0); brcosa_img = sig_toggle(_("Image"), TRUE, &mem_preview, GTK_SIGNAL_FUNC(click_brcosa_RGB_toggle)); to_table(brcosa_img, table, 1, 0, 0); if (mem_clipboard && (mem_clip_bpp == 3)) { brcosa_clip = sig_toggle(_("Clipboard"), FALSE, &mem_preview_clip, GTK_SIGNAL_FUNC(click_brcosa_RGB_toggle)); to_table_l(brcosa_clip, table, 1, 1, 2, 0); } } hbox = gtk_hbox_new(FALSE, 0); gtk_widget_show(hbox); to_table_l(hbox, table, 2, 1, 2, 0); brcosa_pal_lim[0] = 0; brcosa_pal_lim[1] = mem_cols - 1; for (i = 0; i < 2; i++) { brcosa_pspins[i] = xpack(hbox,add_a_spin(brcosa_pal_lim[i], 0, mem_cols - 1)); spin_connect(brcosa_pspins[i], GTK_SIGNAL_FUNC(brcosa_pal_lim_change), NULL); } brcosa_view = sig_toggle(_("Auto-Preview"), brcosa_auto, NULL, GTK_SIGNAL_FUNC(click_brcosa_preview_toggle)); to_table(brcosa_view, table, 3, 0, 0); for (i = 0; i < 3; i++) { brcosa_rgb[i] = sig_toggle(rgb_txt[i], TRUE, NULL, GTK_SIGNAL_FUNC(click_brcosa_preview)); to_table(brcosa_rgb[i], table, 3, 1 + i, 0); } /// BOTTOM AREA add_hseparator(vbox, -2, 10); hbox = pack(vbox, gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); button = add_a_button(_("Cancel"), 4, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_brcosa_cancel), NULL); gtk_signal_connect(GTK_OBJECT(brcosa_window), "delete_event", GTK_SIGNAL_FUNC(click_brcosa_cancel), NULL); gtk_widget_add_accelerator(button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); brcosa_buttons[0] = button; button = add_a_button(_("Preview"), 4, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_brcosa_preview), NULL); brcosa_buttons[1] = button; button = add_a_button(_("Reset"), 4, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_brcosa_reset), NULL); brcosa_buttons[2] = button; button = add_a_button(_("Apply"), 4, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_brcosa_apply), NULL); brcosa_buttons[3] = button; button = add_a_button(_("OK"), 4, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(click_brcosa_ok), NULL); gtk_widget_add_accelerator(button, "clicked", ag, GDK_KP_Enter, 0, (GtkAccelFlags)0); gtk_widget_add_accelerator(button, "clicked", ag, GDK_Return, 0, (GtkAccelFlags)0); brcosa_buttons[4] = button; click_brcosa_preview_toggle(); // Show/hide preview button brcosa_buttons_sensitive(); // Disable buttons gtk_window_set_transient_for(GTK_WINDOW(brcosa_window), GTK_WINDOW(main_window)); gtk_widget_show(brcosa_window); gtk_window_add_accel_group(GTK_WINDOW(brcosa_window), ag); #if GTK_MAJOR_VERSION == 1 /* To make Smooth theme engine render sliders properly */ gtk_widget_queue_resize(brcosa_window); #endif } /// RESIZE/RESCALE WINDOWS GtkWidget *sisca_window, *sisca_table; GtkWidget *sisca_spins[6], *sisca_toggles[2], *sisca_gc; gboolean sisca_scale; static void sisca_moved(GtkAdjustment *adjustment, gpointer user_data) { int w, h, nw, idx = (int)user_data; if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sisca_toggles[0]))) return; w = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(sisca_spins[0])); h = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(sisca_spins[1])); if (idx) { nw = rint(h * mem_width / (float)mem_height); nw = nw < 1 ? 1 : nw > MAX_WIDTH ? MAX_WIDTH : nw; if (nw == w) return; } else { nw = rint(w * mem_height / (float)mem_width); nw = nw < 1 ? 1 : nw > MAX_HEIGHT ? MAX_HEIGHT : nw; if (nw == h) return; } idx ^= 1; /* Other coordinate */ gtk_spin_button_update(GTK_SPIN_BUTTON(sisca_spins[idx])); gtk_spin_button_set_value(GTK_SPIN_BUTTON(sisca_spins[idx]), nw); } static void alert_same_geometry() { alert_box(_("Error"), _("New geometry is the same as now - nothing to do."), NULL); } static int scale_mode = 6; static int resize_mode = 0; static int boundary_mode = BOUND_MIRROR; int sharper_reduce; static void click_sisca_ok(GtkWidget *widget, gpointer user_data) { int nw, nh, ox = 0, oy = 0, res = 1, scale_type = 0, gcor = FALSE; read_spin(sisca_spins[1]); // For aspect ratio handling nw = read_spin(sisca_spins[0]); nh = read_spin(sisca_spins[1]); if (!sisca_scale) { ox = read_spin(sisca_spins[2]); oy = read_spin(sisca_spins[3]); } if ((nw == mem_width) && (nh == mem_height) && !ox && !oy) { alert_same_geometry(); return; } if (sisca_scale) { if (mem_img_bpp == 3) { scale_type = scale_mode; gcor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sisca_gc)); } res = mem_image_scale(nw, nh, scale_type, gcor, sharper_reduce, boundary_mode); } else res = mem_image_resize(nw, nh, ox, oy, resize_mode); if (!res) { update_stuff(UPD_GEOM); destroy_dialog(sisca_window); } else memory_errors(res); } void memory_errors(int type) { if ( type == 1 ) alert_box(_("Error"), _("The operating system cannot allocate the memory for this operation."), NULL); if ( type == 2 ) alert_box(_("Error"), _("You have not allocated enough memory in the Preferences window for this operation."), NULL); } gint click_sisca_centre( GtkWidget *widget, GdkEvent *event, gpointer data ) { int nw = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(sisca_spins[0]) ); int nh = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(sisca_spins[1]) ); nw = (nw - mem_width) / 2; nh = (nh - mem_height) / 2; gtk_spin_button_set_value( GTK_SPIN_BUTTON(sisca_spins[2]), nw ); gtk_spin_button_set_value( GTK_SPIN_BUTTON(sisca_spins[3]), nh ); return FALSE; } static GtkWidget *filter_pack(int am, int idx, int *var) { char *fnames[] = { _("Nearest Neighbour"), am ? _("Bilinear / Area Mapping") : _("Bilinear"), _("Bicubic"), _("Bicubic edged"), _("Bicubic better"), _("Bicubic sharper"), _("Blackman-Harris"), NULL }; return (wj_radio_pack(fnames, -1, 0, idx, var, NULL)); } void sisca_init( char *title ) { GtkWidget *button_centre, *sisca_vbox, *sisca_hbox; GtkWidget *wvbox, *wvbox2, /**notebook,*/ *page0, *page1, *button; sisca_window = add_a_window( GTK_WINDOW_TOPLEVEL, title, GTK_WIN_POS_CENTER, TRUE ); sisca_vbox = add_vbox(sisca_window); sisca_table = add_a_table(3, 3, 5, sisca_vbox); add_to_table( _("Width "), sisca_table, 0, 1, 0 ); add_to_table( _("Height "), sisca_table, 0, 2, 0 ); add_to_table( _("Original "), sisca_table, 1, 0, 0); sisca_spins[0] = spin_to_table(sisca_table, 1, 1, 5, mem_width, mem_width, mem_width); sisca_spins[1] = spin_to_table(sisca_table, 1, 2, 5, mem_height, mem_height, mem_height); GTK_WIDGET_UNSET_FLAGS (sisca_spins[0], GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (sisca_spins[1], GTK_CAN_FOCUS); add_to_table( _("New"), sisca_table, 2, 0, 0 ); sisca_spins[0] = spin_to_table(sisca_table, 2, 1, 5, mem_width, 1, MAX_WIDTH); sisca_spins[1] = spin_to_table(sisca_table, 2, 2, 5, mem_height, 1, MAX_HEIGHT); spin_connect(sisca_spins[0], GTK_SIGNAL_FUNC(sisca_moved), (gpointer)0); spin_connect(sisca_spins[1], GTK_SIGNAL_FUNC(sisca_moved), (gpointer)1); if ( !sisca_scale ) { add_to_table( _("Offset"), sisca_table, 3, 0, 0 ); sisca_spins[2] = spin_to_table(sisca_table, 3, 1, 5, 0, -MAX_WIDTH, MAX_WIDTH); sisca_spins[3] = spin_to_table(sisca_table, 3, 2, 5, 0, -MAX_HEIGHT, MAX_HEIGHT); button_centre = gtk_button_new_with_label(_("Centre")); gtk_widget_show(button_centre); gtk_table_attach (GTK_TABLE (sisca_table), button_centre, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 5); gtk_signal_connect(GTK_OBJECT(button_centre), "clicked", GTK_SIGNAL_FUNC(click_sisca_centre), NULL); } add_hseparator( sisca_vbox, -2, 10 ); sisca_toggles[0] = sig_toggle(_("Fix Aspect Ratio"), TRUE, (gpointer)0, GTK_SIGNAL_FUNC(sisca_moved)); sisca_hbox = sisca_gc = NULL; wvbox = page0 = sisca_vbox; /* Resize */ if (!sisca_scale) { char *resize_modes[] = { _("Clear"), _("Tile"), _("Mirror tile"), NULL }; sisca_hbox = wj_radio_pack(resize_modes, -1, 0, resize_mode, &resize_mode, NULL); } /* RGB rescale */ else if (mem_img_bpp == 3) { char *bound_modes[] = { _("Mirror"), _("Tile"), _("Void") }; sisca_hbox = pack(sisca_vbox, gtk_hbox_new(FALSE, 0)); wvbox = pack(sisca_hbox, gtk_vbox_new(FALSE, 0)); sisca_gc = pack_end(wvbox, gamma_toggle()); // notebook = pack(sisca_vbox, buttoned_book(&page0, &page1, &button, _("Settings"))); wvbox2 = pack_end(sisca_hbox, gtk_vbox_new(FALSE, 0)); pack(wvbox2, button); add_hseparator(page1, -2, 10); pack(page1, sig_toggle(_("Sharper image reduction"), sharper_reduce, &sharper_reduce, NULL)); add_with_frame(page1, _("Boundary extension"), wj_radio_pack( bound_modes, 3, 0, boundary_mode, &boundary_mode, NULL)); sisca_hbox = filter_pack(TRUE, scale_mode, &scale_mode); } pack(wvbox, sisca_toggles[0]); if (sisca_hbox) { add_hseparator(page0, -2, 10); xpack(page0, sisca_hbox); } add_hseparator(page0, -2, 10); pack(sisca_vbox, OK_box(5, sisca_window, _("OK"), GTK_SIGNAL_FUNC(click_sisca_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); gtk_window_set_transient_for(GTK_WINDOW(sisca_window), GTK_WINDOW(main_window)); gtk_widget_show_all(sisca_window); } void pressed_scale_size(int mode) { sisca_scale = mode; sisca_init(mode ? _("Scale Canvas") : _("Resize Canvas")); } /// PALETTE EDITOR WINDOW enum { CHOOK_CANCEL = 0, CHOOK_PREVIEW, CHOOK_OK, CHOOK_SELECT, CHOOK_SET, CHOOK_UNVIEW, CHOOK_CHANGE }; static chanlist ctable_; /* "Alpha" here is in fact opacity, so is separate from channels */ static unsigned char *opctable; static GtkWidget *allcol_window, *allcol_list; static int allcol_idx, allcol_preview; static colour_hook allcol_hook; static void allcol_ok(GtkWidget *window) { update_window_spin(window); allcol_hook(CHOOK_OK); gtk_widget_destroy(window); free(ctable_[CHN_IMAGE]); } static void allcol_preview_toggle(GtkToggleButton *button, GtkWidget *window) { allcol_hook((allcol_preview = button->active) ? CHOOK_PREVIEW : CHOOK_UNVIEW); } static gboolean allcol_cancel(GtkWidget *window) { allcol_hook(CHOOK_CANCEL); gtk_widget_destroy(window); free(ctable_[CHN_IMAGE]); return (FALSE); } static void color_refresh() { gtk_list_select_item(GTK_LIST(allcol_list), allcol_idx); /* Stupid GTK+ does nothing for gtk_widget_queue_draw(allcol_list) */ gtk_container_foreach(GTK_CONTAINER(allcol_list), (GtkCallback)gtk_widget_queue_draw, NULL); } static gboolean color_expose( GtkWidget *widget, GdkEventExpose *event, gpointer user_data ) { unsigned char *rgb, *lc = ctable_[CHN_IMAGE] + (int)user_data * 3; int x = event->area.x, y = event->area.y, w = event->area.width, h = event->area.height; int i, j = w * 3; rgb = malloc(j); if (rgb) { for (i = 0; i < j; i += 3) { rgb[i + 0] = lc[0]; rgb[i + 1] = lc[1]; rgb[i + 2] = lc[2]; } gdk_draw_rgb_image(widget->window, widget->style->black_gc, x, y, w, h, GDK_RGB_DITHER_NONE, rgb, 0); free(rgb); } return FALSE; } static void color_set(GtkWidget *cs, gpointer user_data) { unsigned char *lc; int idx, rgb, opacity; GtkWidget *widget; GdkColor c; rgb = cpick_get_colour(cs, &opacity); widget = GTK_WIDGET(gtk_object_get_user_data(GTK_OBJECT(cs))); idx = (int)gtk_object_get_user_data(GTK_OBJECT(widget)); lc = ctable_[CHN_IMAGE] + idx * 3; lc[0] = INT_2_R(rgb); lc[1] = INT_2_G(rgb); lc[2] = INT_2_B(rgb); opctable[idx] = opacity; c.pixel = 0; c.red = lc[0] * 257; c.green = lc[1] * 257; c.blue = lc[2] * 257; gdk_colormap_alloc_color( gdk_colormap_get_system(), &c, FALSE, TRUE ); gtk_widget_queue_draw(widget); allcol_hook(CHOOK_SET); } static void color_select( GtkList *list, GtkWidget *widget, gpointer user_data ) { unsigned char *lc; int rgb, idx = (int)gtk_object_get_user_data(GTK_OBJECT(widget)); GtkWidget *cs = GTK_WIDGET(user_data); gtk_object_set_user_data( GTK_OBJECT(cs), widget ); gtk_signal_handler_block_by_func( GTK_OBJECT(cs), GTK_SIGNAL_FUNC(color_set), NULL ); lc = ctable_[CHN_IMAGE] + idx * 3; rgb = MEM_2_INT(lc, 0); cpick_set_colour_previous(cs, rgb, opctable[idx]); cpick_set_colour(cs, rgb, opctable[idx]); allcol_idx = idx; gtk_signal_handler_unblock_by_func( GTK_OBJECT(cs), GTK_SIGNAL_FUNC(color_set), NULL ); allcol_hook(CHOOK_SELECT); } static void colour_window(GtkWidget *win, GtkWidget *extbox, int cnt, int idx, char **cnames, int alpha, colour_hook chook, GtkSignalFunc lhook) { GtkWidget *vbox, *hbox, *hbut; GtkWidget *col_list, *l_item, *hbox2, *label, *drw, *swindow, *viewport; GtkWidget *cs; GtkAdjustment *adj; char txt[64], *tmp = txt; int i; if (idx >= cnt) idx = 0; cs = cpick_create(); cpick_set_opacity_visibility( cs, alpha ); gtk_signal_connect( GTK_OBJECT(cs), "color_changed", GTK_SIGNAL_FUNC(color_set), NULL ); allcol_window = win; allcol_hook = chook; allcol_preview = FALSE; swindow = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(swindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); viewport = gtk_viewport_new (NULL, NULL); gtk_widget_show(viewport); gtk_container_add (GTK_CONTAINER (swindow), viewport); allcol_idx = idx; allcol_list = col_list = gtk_list_new(); gtk_container_add ( GTK_CONTAINER(viewport), col_list ); gtk_widget_show( col_list ); for (i = 0; i < cnt; i++) { l_item = gtk_list_item_new(); gtk_object_set_user_data(GTK_OBJECT(l_item), (gpointer)i); if (lhook) gtk_signal_connect(GTK_OBJECT(l_item), "button_press_event", lhook, (gpointer)i); gtk_container_add( GTK_CONTAINER(col_list), l_item ); gtk_widget_show( l_item ); hbox2 = gtk_hbox_new( FALSE, 3 ); gtk_widget_show( hbox2 ); gtk_container_set_border_width( GTK_CONTAINER(hbox2), 3 ); gtk_container_add( GTK_CONTAINER(l_item), hbox2 ); drw = pack(hbox2, gtk_drawing_area_new()); gtk_drawing_area_size( GTK_DRAWING_AREA(drw), 20, 20 ); gtk_signal_connect(GTK_OBJECT(drw), "expose_event", GTK_SIGNAL_FUNC(color_expose), (gpointer)i); gtk_widget_show(drw); if (cnames) tmp = cnames[i]; else sprintf(txt, "%i", i); label = xpack(hbox2, gtk_label_new(tmp)); gtk_widget_show( label ); gtk_misc_set_alignment( GTK_MISC(label), 0.0, 1.0 ); } gtk_list_set_selection_mode(GTK_LIST(col_list), GTK_SELECTION_BROWSE); /* gtk_list_select_*() don't work in GTK_SELECTION_BROWSE mode */ gtk_container_set_focus_child(GTK_CONTAINER(col_list), GTK_WIDGET(g_list_nth(GTK_LIST(col_list)->children, idx)->data)); gtk_signal_connect(GTK_OBJECT(col_list), "select_child", GTK_SIGNAL_FUNC(color_select), cs); /* Make listbox top-to-bottom when it's useful or just not harmful */ if ((cnt > 6) || !extbox) { hbox = gtk_hbox_new(FALSE, 5); gtk_container_add( GTK_CONTAINER(allcol_window), hbox ); pack(hbox, swindow); vbox = xpack(hbox, gtk_vbox_new(FALSE, 5)); gtk_container_set_border_width( GTK_CONTAINER(vbox), 5 ); gtk_box_pack_start (GTK_BOX (vbox), cs, TRUE, FALSE, 0); } else { vbox = gtk_vbox_new( FALSE, 5 ); gtk_container_set_border_width( GTK_CONTAINER(vbox), 5 ); gtk_container_add( GTK_CONTAINER(allcol_window), vbox ); hbox = xpack(vbox, gtk_hbox_new(FALSE, 10)); pack(hbox, swindow); xpack(hbox, cs); } gtk_widget_show(vbox); gtk_widget_show(hbox); if (extbox) pack(vbox, extbox); hbut = OK_box(0, allcol_window, _("OK"), GTK_SIGNAL_FUNC(allcol_ok), _("Cancel"), GTK_SIGNAL_FUNC(allcol_cancel)); OK_box_add_toggle(hbut, _("Preview"), GTK_SIGNAL_FUNC(allcol_preview_toggle)); hbox = pack(vbox, gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox); pack_end(hbox, widget_align_minsize(hbut, 260, -1)); gtk_widget_show( cs ); gtk_window_set_transient_for( GTK_WINDOW(allcol_window), GTK_WINDOW(main_window) ); gtk_widget_show( allcol_window ); #if GTK_MAJOR_VERSION == 1 handle_events(); /* GTK2 calls select handler on its own, GTK1 needs prodding */ gtk_list_select_item(GTK_LIST(col_list), idx); /* Re-render sliders, adjust option menu */ gtk_widget_queue_resize(allcol_window); #endif /* Scroll list to selected item */ adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(swindow)); if (adj->upper > adj->page_size) { float f = adj->upper * (idx + 0.5) / cnt - adj->page_size * 0.5; adj->value = f < 0.0 ? 0.0 : f > adj->upper - adj->page_size ? adj->upper - adj->page_size : f; gtk_adjustment_value_changed(adj); } } static void do_allcol() { int i; for (i = 0; i < mem_cols; i++) { mem_pal[i].red = ctable_[CHN_IMAGE][i * 3 + 0]; mem_pal[i].green = ctable_[CHN_IMAGE][i * 3 + 1]; mem_pal[i].blue = ctable_[CHN_IMAGE][i * 3 + 2]; } update_stuff(UPD_PAL); } static void do_allover(int idx) { unsigned char *lc = ctable_[CHN_IMAGE] + idx * 3; int i; for (i = 0; i < NUM_CHANNELS; i++) { channel_rgb[i][0] = lc[i * 3 + 0]; channel_rgb[i][1] = lc[i * 3 + 1]; channel_rgb[i][2] = lc[i * 3 + 2]; channel_opacity[i] = opctable[idx + i]; } update_stuff(UPD_RENDER); } static void do_AB(int idx) { unsigned char *lc = ctable_[CHN_IMAGE] + idx * 3; png_color *A0, *B0; A0 = mem_img_bpp == 1 ? &mem_pal[mem_col_A] : &mem_col_A24; B0 = mem_img_bpp == 1 ? &mem_pal[mem_col_B] : &mem_col_B24; A0->red = lc[0]; A0->green = lc[1]; A0->blue = lc[2]; B0->red = lc[3]; B0->green = lc[4]; B0->blue = lc[5]; update_stuff(mem_img_bpp == 1 ? UPD_PAL : UPD_AB); } static void set_csel() { unsigned char *lc = ctable_[CHN_IMAGE]; csel_data->center = RGB_2_INT(lc[0], lc[1], lc[2]); csel_data->center_a = ctable_[CHN_ALPHA][0]; csel_data->limit = RGB_2_INT(lc[3], lc[4], lc[5]); csel_data->limit_a = ctable_[CHN_ALPHA][1]; csel_preview = RGB_2_INT(lc[6], lc[7], lc[8]); /* !!! Alpha is disabled for now - later will be opacity !!! */ // csel_preview_a = opctable[2]; } static GtkWidget *range_spins[2]; static void select_colour(int what) { switch (what) { case CHOOK_UNVIEW: /* Disable preview */ case CHOOK_CANCEL: /* Cancel */ mem_pal_copy(mem_pal, brcosa_palette); update_stuff(UPD_PAL); break; case CHOOK_SET: /* Set */ if (!allcol_preview) break; case CHOOK_PREVIEW: /* Preview */ do_allcol(); break; case CHOOK_OK: /* OK */ mem_pal_copy(mem_pal, brcosa_palette); spot_undo(UNDO_PAL); do_allcol(); break; } } static gint click_colour(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { /* Middle click sets "from" */ if ((event->type == GDK_BUTTON_PRESS) && (event->button == 2)) gtk_spin_button_set_value(GTK_SPIN_BUTTON(range_spins[0]), (int)user_data); /* Right click sets "to" */ if ((event->type == GDK_BUTTON_PRESS) && (event->button == 3)) gtk_spin_button_set_value(GTK_SPIN_BUTTON(range_spins[1]), (int)user_data); /* Let click processing continue */ return (FALSE); } static void set_range_spin(GtkButton *button, GtkWidget *spin) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), allcol_idx); } static void make_cscale(GtkButton *button, gpointer user_data) { int i, n, start, stop, start0, mode; unsigned char *c0, *c1, *lc; double d; mode = wj_option_menu_get_history(GTK_WIDGET(user_data)); start = start0 = read_spin(range_spins[0]); stop = read_spin(range_spins[1]); if (mode <= 2) /* RGB/sRGB/HSV */ { if (start > stop) { i = start; start = stop; stop = i; } if (stop < start + 2) return; } else if (stop == start) return; /* Gradient */ c0 = lc = ctable_[CHN_IMAGE] + start * 3; c1 = ctable_[CHN_IMAGE] + stop * 3; d = n = stop - start; switch (mode) { case 0: /* RGB */ { double r0, g0, b0, dr, dg, db; dr = ((int)c1[0] - c0[0]) / d; r0 = c0[0]; dg = ((int)c1[1] - c0[1]) / d; g0 = c0[1]; db = ((int)c1[2] - c0[2]) / d; b0 = c0[2]; for (i = 1; i < n; i++) { lc += 3; lc[0] = rint(r0 + dr * i); lc[1] = rint(g0 + dg * i); lc[2] = rint(b0 + db * i); } break; } case 1: /* sRGB */ { double r0, g0, b0, dr, dg, db, rr, gg, bb; dr = (gamma256[c1[0]] - (r0 = gamma256[c0[0]])) / d; dg = (gamma256[c1[1]] - (g0 = gamma256[c0[1]])) / d; db = (gamma256[c1[2]] - (b0 = gamma256[c0[2]])) / d; for (i = 1; i < n; i++) { lc += 3; rr = r0 + dr * i; lc[0] = UNGAMMA256(rr); gg = g0 + dg * i; lc[1] = UNGAMMA256(gg); bb = b0 + db * i; lc[2] = UNGAMMA256(bb); } break; } case 2: /* HSV */ { int t; double h0, dh, s0, ds, v0, dv, hsv[6], hh, ss, vv; rgb2hsv(c0, hsv + 0); rgb2hsv(c1, hsv + 3); /* Grey has no hue */ if (hsv[1] == 0.0) hsv[0] = hsv[3]; if (hsv[4] == 0.0) hsv[3] = hsv[0]; /* Always go from 1st to 2nd hue in ascending order */ t = start == start0 ? 0 : 3; if (hsv[t] > hsv[t ^ 3]) hsv[t] -= 6.0; dh = (hsv[3] - hsv[0]) / d; h0 = hsv[0]; ds = (hsv[4] - hsv[1]) / d; s0 = hsv[1]; dv = (hsv[5] - hsv[2]) / d; v0 = hsv[2]; for (i = 1; i < n; i++) { vv = v0 + dv * i; ss = vv - vv * (s0 + ds * i); hh = h0 + dh * i; if (hh < 0.0) hh += 6.0; t = hh; hh = (hh - t) * (vv - ss); if (t & 1) { vv -= hh; hh += vv; } else hh += ss; t >>= 1; lc += 3; lc[t] = rint(vv); lc[(t + 1) % 3] = rint(hh); lc[(t + 2) % 3] = rint(ss); } break; } default: /* Gradient */ { int j, op, c[NUM_CHANNELS + 3]; j = start < stop ? 1 : -1; for (i = 0; i != n + j; i += j , lc += j * 3) { op = grad_value(c, 0, i / d); /* Zero opacity - empty slot */ if (!op) lc[0] = lc[1] = lc[2] = 0; else { lc[0] = (c[0] + 128) >> 8; lc[1] = (c[1] + 128) >> 8; lc[2] = (c[2] + 128) >> 8; } } break; } } color_refresh(); select_colour(CHOOK_SET); } static void select_overlay(int what) { char txt[64]; int i, j; switch (what) { case CHOOK_UNVIEW: /* Disable preview */ case CHOOK_CANCEL: /* Cancel */ do_allover(NUM_CHANNELS); // Restore original values break; case CHOOK_SET: /* Set */ if (!allcol_preview) break; case CHOOK_PREVIEW: /* Preview */ do_allover(0); break; case CHOOK_OK: /* OK */ do_allover(0); for (i = 0; i < NUM_CHANNELS; i++) // Save all settings to ini file { for (j = 0; j < 4; j++) { sprintf(txt, "overlay%i%i", i, j); inifile_set_gint32(txt, j < 3 ? channel_rgb[i][j] : channel_opacity[i]); } } break; } } static GtkWidget *AB_spins[NUM_CHANNELS]; static void select_AB(int what) { int i; switch (what) { case CHOOK_UNVIEW: /* Disable preview */ case CHOOK_CANCEL: /* Cancel */ do_AB(2); break; case CHOOK_OK: /* OK */ do_AB(2); spot_undo(UNDO_PAL); for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) { channel_col_A[i] = ctable_[i][0]; channel_col_B[i] = ctable_[i][1]; } do_AB(0); break; case CHOOK_SET: /* Set */ if (!allcol_preview) break; case CHOOK_PREVIEW: /* Preview */ do_AB(0); break; case CHOOK_SELECT: /* Select */ for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) { mt_spinslide_set_value(AB_spins[i], ctable_[i][allcol_idx]); } break; } } static void AB_spin_moved(GtkAdjustment *adj, gpointer user_data) { ctable_[(int)user_data][allcol_idx] = ADJ2INT(adj); } static void posterize_AB(GtkButton *button, gpointer user_data) { static const int posm[8] = {0, 0xFF00, 0x5500, 0x2480, 0x1100, 0x0840, 0x0410, 0x0204}; unsigned char *lc = ctable_[CHN_IMAGE]; int i, pm, ps; ps = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(user_data)); inifile_set_gint32("posterizeInt", ps); if (ps >= 8) return; pm = posm[ps]; ps = 8 - ps; for (i = 0; i < 6; i++) lc[i] = ((lc[i] >> ps) * pm) >> 8; color_refresh(); select_AB(CHOOK_SET); } static GtkWidget *csel_spin, *csel_toggle; static unsigned char csel_save[CSEL_SVSIZE]; static int csel_preview0, csel_preview_a0; static void select_csel(int what) { int old_over = csel_overlay; switch (what) { case CHOOK_CANCEL: /* Cancel */ memcpy(csel_data, csel_save, CSEL_SVSIZE); csel_preview = csel_preview0; csel_preview_a = csel_preview_a0; csel_reset(csel_data); case CHOOK_UNVIEW: /* Disable preview */ csel_overlay = 0; if (old_over) update_stuff(UPD_RENDER); break; case CHOOK_PREVIEW: /* Preview */ csel_overlay = 1; case CHOOK_CHANGE: /* Range/mode/invert controls changed */ if (!csel_overlay) break; // No preview case CHOOK_OK: /* OK */ csel_data->range = read_float_spin(csel_spin); csel_data->invert = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(csel_toggle)); set_csel(); csel_reset(csel_data); if (what == CHOOK_OK) { csel_overlay = 0; update_stuff(UPD_RENDER | UPD_MODE); } else update_stuff(UPD_RENDER); break; case CHOOK_SET: /* Set */ set_csel(); if (allcol_idx == 1) /* Limit color changed */ { // This triggers CHOOK_CHANGE which will redraw gtk_spin_button_set_value(GTK_SPIN_BUTTON(csel_spin), csel_eval(csel_data->mode, csel_data->center, csel_data->limit)); } else if (csel_overlay) { /* Center color changed */ if (allcol_idx == 0) csel_reset(csel_data); /* Else, overlay color changed */ update_stuff(UPD_RENDER); } break; } } static void csel_controls_changed() { select_csel(CHOOK_CHANGE); } static void csel_mode_changed(GtkToggleButton *widget, gpointer user_data) { if (!gtk_toggle_button_get_active(widget)) return; if (csel_data->mode == (int)user_data) return; csel_data->mode = (int)user_data; set_csel(); // This triggers CHOOK_CHANGE which will redraw gtk_spin_button_set_value(GTK_SPIN_BUTTON(csel_spin), csel_eval(csel_data->mode, csel_data->center, csel_data->limit)); } typedef struct { GtkWidget *ctoggle, *szspin; GtkWidget *ttoggle, *twspin, *thspin; int color0[GRID_MAX]; int ctoggle0, size0; int ttoggle0, tw0, th0; } grid_widgets; static void select_grid(int what) { grid_widgets *gw = gtk_object_get_user_data(GTK_OBJECT(allcol_window)); int i; switch (what) { case CHOOK_UNVIEW: /* Disable preview */ case CHOOK_CANCEL: /* Cancel */ // Restore original values memcpy(grid_rgb, gw->color0, sizeof(gw->color0)); color_grid = gw->ctoggle0; mem_grid_min = gw->size0; show_tile_grid = gw->ttoggle0; tgrid_dx = gw->tw0; tgrid_dy = gw->th0; break; case CHOOK_CHANGE: /* Grid controls changed */ case CHOOK_SET: /* Set */ if (!allcol_preview) return; case CHOOK_PREVIEW: /* Preview */ case CHOOK_OK: /* OK */ for (i = 0; i < GRID_MAX; i++) { unsigned char *tmp = ctable_[CHN_IMAGE] + i * 3; grid_rgb[i] = MEM_2_INT(tmp, 0); } if (what == CHOOK_SET) break; // Color, not controls, changed color_grid = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gw->ctoggle)); mem_grid_min = read_spin(gw->szspin); show_tile_grid = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gw->ttoggle)); tgrid_dx = read_spin(gw->twspin); tgrid_dy = read_spin(gw->thspin); break; default: return; } update_stuff(UPD_RENDER); } static void grid_controls_changed() { select_grid(CHOOK_CHANGE); } static int alloc_ctable(int nslots) { int i, sz = nslots * (NUM_CHANNELS + 3); unsigned char *mem = calloc(1, sz); if (!mem) return (FALSE); ctable_[CHN_IMAGE] = mem; mem += nslots * 3; for (i = CHN_IMAGE + 1; i < NUM_CHANNELS; i++) { ctable_[i] = mem; mem += nslots; } opctable = mem; return (TRUE); } void colour_selector( int cs_type ) // Bring up GTK+ colour wheel { unsigned char *lc; GtkWidget *win, *extbox, *button, *spin, *opt; int i, j; if (cs_type >= COLSEL_EDIT_ALL) { char *fromto[] = { _("From"), _("To") }; char *scales[] = { _("RGB"), _("sRGB"), _("HSV"), _("Gradient") }; if (!alloc_ctable(256)) return; lc = ctable_[CHN_IMAGE]; mem_pal_copy(brcosa_palette, mem_pal); // Remember old settings for (i = 0; i < mem_cols; i++) { lc[i * 3 + 0] = mem_pal[i].red; lc[i * 3 + 1] = mem_pal[i].green; lc[i * 3 + 2] = mem_pal[i].blue; opctable[i] = 255; } /* Prepare range controls */ extbox = gtk_hbox_new(FALSE, 0); pack(extbox, gtk_label_new(_("Scale"))); for (i = 0; i < 2; i++) { button = add_a_button(fromto[i], 4, extbox, TRUE); spin = range_spins[i] = pack(extbox, add_a_spin(0, 0, 255)); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_range_spin), spin); } opt = xpack(extbox, wj_option_menu(scales, 4, 0, NULL, NULL)); gtk_container_set_border_width(GTK_CONTAINER(opt), 4); button = add_a_button(_("Create"), 4, extbox, TRUE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(make_cscale), (gpointer)opt); gtk_widget_show_all(extbox); win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Palette Editor"), GTK_WIN_POS_MOUSE, TRUE); colour_window(win, extbox, mem_cols, cs_type - COLSEL_EDIT_ALL, NULL, FALSE, select_colour, GTK_SIGNAL_FUNC(click_colour)); } else if (cs_type == COLSEL_OVERLAYS) { if (!alloc_ctable(NUM_CHANNELS * 2)) return; lc = ctable_[CHN_IMAGE]; for (i = 0; i < NUM_CHANNELS; i++) { lc[i * 3 + 0] = channel_rgb[i][0]; lc[i * 3 + 1] = channel_rgb[i][1]; lc[i * 3 + 2] = channel_rgb[i][2]; opctable[i] = channel_opacity[i]; } /* Save old values in the same array */ memcpy(lc + NUM_CHANNELS * 3, lc, NUM_CHANNELS * 3); memcpy(opctable + NUM_CHANNELS, opctable, NUM_CHANNELS); win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Configure Overlays"), GTK_WIN_POS_CENTER, TRUE); colour_window(win, NULL, NUM_CHANNELS, 0, allchannames, TRUE, select_overlay, NULL); } else if (cs_type == COLSEL_EDIT_AB) { static char *AB_txt[] = { "A", "B" }; png_color *A0, *B0; A0 = mem_img_bpp == 1 ? &mem_pal[mem_col_A] : &mem_col_A24; B0 = mem_img_bpp == 1 ? &mem_pal[mem_col_B] : &mem_col_B24; if (!alloc_ctable(4)) return; lc = ctable_[CHN_IMAGE]; lc[0] = A0->red; lc[1] = A0->green; lc[2] = A0->blue; lc[3] = B0->red; lc[4] = B0->green; lc[5] = B0->blue; /* Save previous values right here */ memcpy(lc + 2 * 3, lc, 2 * 3); opctable[0] = opctable[2] = 255; opctable[1] = opctable[3] = 255; for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) { ctable_[i][0] = ctable_[i][2] = channel_col_A[i]; ctable_[i][1] = ctable_[i][3] = channel_col_B[i]; } /* Prepare posterize controls */ extbox = gtk_table_new(3, 3, FALSE); win = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(extbox), win, 0, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); button = add_a_button(_("Posterize"), 4, win, TRUE); spin = pack(win, add_a_spin(inifile_get_gint32("posterizeInt", 1), 1, 8)); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(posterize_AB), spin); /* Prepare channel A/B controls */ for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) { j = i - CHN_ALPHA; spin = gtk_label_new(allchannames[i]); to_table(spin, extbox, 1, j, 0); gtk_misc_set_alignment(GTK_MISC(spin), 1.0 / 3.0, 0.5); spin = AB_spins[i] = mt_spinslide_new(-1, -1); gtk_table_attach(GTK_TABLE(extbox), spin, j, j + 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); mt_spinslide_set_range(spin, 0, 255); mt_spinslide_set_value(spin, channel_col_A[i]); mt_spinslide_connect(spin, GTK_SIGNAL_FUNC(AB_spin_moved), (gpointer)i); } gtk_widget_show_all(extbox); win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Colour Editor"), GTK_WIN_POS_MOUSE, TRUE); colour_window(win, extbox, 2, 0, AB_txt, FALSE, select_AB, NULL); } else if (cs_type == COLSEL_EDIT_CSEL) { char *csel_txt[] = { _("Centre"), _("Limit"), _("Preview") }; char *csel_modes[] = { _("Sphere"), _("Angle"), _("Cube"), NULL }; if (!csel_data) { csel_init(); if (!csel_data) return; } /* Save previous values */ memcpy(csel_save, csel_data, CSEL_SVSIZE); csel_preview0 = csel_preview; csel_preview_a0 = csel_preview_a; if (!alloc_ctable(3)) return; lc = ctable_[CHN_IMAGE]; lc[0] = INT_2_R(csel_data->center); lc[1] = INT_2_G(csel_data->center); lc[2] = INT_2_B(csel_data->center); ctable_[CHN_ALPHA][0] = csel_data->center_a; lc[3] = INT_2_R(csel_data->limit); lc[4] = INT_2_G(csel_data->limit); lc[5] = INT_2_B(csel_data->limit); ctable_[CHN_ALPHA][1] = csel_data->limit_a; lc[6] = INT_2_R(csel_preview); lc[7] = INT_2_G(csel_preview); lc[8] = INT_2_B(csel_preview); opctable[0] = opctable[1] = 255; opctable[2] = csel_preview_a; /* Prepare extra controls */ extbox = gtk_hbox_new(FALSE, 0); pack(extbox, gtk_label_new(_("Range"))); csel_spin = pack(extbox, add_float_spin(csel_data->range, 0, 765)); csel_toggle = add_a_toggle(_("Inverse"), extbox, csel_data->invert); track_updates(GTK_SIGNAL_FUNC(csel_controls_changed), csel_spin, csel_toggle, NULL); pack(extbox, wj_radio_pack(csel_modes, -1, 1, csel_data->mode, NULL, GTK_SIGNAL_FUNC(csel_mode_changed))); gtk_widget_show_all(extbox); win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Colour-Selective Mode"), GTK_WIN_POS_CENTER, TRUE); colour_window(win, extbox, 3, 0, /* !!! Alpha ranges not implemented yet !!! */ csel_txt, FALSE /* TRUE */, select_csel, NULL); } else if (cs_type == COLSEL_GRID) { char *grid_txt[GRID_MAX] = { _("Opaque"), _("Border"), _("Transparent"), _("Tile "), _("Segment") }; /* !!! "Tile " has a trailing space to be distinct from "Tile" in "Resize Canvas" */ grid_widgets *gw; if (!alloc_ctable(GRID_MAX)) return; lc = ctable_[CHN_IMAGE]; for (i = 0; i < GRID_MAX; i++) { lc[i * 3 + 0] = INT_2_R(grid_rgb[i]); lc[i * 3 + 1] = INT_2_G(grid_rgb[i]); lc[i * 3 + 2] = INT_2_B(grid_rgb[i]); opctable[i] = 255; } /* Prepare extra controls */ extbox = gtk_table_new(6, 2, FALSE); gw = bound_malloc(extbox, sizeof(grid_widgets)); gw->ctoggle = sig_toggle(_("Smart grid"), color_grid, NULL, NULL); to_table_l(gw->ctoggle, extbox, 0, 0, 1, 0); gw->ttoggle = sig_toggle(_("Tile grid"), show_tile_grid, NULL, NULL); to_table_l(gw->ttoggle, extbox, 0, 1, 2, 0); add_to_table(_("Minimum grid zoom"), extbox, 1, 0, 5); gw->szspin = spin_to_table(extbox, 1, 1, 0, mem_grid_min, 2, 12); add_to_table(_("Tile width"), extbox, 1, 2, 5); gw->twspin = spin_to_table(extbox, 1, 3, 0, tgrid_dx, 2, MAX_WIDTH); add_to_table(_("Tile height"), extbox, 1, 4, 5); gw->thspin = spin_to_table(extbox, 1, 5, 0, tgrid_dy, 2, MAX_HEIGHT); track_updates(GTK_SIGNAL_FUNC(grid_controls_changed), gw->ctoggle, gw->ttoggle, gw->szspin, gw->twspin, gw->thspin, NULL); gtk_widget_show_all(extbox); /* Save old values */ memcpy(gw->color0, grid_rgb, sizeof(gw->color0)); gw->ctoggle0 = color_grid; gw->size0 = mem_grid_min; gw->ttoggle0 = show_tile_grid; gw->tw0 = tgrid_dx; gw->th0 = tgrid_dy; win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Configure Grid"), GTK_WIN_POS_CENTER, TRUE); gtk_object_set_user_data(GTK_OBJECT(win), gw); colour_window(win, extbox, GRID_MAX, 0, grid_txt, FALSE, select_grid, NULL); } } /// QUANTIZE WINDOW #define QUAN_EXACT 0 #define QUAN_CURRENT 1 #define QUAN_PNN 2 #define QUAN_WU 3 #define QUAN_MAXMIN 4 #define QUAN_MAX 5 #define DITH_NONE 0 #define DITH_FS 1 #define DITH_STUCKI 2 #define DITH_ORDERED 3 #define DITH_DUMBFS 4 #define DITH_OLDDITHER 5 #define DITH_OLDSCATTER 6 #define DITH_MAX 7 static GtkWidget *quantize_window, *quantize_spin, *quantize_dither, *quantize_book; static GtkWidget *dither_serpent, *dither_spin, *dither_err; static int quantize_cols; /* Quantization & dither settings - persistent */ static int quantize_mode = -1, dither_mode = -1; static int quantize_tp; static int dither_cspace = CSPACE_SRGB, dither_dist = DIST_L2, dither_limit; static int dither_scan = TRUE, dither_8b, dither_sel; static double dither_fract[2] = {1.0, 0.85}; static void click_quantize_radio(GtkWidget *widget, gpointer data) { int c0 = 1, c1 = 256, n = (int)data; if (widget && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) return; quantize_mode = n; gtk_notebook_set_page(GTK_NOTEBOOK(quantize_book), (n == QUAN_PNN) || (n == QUAN_WU) ? 2 : n == QUAN_CURRENT ? 1 : 0); if (n == QUAN_EXACT) c0 = c1 = quantize_cols; else if (n == QUAN_CURRENT) c1 = mem_cols; spin_set_range(quantize_spin, c0, c1); /* No dither for exact conversion */ if (quantize_dither) gtk_widget_set_sensitive(quantize_dither, n != QUAN_EXACT); } static void click_quantize_ok(GtkWidget *widget, gpointer data) { int i, dither, new_cols, have_image = !!quantize_dither, err = 0; png_color newpal[256]; unsigned char *old_image = mem_img[CHN_IMAGE]; double efrac = 0.0; /* Dithering filters */ /* Floyd-Steinberg dither */ static short fs_dither[16] = { 16, 0, 0, 0, 7, 0, 0, 3, 5, 1, 0, 0, 0, 0, 0, 0 }; /* Stucki dither */ static short s_dither[16] = { 42, 0, 0, 0, 8, 4, 2, 4, 8, 4, 2, 1, 2, 4, 2, 1 }; dither = quantize_mode != QUAN_EXACT ? dither_mode : DITH_NONE; new_cols = read_spin(quantize_spin); if (have_image) /* Work on image */ { dither_scan = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(dither_serpent)); dither_8b = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(dither_err)); efrac = 0.01 * read_spin(dither_spin); dither_fract[dither_sel ? 1 : 0] = efrac; } gtk_widget_destroy(quantize_window); /* Paranoia */ if ((quantize_mode >= QUAN_MAX) || (dither >= DITH_MAX)) return; if (!have_image && (quantize_mode == QUAN_CURRENT)) return; i = undo_next_core(UC_NOCOPY, mem_width, mem_height, have_image ? 1 : mem_img_bpp, have_image ? CMASK_IMAGE : CMASK_NONE); if (i) { memory_errors(i); return; } switch (quantize_mode) { case QUAN_EXACT: /* Use image colours */ new_cols = quantize_cols; mem_cols_found(newpal); if (have_image) err = mem_convert_indexed(); dither = DITH_MAX; break; default: case QUAN_CURRENT: /* Use current palette */ break; case QUAN_PNN: /* PNN quantizer */ err = pnnquan(old_image, mem_width, mem_height, new_cols, newpal); break; case QUAN_WU: /* Wu quantizer */ err = wu_quant(old_image, mem_width, mem_height, new_cols, newpal); break; case QUAN_MAXMIN: /* Max-Min quantizer */ err = maxminquan(old_image, mem_width, mem_height, new_cols, newpal); break; } if (err) dither = DITH_MAX; else if (quantize_mode != QUAN_CURRENT) { memcpy(mem_pal, newpal, new_cols * sizeof(*mem_pal)); mem_cols = new_cols; } else if (quantize_tp) mem_cols = new_cols; // Truncate palette if (!have_image) /* Palette only */ { if (err < 0) memory_errors(1); update_stuff(UPD_PAL | CF_MENU); return; } switch (dither) { case DITH_NONE: case DITH_FS: case DITH_STUCKI: err = mem_dither(old_image, new_cols, dither == DITH_NONE ? NULL : dither == DITH_FS ? fs_dither : s_dither, dither_cspace, dither_dist, dither_limit, dither_sel, dither_scan, dither_8b, efrac); break; // !!! No code yet - temporarily disabled !!! // case DITH_ORDERED: case DITH_DUMBFS: err = mem_dumb_dither(old_image, mem_img[CHN_IMAGE], mem_pal, mem_width, mem_height, new_cols, TRUE); break; case DITH_OLDDITHER: err = mem_quantize(old_image, new_cols, 2); break; case DITH_OLDSCATTER: err = mem_quantize(old_image, new_cols, 3); break; case DITH_MAX: /* Stay silent unless a memory error happened */ err = err < 0; break; } if (err) memory_errors(1); /* Image was converted */ mem_col_A = mem_cols > 1 ? 1 : 0; mem_col_B = 0; update_stuff(UPD_2IDX); } static void choose_selective(GtkMenuItem *menuitem, gpointer user_data) { int i = (int)gtk_object_get_user_data(GTK_OBJECT(menuitem)); if (dither_sel == i) return; /* Selectivity state toggled */ if ((dither_sel == 0) ^ (i == 0)) { dither_fract[dither_sel ? 1 : 0] = 0.01 * read_spin(dither_spin); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dither_spin), 100.0 * dither_fract[i ? 1 : 0]); } dither_sel = i; } static GtkWidget *cspace_frame(int idx, gpointer var, GtkSignalFunc handler) { return (add_with_frame(NULL, _("Colour space"), wj_radio_pack(cspnames, NUM_CSPACES, 1, idx, var, handler))); } static GtkWidget *difference_frame(int idx, gpointer var, GtkSignalFunc handler) { char *dist_txt[] = {_("Largest (Linf)"), _("Sum (L1)"), _("Euclidean (L2)")}; return (add_with_frame(NULL, _("Difference measure"), wj_radio_pack(dist_txt, 3, 1, idx, var, handler))); } void pressed_quantize(int palette) { GtkWidget *mainbox, *topbox, /**notebook,*/ *page0, *page1, *button; GtkWidget *vbox, *hbox, *table, *pages[3]; char *rad_txt[] = {_("Exact Conversion"), _("Use Current Palette"), _("PNN Quantize (slow, better quality)"), _("Wu Quantize (fast)"), _("Max-Min Quantize (best for small palettes and dithering)"), NULL }; char *rad_txt2[] = {_("None"), _("Floyd-Steinberg"), _("Stucki"), // !!! "Ordered" not done yet !!! /* _("Ordered") */ "", _("Floyd-Steinberg (quick)"), _("Dithered (effect)"), _("Scattered (effect)"), NULL }; char *clamp_txt[] = {_("Gamut"), _("Weakly"), _("Strongly")}; char *err_txt[] = {_("Off"), _("Separate/Sum"), _("Separate/Split"), _("Length/Sum"), _("Length/Split"), NULL}; quantize_cols = mem_cols_used(257); quantize_window = add_a_window(GTK_WINDOW_TOPLEVEL, palette ? _("Create Quantized") : _("Convert To Indexed"), GTK_WIN_POS_CENTER, TRUE); mainbox = add_vbox(quantize_window); /* Colours spin */ topbox = pack(mainbox, gtk_hbox_new(FALSE, 5)); gtk_container_set_border_width(GTK_CONTAINER(topbox), 10); pack(topbox, gtk_label_new(_("Indexed Colours To Use"))); quantize_spin = xpack(topbox, add_a_spin(quantize_cols, 1, 256)); /* Notebook */ if (!palette) { // notebook = xpack(mainbox, buttoned_book(&page0, &page1, &button, _("Settings"))); pack_end(topbox, button); } else page0 = mainbox; /* Main page - Palette frame */ /* No exact transfer if too many colours */ if (quantize_cols > 256) rad_txt[QUAN_EXACT] = ""; if (palette) rad_txt[QUAN_CURRENT] = ""; if ((quantize_mode < 0) || !rad_txt[quantize_mode][0]) // Use default mode { quantize_mode = palette || (quantize_cols > 256) ? QUAN_WU : QUAN_EXACT; if (!palette) dither_mode = -1; // Reset dither too } vbox = wj_radio_pack(rad_txt, -1, 0, quantize_mode, &quantize_mode, GTK_SIGNAL_FUNC(click_quantize_radio)); /* Settings subnotebook */ quantize_book = pack(vbox, plain_book(pages, 3)); pack(pages[1], sig_toggle(_("Truncate palette"), quantize_tp, &quantize_tp, NULL)); pack(pages[2], sig_toggle(_("Diameter based weighting"), quan_sqrt, &quan_sqrt, NULL)); add_with_frame(page0, _("Palette"), vbox); /* Main page - Dither frame */ quantize_dither = NULL; if (!palette) { if (dither_mode < 0) dither_mode = quantize_cols > 256 ? DITH_DUMBFS : DITH_NONE; hbox = wj_radio_pack(rad_txt2, -1, DITH_MAX / 2, dither_mode, &dither_mode, NULL); // !!! If want to make both columns same width // gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); quantize_dither = add_with_frame(page0, _("Dither"), hbox); /* Settings page */ pack(page1, cspace_frame(dither_cspace, &dither_cspace, NULL)); pack(page1, difference_frame(dither_dist, &dither_dist, NULL)); hbox = wj_radio_pack(clamp_txt, 3, 1, dither_limit, &dither_limit, NULL); add_with_frame(page1, _("Reduce colour bleed"), hbox); dither_serpent = add_a_toggle(_("Serpentine scan"), page1, dither_scan); table = add_a_table(2, 2, 5, page1); add_to_table(_("Error propagation, %"), table, 0, 0, 5); add_to_table(_("Selective error propagation"), table, 1, 0, 5); dither_spin = spin_to_table(table, 0, 1, 5, 100, 0, 100); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dither_spin), (dither_sel ? dither_fract[1] : dither_fract[0]) * 100.0); hbox = wj_option_menu(err_txt, -1, dither_sel, &dither_sel, GTK_SIGNAL_FUNC(choose_selective)); to_table(hbox, table, 1, 1, 0); dither_err = add_a_toggle(_("Full error precision"), page1, dither_8b); } /* OK / Cancel */ pack(mainbox, OK_box(0, quantize_window, _("OK"), GTK_SIGNAL_FUNC(click_quantize_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); click_quantize_radio(NULL, (gpointer)quantize_mode); // Update widgets gtk_window_set_transient_for(GTK_WINDOW(quantize_window), GTK_WINDOW(main_window)); gtk_widget_show_all(quantize_window); } /// GRADIENT WINDOW static int grad_channel; static grad_info grad_temps[NUM_CHANNELS]; static grad_map grad_tmaps[NUM_CHANNELS + 1]; static grad_store grad_tbytes; static GtkWidget *grad_window; static GtkWidget *grad_spin_len, *grad_spin_rep, *grad_spin_ofs; static GtkWidget *grad_opt_type, *grad_opt_bound; static GtkWidget *grad_ss_pre; static GtkWidget *grad_opt_gtype, *grad_opt_otype; static GtkWidget *grad_check_grev, *grad_check_orev; static unsigned char grad_pad[GRAD_POINTS * 3], grad_mpad[GRAD_POINTS]; static int grad_cnt, grad_ofs, grad_slot, grad_mode; static GtkWidget *grad_ed_cs, *grad_ed_opt, *grad_ed_ss, *grad_ed_tog, *grad_ed_pm; static GtkWidget *grad_ed_len, *grad_ed_bar[16], *grad_ed_left, *grad_ed_right; #define SLOT_SIZE 15 #define PPAD_SLOT 11 #define PPAD_XSZ 32 #define PPAD_YSZ 8 #define PPAD_WIDTH(X) (PPAD_XSZ * (X) - 1) #define PPAD_HEIGHT(X) (PPAD_YSZ * (X) - 1) static void palette_pad_set(int value) { wjpixmap_move_cursor(grad_ed_pm, (value % PPAD_XSZ) * PPAD_SLOT, (value / PPAD_XSZ) * PPAD_SLOT); } static void palette_pad_draw(GtkWidget *widget, gpointer user_data) { unsigned char *rgb; int w, h, col, cellsize = PPAD_SLOT; if (!wjpixmap_pixmap(widget)) return; w = PPAD_WIDTH(cellsize); h = PPAD_HEIGHT(cellsize); rgb = render_color_grid(w, h, cellsize, (int)user_data); if (!rgb) return; palette_pad_set(0); wjpixmap_draw_rgb(widget, 0, 0, w, h, rgb, w * 3); col = (cellsize >> 1) - 1; wjpixmap_set_cursor(widget, xbm_ring4_bits, xbm_ring4_mask_bits, xbm_ring4_width, xbm_ring4_height, xbm_ring4_x_hot - col, xbm_ring4_y_hot - col, TRUE); free(rgb); } static void grad_edit_set_rgb(GtkWidget *selection, gpointer user_data); static void palette_pad_select(int i, int mode) { palette_pad_set(i); /* Indexed / utility / opacity */ if (!mode) { /* !!! Signal needs be sent even if value stays the same */ GtkAdjustment *adj = SPINSLIDE_ADJUSTMENT(grad_ed_ss); adj->value = i; gtk_adjustment_value_changed(adj); } else if (i < mem_cols) /* Valid RGB */ { cpick_set_colour(grad_ed_cs, PNG_2_INT(mem_pal[i]), 255); // !!! GTK+2 emits "color_changed" when setting color, others need explicit call #if GTK_MAJOR_VERSION == 1 || defined U_CPICK_MTPAINT grad_edit_set_rgb(grad_ed_cs, NULL); #endif } } static gboolean palette_pad_click(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { int x = event->x, y = event->y; gtk_widget_grab_focus(widget); /* Only single clicks */ if (event->type != GDK_BUTTON_PRESS) return (TRUE); x /= PPAD_SLOT; y /= PPAD_SLOT; palette_pad_select(y * PPAD_XSZ + x, (int)user_data); return (TRUE); } static gboolean palette_pad_key(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { int x, y, dx, dy; if (!arrow_key(event, &dx, &dy, 0)) return (FALSE); wjpixmap_cursor(widget, &x, &y); x = x / PPAD_SLOT + dx; y = y / PPAD_SLOT + dy; y = y < 0 ? 0 : y >= PPAD_YSZ ? PPAD_YSZ - 1 : y; y = y * PPAD_XSZ + x; y = y < 0 ? 0 : y > 255 ? 255 : y; palette_pad_select(y, (int)user_data); #if GTK_MAJOR_VERSION == 1 /* Return value alone doesn't stop GTK1 from running other handlers */ gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event"); #endif return (TRUE); } static GtkWidget *grad_interp_menu(int value, int allow_const, GtkSignalFunc handler) { char *interp[] = { _("RGB"), _("sRGB"), _("HSV"), _("Backward HSV"), _("Constant") }; return (wj_option_menu(interp, allow_const ? 5 : 4, value, NULL, handler)); } static void click_grad_edit_ok(GtkWidget *widget) { int idx = (grad_channel == CHN_IMAGE) && (mem_img_bpp == 3) ? 0 : grad_channel + 1; if (grad_mode < 0) /* Opacity */ { memcpy(grad_tbytes + GRAD_CUSTOM_OPAC(idx), grad_pad, GRAD_POINTS); memcpy(grad_tbytes + GRAD_CUSTOM_OMAP(idx), grad_mpad, GRAD_POINTS); grad_tmaps[idx].coplen = grad_cnt; } else /* Gradient */ { memcpy(grad_tbytes + GRAD_CUSTOM_DATA(idx), grad_pad, idx ? GRAD_POINTS : GRAD_POINTS * 3); memcpy(grad_tbytes + GRAD_CUSTOM_DMAP(idx), grad_mpad, GRAD_POINTS); grad_tmaps[idx].cvslen = grad_cnt; } gtk_widget_destroy(widget); } static void grad_load_slot(int slot) { if (slot >= grad_cnt) /* Empty slot */ { grad_slot = slot; return; } grad_slot = -1; /* Block circular signal calls */ if (!grad_mode) /* RGB */ { unsigned char *gp = grad_pad + slot * 3; int rgb = MEM_2_INT(gp, 0); cpick_set_colour(grad_ed_cs, rgb, 255); cpick_set_colour_previous(grad_ed_cs, rgb, 255); gtk_option_menu_set_history(GTK_OPTION_MENU(grad_ed_opt), grad_mpad[slot]); } else /* Indexed / utility / opacity */ { mt_spinslide_set_value(grad_ed_ss, grad_pad[slot]); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(grad_ed_tog), grad_mpad[slot] == GRAD_TYPE_CONST); palette_pad_set(grad_pad[slot]); } grad_slot = slot; } static void grad_redraw_slots(int idx0, int idx1) { if (idx0 < grad_ofs) idx0 = grad_ofs; if (++idx1 > grad_ofs + 16) idx1 = grad_ofs + 16; for (; idx0 < idx1; idx0++) gtk_widget_queue_draw(GTK_BIN(grad_ed_bar[idx0 - grad_ofs])->child); } static void grad_edit_set_mode() { int mode, ix0 = grad_slot; if (grad_slot < 0) return; /* Blocked */ if (!grad_mode) mode = wj_option_menu_get_history(grad_ed_opt); else mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(grad_ed_tog)) ? GRAD_TYPE_CONST : GRAD_TYPE_RGB; grad_mpad[grad_slot] = mode; if (grad_cnt <= grad_slot) { ix0 = grad_cnt; grad_cnt = grad_slot + 1; gtk_spin_button_set_value(GTK_SPIN_BUTTON(grad_ed_len), grad_cnt); } grad_redraw_slots(ix0, grad_slot); } static void grad_edit_set_rgb(GtkWidget *selection, gpointer user_data) { int i, rgb; if (grad_slot < 0) return; /* Blocked */ rgb = cpick_get_colour(selection, NULL); i = grad_slot * 3; grad_pad[i++] = INT_2_R(rgb); grad_pad[i++] = INT_2_G(rgb); grad_pad[i ] = INT_2_B(rgb); grad_edit_set_mode(); } static void grad_edit_move_slide(GtkAdjustment *adj, gpointer user_data) { if (grad_slot < 0) return; /* Blocked */ palette_pad_set(grad_pad[grad_slot] = ADJ2INT(adj)); grad_edit_set_mode(); } static void grad_edit_length(GtkAdjustment *adj, gpointer user_data) { int l0 = grad_cnt; grad_cnt = ADJ2INT(adj); if (l0 < grad_cnt) grad_redraw_slots(l0, grad_cnt - 1); else if (l0 > grad_cnt) grad_redraw_slots(grad_cnt, l0 - 1); } static void grad_edit_scroll(GtkButton *button, gpointer user_data) { int dir = (int)user_data; grad_ofs += dir; gtk_widget_set_sensitive(grad_ed_left, !!grad_ofs); gtk_widget_set_sensitive(grad_ed_right, grad_ofs < GRAD_POINTS - 16); grad_redraw_slots(0, GRAD_POINTS); } static void grad_edit_slot(GtkWidget *btn, gpointer user_data) { if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btn))) return; grad_load_slot((int)user_data + grad_ofs); } static gboolean grad_draw_slot(GtkWidget *widget, GdkEventExpose *event, gpointer idx) { unsigned char rgb[SLOT_SIZE * 2 * 3]; int i, n = (int)idx + grad_ofs, mode = n >= grad_cnt ? -2 : grad_mode; switch (mode) { default: /* Error */ case -2: /* Empty */ rgb[0] = rgb[1] = rgb[2] = 178; break; case -1: /* Opacity */ rgb[0] = rgb[1] = rgb[2] = grad_pad[n]; break; case 0: /* RGB */ rgb[0] = grad_pad[n * 3 + 0]; rgb[1] = grad_pad[n * 3 + 1]; rgb[2] = grad_pad[n * 3 + 2]; break; case CHN_IMAGE + 1: /* Indexed */ i = grad_pad[n]; if (i >= mem_cols) rgb[0] = rgb[1] = rgb[2] = 0; else { rgb[0] = mem_pal[i].red; rgb[1] = mem_pal[i].green; rgb[2] = mem_pal[i].blue; } break; case CHN_ALPHA + 1: /* Alpha */ case CHN_SEL + 1: /* Selection */ case CHN_MASK + 1: /* Mask */ i = channel_rgb[mode - 1][0] * grad_pad[n]; rgb[0] = (i + (i >> 8) + 1) >> 8; i = channel_rgb[mode - 1][1] * grad_pad[n]; rgb[1] = (i + (i >> 8) + 1) >> 8; i = channel_rgb[mode - 1][2] * grad_pad[n]; rgb[2] = (i + (i >> 8) + 1) >> 8; break; } for (i = 3; i < SLOT_SIZE * 2 * 3; i++) rgb[i] = rgb[i - 3]; if (mode == -2) /* Empty slot - show that */ memset(rgb, 128, SLOT_SIZE * 3); gdk_draw_rgb_image(widget->window, widget->style->black_gc, 0, 0, SLOT_SIZE, SLOT_SIZE, GDK_RGB_DITHER_NONE, rgb + SLOT_SIZE * 3, -3); return (TRUE); } static void grad_edit(GtkWidget *widget, gpointer user_data) { GtkWidget *win, *mainbox, *hbox, *hbox2, *pix, *cs, *ss, *sw, *btn; int i, idx, opac = (int)user_data != 0; idx = (grad_channel == CHN_IMAGE) && (mem_img_bpp == 3) ? 0 : grad_channel + 1; /* Copy to temp */ if (opac) { memcpy(grad_pad, grad_tbytes + GRAD_CUSTOM_OPAC(idx), GRAD_POINTS); memcpy(grad_mpad, grad_tbytes + GRAD_CUSTOM_OMAP(idx), GRAD_POINTS); grad_cnt = grad_tmaps[idx].coplen; } else { memcpy(grad_pad, grad_tbytes + GRAD_CUSTOM_DATA(idx), idx ? GRAD_POINTS : GRAD_POINTS * 3); memcpy(grad_mpad, grad_tbytes + GRAD_CUSTOM_DMAP(idx), GRAD_POINTS); grad_cnt = grad_tmaps[idx].cvslen; } if (grad_cnt < 2) grad_cnt = 2; grad_ofs = grad_slot = 0; grad_mode = opac ? -1 : idx; win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Edit Gradient"), GTK_WIN_POS_CENTER, TRUE); mainbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); gtk_container_add(GTK_CONTAINER(win), mainbox); /* Palette pad */ pix = grad_ed_pm = pack(mainbox, wjpixmap_new(PPAD_WIDTH(PPAD_SLOT), PPAD_HEIGHT(PPAD_SLOT))); gtk_signal_connect(GTK_OBJECT(pix), "realize", GTK_SIGNAL_FUNC(palette_pad_draw), (gpointer)(opac ? -1 : grad_channel)); gtk_signal_connect(GTK_OBJECT(pix), "button_press_event", GTK_SIGNAL_FUNC(palette_pad_click), (gpointer)!grad_mode); gtk_signal_connect(GTK_OBJECT(pix), "key_press_event", GTK_SIGNAL_FUNC(palette_pad_key), (gpointer)!grad_mode); add_hseparator(mainbox, -2, 10); /* Editor widgets */ if (!grad_mode) /* RGB */ { grad_ed_cs = cs = pack(mainbox, cpick_create()); cpick_set_opacity_visibility( cs, FALSE ); gtk_signal_connect(GTK_OBJECT(cs), "color_changed", GTK_SIGNAL_FUNC(grad_edit_set_rgb), NULL); grad_ed_opt = sw = grad_interp_menu(0, TRUE, GTK_SIGNAL_FUNC(grad_edit_set_mode)); } else /* Indexed / utility / opacity */ { grad_ed_ss = ss = pack(mainbox, mt_spinslide_new(-2, -2)); mt_spinslide_set_range(ss, 0, grad_mode == CHN_IMAGE + 1 ? mem_cols - 1 : 255); mt_spinslide_connect(ss, GTK_SIGNAL_FUNC(grad_edit_move_slide), NULL); grad_ed_tog = sw = sig_toggle(_("Constant"), FALSE, NULL, GTK_SIGNAL_FUNC(grad_edit_set_mode)); } hbox = pack(mainbox, gtk_hbox_new(TRUE, 5)); xpack(hbox, sw); hbox2 = xpack(hbox, gtk_hbox_new(FALSE, 5)); pack(hbox2, gtk_label_new(_("Points:"))); grad_ed_len = sw = pack(hbox2, add_a_spin(grad_cnt, 2, GRAD_POINTS)); spin_connect(sw, GTK_SIGNAL_FUNC(grad_edit_length), NULL); /* Gradient bar */ hbox2 = pack(mainbox, gtk_hbox_new(TRUE, 0)); grad_ed_left = btn = xpack(hbox2, gtk_button_new()); gtk_container_add(GTK_CONTAINER(btn), gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE)); gtk_widget_set_sensitive(btn, FALSE); gtk_signal_connect(GTK_OBJECT(btn), "clicked", GTK_SIGNAL_FUNC(grad_edit_scroll), (gpointer)(-1)); btn = NULL; for (i = 0; i < 16; i++) { grad_ed_bar[i] = btn = xpack(hbox2, gtk_radio_button_new_from_widget( GTK_RADIO_BUTTON_0(btn))); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(btn), FALSE); gtk_signal_connect(GTK_OBJECT(btn), "toggled", GTK_SIGNAL_FUNC(grad_edit_slot), (gpointer)i); sw = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(btn), sw); gtk_widget_set_usize(sw, SLOT_SIZE, SLOT_SIZE); gtk_signal_connect(GTK_OBJECT(sw), "expose_event", GTK_SIGNAL_FUNC(grad_draw_slot), (gpointer)i); } grad_ed_right = btn = xpack(hbox2, gtk_button_new()); gtk_container_add(GTK_CONTAINER(btn), gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE)); gtk_signal_connect(GTK_OBJECT(btn), "clicked", GTK_SIGNAL_FUNC(grad_edit_scroll), (gpointer)1); pack(mainbox, OK_box(0, win, _("OK"), GTK_SIGNAL_FUNC(click_grad_edit_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); #ifndef U_CPICK_MTPAINT grad_load_slot(0); #endif gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(grad_window)); gtk_widget_show_all(win); #ifdef U_CPICK_MTPAINT grad_load_slot(0); #endif #if GTK_MAJOR_VERSION == 1 gtk_widget_queue_resize(win); /* Re-render sliders */ #endif } #define NUM_GTYPES 7 #define NUM_OTYPES 3 static const char gtmap[NUM_GTYPES * 2] = { GRAD_TYPE_RGB, 1, GRAD_TYPE_RGB, 2, GRAD_TYPE_SRGB, 2, GRAD_TYPE_HSV, 2, GRAD_TYPE_BK_HSV, 2, GRAD_TYPE_CONST, 3, GRAD_TYPE_CUSTOM, 3 }; static const char opmap[NUM_OTYPES] = { GRAD_TYPE_RGB, GRAD_TYPE_CONST, GRAD_TYPE_CUSTOM }; static void grad_reset_menu(int mode, int bpp) { GList *items = GTK_MENU_SHELL(gtk_option_menu_get_menu( GTK_OPTION_MENU(grad_opt_gtype)))->children; char f = bpp == 1 ? 1 : 2; int i, j; for (j = NUM_GTYPES - 1; j >= 0; j--) { if ((gtmap[j * 2] == mode) && (gtmap[j * 2 + 1] & f)) break; } for (; items; items = items->next) { i = (int)gtk_object_get_user_data(GTK_OBJECT(items->data)); (gtmap[2 * i + 1] & f ? gtk_widget_show : gtk_widget_hide) (GTK_WIDGET(items->data)); } gtk_option_menu_set_history(GTK_OPTION_MENU(grad_opt_gtype), j); } static void store_channel_gradient(int channel) { grad_info *grad = grad_temps + channel; grad_map *gmap = grad_tmaps + channel + 1; if (channel < 0) return; if ((channel == CHN_IMAGE) && (mem_img_bpp == 3)) gmap = grad_tmaps; grad->len = read_spin(grad_spin_len); grad->gmode = wj_option_menu_get_history(grad_opt_type) + GRAD_MODE_LINEAR; grad->rep = read_spin(grad_spin_rep); grad->rmode = wj_option_menu_get_history(grad_opt_bound); grad->ofs = read_spin(grad_spin_ofs); gmap->gtype = gtmap[2 * wj_option_menu_get_history(grad_opt_gtype)]; gmap->grev = !!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(grad_check_grev)); gmap->otype = opmap[wj_option_menu_get_history(grad_opt_otype)]; gmap->orev = !!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(grad_check_orev)); } static void show_channel_gradient(int channel) { grad_info *grad = grad_temps + channel; grad_map *gmap; int i, idx = channel + 1, bpp = BPP(channel); if (bpp == 3) --idx; gmap = grad_tmaps + idx; gtk_spin_button_set_value(GTK_SPIN_BUTTON(grad_spin_len), grad->len); gtk_option_menu_set_history(GTK_OPTION_MENU(grad_opt_type), grad->gmode - GRAD_MODE_LINEAR); gtk_spin_button_set_value(GTK_SPIN_BUTTON(grad_spin_rep), grad->rep); gtk_option_menu_set_history(GTK_OPTION_MENU(grad_opt_bound), grad->rmode); gtk_spin_button_set_value(GTK_SPIN_BUTTON(grad_spin_ofs), grad->ofs); grad_reset_menu(gmap->gtype, bpp); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(grad_check_grev), gmap->grev); for (i = NUM_OTYPES - 1; (i >= 0) && (opmap[i] != gmap->otype); i--); gtk_option_menu_set_history(GTK_OPTION_MENU(grad_opt_otype), i); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(grad_check_orev), gmap->orev); } static void click_grad_apply(GtkWidget *widget) { int i; store_channel_gradient(grad_channel); memcpy(gradient, grad_temps, sizeof(grad_temps)); memcpy(graddata, grad_tmaps, sizeof(grad_tmaps)); memcpy(gradbytes, grad_tbytes, sizeof(grad_tbytes)); grad_opacity = mt_spinslide_get_value(grad_ss_pre); for (i = 0; i < NUM_CHANNELS; i++) grad_update(gradient + i); for (i = 0; i <= NUM_CHANNELS; i++) gmap_setup(graddata + i, gradbytes, i); update_stuff(UPD_GRAD); } static void click_grad_ok(GtkWidget *widget) { click_grad_apply(widget); gtk_widget_destroy(widget); } static void grad_channel_changed(GtkToggleButton *widget, gpointer user_data) { if ((int)user_data == grad_channel) return; if (!gtk_toggle_button_get_active(widget)) return; store_channel_gradient(grad_channel); grad_channel = -1; show_channel_gradient((int)user_data); grad_channel = (int)user_data; } static void grad_selector_box(GtkWidget *box, char **mtext, int op) { GtkWidget *vbox, *hbox, *menu, *rev, *btn; vbox = gtk_vbox_new(FALSE, 0); add_with_frame_x(box, op ? _("Opacity") : _("Gradient"), vbox, 5, TRUE); menu = pack(vbox, wj_option_menu(mtext, -1, 0, NULL, NULL)); gtk_container_set_border_width(GTK_CONTAINER(menu), 5); hbox = pack(vbox, gtk_hbox_new(TRUE, 0)); rev = add_a_toggle(_("Reverse"), hbox, FALSE); btn = add_a_button(_("Edit Custom"), 5, hbox, TRUE); gtk_signal_connect(GTK_OBJECT(btn), "clicked", GTK_SIGNAL_FUNC(grad_edit), (gpointer)op); if (op) { grad_opt_otype = menu; grad_check_orev = rev; } else { grad_opt_gtype = menu; grad_check_grev = rev; } } void gradient_setup(int mode) { char *gtypes[] = {_("Linear"), _("Bilinear"), _("Radial"), _("Square"), _("Angular"), _("Conical")}; char *rtypes[] = {_("None"), _("Level"), _("Repeat"), _("Mirror")}; char *gradtypes[] = {_("A to B"), _("A to B (RGB)"), _("A to B (sRGB)"), _("A to B (HSV)"), _("A to B (backward HSV)"), _("A only"), _("Custom"), NULL}; char *optypes[] = {_("Current to 0"), _("Current only"), _("Custom"), NULL}; GtkWidget *win, *mainbox, *hbox, *table, *align; GtkWindowPosition pos = !mode && !inifile_get_gboolean("centerSettings", TRUE) ? GTK_WIN_POS_MOUSE : GTK_WIN_POS_CENTER; memcpy(grad_temps, gradient, sizeof(grad_temps)); memcpy(grad_tmaps, graddata, sizeof(grad_tmaps)); memcpy(grad_tbytes, gradbytes, sizeof(grad_tbytes)); grad_channel = mem_channel; grad_window = win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Configure Gradient"), pos, TRUE); mainbox = add_vbox(win); /* Channel box */ hbox = wj_radio_pack(allchannames, 4, 1, mem_channel, NULL, GTK_SIGNAL_FUNC(grad_channel_changed)); add_with_frame(mainbox, _("Channel"), hbox); /* Setup block */ table = add_a_table(3, 4, 5, mainbox); add_to_table(_("Length"), table, 0, 0, 5); grad_spin_len = spin_to_table(table, 0, 1, 5, 0, 0, MAX_GRAD); add_to_table(_("Repeat length"), table, 1, 0, 5); grad_spin_rep = spin_to_table(table, 1, 1, 5, 0, 0, MAX_GRAD); add_to_table(_("Offset"), table, 2, 0, 5); grad_spin_ofs = spin_to_table(table, 2, 1, 5, 0, -MAX_GRAD, MAX_GRAD); add_to_table(_("Gradient type"), table, 0, 2, 5); grad_opt_type = wj_option_menu(gtypes, 6, 0, NULL, NULL); to_table(grad_opt_type, table, 0, 3, 5); add_to_table(_("Extension type"), table, 1, 2, 5); grad_opt_bound = wj_option_menu(rtypes, 4, 0, NULL, NULL); to_table(grad_opt_bound, table, 1, 3, 5); add_to_table(_("Preview opacity"), table, 2, 2, 5); grad_ss_pre = mt_spinslide_new(-1, -1); mt_spinslide_set_range(grad_ss_pre, 0, 255); mt_spinslide_set_value(grad_ss_pre, grad_opacity); /* !!! Box derivatives can't have their "natural" size set directly */ align = widget_align_minsize(grad_ss_pre, 200, -2); to_table(align, table, 2, 3, 5); /* Select page */ hbox = pack(mainbox, gtk_hbox_new(TRUE, 0)); grad_selector_box(hbox, gradtypes, 0); grad_selector_box(hbox, optypes, 1); /* Cancel / Apply / OK */ align = pack(mainbox, OK_box(0, win, _("OK"), GTK_SIGNAL_FUNC(click_grad_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); OK_box_add(align, _("Apply"), GTK_SIGNAL_FUNC(click_grad_apply)); /* Fill in values */ gtk_widget_show_all(mainbox); show_channel_gradient(mem_channel); gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(main_window)); gtk_widget_show(win); #if GTK_MAJOR_VERSION == 1 /* Re-render sliders, adjust option menus */ gtk_widget_queue_resize(win); #endif } /// GRADIENT PICKER static int pickg_grad = GRAD_TYPE_RGB, pickg_cspace = CSPACE_LXN; static int do_pick_gradient(GtkWidget *table, gpointer fdata) { unsigned char buf[256]; int len; pickg_grad = wj_option_menu_get_history(table_slot(table, 0, 1)); pickg_cspace = wj_option_menu_get_history(table_slot(table, 1, 1)); len = mem_pick_gradient(buf, pickg_cspace, pickg_grad); mem_clip_new(len, 1, 1, CMASK_IMAGE, FALSE); if (mem_clipboard) memcpy(mem_clipboard, buf, len); update_stuff(UPD_XCOPY); pressed_paste(TRUE); return TRUE; } void pressed_pick_gradient() { GtkWidget *table = gtk_table_new(2, 2, FALSE); gtk_container_set_border_width(GTK_CONTAINER(table), 5); to_table(grad_interp_menu(pickg_grad, FALSE, NULL), table, 0, 1, 5); to_table(wj_option_menu(cspnames, NUM_CSPACES, pickg_cspace, NULL, NULL), table, 1, 1, 5); add_to_table(_("Gradient"), table, 0, 0, 5); add_to_table(_("Colour space"), table, 1, 0, 5); gtk_widget_show_all(table); filter_window(_("Pick Gradient"), table, do_pick_gradient, NULL, FALSE); } /// SKEW WINDOW typedef struct { GtkWidget *angle[2], *ofs[2], *dist[2], *gc; int angles, lock; } skew_widgets; static int skew_mode = 6; static void click_skew_ok(GtkWidget *widget, gpointer user_data) { skew_widgets *sw = gtk_object_get_user_data(GTK_OBJECT(widget)); double xskew, yskew; int res, ftype = 0, gcor = FALSE; if ((sw->angles & 1) || GTK_WIDGET_HAS_FOCUS(sw->angle[0])) xskew = tan(read_float_spin(sw->angle[0]) * (M_PI / 180.0)); else xskew = read_float_spin(sw->ofs[0]) / (double)read_spin(sw->dist[0]); if ((sw->angles & 2) || GTK_WIDGET_HAS_FOCUS(sw->angle[1])) yskew = tan(read_float_spin(sw->angle[1]) * (M_PI / 180.0)); else yskew = read_float_spin(sw->ofs[1]) / (double)read_spin(sw->dist[1]); if (!xskew && !yskew) { alert_same_geometry(); return; } if (mem_img_bpp == 3) { ftype = skew_mode; gcor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sw->gc)); } res = mem_skew(xskew, yskew, ftype, gcor); if (!res) { update_stuff(UPD_GEOM); destroy_dialog(widget); } else memory_errors(res); } static void skew_moved(GtkAdjustment *adjustment, gpointer user_data) { skew_widgets *sw = user_data; int i; if (sw->lock) return; // Avoid recursion sw->lock = TRUE; for (i = 0; i < 2; i++) { /* Offset for angle */ if (adjustment == GTK_SPIN_BUTTON(sw->angle[i])->adjustment) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(sw->ofs[i]), ADJ2INT(GTK_SPIN_BUTTON(sw->dist[i])->adjustment) * tan(adjustment->value * (M_PI / 180.0))); sw->angles |= 1 << i; } /* Angle for offset */ else if ((adjustment == GTK_SPIN_BUTTON(sw->ofs[i])->adjustment) || (adjustment == GTK_SPIN_BUTTON(sw->dist[i])->adjustment)) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(sw->angle[i]), atan(GTK_SPIN_BUTTON(sw->ofs[i])->adjustment->value / ADJ2INT(GTK_SPIN_BUTTON(sw->dist[i])->adjustment)) * (180.0 / M_PI)); sw->angles &= ~(1 << i); } } sw->lock = FALSE; } void pressed_skew() { GtkWidget *skew_window, *vbox, *table; skew_widgets *sw; skew_window = add_a_window(GTK_WINDOW_TOPLEVEL, _("Skew"), GTK_WIN_POS_CENTER, TRUE); sw = bound_malloc(skew_window, sizeof(skew_widgets)); gtk_object_set_user_data(GTK_OBJECT(skew_window), (gpointer)sw); vbox = add_vbox(skew_window); table = add_a_table(3, 4, 5, vbox); add_to_table(_("Angle"), table, 0, 1, 0); add_to_table(_("Offset"), table, 0, 2, 0); add_to_table(_("At distance"), table, 0, 3, 0); add_to_table(_("Horizontal "), table, 1, 0, 0); add_to_table(_("Vertical"), table, 2, 0, 0); sw->angle[0] = float_spin_to_table(table, 1, 1, 5, 0, -89.99, 89.99); sw->angle[1] = float_spin_to_table(table, 2, 1, 5, 0, -89.99, 89.99); sw->ofs[0] = float_spin_to_table(table, 1, 2, 5, 0, -MAX_WIDTH, MAX_WIDTH); sw->ofs[1] = float_spin_to_table(table, 2, 2, 5, 0, -MAX_HEIGHT, MAX_HEIGHT); sw->dist[0] = spin_to_table(table, 1, 3, 5, mem_height, 1, MAX_HEIGHT); sw->dist[1] = spin_to_table(table, 2, 3, 5, mem_width, 1, MAX_WIDTH); spin_connect(sw->angle[0], GTK_SIGNAL_FUNC(skew_moved), (gpointer)sw); spin_connect(sw->ofs[0], GTK_SIGNAL_FUNC(skew_moved), (gpointer)sw); spin_connect(sw->dist[0], GTK_SIGNAL_FUNC(skew_moved), (gpointer)sw); spin_connect(sw->angle[1], GTK_SIGNAL_FUNC(skew_moved), (gpointer)sw); spin_connect(sw->ofs[1], GTK_SIGNAL_FUNC(skew_moved), (gpointer)sw); spin_connect(sw->dist[1], GTK_SIGNAL_FUNC(skew_moved), (gpointer)sw); add_hseparator(vbox, -2, 10); if (mem_img_bpp == 3) { sw->gc = pack(vbox, gamma_toggle()); add_hseparator(vbox, -2, 10); xpack(vbox, filter_pack(FALSE, skew_mode, &skew_mode)); add_hseparator(vbox, -2, 10); } pack(vbox, OK_box(5, skew_window, _("OK"), GTK_SIGNAL_FUNC(click_skew_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); gtk_window_set_transient_for(GTK_WINDOW(skew_window), GTK_WINDOW(main_window)); gtk_widget_show_all(skew_window); } /// TRACING IMAGE WINDOW typedef struct { GtkWidget *wspin, *hspin, *xspin, *yspin, *zspin, *opt, *tog; int src, x, y, scale, state; } bkg_widgets; static void bkg_update_widgets(bkg_widgets *bw) { int w = 0, h = 0; bw->src = wj_option_menu_get_history(bw->opt); switch (bw->src) { case 0: w = bkg_w; h = bkg_h; break; case 1: break; case 2: w = mem_width; h = mem_height; break; case 3: if (mem_clipboard) w = mem_clip_w , h = mem_clip_h; break; } spin_set_range(bw->wspin, w, w); spin_set_range(bw->hspin, h, h); bw->x = read_spin(bw->xspin); bw->y = read_spin(bw->yspin); bw->scale = read_spin(bw->zspin); bw->state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(bw->tog)); } static void click_bkg_apply(GtkWidget *widget) { bkg_widgets *bw = gtk_object_get_user_data(GTK_OBJECT(widget)); bkg_update_widgets(bw); bkg_x = bw->x; bkg_y = bw->y; bkg_scale = bw->scale; bkg_flag = bw->state; if (!config_bkg(bw->src)) memory_errors(1); update_stuff(UPD_RENDER); } static void click_bkg_option(GtkMenuItem *menuitem, gpointer user_data) { bkg_update_widgets(user_data); } static void click_bkg_ok(GtkWidget *widget) { click_bkg_apply(widget); gtk_widget_destroy(widget); } void bkg_setup() { char *srcs[4] = { _("Unchanged"), _("None"), _("Image"), _("Clipboard") }; GtkWidget *win, *vbox, *table, *hbox; bkg_widgets *bw; win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Tracing Image"), GTK_WIN_POS_CENTER, TRUE); bw = bound_malloc(win, sizeof(bkg_widgets)); gtk_object_set_user_data(GTK_OBJECT(win), (gpointer)bw); bw->src = 0; bw->state = bkg_flag; vbox = add_vbox(win); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); table = add_a_table(4, 3, 5, vbox); add_to_table(_("Source"), table, 0, 0, 5); add_to_table(_("Size"), table, 1, 0, 5); add_to_table(_("Origin"), table, 2, 0, 5); add_to_table(_("Relative scale"), table, 3, 0, 5); bw->opt = wj_option_menu(srcs, 4, 0, bw, GTK_SIGNAL_FUNC(click_bkg_option)); to_table_l(bw->opt, table, 0, 1, 2, 5); bw->wspin = spin_to_table(table, 1, 1, 5, 0, 0, 0); bw->hspin = spin_to_table(table, 1, 2, 5, 0, 0, 0); GTK_WIDGET_UNSET_FLAGS(bw->wspin, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(bw->hspin, GTK_CAN_FOCUS); bw->xspin = spin_to_table(table, 2, 1, 5, bkg_x, -MAX_WIDTH, MAX_WIDTH); bw->yspin = spin_to_table(table, 2, 2, 5, bkg_y, -MAX_HEIGHT, MAX_HEIGHT); bw->zspin = spin_to_table(table, 3, 1, 5, bkg_scale, 1, MAX_ZOOM); bw->tog = add_a_toggle(_("Display"), vbox, bkg_flag); add_hseparator(vbox, -2, 10); /* Cancel / Apply / OK */ hbox = pack(vbox, OK_box(5, win, _("OK"), GTK_SIGNAL_FUNC(click_bkg_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); OK_box_add(hbox, _("Apply"), GTK_SIGNAL_FUNC(click_bkg_apply)); bkg_update_widgets(bw); gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(main_window)); gtk_widget_show_all(win); } /// SEGMENTATION WINDOW seg_state *seg_preview; typedef struct { char ids[3]; // For binding updaters GtkWidget *win, *tspin, *pbutton; seg_state *s; int vars[2]; // Colorspace and distance int progress; int step; // Calculation step of 2nd phase } seg_widgets; static int seg_cspace = CSPACE_LXN, seg_dist = DIST_LINF; static int seg_rank = 4, seg_minsize = 1; static guint seg_idle; /* Change colorspace or distance measure, causing full recalculation */ static void seg_mode_toggled(GtkWidget *btn, gpointer idx) { seg_widgets *sw; char *cp; if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btn))) return; cp = gtk_object_get_user_data(GTK_OBJECT(btn->parent)); sw = (seg_widgets *)(cp - *cp); if (sw->vars[(int)*cp] == (int)idx) return; sw->vars[(int)*cp] = (int)idx; mem_seg_prepare(sw->s, mem_img[CHN_IMAGE], mem_width, mem_height, sw->progress, sw->vars[0], sw->vars[1]); /* Disable preview if cancelled, change threshold if not */ if (!sw->s->phase) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(sw->pbutton), FALSE); else gtk_spin_button_set_value(GTK_SPIN_BUTTON(sw->tspin), mem_seg_threshold(sw->s)); } /* Do phase 2 (segmentation) in the background */ static gboolean seg_process_idle(seg_widgets *sw) { if (seg_preview && (sw->s->phase == 1)) { #define SEG_STEP 100000 sw->step = mem_seg_process_chunk(sw->step, SEG_STEP, sw->s); #undef SEG_STEP if (!(sw->s->phase & 2)) return (TRUE); // Not yet completed gdk_window_set_cursor(sw->win->window, NULL); seg_idle = 0; // In case update_stuff() ever calls main loop update_stuff(UPD_RENDER); } seg_idle = 0; return (FALSE); } /* Change segmentation limits, causing phase 2 restart */ static void seg_spin_changed(GtkAdjustment *adjustment, char *cp) { seg_widgets *sw = (seg_widgets *)(cp - *cp); seg_state *s = sw->s; if (!*cp) s->threshold = adjustment->value; else *(*cp == 1 ? &s->minrank : &s->minsize) = ADJ2INT(adjustment); s->phase &= 1; // Need phase 2 rerun sw->step = 0; // Restart phase 2 afresh if (seg_preview) { if (sw->progress) gdk_window_set_cursor(sw->win->window, busy_cursor); if (!seg_idle) seg_idle = threads_idle_add_priority( GTK_PRIORITY_REDRAW + 5, (GtkFunction)seg_process_idle, sw); } } /* Finish all calculations (preparation and segmentation) */ static int seg_process(seg_widgets *sw) { /* Run phase 1 if necessary */ if (!sw->s->phase) mem_seg_prepare(sw->s, mem_img[CHN_IMAGE], mem_width, mem_height, sw->progress, sw->vars[0], sw->vars[1]); /* Run phase 2 if possible & necessary */ if (sw->s->phase == 1) mem_seg_process(sw->s); /* Return whether job is done */ return (sw->s->phase > 1); } /* Toggle interactive preview */ static void seg_preview_toggle(GtkToggleButton *button, GtkWidget *window) { seg_state *oldp = seg_preview; seg_widgets *sw = NULL; if ((button && button->active) ^ !oldp) return; // Nothing to do if (window) sw = gtk_object_get_user_data(GTK_OBJECT(window)); if (seg_idle) gtk_idle_remove(seg_idle); seg_idle = 0; if (oldp) // Disable { // !!! Maybe better to add & use an integrated progressbar? if (sw) gdk_window_set_cursor(sw->win->window, NULL); seg_preview = NULL; } else // Enable { /* Do segmentation conspicuously at first */ if (!seg_process(sw)) gtk_toggle_button_set_active(button, FALSE); else seg_preview = sw->s; } if (oldp != seg_preview) update_stuff(UPD_RENDER); } static gboolean seg_cancel(GtkWidget *window) { seg_widgets *sw = gtk_object_get_user_data(GTK_OBJECT(window)); seg_preview_toggle(NULL, NULL); // Clear the preview if enabled destroy_dialog(window); free(sw->s); free(sw); return (FALSE); } static void seg_ok(GtkWidget *window) { seg_widgets *sw = gtk_object_get_user_data(GTK_OBJECT(window)); /* First, disable preview */ seg_preview_toggle(NULL, NULL); /* Then, update parameters */ update_window_spin(window); seg_cspace = sw->vars[0]; seg_dist = sw->vars[1]; seg_rank = sw->s->minrank; seg_minsize = sw->s->minsize; /* Now, finish segmentation & render results */ if (seg_process(sw)) { spot_undo(UNDO_FILT); mem_seg_render(mem_img[CHN_IMAGE], sw->s); mem_undo_prepare(); update_stuff(UPD_IMG); } seg_cancel(window); } void pressed_segment() { GtkWidget *seg_window, *mainbox, *table, *hbox, *spin; seg_widgets *sw; seg_state *s; int progress = 0, sz = mem_width * mem_height; if (sz == 1) return; /* 1 pixel in image is trivial - do nothing */ if (sz >= 1024 * 1024) progress = SEG_PROGRESS; s = mem_seg_prepare(NULL, mem_img[CHN_IMAGE], mem_width, mem_height, progress, seg_cspace, seg_dist); if (!s) { memory_errors(1); return; } if (!s->phase) return; // Terminated by user s->threshold = mem_seg_threshold(s); sw = calloc(1, sizeof(seg_widgets)); sw->ids[1] = 1; sw->ids[2] = 2; sw->s = s; sw->progress = progress; sw->win = seg_window = add_a_window(GTK_WINDOW_TOPLEVEL, _("Segment Image"), GTK_WIN_POS_CENTER, TRUE); gtk_object_set_user_data(GTK_OBJECT(seg_window), sw); mainbox = add_vbox(seg_window); pack(mainbox, cspace_frame(sw->vars[0] = seg_cspace, sw->ids + 0, GTK_SIGNAL_FUNC(seg_mode_toggled))); pack(mainbox, difference_frame(sw->vars[1] = seg_dist, sw->ids + 1, GTK_SIGNAL_FUNC(seg_mode_toggled))); table = add_a_table(3, 2, 5, mainbox); add_to_table(_("Threshold"), table, 0, 0, 5); sw->tspin = float_spin_to_table(table, 0, 1, 5, s->threshold, 0, 5000.0); spin_connect(sw->tspin, GTK_SIGNAL_FUNC(seg_spin_changed), sw->ids + 0); add_to_table(_("Level"), table, 1, 0, 5); spin = spin_to_table(table, 1, 1, 5, s->minrank = seg_rank, 0, 32); spin_connect(spin, GTK_SIGNAL_FUNC(seg_spin_changed), sw->ids + 1); add_to_table(_("Minimum size"), table, 2, 0, 5); spin = spin_to_table(table, 2, 1, 5, s->minsize = seg_minsize, 1, sz); spin_connect(spin, GTK_SIGNAL_FUNC(seg_spin_changed), sw->ids + 2); hbox = pack(mainbox, OK_box(0, seg_window, _("Apply"), GTK_SIGNAL_FUNC(seg_ok), _("Cancel"), GTK_SIGNAL_FUNC(seg_cancel))); sw->pbutton = OK_box_add_toggle(hbox, _("Preview"), GTK_SIGNAL_FUNC(seg_preview_toggle)); gtk_window_set_transient_for(GTK_WINDOW(seg_window), GTK_WINDOW(main_window)); gtk_widget_show(seg_window); } mtpaint-3.40/src/mygtk.h0000644000175000000620000003546611656044113014545 0ustar muammarstaff/* mygtk.h Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include #include #include #include #include #include #include #include #include #include #include /// GTK+2 version to use #if GTK_MAJOR_VERSION == 2 #ifndef GTK2VERSION #define GTK2VERSION GTK_MINOR_VERSION #endif #endif /// Icon descriptor type typedef void *xpm_icon_desc[2]; #if GTK_MAJOR_VERSION == 1 #define XPM_TYPE char** #else /* if GTK_MAJOR_VERSION == 2 */ #define XPM_TYPE void** #endif /// Generic RGB buffer typedef struct { int xy[4]; unsigned char *rgb; } rgbcontext; /// Generic Widget Primitives GtkWidget *add_a_window( GtkWindowType type, char *title, GtkWindowPosition pos, gboolean modal ); GtkWidget *add_a_button( char *text, int bord, GtkWidget *box, gboolean filler ); GtkWidget *add_a_spin( int value, int min, int max ); GtkWidget *add_a_table( int rows, int columns, int bord, GtkWidget *box ); GtkWidget *add_a_toggle( char *label, GtkWidget *box, gboolean value ); GtkWidget *add_to_table( char *text, GtkWidget *table, int row, int column, int spacing); GtkWidget *add_to_table_l(char *text, GtkWidget *table, int row, int column, int l, int spacing); GtkWidget *to_table(GtkWidget *widget, GtkWidget *table, int row, int column, int spacing); GtkWidget *to_table_l(GtkWidget *widget, GtkWidget *table, int row, int column, int l, int spacing); GtkWidget *spin_to_table( GtkWidget *table, int row, int column, int spacing, int value, int min, int max ); GtkWidget *float_spin_to_table(GtkWidget *table, int row, int column, int spacing, double value, double min, double max); void add_hseparator( GtkWidget *widget, int xs, int ys ); void progress_init(char *text, int canc); // Initialise progress window int progress_update(float val); // Update progress window void progress_end(); // Close progress window int alert_box(char *title, char *message, char *text1, ...); // Add page to notebook GtkWidget *add_new_page(GtkWidget *notebook, char *name); // Slider-spin combo (practically a new widget class) GtkWidget *mt_spinslide_new(int swidth, int sheight); void mt_spinslide_set_range(GtkWidget *spinslide, int minv, int maxv); int mt_spinslide_get_value(GtkWidget *spinslide); int mt_spinslide_read_value(GtkWidget *spinslide); void mt_spinslide_set_value(GtkWidget *spinslide, int value); /* void handler(GtkAdjustment *adjustment, gpointer user_data); */ void mt_spinslide_connect(GtkWidget *spinslide, GtkSignalFunc handler, gpointer user_data); #define SPINSLIDE_ADJUSTMENT(s) \ (GTK_SPIN_BUTTON(BOX_CHILD_1(s))->adjustment) #define ADJ2INT(a) ((int)rint((a)->value)) // Self-contained package of radio buttons GtkWidget *wj_radio_pack(char **names, int cnt, int vnum, int idx, gpointer var, GtkSignalFunc handler); // Convert window close into a button click ("Cancel" or whatever) void delete_to_click(GtkWidget *window, GtkWidget *button); // Buttons for standard dialogs GtkWidget *OK_box(int border, GtkWidget *window, char *nOK, GtkSignalFunc OK, char *nCancel, GtkSignalFunc Cancel); GtkWidget *OK_box_add(GtkWidget *box, char *name, GtkSignalFunc Handler); GtkWidget *OK_box_add_toggle(GtkWidget *box, char *name, GtkSignalFunc Handler); // Easier way with spinbuttons int read_spin(GtkWidget *spin); double read_float_spin(GtkWidget *spin); GtkWidget *add_float_spin(double value, double min, double max); void spin_connect(GtkWidget *spin, GtkSignalFunc handler, gpointer user_data); #if GTK_MAJOR_VERSION == 1 void spin_set_range(GtkWidget *spin, int min, int max); #else #define spin_set_range(spin, min, max) \ gtk_spin_button_set_range(GTK_SPIN_BUTTON(spin), (min), (max)) #endif // Box unpacking macros #define BOX_CHILD_0(box) \ (((GtkBoxChild*)GTK_BOX(box)->children->data)->widget) #define BOX_CHILD_1(box) \ (((GtkBoxChild*)GTK_BOX(box)->children->next->data)->widget) #define BOX_CHILD_2(box) \ (((GtkBoxChild*)GTK_BOX(box)->children->next->next->data)->widget) #define BOX_CHILD(box, n) \ (((GtkBoxChild *)g_list_nth_data(GTK_BOX(box)->children, (n)))->widget) // Wrapper for utf8->C and C->utf8 translation char *gtkxncpy(char *dest, const char *src, int cnt, int u); #define gtkncpy(dest, src, cnt) gtkxncpy(dest, src, cnt, FALSE) #define gtkuncpy(dest, src, cnt) gtkxncpy(dest, src, cnt, TRUE) // Generic wrapper for strncpy(), ensuring NUL termination #define strncpy0(A,B,C) (strncpy((A), (B), (C))[(C) - 1] = 0) // A more sane replacement for strncat() char *strnncat(char *dest, const char *src, int max); // Add C strings to a string with explicit length char *wjstrcat(char *dest, int max, const char *s0, int l, ...); // Add directory to filename char *file_in_dir(char *dest, const char *dir, const char *file, int cnt); char *file_in_homedir(char *dest, const char *file, int cnt); // Extracting widget from GtkTable GtkWidget *table_slot(GtkWidget *table, int row, int col); // Packing framed widget GtkWidget *add_with_frame_x(GtkWidget *box, char *text, GtkWidget *widget, int border, int expand); GtkWidget *add_with_frame(GtkWidget *box, char *text, GtkWidget *widget); // Entry + Browse GtkWidget *mt_path_box(char *name, GtkWidget *box, char *title, int fsmode); // Option menu GtkWidget *wj_option_menu(char **names, int cnt, int idx, gpointer var, GtkSignalFunc handler); int wj_option_menu_get_history(GtkWidget *optmenu); // Workaround for broken option menu sizing in GTK2 #if GTK_MAJOR_VERSION == 2 void wj_option_realize(GtkWidget *widget, gpointer user_data); #define FIX_OPTION_MENU_SIZE(opt) \ gtk_signal_connect_after(GTK_OBJECT(opt), "realize", \ GTK_SIGNAL_FUNC(wj_option_realize), NULL) #else #define FIX_OPTION_MENU_SIZE(opt) #endif // Set minimum size for a widget void widget_set_minsize(GtkWidget *widget, int width, int height); GtkWidget *widget_align_minsize(GtkWidget *widget, int width, int height); // Make widget request no less size than before (in one direction) void widget_set_keepsize(GtkWidget *widget, int keep_height); // Signalled toggles GtkWidget *sig_toggle(char *label, int value, gpointer var, GtkSignalFunc handler); GtkWidget *sig_toggle_button(char *label, int value, gpointer var, GtkSignalFunc handler); // Workaround for GtkCList reordering bug in GTK2 void clist_enable_drag(GtkWidget *clist); // Move browse-mode selection in GtkCList without invoking callbacks void clist_reselect_row(GtkCList *clist, int n); // Move browse-mode selection in GtkList void list_select_item(GtkWidget *list, GtkWidget *item); // Properly destroy transient window void destroy_dialog(GtkWidget *window); // Settings notebook GtkWidget *plain_book(GtkWidget **pages, int npages); GtkWidget *buttoned_book(GtkWidget **page0, GtkWidget **page1, GtkWidget **button, char *button_label); // Most common use of boxes GtkWidget *pack(GtkWidget *box, GtkWidget *widget); GtkWidget *xpack(GtkWidget *box, GtkWidget *widget); GtkWidget *pack_end(GtkWidget *box, GtkWidget *widget); GtkWidget *pack5(GtkWidget *box, GtkWidget *widget); GtkWidget *xpack5(GtkWidget *box, GtkWidget *widget); GtkWidget *pack_end5(GtkWidget *box, GtkWidget *widget); // Put vbox into container GtkWidget *add_vbox(GtkWidget *cont); // Save/restore window positions void win_store_pos(GtkWidget *window, char *inikey); void win_restore_pos(GtkWidget *window, char *inikey, int defx, int defy, int defw, int defh); // Fix for paned widgets losing focus in GTK+1 #if GTK_MAJOR_VERSION == 1 void paned_mouse_fix(GtkWidget *widget); #else #define paned_mouse_fix(X) #endif // Init-time bugfixes void gtk_init_bugfixes(); // Moving mouse cursor int move_mouse_relative(int dx, int dy); // Mapping keyval to key guint real_key(GdkEventKey *event); guint low_key(GdkEventKey *event); guint keyval_key(guint keyval); // Interpreting arrow keys int arrow_key(GdkEventKey *event, int *dx, int *dy, int mult); // Create pixmap cursor GdkCursor *make_cursor(const char *icon, const char *mask, int w, int h, int tip_x, int tip_y); // Menu-like combo box GtkWidget *wj_combo_box(char **names, int cnt, int idx, gpointer var, GtkSignalFunc handler); int wj_combo_box_get_history(GtkWidget *combobox); // Box widget with customizable size handling GtkWidget *wj_size_box(); // Disable visual updates while tweaking container's contents gpointer toggle_updates(GtkWidget *widget, gpointer unlock); // Drawable to RGB unsigned char *wj_get_rgb_image(GdkWindow *window, GdkPixmap *pixmap, unsigned char *buf, int x, int y, int width, int height); // Clipboard int internal_clipboard(int which); int process_clipboard(int which, char *what, GtkSignalFunc handler, gpointer data); int offer_clipboard(int which, GtkTargetEntry *targets, int ntargets, GtkSignalFunc handler); // Allocate a memory chunk which is freed along with a given widget void *bound_malloc(GtkWidget *widget, int size); // Gamma correction toggle GtkWidget *gamma_toggle(); // Image widget GtkWidget *xpm_image(XPM_TYPE xpm); // Render stock icons to pixmaps /* !!! Mask needs be zeroed before the call - especially with GTK+1 :-) */ #if GTK_MAJOR_VERSION == 1 #define render_stock_pixmap(X,Y,Z) NULL #else GdkPixmap *render_stock_pixmap(GtkWidget *widget, const gchar *stock_id, GdkBitmap **mask); #endif // Release outstanding pointer grabs int release_grab(); // Frame widget with passthrough scrolling GtkWidget *wjframe_new(); void add_with_wjframe(GtkWidget *bin, GtkWidget *widget); // Scrollable canvas widget GtkWidget *wjcanvas_new(); void wjcanvas_size(GtkWidget *widget, int width, int height); void wjcanvas_get_vport(GtkWidget *widget, int *vport); int wjcanvas_scroll_in(GtkWidget *widget, int x, int y); int wjcanvas_bind_mouse(GtkWidget *widget, GdkEventMotion *event, int x, int y); // Focusable pixmap widget GtkWidget *wjpixmap_new(int width, int height); GdkPixmap *wjpixmap_pixmap(GtkWidget *widget); void wjpixmap_draw_rgb(GtkWidget *widget, int x, int y, int w, int h, unsigned char *rgb, int step); void wjpixmap_fill_rgb(GtkWidget *widget, int x, int y, int w, int h, int rgb); void wjpixmap_move_cursor(GtkWidget *widget, int x, int y); void wjpixmap_set_cursor(GtkWidget *widget, char *image, char *mask, int width, int height, int hot_x, int hot_y, int focused); void wjpixmap_cursor(GtkWidget *widget, int *x, int *y); int wjpixmap_rxy(GtkWidget *widget, int x, int y, int *xr, int *yr); // Repaint expose region // !!! For now, repaint_func() is expected to know widget & window to repaint typedef void (*repaint_func)(int x, int y, int w, int h); #if GTK_MAJOR_VERSION == 1 /* No regions there */ #define repaint_expose(event, vport, repaint, cost) \ (repaint)((event)->area.x + (vport)[0], (event)->area.y + (vport)[1], \ (event)->area.width, (event)->area.height) #else void repaint_expose(GdkEventExpose *event, int *vport, repaint_func repaint, int cost); #endif // Track updates of multiple widgets (by whatever means necessary) void track_updates(GtkSignalFunc handler, GtkWidget *widget, ...); // Convert pathname to absolute char *resolve_path(char *buf, int buflen, char *path); // A (better) substitute for fnmatch(), in case one is needed #if defined(WIN32) || ((GTK_MAJOR_VERSION == 2) && (GTK2VERSION < 4)) int wjfnmatch(const char *mask, const char *str, int utf); #endif // Replace '/' path separators #ifdef WIN32 void reseparate(char *str); #endif // Prod the focused spinbutton, if any, to finally update its value void update_window_spin(GtkWidget *window); // Process event queue void handle_events(); // Make GtkEntry accept Ctrl+Enter as a character void accept_ctrl_enter(GtkWidget *entry); // Grab/ungrab input #define GRAB_FULL 0 /* Redirect everything */ #define GRAB_WIDGET 1 /* Redirect everything outside widget */ #define GRAB_PROGRAM 2 /* Redirect everything outside program's windows */ int do_grab(int mode, GtkWidget *widget, GdkCursor *cursor); void undo_grab(GtkWidget *widget); // Workaround for crazy GTK+1 resize handling #if GTK_MAJOR_VERSION == 1 void force_resize(GtkWidget *widget); #endif // Workaround for broken GTK_SHADOW_NONE viewports in GTK+1 #if GTK_MAJOR_VERSION == 1 void vport_noshadow_fix(GtkWidget *widget); #else #define vport_noshadow_fix(X) #endif // Filtering bogus xine-ui "keypresses" (Linux only) #ifdef WIN32 #define XINE_FAKERY(key) 0 #else #define XINE_FAKERY(key) (((key) == GDK_Shift_L) || ((key) == GDK_Control_L) \ || ((key) == GDK_Scroll_Lock) || ((key) == GDK_Num_Lock)) #endif // Workaround for stupid GTK1 typecasts #if GTK_MAJOR_VERSION == 1 #define GTK_RADIO_BUTTON_0(X) (GtkRadioButton *)(X) #else #define GTK_RADIO_BUTTON_0(X) GTK_RADIO_BUTTON(X) #endif // Path separator char #ifdef WIN32 #define DIR_SEP '\\' #define DIR_SEP_STR "\\" #else #define DIR_SEP '/' #define DIR_SEP_STR "/" #endif // Path string sizes /* If path is longer than this, it is user's own problem */ #define SANE_PATH_LEN 2048 #ifdef WIN32 #define PATHBUF 260 /* MinGW defines PATH_MAX to not include terminating NUL */ #elif defined MAXPATHLEN #define PATHBUF MAXPATHLEN /* MAXPATHLEN includes the NUL */ #elif defined PATH_MAX #define PATHBUF PATH_MAX /* POSIXly correct PATH_MAX does too */ #else #define PATHBUF SANE_PATH_LEN /* Arbitrary limit for GNU Hurd and the like */ #endif #if PATHBUF > SANE_PATH_LEN /* Force a sane limit */ #undef PATHBUF #define PATHBUF SANE_PATH_LEN #endif #if GTK_MAJOR_VERSION == 1 /* Same encoding in GTK+1 */ #define PATHTXT PATHBUF #else /* Allow for expansion when converting from codepage to UTF8 */ #define PATHTXT (PATHBUF * 2) #endif // Filename string size #ifdef WIN32 #define NAMEBUF 256 /* MinGW doesn't define MAXNAMLEN nor NAME_MAX */ #elif defined MAXNAMLEN #define NAMEBUF (MAXNAMLEN + 1) #elif defined NAME_MAX #define NAMEBUF (NAME_MAX + 1) #else #define NAMEBUF 256 /* Most filesystems limit filenames to 255 bytes or less */ #endif // Threading helpers #if 0 /* Not needed for now - GTK+/Win32 still isn't thread-safe anyway */ //#ifdef U_THREADS guint threads_idle_add_priority(gint priority, GtkFunction function, gpointer data); guint threads_timeout_add(guint32 interval, GSourceFunc function, gpointer data); #define THREADS_ENTER() gdk_threads_enter() #define THREADS_LEAVE() gdk_threads_leave() #else #define threads_idle_add_priority(X,Y,Z) gtk_idle_add_priority(X,Y,Z) #define threads_timeout_add(X,Y,Z) g_timeout_add(X,Y,Z) #define THREADS_ENTER() #define THREADS_LEAVE() #endif mtpaint-3.40/src/polygon.c0000644000175000000620000002062111264644505015065 0ustar muammarstaff/* polygon.c Copyright (C) 2005-2009 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "polygon.h" #include "mygtk.h" #include "memory.h" /* !!! Currently, poly_points should be set to 0 when there's no polygonal * selection, because poly_lasso() depends on that - WJ */ int poly_points; int poly_mem[MAX_POLY][2]; // Coords in poly_mem are raw coords as plotted over image int poly_xy[4]; static int cmp_spans(const void *span1, const void *span2) { return (((int *)span1)[2] - ((int *)span2)[2]); } /* !!! This code clips polygon to image boundaries, and when using buffer * assumes it covers the intersection area - WJ */ void poly_draw(int filled, unsigned char *buf, int wbuf) { #define SPAN_STEP 5 /* x0, x1, y0, y1, next */ linedata line; unsigned char borders[MAX_WIDTH]; int spans[(MAX_POLY + 1) * SPAN_STEP], *span, *span2; int i, j, k, nspans, y, rxy[4]; int oldmode = mem_undo_opacity; /* Intersect image & polygon rectangles */ clip(rxy, 0, 0, mem_width - 1, mem_height - 1, poly_xy); // !!! clip() can intersect inclusive rectangles, but not check result if ((rxy[0] > rxy[2]) || (rxy[1] > rxy[3])) return; /* Adjust buffer pointer */ if (buf) buf -= rxy[1] * wbuf + rxy[0]; mem_undo_opacity = TRUE; j = poly_points - 1; for (i = 0; i < poly_points; j = i++) { int x0 = poly_mem[j][0], y0 = poly_mem[j][1]; int x1 = poly_mem[i][0], y1 = poly_mem[i][1]; if (!filled) { f_circle(x0, y0, tool_size); tline(x0, y0, x1, y1, tool_size); } else if (!buf) sline(x0, y0, x1, y1); else { int tk; line_init(line, x0, y0, x1, y1); if (line_clip(line, rxy, &tk) < 0) continue; for (; line[2] >= 0; line_step(line)) { buf[line[0] + line[1] * wbuf] = 255; } } // Outline is needed to properly edge the polygon } if (!filled) goto done; // If drawing outline only, finish now /* Build array of vertical spans */ span = spans + SPAN_STEP; j = poly_points - 1; for (i = 0; i < poly_points; j = i++) { int x0 = poly_mem[j][0], y0 = poly_mem[j][1]; int x1 = poly_mem[i][0], y1 = poly_mem[i][1]; // No use for horizontal spans if (y0 == y1) continue; // Order points by increasing Y k = y0 > y1; span[k] = x0; span[k + 2] = y0; k ^= 1; span[k] = x1; span[k + 2] = y1; // Check vertical boundaries if ((span[3] <= 0) || (span[2] >= mem_height - 1)) continue; // Accept the span span += SPAN_STEP; } nspans = (span - spans) / SPAN_STEP - 1; if (!nspans) goto done; // No interior to fill /* Sort and link spans */ qsort(spans + SPAN_STEP, nspans, SPAN_STEP * sizeof(int), cmp_spans); for (i = 0; i < nspans; i++) spans[i * SPAN_STEP + 4] = i + 1; spans[nspans * SPAN_STEP + 4] = 0; // Chain terminator spans[2] = spans[3] = MAX_HEIGHT; // Loops breaker /* Let's scan! */ memset(borders, 0, mem_width); y = spans[SPAN_STEP + 2] + 1; if (y < 0) y = 0; for (; y < mem_height; y++) { unsigned char tv = 0; int i, x, x0 = mem_width, x1 = 0; /* Label the intersections */ if (!spans[4]) break; // List is empty span = spans; while (TRUE) { int dx, dy; // Unchain used-up spans while ((span2 = spans + span[4] * SPAN_STEP)[3] < y) span[4] = span2[4]; if (y <= span2[2]) break; // Y too small yet span = span2; dx = span[1] - span[0]; dy = span[3] - span[2]; x = (dx * 2 * (y - span[2]) + dy) / (dy * 2) + span[0]; if (x >= mem_width) x1 = mem_width; // Fill to end else { if (x < 0) x = 0; if (x0 > x) x0 = x; if (x1 <= x) x1 = x + 1; borders[x] ^= 1; } } /* Draw the runs */ if (x0 >= mem_width) continue; // No pixels for (i = x0; i < x1; i++) { tv ^= borders[i]; // !!! "&" is for larger-than-byte char type; normally, GCC will optimize it out borders[i] = (~tv + 1) & 255; } x1 -= x0; if (buf) memcpy(buf + y * wbuf + x0, borders + x0, x1); else put_pixel_row(x0, y, x1, borders + x0); memset(borders + x0, 0, x1); } done: mem_undo_opacity = oldmode; #undef SPAN_STEP } void poly_mask() // Paint polygon onto clipboard mask { mem_clip_mask_init(0); /* Clear mask */ if (!mem_clip_mask) return; /* Failed to get memory */ poly_draw(TRUE, mem_clip_mask, mem_clip_w); } void poly_paint() // Paint polygon onto image { poly_draw(TRUE, NULL, 0); } void poly_outline() // Paint polygon outline onto image { poly_draw(FALSE, NULL, 0); } void poly_add(int x, int y) // Add point to list { if (!poly_points) { poly_min_x = poly_max_x = x; poly_min_y = poly_max_y = y; } else { if (poly_points >= MAX_POLY) return; if (poly_min_x > x) poly_min_x = x; if (poly_max_x < x) poly_max_x = x; if (poly_min_y > y) poly_min_y = y; if (poly_max_y < y) poly_max_y = y; } poly_mem[poly_points][0] = x; poly_mem[poly_points][1] = y; poly_points++; } void flood_fill_poly( int x, int y, unsigned int target ) { int minx = x, maxx = x, ended = 0, newx = 0; mem_clip_mask[ x + y*mem_clip_w ] = 1; while ( ended == 0 ) // Search left for target pixels { minx--; if ( minx < 0 ) ended = 1; else { if ( mem_clipboard[ minx + y*mem_clip_w ] == target ) mem_clip_mask[ minx + y*mem_clip_w ] = 1; else ended = 1; } } minx++; ended = 0; while ( ended == 0 ) // Search right for target pixels { maxx++; if ( maxx >= mem_clip_w ) ended = 1; else { if ( mem_clipboard[ maxx + y*mem_clip_w ] == target ) mem_clip_mask[ maxx + y*mem_clip_w ] = 1; else ended = 1; } } maxx--; if ( (y-1) >= 0 ) // Recurse upwards for ( newx = minx; newx <= maxx; newx++ ) if ( mem_clipboard[ newx + (y-1)*mem_clip_w ] == target && mem_clip_mask[newx + mem_clip_w*(y-1)] != 1 ) flood_fill_poly( newx, y-1, target ); if ( (y+1) < mem_clip_h ) // Recurse downwards for ( newx = minx; newx <= maxx; newx++ ) if ( mem_clipboard[ newx + (y+1)*mem_clip_w ] == target && mem_clip_mask[newx + mem_clip_w*(y+1)] != 1 ) flood_fill_poly( newx, y+1, target ); } void flood_fill24_poly( int x, int y, int target ) { int minx = x, maxx = x, ended = 0, newx = 0; mem_clip_mask[ x + y*mem_clip_w ] = 1; while ( ended == 0 ) // Search left for target pixels { minx--; if ( minx < 0 ) ended = 1; else { if ( MEM_2_INT(mem_clipboard, 3*(minx + mem_clip_w*y) ) == target ) mem_clip_mask[ minx + y*mem_clip_w ] = 1; else ended = 1; } } minx++; ended = 0; while ( ended == 0 ) // Search right for target pixels { maxx++; if ( maxx >= mem_clip_w ) ended = 1; else { if ( MEM_2_INT(mem_clipboard, 3*(maxx + mem_clip_w*y) ) == target ) mem_clip_mask[ maxx + y*mem_clip_w ] = 1; else ended = 1; } } maxx--; if ( (y-1) >= 0 ) // Recurse upwards for ( newx = minx; newx <= maxx; newx++ ) if ( MEM_2_INT(mem_clipboard, 3*(newx + mem_clip_w*(y-1)) ) == target && mem_clip_mask[newx + mem_clip_w*(y-1)] != 1 ) flood_fill24_poly( newx, y-1, target ); if ( (y+1) < mem_clip_h ) // Recurse downwards for ( newx = minx; newx <= maxx; newx++ ) if ( MEM_2_INT(mem_clipboard, 3*(newx + mem_clip_w*(y+1)) ) == target && mem_clip_mask[newx + mem_clip_w*(y+1)] != 1 ) flood_fill24_poly( newx, y+1, target ); } void poly_lasso() // Lasso around current clipboard { int i, j, x = 0, y = 0; if (!mem_clip_mask) return; /* Nothing to do */ /* Fill seed is the first point of polygon, if any, * or top left corner of the clipboard by default */ if (poly_points) { x = poly_mem[0][0] - poly_min_x; y = poly_mem[0][1] - poly_min_y; if ((x < 0) || (x >= mem_clip_w) || (y < 0) || (y >= mem_clip_h)) x = y = 0; // Point is outside clipboard } if ( mem_clip_bpp == 1 ) { j = mem_clipboard[x + y*mem_clip_w]; flood_fill_poly( x, y, j ); } if ( mem_clip_bpp == 3 ) { i = 3*(x + y*mem_clip_w); j = MEM_2_INT(mem_clipboard, i); flood_fill24_poly( x, y, j ); } j = mem_clip_w*mem_clip_h; for ( i=0; i #include #define PNG_READ_PACK_SUPPORTED #include #include #ifdef U_GIF #include #endif #ifdef U_JPEG #define NEED_CMYK #include /* !!! Since libjpeg 7, this conflicts with ; with libjpeg 8a, * conflict can be avoided if windows.h is included BEFORE this - WJ */ #endif #ifdef U_JP2 #define HANDLE_JP2 #include #endif #ifdef U_JASPER #define HANDLE_JP2 #include #endif #ifdef U_TIFF #define NEED_CMYK #include #endif #if U_LCMS == 2 #include /* For version 1.x compatibility */ #define icSigCmykData cmsSigCmykData #define icSigRgbData cmsSigRgbData #define icHeader cmsICCHeader #elif defined U_LCMS #include #endif #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "canvas.h" #include "toolbar.h" #include "layer.h" /* All-in-one transport container for animation save/load */ typedef struct { frameset fset; ls_settings settings; int mode; /* Explode frames mode */ int desttype; int error, miss, cnt; char *destdir; } ani_settings; int silence_limit, jpeg_quality, png_compression; int tga_RLE, tga_565, tga_defdir, jp2_rate; int apply_icc; fformat file_formats[NUM_FTYPES] = { { "", "", "", 0}, { "PNG", "png", "", FF_256 | FF_RGB | FF_ALPHA | FF_MULTI | FF_TRANS | FF_COMPZ | FF_MEM }, #ifdef U_JPEG { "JPEG", "jpg", "jpeg", FF_RGB | FF_COMPJ }, #else { "", "", "", 0}, #endif #ifdef HANDLE_JP2 { "JPEG2000", "jp2", "", FF_RGB | FF_ALPHA | FF_COMPJ2 }, { "J2K", "j2k", "jpc", FF_RGB | FF_ALPHA | FF_COMPJ2 }, #else { "", "", "", 0}, { "", "", "", 0}, #endif #ifdef U_TIFF /* !!! Ideal state */ // { "TIFF", "tif", "tiff", FF_256 | FF_RGB | FF_ALPHA | FF_MULTI | FF_LAYER // /* | FF_TRANS */ }, /* !!! Current state */ { "TIFF", "tif", "tiff", FF_256 | FF_RGB | FF_ALPHA | FF_LAYER }, #else { "", "", "", 0}, #endif #ifdef U_GIF { "GIF", "gif", "", FF_256 | FF_ANIM | FF_TRANS }, #else { "", "", "", 0}, #endif { "BMP", "bmp", "", FF_256 | FF_RGB | FF_ALPHAR | FF_MEM }, { "XPM", "xpm", "", FF_256 | FF_RGB | FF_TRANS | FF_SPOT }, { "XBM", "xbm", "", FF_BW | FF_SPOT }, { "LSS16", "lss", "", FF_16 }, /* !!! Ideal state */ // { "TGA", "tga", "", FF_256 | FF_RGB | FF_ALPHA | FF_MULTI // | FF_TRANS | FF_COMPR }, /* !!! Current state */ { "TGA", "tga", "", FF_256 | FF_RGB | FF_ALPHAR | FF_TRANS | FF_COMPR }, { "PCX", "pcx", "", FF_256 | FF_RGB }, { "PBM", "pbm", "", FF_BW | FF_LAYER }, { "PGM", "pgm", "", FF_256 | FF_LAYER | FF_NOSAVE }, { "PPM", "ppm", "pnm", FF_RGB | FF_LAYER }, { "PAM", "pam", "", FF_BW | FF_RGB | FF_ALPHA | FF_LAYER }, { "GPL", "gpl", "", FF_PALETTE }, { "TXT", "txt", "", FF_PALETTE }, /* !!! Not supported yet */ // { "PAL", "pal", "", FF_PALETTE }, /* !!! Placeholder */ { "", "", "", 0}, { "LAYERS", "txt", "", FF_LAYER }, /* !!! No 2nd layers format yet */ { "", "", "", 0}, /* An X pixmap - not a file at all */ { "PIXMAP", "", "", FF_RGB | FF_NOSAVE }, /* SVG image - import only */ { "SVG", "svg", "", FF_RGB | FF_ALPHA | FF_SCALE | FF_NOSAVE }, }; int file_type_by_ext(char *name, guint32 mask) { char *ext; int i, l = LONGEST_EXT; ext = strrchr(name, '.'); if (!ext || !ext[0]) return (FT_NONE); /* Special case for exploded frames (*.gif.000 etc.) */ if (!ext[strspn(ext, ".0123456789")] && memchr(name, '.', ext - name)) { char *tmp = ext; while (*(--ext) != '.'); if (tmp - ext - 1 < LONGEST_EXT) l = tmp - ext - 1; } ext++; for (i = 0; i < NUM_FTYPES; i++) { unsigned int flags = file_formats[i].flags; if ((flags & FF_NOSAVE) || !(flags & mask)) continue; if (!strncasecmp(ext, file_formats[i].ext, l)) return (i); if (!file_formats[i].ext2[0]) continue; if (!strncasecmp(ext, file_formats[i].ext2, l)) return (i); } return (FT_NONE); } /* Set palette to white and black */ static void set_bw(ls_settings *settings) { static const png_color wb[2] = { { 255, 255, 255 }, { 0, 0, 0 } }; settings->colors = 2; memcpy(settings->pal, wb, sizeof(wb)); } /* Set palette to grayscale */ static void set_gray(ls_settings *settings) { settings->colors = 256; mem_bw_pal(settings->pal, 0, 255); } static int check_next_frame(frameset *fset, int mode, int anim) { int lim = mode != FS_LAYER_LOAD ? FRAMES_MAX : anim ? MAX_LAYERS - 1 : MAX_LAYERS; return (fset->cnt < lim); } static int write_out_frame(char *file_name, ani_settings *ani, ls_settings *f_set); static int process_page_frame(char *file_name, ani_settings *ani, ls_settings *w_set) { image_frame *frame; if (ani->settings.mode == FS_EXPLODE_FRAMES) return (write_out_frame(file_name, ani, w_set)); /* Store a new frame */ // !!! Currently, frames are allocated without checking any limits if (!mem_add_frame(&ani->fset, w_set->width, w_set->height, w_set->bpp, CMASK_NONE, w_set->pal)) return (FILE_MEM_ERROR); frame = ani->fset.frames + (ani->fset.cnt - 1); frame->cols = w_set->colors; frame->trans = w_set->xpm_trans; frame->delay = 0; frame->x = w_set->x; frame->y = w_set->y; memcpy(frame->img, w_set->img, sizeof(chanlist)); return (0); } /* Receives struct with image parameters, and channel flags; * returns 0 for success, or an error code; * success doesn't mean that anything was allocated, loader must check that; * loader may call this multiple times - say, for each channel */ static int allocate_image(ls_settings *settings, int cmask) { size_t sz, l; int i, j, oldmask, mode = settings->mode; if ((settings->width < 1) || (settings->height < 1)) return (-1); if ((settings->width > MAX_WIDTH) || (settings->height > MAX_HEIGHT)) return (TOO_BIG); /* Don't show progress bar where there's no need */ if (settings->width * settings->height <= (1 << silence_limit)) settings->silent = TRUE; /* Reduce cmask according to mode */ if (mode == FS_CLIP_FILE) cmask &= CMASK_CLIP; else if (mode == FS_CLIPBOARD) cmask &= CMASK_RGBA; else if ((mode == FS_CHANNEL_LOAD) || (mode == FS_PATTERN_LOAD)) cmask &= CMASK_IMAGE; /* Overwriting is allowed */ oldmask = cmask_from(settings->img); cmask &= ~oldmask; if (!cmask) return (0); // Already allocated /* No utility channels without image */ oldmask |= cmask; if (!(oldmask & CMASK_IMAGE)) return (-1); j = TRUE; // For FS_LAYER_LOAD sz = (size_t)settings->width * settings->height; switch (mode) { case FS_PNG_LOAD: /* Regular image */ /* Reserve memory */ j = undo_next_core(UC_CREATE | UC_GETMEM, settings->width, settings->height, settings->bpp, oldmask); /* Drop current image if not enough memory for undo */ if (j) mem_free_image(&mem_image, FREE_IMAGE); case FS_EXPLODE_FRAMES: /* Frames' temporaries */ case FS_LAYER_LOAD: /* Layers */ /* Allocate, or at least try to */ for (i = 0; i < NUM_CHANNELS; i++) { if (!(cmask & CMASK_FOR(i))) continue; l = i == CHN_IMAGE ? sz * settings->bpp : sz; settings->img[i] = j ? malloc(l) : mem_try_malloc(l); if (!settings->img[i]) return (FILE_MEM_ERROR); } break; case FS_CLIP_FILE: /* Clipboard */ case FS_CLIPBOARD: /* Allocate the entire batch at once */ if (cmask & CMASK_IMAGE) { j = mem_clip_new(settings->width, settings->height, settings->bpp, cmask, FALSE); if (j) return (FILE_MEM_ERROR); memcpy(settings->img, mem_clip.img, sizeof(chanlist)); break; } /* Try to add clipboard alpha and/or mask */ for (i = 0; i < NUM_CHANNELS; i++) { if (!(cmask & CMASK_FOR(i))) continue; if (!(settings->img[i] = mem_clip.img[i] = malloc(sz))) return (FILE_MEM_ERROR); } break; case FS_CHANNEL_LOAD: /* Current channel */ /* Dimensions & depth have to be the same */ if ((settings->width != mem_width) || (settings->height != mem_height) || (settings->bpp != MEM_BPP)) return (-1); /* Reserve memory */ j = undo_next_core(UC_CREATE | UC_GETMEM, settings->width, settings->height, settings->bpp, CMASK_CURR); if (j) return (FILE_MEM_ERROR); /* Allocate */ settings->img[CHN_IMAGE] = mem_try_malloc(sz * settings->bpp); if (!settings->img[CHN_IMAGE]) return (FILE_MEM_ERROR); break; case FS_PATTERN_LOAD: /* Patterns */ settings->silent = TRUE; /* Fixed dimensions and depth */ if ((settings->width != PATTERN_GRID_W * 8) || (settings->height != PATTERN_GRID_H * 8) || (settings->bpp != 1)) return (-1); /* Allocate temp memory */ settings->img[CHN_IMAGE] = calloc(1, sz); if (!settings->img[CHN_IMAGE]) return (FILE_MEM_ERROR); break; case FS_PALETTE_LOAD: /* Palette */ case FS_PALETTE_DEF: return (-1); // Should not arrive here if palette is present } return (0); } /* Receives struct with image parameters, and which channels to deallocate */ static void deallocate_image(ls_settings *settings, int cmask) { int i; /* No deallocating image channel */ if (!(cmask &= ~CMASK_IMAGE)) return; for (i = 0; i < NUM_CHANNELS; i++) { if (!(cmask & CMASK_FOR(i))) continue; if (!settings->img[i]) continue; free(settings->img[i]); settings->img[i] = NULL; /* Clipboard */ if ((settings->mode == FS_CLIP_FILE) || (settings->mode == FS_CLIPBOARD)) mem_clip.img[i] = NULL; } } typedef struct { FILE *file; // for traditional use char *buf; // data block int here; // current position int top; // end of data int size; // currently allocated } memFILE; static int mfextend(memFILE *mf, size_t length) { size_t l = mf->here + length, l2 = mf->size * 2; unsigned char *tmp = NULL; if (l2 > l) tmp = realloc(mf->buf, l2); if (!tmp) tmp = realloc(mf->buf, l2 = l); if (!tmp) return (FALSE); mf->buf = tmp; mf->size = l2; return (TRUE); } static size_t mfread(void *ptr, size_t size, size_t nmemb, memFILE *mf) { size_t l, m; if (mf->file) return (fread(ptr, size, nmemb, mf->file)); l = size * nmemb; m = mf->top - mf->here; if ((mf->here < 0) || (m < 0)) return (0); if (l > m) l = m , nmemb = m / size; memcpy(ptr, mf->buf + mf->here, l); mf->here += l; return (nmemb); } static size_t mfwrite(void *ptr, size_t size, size_t nmemb, memFILE *mf) { size_t l, m; if (mf->file) return (fwrite(ptr, size, nmemb, mf->file)); if (mf->here < 0) return (0); l = size * nmemb; m = mf->size - mf->here; if ((l > m) && !mfextend(mf, l)) l = m , nmemb = m / size; memcpy(mf->buf + mf->here, ptr, l); // !!! Nothing in here does fseek() when writing, so no need to track mf->top mf->top = mf->here += l; return (nmemb); } static int mfseek(memFILE *mf, long offset, int mode) { // !!! For operating on tarballs, adjust fseek() params here if (mf->file) return (fseek(mf->file, offset, mode)); if (mode == SEEK_SET); else if (mode == SEEK_CUR) offset += mf->here; else if (mode == SEEK_END) offset += mf->top; else return (-1); mf->here = offset; return (0); } /* Fills temp buffer row, or returns image row if no buffer */ static unsigned char *prepare_row(unsigned char *buf, ls_settings *settings, int bpp, int y) { unsigned char *tmp, *tmi, *tma, *tms; int i, j, w = settings->width, h = y * w; int bgr = settings->ftype == FT_PNG ? 0 : 2; tmi = settings->img[CHN_IMAGE] + h * settings->bpp; if (bpp < (bgr ? 3 : 4)) /* Return/copy image row */ { if (!buf) return (tmi); memcpy(buf, tmi, w * bpp); return (buf); } /* Produce BGR / BGRx / RGBx */ tmp = buf; if (settings->bpp == 1) // Indexed { png_color *pal = settings->pal; for (i = 0; i < w; tmp += bpp , i++) { png_color *col = pal + *tmi++; tmp[bgr] = col->red; tmp[1] = col->green; tmp[bgr ^ 2] = col->blue; } } else // RGB { for (i = 0; i < w; tmp += bpp , tmi += 3 , i++) { tmp[0] = tmi[bgr]; tmp[1] = tmi[1]; tmp[2] = tmi[bgr ^ 2]; } } /* Add alpha to the mix */ tmp = buf + 3; tma = settings->img[CHN_ALPHA] + h; if (bpp == 3); // No alpha - all done else if ((settings->mode != FS_CLIPBOARD) || !settings->img[CHN_SEL]) { // Only alpha here for (i = 0; i < w; tmp += bpp , i++) *tmp = *tma++; } else { // Merge alpha and selection tms = settings->img[CHN_SEL] + h; for (i = 0; i < w; tmp += bpp , i++) { j = *tma++ * *tms++; *tmp = (j + (j >> 8) + 1) >> 8; } } return (buf); } /* Converts palette-based transparency to color transparency or alpha channel */ static int palette_trans(ls_settings *settings, unsigned char ttb[256]) { int i, n, res; /* Count transparent colors */ for (i = n = 0; i < 256; i++) n += ttb[i] < 255; /* None means no transparency */ settings->xpm_trans = -1; if (!n) return (0); /* One fully transparent color means color transparency */ if (n == 1) { for (i = 0; i < 256; i++) { if (ttb[i]) continue; settings->xpm_trans = i; return (0); } } /* Anything else means alpha transparency */ res = allocate_image(settings, CMASK_FOR(CHN_ALPHA)); if (!res && settings->img[CHN_ALPHA]) { unsigned char *src, *dest; size_t i = (size_t)settings->width * settings->height; src = settings->img[CHN_IMAGE]; dest = settings->img[CHN_ALPHA]; while (i-- > 0) *dest++ = ttb[*src++]; } return (res); } static void ls_init(char *what, int save) { char buf[256]; sprintf(buf, save ? _("Saving %s image") : _("Loading %s image"), what); progress_init(buf, 0); } static void ls_progress(ls_settings *settings, int n, int steps) { int h = settings->height; if (!settings->silent && ((n * steps) % h >= h - steps)) progress_update((float)n / h); } #if PNG_LIBPNG_VER >= 10400 /* 1.4+ */ #define png_set_gray_1_2_4_to_8(X) png_set_expand_gray_1_2_4_to_8(X) #endif /* !!! libpng 1.2.17-1.2.24 was losing extra chunks if there was no callback */ static int buggy_libpng_handler() { return (0); } static void png_memread(png_structp png_ptr, png_bytep data, png_size_t length) { memFILE *mf = (memFILE *)png_get_io_ptr(png_ptr); // memFILE *mf = (memFILE *)png_ptr->io_ptr; size_t l = mf->top - mf->here; if (l > length) l = length; memcpy(data, mf->buf + mf->here, l); mf->here += l; if (l < length) png_error(png_ptr, "Read Error"); } static void png_memwrite(png_structp png_ptr, png_bytep data, png_size_t length) { memFILE *mf = (memFILE *)png_get_io_ptr(png_ptr); // memFILE *mf = (memFILE *)png_ptr->io_ptr; if ((mf->here + length > mf->size) && !mfextend(mf, length)) png_error(png_ptr, "Write Error"); else { memcpy(mf->buf + mf->here, data, length); mf->top = mf->here += length; } } static void png_memflush(png_structp png_ptr) { /* Does nothing */ } #define PNG_BYTES_TO_CHECK 8 #define PNG_HANDLE_CHUNK_ALWAYS 3 static const char *chunk_names[NUM_CHANNELS] = { "", "alPh", "seLc", "maSk" }; static int load_png(char *file_name, ls_settings *settings, memFILE *mf) { /* Description of PNG interlacing passes as X0, DX, Y0, DY */ static const unsigned char png_interlace[8][4] = { {0, 1, 0, 1}, /* One pass for non-interlaced */ {0, 8, 0, 8}, /* Seven passes for Adam7 interlaced */ {4, 8, 0, 8}, {0, 4, 4, 8}, {2, 4, 0, 4}, {0, 2, 2, 4}, {1, 2, 0, 2}, {0, 1, 1, 2} }; static png_bytep *row_pointers; static char *msg; png_structp png_ptr; png_infop info_ptr; png_unknown_chunkp uk_p; png_uint_32 pwidth, pheight; char buf[PNG_BYTES_TO_CHECK + 1]; unsigned char trans[256], *src, *dest, *dsta; long dest_len; FILE *fp = NULL; int i, j, k, bit_depth, color_type, interlace_type, num_uk, res = -1; int maxpass, x0, dx, y0, dy, n, nx, height, width, itrans = FALSE; if (!mf) { if ((fp = fopen(file_name, "rb")) == NULL) return -1; i = fread(buf, 1, PNG_BYTES_TO_CHECK, fp); } else i = mfread(buf, 1, PNG_BYTES_TO_CHECK, mf); if (i != PNG_BYTES_TO_CHECK) goto fail; if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)) goto fail; png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) goto fail; row_pointers = NULL; msg = NULL; info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) goto fail2; if (setjmp(png_jmpbuf(png_ptr))) { res = FILE_LIB_ERROR; goto fail2; } /* !!! libpng 1.2.17-1.2.24 needs this to read extra channels */ png_set_read_user_chunk_fn(png_ptr, NULL, buggy_libpng_handler); if (!mf) png_init_io(png_ptr, fp); else png_set_read_fn(png_ptr, mf, png_memread); png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); /* Stupid libpng handles private chunks on all-or-nothing basis */ png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_ALWAYS, NULL, 0); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &pwidth, &pheight, &bit_depth, &color_type, &interlace_type, NULL, NULL); if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) { png_colorp png_palette; png_get_PLTE(png_ptr, info_ptr, &png_palette, &settings->colors); memcpy(settings->pal, png_palette, settings->colors * sizeof(png_color)); /* If palette is all we need */ res = 1; if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) goto fail3; } res = TOO_BIG; if ((pwidth > MAX_WIDTH) || (pheight > MAX_HEIGHT)) goto fail2; /* Call allocator for image data */ settings->width = width = (int)pwidth; settings->height = height = (int)pheight; settings->bpp = 1; if ((color_type != PNG_COLOR_TYPE_PALETTE) || (bit_depth > 8)) settings->bpp = 3; i = CMASK_IMAGE; if ((color_type == PNG_COLOR_TYPE_RGB_ALPHA) || (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) i = CMASK_RGBA; if ((res = allocate_image(settings, i))) goto fail2; res = FILE_MEM_ERROR; i = sizeof(png_bytep) * height; row_pointers = malloc(i + width * 4); if (!row_pointers) goto fail2; row_pointers[0] = (char *)row_pointers + i; if (!settings->silent) { switch(settings->mode) { case FS_PNG_LOAD: msg = "PNG"; break; case FS_CLIP_FILE: case FS_CLIPBOARD: msg = _("Clipboard"); break; } } if (msg) ls_init(msg, 0); res = -1; /* RGB PNG file */ if (settings->bpp == 3) { png_set_strip_16(png_ptr); png_set_gray_1_2_4_to_8(png_ptr); png_set_palette_to_rgb(png_ptr); png_set_gray_to_rgb(png_ptr); /* Is there a transparent color? */ settings->rgb_trans = -1; if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { png_color_16p trans_rgb; png_get_tRNS(png_ptr, info_ptr, NULL, NULL, &trans_rgb); if (color_type == PNG_COLOR_TYPE_GRAY) { i = trans_rgb->gray; switch (bit_depth) { case 1: i *= 0xFF; break; case 2: i *= 0x55; break; case 4: i *= 0x11; break; case 8: default: break; /* Hope libpng compiled w/o accurate transform */ case 16: i >>= 8; break; } settings->rgb_trans = RGB_2_INT(i, i, i); } else settings->rgb_trans = RGB_2_INT(trans_rgb->red, trans_rgb->green, trans_rgb->blue); } if (settings->img[CHN_ALPHA]) /* RGBA */ { nx = height; /* Have to do deinterlacing myself */ if (interlace_type == PNG_INTERLACE_NONE) { k = 0; maxpass = 1; } else if (interlace_type == PNG_INTERLACE_ADAM7) { k = 1; maxpass = 8; nx = (nx + 7) & ~7; nx += 7 * (nx >> 3); } else goto fail2; /* Unknown type */ for (n = 0; k < maxpass; k++) { x0 = png_interlace[k][0]; dx = png_interlace[k][1]; y0 = png_interlace[k][2]; dy = png_interlace[k][3]; for (i = y0; i < height; i += dy , n++) { png_read_rows(png_ptr, &row_pointers[0], NULL, 1); src = row_pointers[0]; dest = settings->img[CHN_IMAGE] + (i * width + x0) * 3; dsta = settings->img[CHN_ALPHA] + i * width; for (j = x0; j < width; j += dx) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dsta[j] = src[3]; src += 4; dest += 3 * dx; } if (msg && ((n * 20) % nx >= nx - 20)) progress_update((float)n / nx); } } } else /* RGB */ { png_set_strip_alpha(png_ptr); for (i = 0; i < height; i++) { row_pointers[i] = settings->img[CHN_IMAGE] + i * width * 3; } png_read_image(png_ptr, row_pointers); } } /* Paletted PNG file */ else { /* Is there a transparent index? */ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { png_bytep ptrans; int ltrans; png_get_tRNS(png_ptr, info_ptr, &ptrans, <rans, NULL); memset(trans, 255, 256); memcpy(trans, ptrans, ltrans); itrans = TRUE; } png_set_strip_16(png_ptr); png_set_strip_alpha(png_ptr); png_set_packing(png_ptr); if ((color_type == PNG_COLOR_TYPE_GRAY) && (bit_depth < 8)) png_set_gray_1_2_4_to_8(png_ptr); for (i = 0; i < height; i++) { row_pointers[i] = settings->img[CHN_IMAGE] + i * width; } png_read_image(png_ptr, row_pointers); } if (msg) progress_update(1.0); png_read_end(png_ptr, info_ptr); res = 0; /* Apply palette transparency */ if (itrans) res = palette_trans(settings, trans); num_uk = png_get_unknown_chunks(png_ptr, info_ptr, &uk_p); if (num_uk) /* File contains mtPaint's private chunks */ { for (i = 0; i < num_uk; i++) /* Examine each chunk */ { for (j = CHN_ALPHA; j < NUM_CHANNELS; j++) { if (!strcmp(uk_p[i].name, chunk_names[j])) break; } if (j >= NUM_CHANNELS) continue; /* Try to allocate a channel */ if ((res = allocate_image(settings, CMASK_FOR(j)))) break; /* Skip if not allocated */ if (!settings->img[j]) continue; dest_len = width * height; uncompress(settings->img[j], &dest_len, uk_p[i].data, uk_p[i].size); } /* !!! Is this call really needed? */ png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, -1); } if (!res) res = 1; #ifdef U_LCMS #ifdef PNG_iCCP_SUPPORTED /* Extract ICC profile if it's of use */ if (!settings->icc_size) { png_charp name, icc; png_uint_32 len; int comp; if (png_get_iCCP(png_ptr, info_ptr, &name, &comp, &icc, &len) && (len < INT_MAX) && (settings->icc = malloc(len))) { settings->icc_size = len; memcpy(settings->icc, icc, len); } } #endif #endif fail2: if (msg) progress_end(); free(row_pointers); fail3: png_destroy_read_struct(&png_ptr, &info_ptr, NULL); fail: if (fp) fclose(fp); return (res); } #ifndef PNG_AFTER_IDAT #define PNG_AFTER_IDAT 8 #endif static int save_png(char *file_name, ls_settings *settings, memFILE *mf) { png_unknown_chunk unknown0; png_structp png_ptr; png_infop info_ptr; FILE *fp = NULL; int h = settings->height, w = settings->width, bpp = settings->bpp; int i, chunks = 0, res = -1; long uninit_(dest_len), res_len; char *mess = NULL; unsigned char trans[256], *tmp, *rgba_row = NULL; png_color_16 trans_rgb; /* Baseline PNG format does not support alpha for indexed images, so * we have to convert them to RGBA for clipboard export - WJ */ if (((settings->mode == FS_CLIPBOARD) || (bpp == 3)) && settings->img[CHN_ALPHA]) { rgba_row = malloc(w * 4); if (!rgba_row) return (-1); bpp = 4; } if (!settings->silent) switch(settings->mode) { case FS_PNG_SAVE: mess = "PNG"; break; case FS_CLIP_FILE: case FS_CLIPBOARD: mess = _("Clipboard"); break; case FS_COMPOSITE_SAVE: mess = _("Layer"); break; case FS_CHANNEL_SAVE: mess = _("Channel"); break; default: settings->silent = TRUE; break; } if (!mf && ((fp = fopen(file_name, "wb")) == NULL)) goto exit0; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL); if (!png_ptr) goto exit1; info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) goto exit2; res = 0; if (!mf) png_init_io(png_ptr, fp); else png_set_write_fn(png_ptr, mf, png_memwrite, png_memflush); png_set_compression_level(png_ptr, settings->png_compression); if (bpp == 1) { png_set_IHDR(png_ptr, info_ptr, w, h, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_set_PLTE(png_ptr, info_ptr, settings->pal, settings->colors); /* Transparent index in use */ if ((settings->xpm_trans > -1) && (settings->xpm_trans < 256)) { memset(trans, 255, 256); trans[settings->xpm_trans] = 0; png_set_tRNS(png_ptr, info_ptr, trans, settings->colors, 0); } } else { png_set_IHDR(png_ptr, info_ptr, w, h, 8, bpp == 4 ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); if (settings->pal) png_set_PLTE(png_ptr, info_ptr, settings->pal, settings->colors); /* Transparent index in use */ if ((settings->rgb_trans > -1) && !settings->img[CHN_ALPHA]) { trans_rgb.red = INT_2_R(settings->rgb_trans); trans_rgb.green = INT_2_G(settings->rgb_trans); trans_rgb.blue = INT_2_B(settings->rgb_trans); png_set_tRNS(png_ptr, info_ptr, 0, 1, &trans_rgb); } } png_write_info(png_ptr, info_ptr); if (mess) ls_init(mess, 1); for (i = 0; i < h; i++) { tmp = prepare_row(rgba_row, settings, bpp, i); png_write_row(png_ptr, (png_bytep)tmp); ls_progress(settings, i, 20); } /* Save private chunks into PNG file if we need to */ tmp = NULL; i = bpp == 1 ? CHN_ALPHA : CHN_ALPHA + 1; if (settings->mode == FS_CLIPBOARD) i = NUM_CHANNELS; // Disable extensions for (; i < NUM_CHANNELS; i++) { if (!settings->img[i]) continue; if (!tmp) { /* Get size required for each zlib compress */ w = settings->width * settings->height; #if ZLIB_VERNUM >= 0x1200 dest_len = compressBound(w); #else dest_len = w + (w >> 8) + 32; #endif res = -1; tmp = malloc(dest_len); // Temporary space for compression if (!tmp) break; res = 0; } res_len = dest_len; if (compress2(tmp, &res_len, settings->img[i], w, settings->png_compression) != Z_OK) continue; strncpy(unknown0.name, chunk_names[i], 5); unknown0.data = tmp; unknown0.size = res_len; png_set_unknown_chunks(png_ptr, info_ptr, &unknown0, 1); png_set_unknown_chunk_location(png_ptr, info_ptr, chunks++, PNG_AFTER_IDAT); } free(tmp); png_write_end(png_ptr, info_ptr); if (mess) progress_end(); /* Tidy up */ exit2: png_destroy_write_struct(&png_ptr, &info_ptr); exit1: if (fp) fclose(fp); exit0: free(rgba_row); return (res); } #ifdef U_GIF /* *** PREFACE *** * Contrary to what GIF89 docs say, all contemporary browser implementations * always render background in an animated GIF as transparent. So does mtPaint, * for some GIF animations depend on this rule. * An inter-frame delay of 0 normally means that the two (or more) frames * are parts of same animation frame and should be rendered as one resulting * frame; but some (ancient) GIFs have all delays set to 0, but still contain * animation sequences. So the handling of zero-delay frames is user-selectable * in mtPaint. */ /* Animation state */ typedef struct { unsigned char lmap[MAX_DIM]; image_frame prev; int prev_idx; // Frame index+1, so that 0 means None int defw, defh, bk_rect[4]; int mode; /* Extra fields for paletted images */ int global_cols, newcols, newtrans; png_color global_pal[256], newpal[256]; unsigned char xlat[513]; } ani_status; /* Calculate new frame dimensions, and point-in-area bitmap */ static void ani_map_frame(ani_status *stat, ls_settings *settings) { unsigned char *lmap; int i, j, w, h; /* Calculate the new dimensions */ // !!! Offsets considered nonnegative (as in GIF) w = settings->x + settings->width; if (stat->defw < w) stat->defw = w; h = settings->y + settings->height; if (stat->defh < h) stat->defh = h; /* The bitmap works this way: "Xth byte & (Yth byte >> 4)" tells which * area(s) the pixel (X,Y) is in: bit 0 is for image (the new one), * bit 1 is for underlayer (the previous composited frame), and bit 2 * is for hole in it (if "restore to background" was last) */ j = stat->defw > stat->defh ? stat->defw : stat->defh; memset(lmap = stat->lmap, 0, j); // Mark new frame for (i = settings->x , j = i + settings->width; i < j; i++) lmap[i] |= 0x01; // Image bit for (i = settings->y , j = i + settings->height; i < j; i++) lmap[i] |= 0x10; // Image mask bit // Mark previous frame if (stat->prev_idx) { for (i = stat->prev.x , j = i + stat->prev.width; i < j; i++) lmap[i] |= 0x02; // Underlayer bit for (i = stat->prev.y , j = i + stat->prev.height; i < j; i++) lmap[i] |= 0x20; // Underlayer mask bit } // Mark disposal area if ((stat->bk_rect[0] < stat->bk_rect[2]) && (stat->bk_rect[1] < stat->bk_rect[3])) // Add bkg rectangle { for (i = stat->bk_rect[0] , j = stat->bk_rect[2]; i < j; i++) lmap[i] |= 0x04; // Background bit for (i = stat->bk_rect[1] , j = stat->bk_rect[3]; i < j; i++) lmap[i] |= 0x40; // Background mask bit } } static int analyze_gif_frame(ani_status *stat, ls_settings *settings) { unsigned char cmap[513], *lmap, *fg, *bg; png_color *pal, *prev; int tmpal[257], same_size, show_under; int i, k, l, x, y, ul, lpal, lprev, fgw, bgw, prevtr = -1; /* Locate the new palette */ pal = prev = stat->global_pal; lpal = lprev = stat->global_cols; if (settings->colors > 0) { pal = settings->pal; lpal = settings->colors; } /* Accept new palette as final, for now */ mem_pal_copy(stat->newpal, pal); stat->newcols = lpal; stat->newtrans = settings->xpm_trans; /* Prepare for new frame */ if (stat->mode == ANM_RAW) // Raw frame mode { stat->defw = settings->width; stat->defh = settings->height; return (0); } ani_map_frame(stat, settings); same_size = !((stat->defw ^ settings->width) | (stat->defh ^ settings->height)); for (i = 0; i < 256; i++) stat->xlat[i] = stat->xlat[i + 256] = i; stat->xlat[512] = stat->newtrans; /* First frame is exceptional */ if (!stat->prev_idx) { // Trivial if no background gets drawn if (same_size) return (0); // Trivial if have transparent color if (settings->xpm_trans >= 0) return (1); } /* Disable transparency by default, enable when needed */ stat->newtrans = -1; /* Now scan the dest area, filling colors bitmap */ memset(cmap, 0, sizeof(cmap)); fgw = settings->width; fg = settings->img[CHN_IMAGE] - (settings->y * fgw + settings->x); // Set underlayer pointer & step (ignore bpp!) bgw = stat->prev.width; bg = stat->prev.img[CHN_IMAGE] - (stat->prev.y * bgw + stat->prev.x); lmap = stat->lmap; for (y = 0; y < stat->defh; y++) { int ww = stat->defw, tp = settings->xpm_trans; int bmask = lmap[y] >> 4; for (x = 0; x < ww; x++) { int c0, bflag = lmap[x] & bmask; if ((bflag & 1) && ((c0 = fg[x]) != tp)) // New frame c0 += 256; else if ((bflag & 6) == 2) // Underlayer c0 = bg[x]; else c0 = 512; // Background (transparency) cmap[c0] = 1; } fg += fgw; bg += bgw; } /* If we have underlayer */ show_under = 0; if (stat->prev_idx) { // Use per-frame palette if underlayer has it prev = stat->prev.pal; lprev = stat->prev.cols; prevtr = stat->prev.trans; // Move underlayer transparency to "transparent" if (prevtr >= 0) { cmap[512] |= cmap[prevtr]; cmap[prevtr] = 0; } // Check if underlayer is at all visible show_under = !!memchr(cmap, 1, 256); // Visible RGB/RGBA underlayer means RGB/RGBA frame if (show_under && (stat->prev.bpp == 3)) goto RGB; } /* Now, check if either frame's palette is enough */ ul = 2; // Default is new palette if (show_under) { l = lprev > lpal ? lprev : lpal; k = lprev > lpal ? lpal : lprev; for (ul = 3 , i = 0; ul && (i < l); i++) { int tf2 = cmap[i] * 2 + cmap[256 + i]; if (tf2 && ((i >= k) || (PNG_2_INT(prev[i]) != PNG_2_INT(pal[i])))) ul &= ~tf2; // Exclude mismatched palette(s) } if (ul == 1) // Need old palette { mem_pal_copy(stat->newpal, prev); stat->newcols = lprev; } } while (ul) // Place transparency { if (cmap[512]) // Need transparency { int i, l = prevtr, nc = stat->newcols; /* If cannot use old transparent index */ if ((l < 0) || (l >= nc) || (cmap[l] | cmap[l + 256])) l = settings->xpm_trans; /* If cannot use new one either */ if ((l < 0) || (l >= nc) || (cmap[l] | cmap[l + 256])) { /* Try to find unused palette slot */ for (l = -1 , i = 0; (l < 0) && (i < nc); i++) if (!(cmap[i] | cmap[i + 256])) l = i; } if (l < 0) /* Try to add a palette slot */ { png_color *c; if (nc >= 256) break; // Failure l = stat->newcols++; c = stat->newpal + l; c->red = c->green = c->blue = 0; } // Modify mapping if (prevtr >= 0) stat->xlat[prevtr] = l; stat->xlat[512] = stat->newtrans = l; } // Successfully mapped everything - use paletted mode return (same_size ? 0 : 1); } /* Try to build combined palette */ for (ul = i = 0; (ul < 257) && (i < 512); i++) { png_color *c; int j, v; if (!cmap[i]) continue; c = (i < 256 ? prev : pal - 256) + i; v = PNG_2_INT(*c); for (j = 0; (j < ul) && (tmpal[j] != v); j++); if (j == ul) tmpal[ul++] = v; stat->xlat[i] = j; } // Add transparent color if ((ul < 257) && cmap[512]) { // Modify mapping if (prevtr >= 0) stat->xlat[prevtr] = ul; stat->xlat[512] = stat->newtrans = ul; tmpal[ul++] = 0; } if (ul < 257) // Success! { png_color *c = stat->newpal; for (i = 0; i < ul; i++ , c++) // Build palette { int v = tmpal[i]; c->red = INT_2_R(v); c->green = INT_2_G(v); c->blue = INT_2_B(v); } stat->newcols = ul; // Use paletted mode return (same_size ? 0 : 1); } /* Tried everything in vain - fall back to RGB/RGBA */ RGB: if (stat->global_cols > 0) // Use default palette if present { mem_pal_copy(stat->newpal, stat->global_pal); stat->newcols = stat->global_cols; } stat->newtrans = -1; // No color-key transparency // RGBA if underlayer with alpha, or transparent backround, is visible if ((show_under && stat->prev.img[CHN_ALPHA]) || cmap[512]) return (4); // RGB otherwise return (3); } /* Convenience wrapper - expand palette to RGB triples */ static unsigned char *pal2rgb(unsigned char *rgb, png_color *pal) { int i; if (!pal) return (rgb + 768); // Nothing to expand for (i = 0; i < 256; i++ , rgb += 3 , pal++) { rgb[0] = pal->red; rgb[1] = pal->green; rgb[2] = pal->blue; } return (rgb); } static void composite_gif_frame(frameset *fset, ani_status *stat, ls_settings *settings) { unsigned char *dest, *fg0, *bg0 = NULL, *lmap = stat->lmap; image_frame *frame = fset->frames + (fset->cnt - 1), *bkf = &stat->prev; int disposal, w, fgw, bgw = 0, urgb = 0, tp = settings->xpm_trans; frame->trans = stat->newtrans; /* In raw mode, just store the offsets */ if (stat->mode == ANM_RAW) { frame->x = settings->x; frame->y = settings->y; goto done; } /* Read & clear disposal mode */ disposal = frame->flags & FM_DISPOSAL; frame->flags ^= disposal ^ FM_DISP_REMOVE; w = frame->width; dest = frame->img[CHN_IMAGE]; fgw = settings->width; fg0 = settings->img[CHN_IMAGE] ? settings->img[CHN_IMAGE] - (settings->y * fgw + settings->x) : dest; // Always indexed (1 bpp) /* Pointer to absent underlayer is no problem - it just won't get used */ bgw = bkf->width; bg0 = bkf->img[CHN_IMAGE] - (bkf->y * bgw + bkf->x) * bkf->bpp; urgb = bkf->bpp != 1; if (frame->bpp == 1) // To indexed { unsigned char *fg = fg0, *bg = bg0, *xlat = stat->xlat; int x, y; for (y = 0; y < frame->height; y++) { int bmask = lmap[y] >> 4; for (x = 0; x < w; x++) { int c0, bflag = lmap[x] & bmask; if ((bflag & 1) && ((c0 = fg[x]) != tp)) // New frame c0 += 256; else if ((bflag & 6) == 2) // Underlayer c0 = bg[x]; else c0 = 512; // Background (transparent) *dest++ = xlat[c0]; } fg += fgw; bg += bgw; } } else // To RGB { unsigned char rgb[513 * 3], *tmp, *fg = fg0, *bg = bg0; int x, y, bpp = urgb + urgb + 1; /* Setup global palette map: underlayer, image, background */ tmp = pal2rgb(rgb, bkf->pal); tmp = pal2rgb(tmp, settings->pal); tmp[0] = tmp[1] = tmp[2] = 0; frame->trans = -1; // No color-key transparency for (y = 0; y < frame->height; y++) { int bmask = lmap[y] >> 4; for (x = 0; x < w; x++) { unsigned char *src; int c0, bflag = lmap[x] & bmask; if ((bflag & 1) && ((c0 = fg[x]) != tp)) // New frame src = rgb + (256 * 3) + (c0 * 3); else if ((bflag & 6) == 2) // Underlayer src = urgb ? bg + x * 3 : rgb + bg[x] * 3; else src = rgb + 512 * 3; // Background (black) dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest += 3; } fg += fgw; bg += bgw * bpp; } } if (frame->img[CHN_ALPHA]) // To alpha { unsigned char *fg = fg0, *bg = NULL; int x, y, af = 0, utp = -1; dest = frame->img[CHN_ALPHA]; utp = bkf->bpp == 1 ? bkf->trans : -1; af = !!bkf->img[CHN_ALPHA]; // Underlayer has alpha bg = bkf->img[af ? CHN_ALPHA : CHN_IMAGE] - (bkf->y * bgw + bkf->x); for (y = 0; y < frame->height; y++) { int bmask = lmap[y] >> 4; for (x = 0; x < w; x++) { int c0, bflag = lmap[x] & bmask; if ((bflag & 1) && (fg[x] != tp)) // New frame c0 = 255; else if ((bflag & 6) == 2) // Underlayer { c0 = bg[x]; if (!af) c0 = c0 != utp ? 255 : 0; } else c0 = 0; // Background (transparent) *dest++ = c0; } fg += fgw; bg += bgw; } } /* Prepare the disposal action */ memset(&stat->bk_rect, 0, sizeof(stat->bk_rect)); // Clear old switch (disposal) { case FM_DISP_REMOVE: // Dispose to background // Image-sized hole in underlayer stat->bk_rect[2] = (stat->bk_rect[0] = settings->x) + settings->width; stat->bk_rect[3] = (stat->bk_rect[1] = settings->y) + settings->height; // Fallthrough case FM_DISP_LEAVE: // Don't dispose stat->prev = *frame; // Current frame becomes underlayer if (!stat->prev.pal) stat->prev.pal = fset->pal; if (stat->prev_idx && (fset->frames[stat->prev_idx - 1].flags & FM_NUKE)) /* Remove the unref'd frame */ mem_remove_frame(fset, stat->prev_idx - 1); stat->prev_idx = fset->cnt; break; case FM_DISP_RESTORE: // Dispose to previous // Underlayer stays unchanged break; } done: if ((fset->cnt > 1) && (stat->prev_idx != fset->cnt - 1) && (fset->frames[fset->cnt - 2].flags & FM_NUKE)) { /* Remove the next-to-last frame */ mem_remove_frame(fset, fset->cnt - 2); if (stat->prev_idx > fset->cnt) stat->prev_idx = fset->cnt; } } static int convert_gif_palette(png_color *pal, ColorMapObject *cmap) { int i, j; if (!cmap) return (-1); j = cmap->ColorCount; if ((j > 256) || (j < 1)) return (-1); for (i = 0; i < j; i++) { pal[i].red = cmap->Colors[i].Red; pal[i].green = cmap->Colors[i].Green; pal[i].blue = cmap->Colors[i].Blue; } return (j); } static int load_gif_frame(GifFileType *giffy, ls_settings *settings) { /* GIF interlace pattern: Y0, DY, ... */ static const unsigned char interlace[10] = { 0, 1, 0, 8, 4, 8, 2, 4, 1, 2 }; int i, k, kx, n, w, h, dy, res; if (DGifGetImageDesc(giffy) == GIF_ERROR) return (-1); /* Get local palette if any */ if (giffy->Image.ColorMap) settings->colors = convert_gif_palette(settings->pal, giffy->Image.ColorMap); if (settings->colors < 0) return (-1); // No palette at all /* If palette is all we need */ if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) return (EXPLODE_FAILED); /* Store actual image parameters */ settings->x = giffy->Image.Left; settings->y = giffy->Image.Top; settings->width = w = giffy->Image.Width; settings->height = h = giffy->Image.Height; settings->bpp = 1; if ((res = allocate_image(settings, CMASK_IMAGE))) return (res); res = FILE_LIB_ERROR; if (!settings->silent) ls_init("GIF", 0); if (giffy->Image.Interlace) k = 2 , kx = 10; else k = 0 , kx = 2; for (n = 0; k < kx; k += 2) { dy = interlace[k + 1]; for (i = interlace[k]; i < h; n++ , i += dy) { if (DGifGetLine(giffy, settings->img[CHN_IMAGE] + i * w, w) == GIF_ERROR) goto fail; ls_progress(settings, n, 10); } } res = 1; fail: if (!settings->silent) progress_end(); return (res); } static int load_gif_frames(char *file_name, ani_settings *ani) { /* GIF disposal codes mapping */ static const unsigned short gif_disposal[8] = { FM_DISP_LEAVE, FM_DISP_LEAVE, FM_DISP_REMOVE, FM_DISP_RESTORE, /* Handling (reserved) "4" same as "3" is what Mozilla does */ FM_DISP_RESTORE, FM_DISP_LEAVE, FM_DISP_LEAVE, FM_DISP_LEAVE }; GifFileType *giffy; GifRecordType gif_rec; GifByteType *byte_ext; png_color w_pal[256]; ani_status stat; image_frame *frame; ls_settings w_set, init_set; int res, val, disposal, bpp, cmask, lastzero = FALSE; if (!(giffy = DGifOpenFileName(file_name))) return (-1); /* Init state structure */ memset(&stat, 0, sizeof(stat)); stat.mode = ani->mode; stat.defw = giffy->SWidth; stat.defh = giffy->SHeight; stat.global_cols = convert_gif_palette(stat.global_pal, giffy->SColorMap); /* Init temp container */ init_set = ani->settings; init_set.colors = 0; // Nonzero will signal local palette init_set.pal = w_pal; init_set.xpm_trans = -1; init_set.gif_delay = 0; disposal = FM_DISP_LEAVE; /* Init frameset */ if (stat.global_cols > 0) // Set default palette { res = FILE_MEM_ERROR; if (!(ani->fset.pal = malloc(SIZEOF_PALETTE))) goto fail; mem_pal_copy(ani->fset.pal, stat.global_pal); } while (TRUE) { res = -1; if (DGifGetRecordType(giffy, &gif_rec) == GIF_ERROR) goto fail; if (gif_rec == TERMINATE_RECORD_TYPE) break; else if (gif_rec == EXTENSION_RECORD_TYPE) { if (DGifGetExtension(giffy, &val, &byte_ext) == GIF_ERROR) goto fail; while (byte_ext) { if (val == GRAPHICS_EXT_FUNC_CODE) { /* !!! In practice, Graphics Control Extension * affects not only "the first block to follow" * as docs say, but EVERY following block - WJ */ init_set.xpm_trans = byte_ext[1] & 1 ? byte_ext[4] : -1; init_set.gif_delay = byte_ext[2] + (byte_ext[3] << 8); disposal = gif_disposal[(byte_ext[1] >> 2) & 7]; } if (DGifGetExtensionNext(giffy, &byte_ext) == GIF_ERROR) goto fail; } } else if (gif_rec == IMAGE_DESC_RECORD_TYPE) { res = FILE_TOO_LONG; if (!check_next_frame(&ani->fset, ani->settings.mode, TRUE)) goto fail; w_set = init_set; res = load_gif_frame(giffy, &w_set); if (res != 1) goto fail; /* Analyze how we can merge the frames */ bpp = analyze_gif_frame(&stat, &w_set); cmask = !bpp ? CMASK_NONE : bpp > 3 ? CMASK_RGBA : CMASK_IMAGE; /* Allocate a new frame */ // !!! Currently, frames are allocated without checking any limits res = FILE_MEM_ERROR; if (!mem_add_frame(&ani->fset, stat.defw, stat.defh, bpp > 1 ? 3 : 1, cmask, stat.newpal)) goto fail; frame = ani->fset.frames + (ani->fset.cnt - 1); frame->cols = stat.newcols; frame->delay = w_set.gif_delay; frame->flags = disposal; // Pass to compositing /* Tag zero-delay frame for deletion if requested */ if ((lastzero = (stat.mode == ANM_NOZERO) && !w_set.gif_delay)) frame->flags |= FM_NUKE; if (!bpp) // Same bpp & dimensions - reassign the chanlist { memcpy(frame->img, w_set.img, sizeof(chanlist)); memset(w_set.img, 0, sizeof(chanlist)); } /* Do actual compositing, remember disposal method */ composite_gif_frame(&ani->fset, &stat, &w_set); // !!! "frame" pointer may be invalid past this point mem_free_chanlist(w_set.img); memset(w_set.img, 0, sizeof(chanlist)); /* Write out those frames worthy to be stored */ if ((ani->settings.mode == FS_EXPLODE_FRAMES) && !lastzero) { res = write_out_frame(file_name, ani, NULL); if (res) goto fail; } } } /* Write out the final frame if not written before */ if ((ani->settings.mode == FS_EXPLODE_FRAMES) && lastzero) { res = write_out_frame(file_name, ani, NULL); if (res) goto fail; } res = 1; fail: mem_free_chanlist(w_set.img); DGifCloseFile(giffy); return (res); } static int load_gif(char *file_name, ls_settings *settings) { GifFileType *giffy; GifRecordType gif_rec; GifByteType *byte_ext; int res, val, frame = 0; int delay = settings->gif_delay, trans = -1;//, disposal = 0; if (!(giffy = DGifOpenFileName(file_name))) return (-1); /* Get global palette */ settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap); while (TRUE) { res = -1; if (DGifGetRecordType(giffy, &gif_rec) == GIF_ERROR) goto fail; if (gif_rec == TERMINATE_RECORD_TYPE) break; else if (gif_rec == EXTENSION_RECORD_TYPE) { if (DGifGetExtension(giffy, &val, &byte_ext) == GIF_ERROR) goto fail; while (byte_ext) { if (val == GRAPHICS_EXT_FUNC_CODE) { trans = byte_ext[1] & 1 ? byte_ext[4] : -1; delay = byte_ext[2] + (byte_ext[3] << 8); // disposal = (byte_ext[1] >> 2) & 7; } if (DGifGetExtensionNext(giffy, &byte_ext) == GIF_ERROR) goto fail; } } else if (gif_rec == IMAGE_DESC_RECORD_TYPE) { if (frame++) /* Multipage GIF - notify user */ { res = FILE_HAS_FRAMES; goto fail; } settings->gif_delay = delay; settings->xpm_trans = trans; res = load_gif_frame(giffy, settings); if (res != 1) goto fail; } } res = 1; fail: DGifCloseFile(giffy); return (res); } static int save_gif(char *file_name, ls_settings *settings) { ColorMapObject *gif_map; GifFileType *giffy; unsigned char gif_ext_data[8]; int i, nc, w = settings->width, h = settings->height, msg = -1; #ifndef WIN32 mode_t mode; #endif /* GIF save must be on indexed image */ if (settings->bpp != 1) return WRONG_FORMAT; /* Get the next power of 2 for colormap size */ nc = settings->colors - 1; nc |= nc >> 1; nc |= nc >> 2; nc |= nc >> 4; nc += !nc + 1; // No less than 2 colors gif_map = MakeMapObject(nc, NULL); if (!gif_map) return -1; giffy = EGifOpenFileName(file_name, FALSE); if (!giffy) goto fail0; for (i = 0; i < settings->colors; i++) { gif_map->Colors[i].Red = settings->pal[i].red; gif_map->Colors[i].Green = settings->pal[i].green; gif_map->Colors[i].Blue = settings->pal[i].blue; } for (; i < nc; i++) { gif_map->Colors[i].Red = gif_map->Colors[i].Green = gif_map->Colors[i].Blue = 0; } if (EGifPutScreenDesc(giffy, w, h, nc, 0, gif_map) == GIF_ERROR) goto fail; if (settings->xpm_trans >= 0) { gif_ext_data[0] = 1; gif_ext_data[1] = 0; gif_ext_data[2] = 0; gif_ext_data[3] = settings->xpm_trans; EGifPutExtension(giffy, GRAPHICS_EXT_FUNC_CODE, 4, gif_ext_data); } if (EGifPutImageDesc(giffy, 0, 0, w, h, FALSE, NULL) == GIF_ERROR) goto fail; if (!settings->silent) ls_init("GIF", 1); for (i = 0; i < h; i++) { EGifPutLine(giffy, settings->img[CHN_IMAGE] + i * w, w); ls_progress(settings, i, 20); } if (!settings->silent) progress_end(); msg = 0; fail: EGifCloseFile(giffy); #ifndef WIN32 /* giflib creates files with 0600 permissions, which is nasty - WJ */ mode = umask(0022); umask(mode); chmod(file_name, 0666 & ~mode); #endif fail0: FreeMapObject(gif_map); return (msg); } #endif #ifdef NEED_CMYK #ifdef U_LCMS /* Guard against cmsHTRANSFORM changing into something overlong in the future */ typedef char cmsHTRANSFORM_Does_Not_Fit_Into_Pointer[2 * (sizeof(cmsHTRANSFORM) <= sizeof(char *)) - 1]; static int init_cmyk2rgb(ls_settings *settings, unsigned char *icc, int len, int inverted) { cmsHPROFILE from, to; cmsHTRANSFORM how = NULL; from = cmsOpenProfileFromMem((void *)icc, len); if (!from) return (TRUE); // Unopenable now, unopenable ever to = cmsCreate_sRGBProfile(); if (cmsGetColorSpace(from) == icSigCmykData) how = cmsCreateTransform(from, inverted ? TYPE_CMYK_8_REV : TYPE_CMYK_8, to, TYPE_RGB_8, INTENT_PERCEPTUAL, 0); if (from) cmsCloseProfile(from); cmsCloseProfile(to); if (!how) return (FALSE); // Better luck the next time settings->icc = (char *)how; settings->icc_size = -2; return (TRUE); } static void done_cmyk2rgb(ls_settings *settings) { if (settings->icc_size != -2) return; cmsDeleteTransform((cmsHTRANSFORM)settings->icc); settings->icc = NULL; settings->icc_size = -1; // Not need profiles anymore } #else /* No LCMS */ #define done_cmyk2rgb(X) #endif static void cmyk2rgb(unsigned char *dest, unsigned char *src, int cnt, int inverted, ls_settings *settings) { unsigned char xb; int j, k, r, g, b; #ifdef U_LCMS /* Convert CMYK to RGB using LCMS if possible */ if (settings->icc_size == -2) { cmsDoTransform((cmsHTRANSFORM)settings->icc, src, dest, cnt); return; } #endif /* Simple CMYK->RGB conversion */ xb = inverted ? 0 : 255; for (j = 0; j < cnt; j++ , src += 4 , dest += 3) { k = src[3] ^ xb; r = (src[0] ^ xb) * k; dest[0] = (r + (r >> 8) + 1) >> 8; g = (src[1] ^ xb) * k; dest[1] = (g + (g >> 8) + 1) >> 8; b = (src[2] ^ xb) * k; dest[2] = (b + (b >> 8) + 1) >> 8; } } #endif #ifdef U_JPEG struct my_error_mgr { struct jpeg_error_mgr pub; // "public" fields jmp_buf setjmp_buffer; // for return to caller }; typedef struct my_error_mgr *my_error_ptr; METHODDEF(void) my_error_exit (j_common_ptr cinfo) { my_error_ptr myerr = (my_error_ptr) cinfo->err; longjmp(myerr->setjmp_buffer, 1); } struct my_error_mgr jerr; static int load_jpeg(char *file_name, ls_settings *settings) { static int pr; struct jpeg_decompress_struct cinfo; unsigned char *memp, *memx = NULL; FILE *fp; int i, width, height, bpp, res = -1, inv = 0; #ifdef U_LCMS unsigned char *icc = NULL; #endif if ((fp = fopen(file_name, "rb")) == NULL) return (-1); pr = 0; jpeg_create_decompress(&cinfo); cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = my_error_exit; if (setjmp(jerr.setjmp_buffer)) { res = FILE_LIB_ERROR; goto fail; } jpeg_stdio_src(&cinfo, fp); #ifdef U_LCMS /* Request ICC profile aka APP2 data be preserved */ if (!settings->icc_size) jpeg_save_markers(&cinfo, JPEG_APP0 + 2, 0xFFFF); #endif jpeg_read_header(&cinfo, TRUE); jpeg_start_decompress(&cinfo); bpp = 3; switch (cinfo.out_color_space) { case JCS_RGB: break; case JCS_GRAYSCALE: set_gray(settings); bpp = 1; break; case JCS_CMYK: /* Photoshop writes CMYK data inverted */ inv = cinfo.saw_Adobe_marker; if ((memx = malloc(cinfo.output_width * 4))) break; res = FILE_MEM_ERROR; // Fallthrough default: goto fail; /* Unsupported colorspace */ } settings->width = width = cinfo.output_width; settings->height = height = cinfo.output_height; settings->bpp = bpp; if ((res = allocate_image(settings, CMASK_IMAGE))) goto fail; res = -1; pr = !settings->silent; #ifdef U_LCMS #define PARTHDR 14 while (!settings->icc_size) { jpeg_saved_marker_ptr mk; unsigned char *tmp, *parts[256]; int i, part, nparts = -1, icclen = 0, lparts[256]; /* List parts */ memset(parts, 0, sizeof(parts)); for (mk = cinfo.marker_list; mk; mk = mk->next) { if ((mk->marker != JPEG_APP0 + 2) || (mk->data_length < PARTHDR) || strcmp(mk->data, "ICC_PROFILE")) continue; part = GETJOCTET(mk->data[13]); if (nparts < 0) nparts = part; if (nparts != part) break; part = GETJOCTET(mk->data[12]); if (!part-- || (part >= nparts) || parts[part]) break; parts[part] = (unsigned char *)(mk->data + PARTHDR); icclen += lparts[part] = mk->data_length - PARTHDR; } if (nparts < 0) break; icc = tmp = malloc(icclen); if (!icc) break; /* Assemble parts */ for (i = 0; i < nparts; i++) { if (!parts[i]) break; memcpy(tmp, parts[i], lparts[i]); tmp += lparts[i]; } if (i < nparts) break; // Sequence had a hole /* If profile is needed right now, for CMYK->RGB */ if (memx && init_cmyk2rgb(settings, icc, icclen, inv)) break; // Transform is ready, so drop the profile settings->icc = icc; settings->icc_size = icclen; icc = NULL; // Leave the profile be break; } free(icc); #undef PARTHDR #endif if (pr) ls_init("JPEG", 0); for (i = 0; i < height; i++) { memp = settings->img[CHN_IMAGE] + width * i * bpp; jpeg_read_scanlines(&cinfo, memx ? &memx : &memp, 1); if (memx) cmyk2rgb(memp, memx, width, inv, settings); ls_progress(settings, i, 20); } done_cmyk2rgb(settings); jpeg_finish_decompress(&cinfo); res = 1; fail: if (pr) progress_end(); jpeg_destroy_decompress(&cinfo); fclose(fp); free(memx); return (res); } static int save_jpeg(char *file_name, ls_settings *settings) { struct jpeg_compress_struct cinfo; JSAMPROW row_pointer; FILE *fp; int i; if (settings->bpp == 1) return WRONG_FORMAT; if ((fp = fopen(file_name, "wb")) == NULL) return -1; cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = my_error_exit; if (setjmp(jerr.setjmp_buffer)) { jpeg_destroy_compress(&cinfo); fclose(fp); return -1; } jpeg_create_compress(&cinfo); jpeg_stdio_dest( &cinfo, fp ); cinfo.image_width = settings->width; cinfo.image_height = settings->height; cinfo.input_components = 3; cinfo.in_color_space = JCS_RGB; jpeg_set_defaults(&cinfo); jpeg_set_quality(&cinfo, settings->jpeg_quality, TRUE ); jpeg_start_compress( &cinfo, TRUE ); row_pointer = settings->img[CHN_IMAGE]; if (!settings->silent) ls_init("JPEG", 1); for (i = 0; i < settings->height; i++ ) { jpeg_write_scanlines(&cinfo, &row_pointer, 1); row_pointer += 3 * settings->width; ls_progress(settings, i, 20); } jpeg_finish_compress( &cinfo ); if (!settings->silent) progress_end(); jpeg_destroy_compress( &cinfo ); fclose(fp); return 0; } #endif #ifdef U_JP2 /* *** PREFACE *** * OpenJPEG 1.x is wasteful in the extreme, with memory overhead of about * 7 times the unpacked image size. So it can fail to handle even such * resolutions that fit into available memory with lots of room to spare. * Still, JasPer is an even worse memory hog, if a somewhat faster one. * Another thing - Linux builds of OpenJPEG cannot properly encode an opacity * channel (fixed in SVN on 06.11.09, revision 541) * And JP2 images with 4 channels, produced by OpenJPEG, cause JasPer * to die horribly - WJ */ static void stupid_callback(const char *msg, void *client_data) { } static int load_jpeg2000(char *file_name, ls_settings *settings) { opj_dparameters_t par; opj_dinfo_t *dinfo; opj_cio_t *cio = NULL; opj_image_t *image = NULL; opj_image_comp_t *comp; opj_event_mgr_t useless_events; // !!! Silently made mandatory in v1.2 unsigned char xtb[256], *dest, *buf = NULL; FILE *fp; int i, j, k, l, w, h, w0, nc, pr, step, delta, shift; int *src, cmask = CMASK_IMAGE, codec = CODEC_JP2, res; if ((fp = fopen(file_name, "rb")) == NULL) return (-1); /* Read in the entire file */ fseek(fp, 0, SEEK_END); l = ftell(fp); fseek(fp, 0, SEEK_SET); buf = malloc(l); res = FILE_MEM_ERROR; if (!buf) goto ffail; res = -1; i = fread(buf, 1, l, fp); if (i < l) goto ffail; fclose(fp); if ((buf[0] == 0xFF) && (buf[1] == 0x4F)) codec = CODEC_J2K; /* Decompress it */ dinfo = opj_create_decompress(codec); if (!dinfo) goto lfail; memset(&useless_events, 0, sizeof(useless_events)); useless_events.error_handler = useless_events.warning_handler = useless_events.info_handler = stupid_callback; opj_set_event_mgr((opj_common_ptr)dinfo, &useless_events, stderr); opj_set_default_decoder_parameters(&par); opj_setup_decoder(dinfo, &par); cio = opj_cio_open((opj_common_ptr)dinfo, buf, l); if (!cio) goto lfail; if ((pr = !settings->silent)) ls_init("JPEG2000", 0); image = opj_decode(dinfo, cio); opj_cio_close(cio); opj_destroy_decompress(dinfo); free(buf); if (!image) goto ifail; /* Analyze what we got */ // !!! OpenJPEG 1.1.1 does *NOT* properly set image->color_space !!! if (image->numcomps < 3) /* Guess this is paletted */ { set_gray(settings); settings->bpp = 1; } else settings->bpp = 3; if ((nc = settings->bpp) < image->numcomps) nc++ , cmask = CMASK_RGBA; comp = image->comps; settings->width = w = (comp->w + (1 << comp->factor) - 1) >> comp->factor; settings->height = h = (comp->h + (1 << comp->factor) - 1) >> comp->factor; for (i = 1; i < nc; i++) /* Check if all components are the same size */ { comp++; if ((w != (comp->w + (1 << comp->factor) - 1) >> comp->factor) || (h != (comp->h + (1 << comp->factor) - 1) >> comp->factor)) goto ifail; } if ((res = allocate_image(settings, cmask))) goto ifail; /* Unpack data */ for (i = 0 , comp = image->comps; i < nc; i++ , comp++) { if (i < settings->bpp) /* Image */ { dest = settings->img[CHN_IMAGE] + i; step = settings->bpp; } else /* Alpha */ { dest = settings->img[CHN_ALPHA]; if (!dest) break; /* No alpha allocated */ step = 1; } w0 = comp->w; delta = comp->sgnd ? 1 << (comp->prec - 1) : 0; shift = comp->prec > 8 ? comp->prec - 8 : 0; set_xlate(xtb, comp->prec - shift); for (j = 0; j < h; j++) { src = comp->data + j * w0; for (k = 0; k < w; k++) { *dest = xtb[(src[k] + delta) >> shift]; dest += step; } } } res = 1; ifail: if (pr) progress_end(); opj_image_destroy(image); return (res); lfail: opj_destroy_decompress(dinfo); free(buf); return (res); ffail: free(buf); fclose(fp); return (res); } static int save_jpeg2000(char *file_name, ls_settings *settings) { opj_cparameters_t par; opj_cinfo_t *cinfo; opj_image_cmptparm_t channels[4]; opj_cio_t *cio = NULL; opj_image_t *image; opj_event_mgr_t useless_events; // !!! Silently made mandatory in v1.2 unsigned char *src; FILE *fp; int i, j, k, nc, step; int *dest, w = settings->width, h = settings->height, res = -1; if (settings->bpp == 1) return WRONG_FORMAT; if ((fp = fopen(file_name, "wb")) == NULL) return -1; /* Create intermediate structure */ nc = settings->img[CHN_ALPHA] ? 4 : 3; memset(channels, 0, sizeof(channels)); for (i = 0; i < nc; i++) { channels[i].prec = channels[i].bpp = 8; channels[i].dx = channels[i].dy = 1; channels[i].w = settings->width; channels[i].h = settings->height; } image = opj_image_create(nc, channels, CLRSPC_SRGB); if (!image) goto ffail; image->x0 = image->y0 = 0; image->x1 = w; image->y1 = h; /* Fill it */ if (!settings->silent) ls_init("JPEG2000", 1); k = w * h; for (i = 0; i < nc; i++) { if (i < 3) { src = settings->img[CHN_IMAGE] + i; step = 3; } else { src = settings->img[CHN_ALPHA]; step = 1; } dest = image->comps[i].data; for (j = 0; j < k; j++ , src += step) dest[j] = *src; } /* Compress it */ cinfo = opj_create_compress(settings->ftype == FT_JP2 ? CODEC_JP2 : CODEC_J2K); if (!cinfo) goto fail; memset(&useless_events, 0, sizeof(useless_events)); useless_events.error_handler = useless_events.warning_handler = useless_events.info_handler = stupid_callback; opj_set_event_mgr((opj_common_ptr)cinfo, &useless_events, stderr); opj_set_default_encoder_parameters(&par); par.tcp_numlayers = 1; par.tcp_rates[0] = settings->jp2_rate; par.cp_disto_alloc = 1; opj_setup_encoder(cinfo, &par, image); cio = opj_cio_open((opj_common_ptr)cinfo, NULL, 0); if (!cio) goto fail; if (!opj_encode(cinfo, cio, image, NULL)) goto fail; /* Write it */ k = cio_tell(cio); if (fwrite(cio->buffer, 1, k, fp) == k) res = 0; fail: if (cio) opj_cio_close(cio); opj_destroy_compress(cinfo); opj_image_destroy(image); if (!settings->silent) progress_end(); ffail: fclose(fp); return (res); } #endif #ifdef U_JASPER /* *** PREFACE *** * JasPer is QUITE a memory waster, with peak memory usage nearly TEN times the * unpacked image size. But what is worse, its API is 99% undocumented. * And to add insult to injury, it reacts to some invalid JP2 files (4-channel * ones written by OpenJPEG) by abort()ing, instead of returning error - WJ */ static int jasper_init; static int load_jpeg2000(char *file_name, ls_settings *settings) { jas_image_t *img; jas_stream_t *inp; jas_matrix_t *mx; jas_seqent_t *src; char *fmt; unsigned char xtb[256], *dest; int nc, cspace, mode, slots[4]; int bits, shift, delta, chan, step; int i, j, k, n, nx, w, h, bpp, pr = 0, res = -1; /* Init the dumb library */ if (!jasper_init) jas_init(); jasper_init = TRUE; /* Open the file */ inp = jas_stream_fopen(file_name, "rb"); if (!inp) return (-1); /* Validate format */ fmt = jas_image_fmttostr(jas_image_getfmt(inp)); if (!fmt || strcmp(fmt, settings->ftype == FT_JP2 ? "jp2" : "jpc")) goto ffail; /* Decode the file into a halfbaked pile of bytes */ if ((pr = !settings->silent)) ls_init("JPEG2000", 0); img = jas_image_decode(inp, -1, NULL); jas_stream_close(inp); if (!img) goto dfail; /* Analyze the pile's contents */ nc = jas_image_numcmpts(img); mode = jas_clrspc_fam(cspace = jas_image_clrspc(img)); if (mode == JAS_CLRSPC_FAM_GRAY) bpp = 1; else if (mode == JAS_CLRSPC_FAM_RGB) bpp = 3; else goto ifail; if (bpp == 3) { slots[0] = jas_image_getcmptbytype(img, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_R)); slots[1] = jas_image_getcmptbytype(img, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_G)); slots[2] = jas_image_getcmptbytype(img, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_B)); if ((slots[1] < 0) | (slots[2] < 0)) goto ifail; } else { slots[0] = jas_image_getcmptbytype(img, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_GRAY_Y)); set_gray(settings); } if (slots[0] < 0) goto ifail; if (nc > bpp) { slots[bpp] = jas_image_getcmptbytype(img, JAS_IMAGE_CT_OPACITY); /* !!! JasPer has a bug - it doesn't write out component definitions if color * channels are in natural order, thus losing the types of any extra components. * (See where variable "needcdef" in src/libjasper/jp2/jp2_enc.c gets unset.) * Then on reading, type will be replaced by component's ordinal number - WJ */ if (slots[bpp] < 0) slots[bpp] = jas_image_getcmptbytype(img, bpp); /* Use an unlabeled extra component for alpha if no labeled one */ if (slots[bpp] < 0) slots[bpp] = jas_image_getcmptbytype(img, JAS_IMAGE_CT_UNKNOWN); nc = bpp + (slots[bpp] >= 0); // Ignore extra channels if no alpha } w = jas_image_cmptwidth(img, slots[0]); h = jas_image_cmptheight(img, slots[0]); for (i = 1; i < nc; i++) /* Check if all components are the same size */ { if ((jas_image_cmptwidth(img, slots[i]) != w) || (jas_image_cmptheight(img, slots[i]) != h)) goto ifail; } /* Allocate "matrix" */ res = FILE_MEM_ERROR; mx = jas_matrix_create(1, w); if (!mx) goto ifail; /* Allocate image */ settings->width = w; settings->height = h; settings->bpp = bpp; if ((res = allocate_image(settings, nc > bpp ? CMASK_RGBA : CMASK_IMAGE))) goto mfail; if (!settings->img[CHN_ALPHA]) nc = bpp; res = 1; #if U_LCMS /* JasPer implements CMS internally, but without lcms, it makes no sense * to provide all the interface stuff for this one rare format - WJ */ while (!settings->icc_size && (bpp == 3) && (cspace != JAS_CLRSPC_SRGB)) { jas_cmprof_t *prof; jas_image_t *timg; res = FILE_LIB_ERROR; prof = jas_cmprof_createfromclrspc(JAS_CLRSPC_SRGB); if (!prof) break; timg = jas_image_chclrspc(img, prof, JAS_CMXFORM_INTENT_PER); jas_cmprof_destroy(prof); if (!timg) break; jas_image_destroy(img); img = timg; res = 1; // Success - further code is fail-proof break; } #endif /* Unravel the ugly thing into proper format */ nx = h * nc; for (i = n = 0; i < nc; i++) { if (i < bpp) /* Image */ { dest = settings->img[CHN_IMAGE] + i; step = settings->bpp; } else /* Alpha */ { dest = settings->img[CHN_ALPHA]; step = 1; } chan = slots[i]; bits = jas_image_cmptprec(img, chan); delta = jas_image_cmptsgnd(img, chan) ? 1 << (bits - 1) : 0; shift = bits > 8 ? bits - 8 : 0; set_xlate(xtb, bits - shift); for (j = 0; j < h; j++ , n++) { jas_image_readcmpt(img, chan, 0, j, w, 1, mx); src = jas_matrix_getref(mx, 0, 0); for (k = 0; k < w; k++) { *dest = xtb[(unsigned)(src[k] + delta) >> shift]; dest += step; } if (pr && ((n * 10) % nx >= nx - 10)) progress_update((float)n / nx); } } mfail: jas_matrix_destroy(mx); ifail: jas_image_destroy(img); dfail: if (pr) progress_end(); return (res); ffail: jas_stream_close(inp); return (-1); } static int save_jpeg2000(char *file_name, ls_settings *settings) { static const jas_image_cmpttype_t chans[4] = { JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_R), JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_G), JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_B), JAS_IMAGE_CT_OPACITY }; jas_image_cmptparm_t cp[4]; jas_image_t *img; jas_stream_t *outp; jas_matrix_t *mx; jas_seqent_t *dest; char buf[256], *opts = NULL; unsigned char *src; int w = settings->width, h = settings->height, res = -1; int i, j, k, n, nx, nc, step, pr; if (settings->bpp == 1) return WRONG_FORMAT; /* Init the dumb library */ if (!jasper_init) jas_init(); jasper_init = TRUE; /* Open the file */ outp = jas_stream_fopen(file_name, "wb"); if (!outp) return (-1); /* Setup component parameters */ memset(cp, 0, sizeof(cp)); // Zero out all that needs zeroing cp[0].hstep = cp[0].vstep = 1; cp[0].width = w; cp[0].height = h; cp[0].prec = 8; cp[3] = cp[2] = cp[1] = cp[0]; /* Create image structure */ nc = 3 + !!settings->img[CHN_ALPHA]; img = jas_image_create(nc, cp, JAS_CLRSPC_SRGB); if (!img) goto fail; /* Allocate "matrix" */ mx = jas_matrix_create(1, w); if (!mx) goto fail2; if ((pr = !settings->silent)) ls_init("JPEG2000", 1); /* Fill image structure */ nx = h * nc; nx += nx / 10 + 1; // Show "90% done" while compressing for (i = n = 0; i < nc; i++) { /* !!! The only workaround for JasPer losing extra components' types on * write is to reorder the RGB components - but then, dumb readers, such * as ones in Mozilla and GTK+, would read them in wrong order - WJ */ jas_image_setcmpttype(img, i, chans[i]); if (i < 3) /* Image */ { src = settings->img[CHN_IMAGE] + i; step = settings->bpp; } else /* Alpha */ { src = settings->img[CHN_ALPHA]; step = 1; } for (j = 0; j < h; j++ , n++) { dest = jas_matrix_getref(mx, 0, 0); for (k = 0; k < w; k++) { dest[k] = *src; src += step; } jas_image_writecmpt(img, i, 0, j, w, 1, mx); if (pr && ((n * 10) % nx >= nx - 10)) if (progress_update((float)n / nx)) goto fail3; } } /* Compress it */ if (pr) progress_update(0.9); if (settings->jp2_rate) // Lossless if NO "rate" option passed sprintf(opts = buf, "rate=%g", 1.0 / settings->jp2_rate); if (!jas_image_encode(img, outp, jas_image_strtofmt( settings->ftype == FT_JP2 ? "jp2" : "jpc"), opts)) res = 0; jas_stream_flush(outp); if (pr) progress_update(1.0); fail3: if (pr) progress_end(); jas_matrix_destroy(mx); fail2: jas_image_destroy(img); fail: jas_stream_close(outp); return (res); } #endif /* Slow-but-sure universal bitstream parsers; may read extra byte at the end */ static void stream_MSB(unsigned char *src, unsigned char *dest, int cnt, int bits, int bit0, int bitstep, int step) { int i, j, v, mask = (1 << bits) - 1; for (i = 0; i < cnt; i++) { j = bit0 >> 3; v = (src[j] << 8) | src[j + 1]; v >>= 16 - bits - (bit0 & 7); *dest = (unsigned char)(v & mask); bit0 += bitstep; dest += step; } } static void stream_LSB(unsigned char *src, unsigned char *dest, int cnt, int bits, int bit0, int bitstep, int step) { int i, j, v, mask = (1 << bits) - 1; for (i = 0; i < cnt; i++) { j = bit0 >> 3; v = (src[j + 1] << 8) | src[j]; v >>= bit0 & 7; *dest = (unsigned char)(v & mask); bit0 += bitstep; dest += step; } } #ifdef U_TIFF /* *** PREFACE *** * TIFF is a bitch, and libtiff is a joke. An unstable and buggy joke, at that. * It's a fact of life - and when some TIFFs don't load or are mangled, that * also is a fact of life. Installing latest libtiff may help - or not; sending * a bugreport with the offending file attached may help too - but again, it's * not guaranteed. But the common varieties of TIFF format should load OK. */ static int load_tiff_frame(TIFF *tif, ls_settings *settings) { char cbuf[1024]; uint16 bpsamp, sampp, xsamp, pmetric, planar, orient, sform; uint16 *sampinfo, *red16, *green16, *blue16; uint32 width, height, tw = 0, th = 0, rps = 0; uint32 *tr, *raster = NULL; unsigned char *tmp, *buf = NULL; int bpp = 3, cmask = CMASK_IMAGE, argb = FALSE, pr = FALSE; int i, j, mirror, res; /* Let's learn what we've got */ TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &sampp); TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &xsamp, &sampinfo); if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &pmetric)) { /* Defaults like in libtiff */ if (sampp - xsamp == 1) pmetric = PHOTOMETRIC_MINISBLACK; else if (sampp - xsamp == 3) pmetric = PHOTOMETRIC_RGB; else return (-1); } TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLEFORMAT, &sform); TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height); TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bpsamp); TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planar); planar = planar != PLANARCONFIG_CONTIG; TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &orient); switch (orient) { case ORIENTATION_TOPLEFT: case ORIENTATION_LEFTTOP: mirror = 0; break; case ORIENTATION_TOPRIGHT: case ORIENTATION_RIGHTTOP: mirror = 1; break; default: case ORIENTATION_BOTLEFT: case ORIENTATION_LEFTBOT: mirror = 2; break; case ORIENTATION_BOTRIGHT: case ORIENTATION_RIGHTBOT: mirror = 3; break; } if (TIFFIsTiled(tif)) { TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); } else { TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rps); } /* Extract position from it */ settings->x = settings->y = 0; while (TRUE) { float xres, yres, dxu = 0, dyu = 0; if (!TIFFGetField(tif, TIFFTAG_XPOSITION, &dxu) && !TIFFGetField(tif, TIFFTAG_YPOSITION, &dyu)) break; // Have position, now need resolution if (!TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres)) break; // X resolution we have, what about Y? yres = xres; // Default TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres); // Convert ResolutionUnits (whatever they are) to pixels settings->x = rint(dxu * xres); settings->y = rint(dyu * yres); break; } /* Let's decide how to store it */ if ((width > MAX_WIDTH) || (height > MAX_HEIGHT)) return (-1); settings->width = width; settings->height = height; if ((sform != SAMPLEFORMAT_UINT) && (sform != SAMPLEFORMAT_INT) && (sform != SAMPLEFORMAT_VOID)) argb = TRUE; else switch (pmetric) { case PHOTOMETRIC_PALETTE: { png_color *cp = settings->pal; int i, j, k, na = 0, nd = 1; /* Old palette format */ if (bpsamp > 8) { argb = TRUE; break; } if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &red16, &green16, &blue16)) return (-1); settings->colors = j = 1 << bpsamp; /* Analyze palette */ for (k = i = 0; i < j; i++) { k |= red16[i] | green16[i] | blue16[i]; } if (k > 255) na = 128 , nd = 257; /* New palette format */ for (i = 0; i < j; i++ , cp++) { cp->red = (red16[i] + na) / nd; cp->green = (green16[i] + na) / nd; cp->blue = (blue16[i] + na) / nd; } /* If palette is all we need */ if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) return (EXPLODE_FAILED); /* Fallthrough */ } case PHOTOMETRIC_MINISWHITE: case PHOTOMETRIC_MINISBLACK: bpp = 1; break; case PHOTOMETRIC_RGB: break; case PHOTOMETRIC_SEPARATED: /* Leave non-CMYK separations to libtiff */ if (sampp - xsamp == 4) break; default: argb = TRUE; } /* libtiff can't handle this and neither can we */ if (argb && !TIFFRGBAImageOK(tif, cbuf)) return (-1); settings->bpp = bpp; /* Photoshop writes alpha as EXTRASAMPLE_UNSPECIFIED anyway */ if (xsamp) cmask = CMASK_RGBA; /* !!! No alpha support for RGB mode yet */ if (argb) cmask = CMASK_IMAGE; if ((res = allocate_image(settings, cmask))) return (res); res = -1; #ifdef U_LCMS #ifdef TIFFTAG_ICCPROFILE /* Extract ICC profile if it's of use */ if (!settings->icc_size) { uint32 size; unsigned char *data; /* TIFFTAG_ICCPROFILE was broken beyond hope in libtiff 3.8.0 * (see libtiff 3.8.1+ changelog entry for 2006-01-04) */ if (!strstr(TIFFGetVersion(), " 3.8.0") && TIFFGetField(tif, TIFFTAG_ICCPROFILE, &size, &data) && (size < INT_MAX) && /* If profile is needed right now, for CMYK->RGB */ !((pmetric == PHOTOMETRIC_SEPARATED) && !argb && init_cmyk2rgb(settings, data, size, FALSE)) && (settings->icc = malloc(size))) { settings->icc_size = size; memcpy(settings->icc, data, size); } } #endif #endif if ((pr = !settings->silent)) ls_init("TIFF", 0); /* Read it as ARGB if can't understand it ourselves */ if (argb) { /* libtiff is too much of a moving target if finer control is * needed, so let's trade memory for stability */ raster = (uint32 *)_TIFFmalloc(width * height * sizeof(uint32)); res = FILE_MEM_ERROR; if (!raster) goto fail2; res = FILE_LIB_ERROR; if (!TIFFReadRGBAImage(tif, width, height, raster, 0)) goto fail2; res = -1; /* Parse the RGB part only - alpha might be eaten by bugs */ tr = raster; for (i = height - 1; i >= 0; i--) { tmp = settings->img[CHN_IMAGE] + width * i * bpp; for (j = 0; j < width; j++) { tmp[0] = TIFFGetR(tr[j]); tmp[1] = TIFFGetG(tr[j]); tmp[2] = TIFFGetB(tr[j]); tmp += 3; } tr += width; ls_progress(settings, height - i, 10); } _TIFFfree(raster); raster = NULL; /* !!! Now it would be good to read in alpha ourselves - but not yet... */ res = 1; } /* Read & interpret it ourselves */ else { unsigned char xtable[256], *src, *tbuf = NULL; int xstep = tw ? tw : width, ystep = th ? th : rps; int aalpha, tsz = 0, wbpp = bpp; int bpr, bits1, bit0, db, n, nx; int j, k, x0, y0, bsz, plane, nplanes; if (pmetric == PHOTOMETRIC_SEPARATED) // Needs temp buffer tsz = xstep * ystep * (wbpp = 4); nplanes = planar ? wbpp + !!settings->img[CHN_ALPHA] : 1; bsz = (tw ? TIFFTileSize(tif) : TIFFStripSize(tif)) + 1; bpr = tw ? TIFFTileRowSize(tif) : TIFFScanlineSize(tif); buf = _TIFFmalloc(bsz + tsz); res = FILE_MEM_ERROR; if (!buf) goto fail2; res = FILE_LIB_ERROR; if (tsz) tbuf = buf + bsz; // Temp buffer for CMYK->RGB /* Flag associated alpha */ aalpha = settings->img[CHN_ALPHA] && (pmetric != PHOTOMETRIC_PALETTE) && (sampinfo[0] == EXTRASAMPLE_ASSOCALPHA); bits1 = bpsamp > 8 ? 8 : bpsamp; /* Setup greyscale palette */ if ((bpp == 1) && (pmetric != PHOTOMETRIC_PALETTE)) { /* Demultiplied values are 0..255 */ j = aalpha ? 256 : 1 << bits1; settings->colors = j--; k = pmetric == PHOTOMETRIC_MINISBLACK ? 0 : j; mem_bw_pal(settings->pal, k, j ^ k); } /* !!! Assume 16-, 32- and 64-bit data follow machine's * endianness, and everything else is packed big-endian way - * like TIFF 6.0 spec says; but TIFF 5.0 and before specs said * differently, so let's wait for examples to see if I'm right * or not; as for 24- and 128-bit, even different libtiff * versions handle them differently, so I leave them alone * for now - WJ */ bit0 = (G_BYTE_ORDER == G_LITTLE_ENDIAN) && ((bpsamp == 16) || (bpsamp == 32) || (bpsamp == 64)) ? bpsamp - 8 : 0; db = (planar ? 1 : sampp) * bpsamp; /* Prepare to rescale what we've got */ memset(xtable, 0, 256); set_xlate(xtable, bits1); /* Progress steps */ nx = ((width + xstep - 1) / xstep) * nplanes * height; /* Read image tile by tile - considering strip a wide tile */ for (n = y0 = 0; y0 < height; y0 += ystep) for (x0 = 0; x0 < width; x0 += xstep) for (plane = 0; plane < nplanes; plane++) { unsigned char *tmp, *tmpa; int i, j, k, x, y, w, h, dx, dxa, dy, dys; /* Read one piece */ if (tw) { if (TIFFReadTile(tif, buf, x0, y0, 0, plane) < 0) goto fail2; } else { if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y0, plane), buf, bsz) < 0) goto fail2; } /* Prepare decoding loops */ if (mirror & 1) /* X mirror */ { x = width - x0; w = x < xstep ? x : xstep; x -= w; } else { x = x0; w = x + xstep > width ? width - x : xstep; } if (mirror & 2) /* Y mirror */ { y = height - y0; h = y < ystep ? y : ystep; y -= h; } else { y = y0; h = y + ystep > height ? height - y : ystep; } /* Prepare pointers */ dx = dxa = 1; dy = width; i = y * width + x; tmp = tmpa = settings->img[CHN_ALPHA] + i; if (plane >= wbpp); // Alpha else if (tbuf) // CMYK { dx = 4; dy = w; tmp = tbuf + plane; } else // RGB/indexed { dx = bpp; tmp = settings->img[CHN_IMAGE] + plane + i * bpp; } dy *= dx; dys = bpr; src = buf; /* Account for horizontal mirroring */ if (mirror & 1) { // Write bytes backward tmp += (w - 1) * dx; tmpa += w - 1; dx = -dx; dxa = -1; } /* Account for vertical mirroring */ if (mirror & 2) { // Read rows backward src += (h - 1) * dys; dys = -dys; } /* Decode it */ for (j = 0; j < h; j++ , n++ , src += dys , tmp += dy) { if (pr && ((n * 10) % nx >= nx - 10)) progress_update((float)n / nx); stream_MSB(src, tmp, w, bits1, bit0, db, dx); if (planar) continue; for (k = 1; k < wbpp; k++) { stream_MSB(src, tmp + k, w, bits1, bit0 + bpsamp * k, db, dx); } if (settings->img[CHN_ALPHA]) { stream_MSB(src, tmpa, w, bits1, bit0 + bpsamp * wbpp, db, dxa); tmpa += width; } } /* Convert CMYK to RGB if needed */ if (!tbuf || (planar && (plane != 3))) continue; if (bits1 < 8) // Rescale to 8-bit do_xlate(xtable, tbuf, w * h * 4); cmyk2rgb(tbuf, tbuf, w * h, FALSE, settings); src = tbuf; tmp = settings->img[CHN_IMAGE] + (y * width + x) * 3; w *= 3; for (i = 0; i < h; i++ , tmp += width * 3 , src += w) memcpy(tmp, src, w); } done_cmyk2rgb(settings); j = width * height; tmp = settings->img[CHN_IMAGE]; src = settings->img[CHN_ALPHA]; /* Unassociate alpha */ if (aalpha) { if (wbpp > 3) // Converted from CMYK { unsigned char *img = tmp; int i, k, a; if (bits1 < 8) do_xlate(xtable, src, j); bits1 = 8; // No further rescaling needed /* Remove white background */ for (i = 0; i < j; i++ , img += 3) { a = src[i] - 255; k = a + img[0]; img[0] = k < 0 ? 0 : k; k = a + img[1]; img[1] = k < 0 ? 0 : k; k = a + img[2]; img[2] = k < 0 ? 0 : k; } } mem_demultiply(tmp, src, j, bpp); tmp = NULL; // Image is done } if (bits1 < 8) { /* Rescale alpha */ if (src) do_xlate(xtable, src, j); /* Rescale RGB */ if (tmp && (wbpp == 3)) do_xlate(xtable, tmp, j * 3); } res = 1; } fail2: if (pr) progress_end(); if (raster) _TIFFfree(raster); if (buf) _TIFFfree(buf); return (res); } static int load_tiff_frames(char *file_name, ani_settings *ani) { TIFF *tif; ls_settings w_set; int res; /* We don't want any echoing to the output */ TIFFSetErrorHandler(NULL); TIFFSetWarningHandler(NULL); if (!(tif = TIFFOpen(file_name, "r"))) return (-1); while (TRUE) { res = FILE_TOO_LONG; if (!check_next_frame(&ani->fset, ani->settings.mode, FALSE)) goto fail; w_set = ani->settings; res = load_tiff_frame(tif, &w_set); if (res != 1) goto fail; res = process_page_frame(file_name, ani, &w_set); if (res) goto fail; /* Try to get next frame */ if (!TIFFReadDirectory(tif)) break; } res = 1; fail: TIFFClose(tif); return (res); } static int load_tiff(char *file_name, ls_settings *settings) { TIFF *tif; int res; /* We don't want any echoing to the output */ TIFFSetErrorHandler(NULL); TIFFSetWarningHandler(NULL); if (!(tif = TIFFOpen(file_name, "r"))) return (-1); res = load_tiff_frame(tif, settings); if ((res == 1) && TIFFReadDirectory(tif)) res = FILE_HAS_FRAMES; TIFFClose(tif); return (res); } #define TIFFX_VERSION 0 // mtPaint's TIFF extensions version static int save_tiff(char *file_name, ls_settings *settings) { /* !!! No private exts for now */ // char buf[512]; unsigned char *src, *row = NULL; uint16 rgb[256 * 3], xs[NUM_CHANNELS]; int i, j, k, dt, xsamp = 0, cmask = CMASK_IMAGE, res = 0; int w = settings->width, h = settings->height, bpp = settings->bpp; TIFF *tif; /* Find out number of utility channels */ memset(xs, 0, sizeof(xs)); /* !!! Only alpha channel as extra, for now */ for (i = CHN_ALPHA; i <= CHN_ALPHA; i++) // for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) { if (!settings->img[i]) continue; cmask |= CMASK_FOR(i); xs[xsamp++] = i == CHN_ALPHA ? EXTRASAMPLE_UNASSALPHA : EXTRASAMPLE_UNSPECIFIED; } if (xsamp) { row = malloc(w * (bpp + xsamp)); if (!row) return -1; } TIFFSetErrorHandler(NULL); // We don't want any echoing to the output TIFFSetWarningHandler(NULL); if (!(tif = TIFFOpen( file_name, "w" ))) { free(row); return -1; } /* !!! No private exts for now */ #if 0 /* Write private extension info in comments */ TIFFSetField(tif, TIFFTAG_SOFTWARE, "mtPaint 3"); // Extensions' version, then everything useful but lacking a TIFF tag i = sprintf(buf, "VERSION=%d\n", TIFFX_VERSION); i += sprintf(buf + i, "CHANNELS=%d\n", cmask); i += sprintf(buf + i, "COLORS=%d\n", settings->colors); i += sprintf(buf + i, "TRANSPARENCY=%d\n", bpp == 1 ? settings->xpm_trans : settings->rgb_trans); TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, buf); #endif /* Write regular tags */ TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, w); TIFFSetField(tif, TIFFTAG_IMAGELENGTH, h); TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, bpp + xsamp); TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); if (bpp == 1) { TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE); memset(rgb, 0, sizeof(rgb)); for (i = 0; i < settings->colors; i++) { rgb[i] = settings->pal[i].red * 257; rgb[i + 256] = settings->pal[i].green * 257; rgb[i + 512] = settings->pal[i].blue * 257; } TIFFSetField(tif, TIFFTAG_COLORMAP, rgb, rgb + 256, rgb + 512); } else TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); if (xsamp) TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, xsamp, xs); /* Actually write the image */ if (!settings->silent) ls_init("TIFF", 1); xsamp += bpp; for (i = 0; i < h; i++) { src = settings->img[CHN_IMAGE] + w * i * bpp; if (row) /* Interlace the channels */ { for (dt = k = 0; k < w * bpp; k += bpp , dt += xsamp) { row[dt] = src[k]; if (bpp == 1) continue; row[dt + 1] = src[k + 1]; row[dt + 2] = src[k + 2]; } for (dt = bpp , j = CHN_ALPHA; j < NUM_CHANNELS; j++) { if (!settings->img[j]) continue; src = settings->img[j] + w * i; for (k = 0; k < w; k++ , dt += xsamp) { row[dt] = src[k]; } dt -= w * xsamp - 1; } } if (TIFFWriteScanline(tif, row ? row : src, i, 0) == -1) { res = -1; break; } ls_progress(settings, i, 20); } TIFFClose(tif); if (!settings->silent) progress_end(); free(row); return (res); } #endif /* Macros for accessing values in Intel byte order */ #define GET16(buf) (((buf)[1] << 8) + (buf)[0]) #define GET32(buf) (((buf)[3] << 24) + ((buf)[2] << 16) + ((buf)[1] << 8) + (buf)[0]) #define PUT16(buf, v) (buf)[0] = (v) & 0xFF; (buf)[1] = (v) >> 8; #define PUT32(buf, v) (buf)[0] = (v) & 0xFF; (buf)[1] = ((v) >> 8) & 0xFF; \ (buf)[2] = ((v) >> 16) & 0xFF; (buf)[3] = (v) >> 24; /* Version 2 fields */ #define BMP_FILESIZE 2 /* 32b */ #define BMP_DATAOFS 10 /* 32b */ #define BMP_HDR2SIZE 14 /* 32b */ #define BMP_WIDTH 18 /* 32b */ #define BMP_HEIGHT 22 /* 32b */ #define BMP_PLANES 26 /* 16b */ #define BMP_BPP 28 /* 16b */ #define BMP2_HSIZE 30 /* Version 3 fields */ #define BMP_COMPRESS 30 /* 32b */ #define BMP_DATASIZE 34 /* 32b */ #define BMP_COLORS 46 /* 32b */ #define BMP_ICOLORS 50 /* 32b */ #define BMP3_HSIZE 54 /* Version 4 fields */ #define BMP_RMASK 54 /* 32b */ #define BMP_GMASK 58 /* 32b */ #define BMP_BMASK 62 /* 32b */ #define BMP_AMASK 66 /* 32b */ #define BMP_CSPACE 70 /* 32b */ #define BMP4_HSIZE 122 #define BMP5_HSIZE 138 #define BMP_MAXHSIZE (BMP5_HSIZE + 256 * 4) static int load_bmp(char *file_name, ls_settings *settings, memFILE *mf) { guint32 masks[4]; unsigned char hdr[BMP5_HSIZE], xlat[256], *dest, *tmp, *buf = NULL; memFILE fake_mf; FILE *fp = NULL; int shifts[4], bpps[4]; int def_alpha = FALSE, cmask = CMASK_IMAGE, comp = 0, res = -1; int i, j, k, n, ii, w, h, bpp; int l, bl, rl, step, skip, dx, dy; if (!mf) { if (!(fp = fopen(file_name, "rb"))) return (-1); memset(mf = &fake_mf, 0, sizeof(fake_mf)); fake_mf.file = fp; } /* Read the largest header */ k = mfread(hdr, 1, BMP5_HSIZE, mf); /* Check general validity */ if (k < BMP2_HSIZE) goto fail; /* Least supported header size */ if ((hdr[0] != 'B') || (hdr[1] != 'M')) goto fail; /* Signature */ l = GET32(hdr + BMP_HDR2SIZE) + BMP_HDR2SIZE; if (k < l) goto fail; /* Check format */ if (GET16(hdr + BMP_PLANES) != 1) goto fail; /* Only one plane */ w = GET32(hdr + BMP_WIDTH); h = GET32(hdr + BMP_HEIGHT); bpp = GET16(hdr + BMP_BPP); if (l >= BMP3_HSIZE) comp = GET32(hdr + BMP_COMPRESS); /* Only 1, 4, 8, 16, 24 and 32 bpp allowed */ switch (bpp) { case 1: if (comp) goto fail; /* No compression */ break; case 4: if (comp && ((comp != 2) || (h < 0))) goto fail; /* RLE4 */ break; case 8: if (comp && ((comp != 1) || (h < 0))) goto fail; /* RLE8 */ break; case 16: case 24: case 32: if (comp && (comp != 3)) goto fail; /* Bitfields */ shifts[3] = bpps[3] = masks[3] = 0; /* No alpha by default */ if (comp == 3) { /* V3-style bitfields? */ if ((l == BMP3_HSIZE) && (GET32(hdr + BMP_DATAOFS) >= BMP_AMASK)) l = BMP_AMASK; if (l < BMP_AMASK) goto fail; masks[0] = GET32(hdr + BMP_RMASK); masks[1] = GET32(hdr + BMP_GMASK); masks[2] = GET32(hdr + BMP_BMASK); if (l >= BMP_AMASK + 4) masks[3] = GET32(hdr + BMP_AMASK); if (masks[3]) cmask = CMASK_RGBA; /* Convert masks into bit lengths and offsets */ for (i = 0; i < 4; i++) { /* Bit length - just count bits */ j = bitcount(masks[i]); /* Bit offset - add in bits _before_ mask */ k = bitcount(masks[i] - 1) + 1; if (j > 8) j = 8; shifts[i] = k - j; bpps[i] = j; } } else if (bpp == 16) { shifts[0] = 10; shifts[1] = 5; shifts[2] = 0; bpps[0] = bpps[1] = bpps[2] = 5; } else { shifts[0] = 16; shifts[1] = 8; shifts[2] = 0; bpps[0] = bpps[1] = bpps[2] = 8; if (bpp == 32) /* Consider alpha present by default */ { shifts[3] = 24; bpps[3] = 8; cmask = CMASK_RGBA; def_alpha = TRUE; /* Uncertain if alpha */ } } break; default: goto fail; } /* Load palette if needed */ if (bpp < 16) { unsigned char tbuf[1024]; j = 0; if (l >= BMP_COLORS + 4) j = GET32(hdr + BMP_COLORS); if (!j) j = 1 << bpp; k = GET32(hdr + BMP_DATAOFS) - l; k /= l < BMP3_HSIZE ? 3 : 4; if (k < j) j = k; if (!j || (j > 256)) goto fail; /* Wrong palette size */ settings->colors = j; mfseek(mf, l, SEEK_SET); k = l < BMP3_HSIZE ? 3 : 4; i = mfread(tbuf, 1, j * k, mf); if (i < j * k) goto fail; /* Cannot read palette */ tmp = tbuf; for (i = 0; i < j; i++) { settings->pal[i].red = tmp[2]; settings->pal[i].green = tmp[1]; settings->pal[i].blue = tmp[0]; tmp += k; } /* If palette is all we need */ res = 1; if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) goto fail; } /* Allocate buffer and image */ settings->width = w; settings->height = abs(h); settings->bpp = bpp < 16 ? 1 : 3; rl = ((w * bpp + 31) >> 3) & ~3; /* Row data length */ /* For RLE, load all image at once */ if (comp && (bpp < 16)) bl = GET32(hdr + BMP_FILESIZE) - GET32(hdr + BMP_DATAOFS); /* Otherwise, only one row at a time */ else bl = rl; /* To accommodate bitparser's extra step */ buf = malloc(bl + 1); res = FILE_MEM_ERROR; if (!buf) goto fail; if ((res = allocate_image(settings, cmask))) goto fail2; if (!settings->silent) ls_init("BMP", 0); mfseek(mf, GET32(hdr + BMP_DATAOFS), SEEK_SET); /* Seek to data */ if (h < 0) /* Prepare row loop */ { step = 1; i = 0; h = -h; } else { step = -1; i = h - 1; } res = FILE_LIB_ERROR; if ((comp != 1) && (comp != 2)) /* No RLE */ { for (n = 0; (i < h) && (i >= 0); n++ , i += step) { j = mfread(buf, 1, rl, mf); if (j < rl) goto fail3; if (bpp < 16) /* Indexed */ { dest = settings->img[CHN_IMAGE] + w * i; stream_MSB(buf, dest, w, bpp, 0, bpp, 1); } else /* RGB */ { dest = settings->img[CHN_IMAGE] + w * i * 3; stream_LSB(buf, dest + 0, w, bpps[0], shifts[0], bpp, 3); stream_LSB(buf, dest + 1, w, bpps[1], shifts[1], bpp, 3); stream_LSB(buf, dest + 2, w, bpps[2], shifts[2], bpp, 3); if (settings->img[CHN_ALPHA]) stream_LSB(buf, settings->img[CHN_ALPHA] + w * i, w, bpps[3], shifts[3], bpp, 1); } ls_progress(settings, n, 10); } /* Rescale shorter-than-byte RGBA components */ if (bpp > 8) for (i = 0; i < 4; i++) { if (bpps[i] >= 8) continue; k = 3; if (i == 3) { tmp = settings->img[CHN_ALPHA]; if (!tmp) continue; k = 1; } else tmp = settings->img[CHN_IMAGE] + i; set_xlate(xlat, bpps[i]); n = w * h; for (j = 0; j < n; j++ , tmp += k) *tmp = xlat[*tmp]; } res = 1; } else /* RLE - always bottom-up */ { k = mfread(buf, 1, bl, mf); if (k < bl) goto fail3; memset(settings->img[CHN_IMAGE], 0, w * h); skip = j = 0; dest = settings->img[CHN_IMAGE] + w * i; for (tmp = buf; tmp - buf + 1 < k; ) { /* Don't fail on out-of-bounds writes */ if (*tmp) /* Fill block */ { dx = n = *tmp; if (j + n > w) dx = j > w ? 0 : w - j; if (bpp == 8) /* 8-bit */ { memset(dest + j, tmp[1], dx); j += n; tmp += 2; continue; } for (ii = 0; ii < dx; ii++) /* 4-bit */ { dest[j++] = tmp[1] >> 4; if (++ii >= dx) break; dest[j++] = tmp[1] & 0xF; } j += n - dx; tmp += 2; continue; } if (tmp[1] > 2) /* Copy block */ { dx = n = tmp[1]; if (j + n > w) dx = j > w ? 0 : w - j; tmp += 2; if (bpp == 8) /* 8-bit */ { memcpy(dest + j, tmp, dx); j += n; tmp += (n + 1) & ~1; continue; } for (ii = 0; ii < dx; ii++) /* 4-bit */ { dest[j++] = *tmp >> 4; if (++ii >= dx) break; dest[j++] = *tmp++ & 0xF; } j += n - dx; tmp += (((n + 3) & ~3) - (dx & ~1)) >> 1; continue; } if (tmp[1] == 2) /* Skip block */ { dx = tmp[2] + j; dy = tmp[3]; if ((dx > w) || (i - dy < 0)) goto fail3; } else /* End-of-something block */ { dx = 0; dy = tmp[1] ? i + 1 : 1; } /* Transparency detected first time? */ if (!skip && ((dy != 1) || dx || (j < w))) { if ((res = allocate_image(settings, CMASK_FOR(CHN_ALPHA)))) goto fail3; res = FILE_LIB_ERROR; skip = 1; if (settings->img[CHN_ALPHA]) /* Got alpha */ { memset(settings->img[CHN_ALPHA], 255, w * h); skip = 2; } } /* Row skip */ for (ii = 0; ii < dy; ii++ , i--) { if (skip > 1) memset(settings->img[CHN_ALPHA] + w * i + j, 0, w - j); j = 0; ls_progress(settings, h - i - 1, 10); } /* Column skip */ if (skip > 1) memset(settings->img[CHN_ALPHA] + w * i + j, 0, dx - j); j = dx; if (tmp[1] == 1) /* End-of-file block */ { res = 1; break; } dest = settings->img[CHN_IMAGE] + w * i; tmp += 2 + tmp[1]; } } /* Check if alpha channel is valid */ if (def_alpha && settings->img[CHN_ALPHA]) { /* Delete all-zero "alpha" */ if (is_filled(settings->img[CHN_ALPHA], 0, settings->width * settings->height)) deallocate_image(settings, CMASK_FOR(CHN_ALPHA)); } fail3: if (!settings->silent) progress_end(); fail2: free(buf); fail: if (fp) fclose(fp); return (res); } /* Use BMP4 instead of BMP3 for images with alpha */ /* #define USE_BMP4 */ /* Most programs just use 32-bit RGB BMP3 for RGBA */ static int save_bmp(char *file_name, ls_settings *settings, memFILE *mf) { unsigned char *buf, *tmp; memFILE fake_mf; FILE *fp = NULL; int i, j, ll, hsz0, hsz, dsz, fsz; int w = settings->width, h = settings->height, bpp = settings->bpp; i = w > BMP_MAXHSIZE / 4 ? w * 4 : BMP_MAXHSIZE; buf = malloc(i); if (!buf) return (-1); memset(buf, 0, i); if (!mf) { if (!(fp = fopen(file_name, "wb"))) { free(buf); return (-1); } memset(mf = &fake_mf, 0, sizeof(fake_mf)); fake_mf.file = fp; } /* Sizes of BMP parts */ if (((settings->mode == FS_CLIPBOARD) || (bpp == 3)) && settings->img[CHN_ALPHA]) bpp = 4; ll = (bpp * w + 3) & ~3; j = bpp == 1 ? settings->colors : 0; #ifdef USE_BMP4 hsz0 = bpp == 4 ? BMP4_HSIZE : BMP3_HSIZE; #else hsz0 = BMP3_HSIZE; #endif hsz = hsz0 + j * 4; dsz = ll * h; fsz = hsz + dsz; /* Prepare header */ buf[0] = 'B'; buf[1] = 'M'; PUT32(buf + BMP_FILESIZE, fsz); PUT32(buf + BMP_DATAOFS, hsz); i = hsz0 - BMP_HDR2SIZE; PUT32(buf + BMP_HDR2SIZE, i); PUT32(buf + BMP_WIDTH, w); PUT32(buf + BMP_HEIGHT, h); PUT16(buf + BMP_PLANES, 1); PUT16(buf + BMP_BPP, bpp * 8); #ifdef USE_BMP4 i = bpp == 4 ? 3 : 0; /* Bitfield "compression" / no compression */ PUT32(buf + BMP_COMPRESS, i); #else PUT32(buf + BMP_COMPRESS, 0); /* No compression */ #endif PUT32(buf + BMP_DATASIZE, dsz); PUT32(buf + BMP_COLORS, j); PUT32(buf + BMP_ICOLORS, j); #ifdef USE_BMP4 if (bpp == 4) { memset(buf + BMP_RMASK, 0, BMP4_HSIZE - BMP_RMASK); buf[BMP_RMASK + 2] = buf[BMP_GMASK + 1] = buf[BMP_BMASK + 0] = buf[BMP_AMASK + 3] = 0xFF; /* Masks for 8-bit BGRA */ buf[BMP_CSPACE] = 1; /* Device-dependent RGB */ } #endif tmp = buf + hsz0; for (i = 0; i < j; i++ , tmp += 4) { tmp[0] = settings->pal[i].blue; tmp[1] = settings->pal[i].green; tmp[2] = settings->pal[i].red; } mfwrite(buf, 1, tmp - buf, mf); /* Write rows */ if (!settings->silent) ls_init("BMP", 1); memset(buf + ll - 4, 0, 4); for (i = h - 1; i >= 0; i--) { prepare_row(buf, settings, bpp, i); mfwrite(buf, 1, ll, mf); ls_progress(settings, h - i, 20); } if (fp) fclose(fp); if (!settings->silent) progress_end(); free(buf); return 0; } /* Partial ctype implementation for C locale; * space 1, digit 2, alpha 4, punctuation 8 */ static unsigned char ctypes[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #define ISSPACE(x) (ctypes[(unsigned char)(x)] & 1) #define ISALPHA(x) (ctypes[(unsigned char)(x)] & 4) #define ISALNUM(x) (ctypes[(unsigned char)(x)] & 6) #define ISCNTRL(x) (!ctypes[(unsigned char)(x)]) #define WHITESPACE "\t\n\v\f\r " /* Reads text and cuts out C-style comments */ static char *fgetsC(char *buf, int len, FILE *f) { static int in_comment; char *res; int i, l, in_string = 0, has_chars = 0; if (!len) /* Init */ { *buf = '\0'; in_comment = 0; return (NULL); } while (TRUE) { /* Read a line */ buf[0] = '\0'; res = fgets(buf, len, f); if (res != buf) return (res); /* Scan it for comments */ l = strlen(buf); for (i = 0; i < l; i++) { if (in_string) { if ((buf[i] == '"') && (buf[i - 1] != '\\')) in_string = 0; /* Close a string */ continue; } if (in_comment) { if ((buf[i] == '/') && i && (buf[i - 1] == '*')) { /* Replace comment by a single space */ buf[in_comment - 1] = ' '; memcpy(buf + in_comment, buf + i + 1, l - i); l = in_comment + l - i - 1; i = in_comment - 1; in_comment = 0; } continue; } if (!ISSPACE(buf[i])) has_chars++; if (buf[i] == '"') in_string = 1; /* Open a string */ else if ((buf[i] == '*') && i && (buf[i - 1] == '/')) { /* Open a comment */ in_comment = i; has_chars -= 2; } } /* For simplicity, have strings terminate on the same line */ if (in_string) return (NULL); /* All line is a comment - read the next one */ if (in_comment == 1) continue; /* Cut off and remember non-closed comment */ if (in_comment) { buf[in_comment - 1] = '\0'; in_comment = 1; } /* All line is whitespace - read the next one */ if (!has_chars) continue; return (res); } } /* "One at a time" hash function */ static guint32 hashf(guint32 seed, char *key, int len) { int i; for (i = 0; i < len; i++) { seed += key[i]; seed += seed << 10; seed ^= seed >> 6; } seed += seed << 3; seed ^= seed >> 11; seed += seed << 15; return (seed); } #define HASHSEED 0x811C9DC5 #define HASH_RND(X) ((X) * 0x10450405 + 1) #define HSIZE 16384 #define HMASK 0x1FFF /* For cuckoo hashing of 4096 items into 16384 slots */ #define MAXLOOP 39 /* This is the limit from libXPM */ #define XPM_MAXCOL 4096 /* Cuckoo hash of IDs for load or RGB triples for save */ typedef struct { short hash[HSIZE]; char *keys; int step, cpp, cnt; guint32 seed; } str_hash; static int ch_find(str_hash *cuckoo, char *str) { guint32 key; int k, idx, step = cuckoo->step, cpp = cuckoo->cpp; key = hashf(cuckoo->seed, str, cpp); k = (key & HMASK) * 2; while (TRUE) { idx = cuckoo->hash[k]; if (idx && !strncmp(cuckoo->keys + (idx - 1) * step, str, cpp)) return (idx); if (k & 1) return (0); /* Not found */ k = ((key >> 16) & HMASK) * 2 + 1; } } static int ch_insert(str_hash *cuckoo, char *str) { char *p, *keys; guint32 key; int i, j, k, n, idx, step, cpp; n = ch_find(cuckoo, str); if (n) return (n - 1); keys = cuckoo->keys; step = cuckoo->step; cpp = cuckoo->cpp; if (cuckoo->cnt >= XPM_MAXCOL) return (-1); p = keys + cuckoo->cnt++ * step; memcpy(p, str, cpp); p[cpp] = 0; for (n = cuckoo->cnt; n <= cuckoo->cnt; n++) { idx = n; /* Normal cuckoo process */ for (i = 0; i < MAXLOOP; i++) { key = hashf(cuckoo->seed, keys + (idx - 1) * step, cpp); key >>= (i & 1) << 4; j = (key & HMASK) * 2 + (i & 1); k = cuckoo->hash[j]; cuckoo->hash[j] = idx; idx = k; if (!idx) break; } if (!idx) continue; /* Failed insertion - mutate seed */ cuckoo->seed = HASH_RND(cuckoo->seed); memset(cuckoo->hash, 0, sizeof(short) * HSIZE); n = 1; /* Rehash everything */ } return (cuckoo->cnt - 1); } #define XPM_COL_DEFS 5 /* Comments are allowed where valid; but missing newlines or newlines where * should be none aren't tolerated */ static int load_xpm(char *file_name, ls_settings *settings) { static const char *cmodes[XPM_COL_DEFS] = { "c", "g", "g4", "m", "s" }; unsigned char *src, *dest, pal[XPM_MAXCOL * 3]; char lbuf[4096], tstr[20], *buf = lbuf; char ckeys[XPM_MAXCOL * 32], *cdefs[XPM_COL_DEFS], *r, *r2; str_hash cuckoo; FILE *fp; int w, h, cols, cpp, hx, hy, lsz = 4096, res = -1, bpp = 1, trans = -1; int i, j, k, l; if (!(fp = fopen(file_name, "r"))) return (-1); /* Read the header - accept XPM3 and nothing else */ j = 0; fscanf(fp, " /* XPM */%n", &j); if (!j) goto fail; fgetsC(lbuf, 0, fp); /* Reset reader */ /* Read the "intro sequence" */ if (!fgetsC(lbuf, 4096, fp)) goto fail; /* !!! Skip validation; libXpm doesn't do it, and some weird tools * write this line differently - WJ */ // j = 0; sscanf(lbuf, " static char * %*[^[][] = {%n", &j); // if (!j) goto fail; /* Read the values section */ if (!fgetsC(lbuf, 4096, fp)) goto fail; i = sscanf(lbuf, " \"%d%d%d%d%d%d", &w, &h, &cols, &cpp, &hx, &hy); if (i == 4) hx = hy = -1; else if (i != 6) goto fail; /* Extension marker is ignored, as are extensions themselves */ /* More than 4096 colors or no colors at all aren't accepted */ if ((cols < 1) || (cols > XPM_MAXCOL)) goto fail; /* Stupid colors per pixel values aren't either */ if ((cpp < 1) || (cpp > 31)) goto fail; /* RGB image if more than 256 colors */ if (cols > 256) bpp = 3; /* Store values */ settings->width = w; settings->height = h; settings->bpp = bpp; if (bpp == 1) settings->colors = cols; settings->hot_x = hx; settings->hot_y = hy; settings->xpm_trans = -1; /* Init hash */ memset(&cuckoo, 0, sizeof(cuckoo)); cuckoo.keys = ckeys; cuckoo.step = 32; cuckoo.cpp = cpp; cuckoo.seed = HASHSEED; /* Read colormap */ // !!! When/if huge numbers of colors get allowed, will need a progressbar here dest = pal; sprintf(tstr, " \"%%n%%*%dc %%n", cpp); for (i = 0; i < cols; i++ , dest += 3) { if (!fgetsC(lbuf, 4096, fp)) goto fail; /* Parse color ID */ k = 0; sscanf(lbuf, tstr, &k, &l); if (!k) goto fail; /* Insert color into hash */ ch_insert(&cuckoo, lbuf + k); /* Parse color definitions */ if (!(r = strchr(lbuf + l, '"'))) goto fail; *r = '\0'; memset(cdefs, 0, sizeof(cdefs)); k = -1; r2 = NULL; for (r = strtok(lbuf + l, " \t\n"); r; ) { for (j = 0; j < XPM_COL_DEFS; j++) { if (!strcmp(r, cmodes[j])) break; } if (j < XPM_COL_DEFS) /* Key */ { k = j; r2 = NULL; } else if (!r2) /* Color name */ { if (k < 0) goto fail; cdefs[k] = r2 = r; } else /* Add next part of name */ { l = strlen(r2); r2[l] = ' '; if ((l = r - r2 - l - 1)) for (; (*(r - l) = *r); r++); } r = strtok(NULL, " \t\n"); } if (!r2) goto fail; /* Key w/o name */ /* Translate the best one */ for (j = 0; j < XPM_COL_DEFS; j++) { GdkColor col; if (!cdefs[j]) continue; if (!strcasecmp(cdefs[j], "none")) /* Transparent */ { trans = i; break; } if (!gdk_color_parse(cdefs[j], &col)) continue; dest[0] = (col.red + 128) / 257; dest[1] = (col.green + 128) / 257; dest[2] = (col.blue + 128) / 257; break; } /* Not one understandable color */ if (j >= XPM_COL_DEFS) goto fail; } /* Create palette */ if (bpp == 1) { dest = pal; for (i = 0; i < cols; i++ , dest += 3) { settings->pal[i].red = dest[0]; settings->pal[i].green = dest[1]; settings->pal[i].blue = dest[2]; } if (trans >= 0) { settings->xpm_trans = trans; settings->pal[trans].red = settings->pal[trans].green = 115; settings->pal[trans].blue = 0; } /* If palette is all we need */ res = 1; if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) goto fail; } /* Find an unused color for transparency */ else if (trans >= 0) { char cmap[XPM_MAXCOL + 1]; memset(cmap, 0, sizeof(cmap)); dest = pal; for (i = 0; i < cols; i++ , dest += 3) { j = MEM_2_INT(dest, 0); if (j < XPM_MAXCOL) cmap[j] = 1; } settings->rgb_trans = j = strlen(cmap); dest = pal + trans * 3; dest[0] = INT_2_R(j); dest[1] = INT_2_G(j); dest[2] = INT_2_B(j); } /* Allocate row buffer and image */ i = w * cpp + 4 + 1024; if (i > lsz) buf = malloc(lsz = i); res = FILE_MEM_ERROR; if (!buf) goto fail; if ((res = allocate_image(settings, CMASK_IMAGE))) goto fail2; if (!settings->silent) ls_init("XPM", 0); /* Now, read the image */ res = FILE_LIB_ERROR; dest = settings->img[CHN_IMAGE]; for (i = 0; i < h; i++) { if (!fgetsC(buf, lsz, fp)) goto fail3; if (!(r = strchr(buf, '"'))) goto fail3; if (++r - buf + w * cpp >= lsz) goto fail3; for (j = 0; j < w; j++ , dest += bpp) { k = ch_find(&cuckoo, r); if (!k) goto fail3; r += cpp; if (bpp == 1) *dest = k - 1; else { src = (pal - 3) + k * 3; dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } } ls_progress(settings, i, 10); } res = 1; fail3: if (!settings->silent) progress_end(); fail2: if (buf != lbuf) free(buf); fail: fclose(fp); return (res); } static const char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", hex[] = "0123456789ABCDEF"; /* Extract valid C identifier from filename */ static char *extract_ident(char *fname, int *len) { char *tmp; int l; tmp = strrchr(fname, DIR_SEP); tmp = tmp ? tmp + 1 : fname; for (; *tmp && !ISALPHA(*tmp); tmp++); for (l = 0; (l < 256) && ISALNUM(tmp[l]); l++); *len = l; return (tmp); } static int save_xpm(char *file_name, ls_settings *settings) { unsigned char rgbmem[XPM_MAXCOL * 4], *src; const char *ctb; char ws[3], *buf, *tmp; str_hash cuckoo; FILE *fp; int bpp = settings->bpp, w = settings->width, h = settings->height; int i, j, k, l, cpp, cols, trans = -1; tmp = extract_ident(file_name, &l); if (!l) return -1; /* Collect RGB colors */ if (bpp == 3) { /* Init hash */ memset(&cuckoo, 0, sizeof(cuckoo)); cuckoo.keys = rgbmem; cuckoo.step = 4; cuckoo.cpp = 3; cuckoo.seed = HASHSEED; j = w * h; src = settings->img[CHN_IMAGE]; for (i = 0; i < j; i++ , src += 3) { if (ch_insert(&cuckoo, src) < 0) return (WRONG_FORMAT); /* Too many colors */ } cols = cuckoo.cnt; trans = settings->rgb_trans; /* RGB to index */ if (trans > -1) { char trgb[3]; trgb[0] = INT_2_R(trans); trgb[1] = INT_2_G(trans); trgb[2] = INT_2_B(trans); trans = ch_find(&cuckoo, trgb) - 1; } } /* Process indexed colors */ else { cols = settings->colors; src = rgbmem; for (i = 0; i < cols; i++ , src += 4) { src[0] = settings->pal[i].red; src[1] = settings->pal[i].green; src[2] = settings->pal[i].blue; } trans = settings->xpm_trans; } cpp = cols > 64 ? 2 : 1; buf = malloc(w * cpp + 16); if (!buf) return -1; if (!(fp = fopen(file_name, "w"))) { free(buf); return -1; } if (!settings->silent) ls_init("XPM", 1); fprintf(fp, "/* XPM */\n" ); fprintf(fp, "static char *%.*s_xpm[] = {\n", l, tmp); if ((settings->hot_x >= 0) && (settings->hot_y >= 0)) fprintf(fp, "\"%d %d %d %d %d %d\",\n", w, h, cols, cpp, settings->hot_x, settings->hot_y); else fprintf(fp, "\"%d %d %d %d\",\n", w, h, cols, cpp); /* Create colortable */ ctb = cols > 16 ? base64 : hex; ws[1] = ws[2] = '\0'; for (i = 0; i < cols; i++) { if (i == trans) { ws[0] = ' '; if (cpp > 1) ws[1] = ' '; fprintf(fp, "\"%s\tc None\",\n", ws); continue; } ws[0] = ctb[i & 63]; if (cpp > 1) ws[1] = ctb[i >> 6]; src = rgbmem + i * 4; fprintf(fp, "\"%s\tc #%02X%02X%02X\",\n", ws, src[0], src[1], src[2]); } w *= bpp; for (i = 0; i < h; i++) { src = settings->img[CHN_IMAGE] + i * w; tmp = buf; *tmp++ = '"'; for (j = 0; j < w; j += bpp, tmp += cpp) { k = bpp == 1 ? src[j] : ch_find(&cuckoo, src + j) - 1; if (k == trans) tmp[0] = tmp[1] = ' '; else { tmp[0] = ctb[k & 63]; tmp[1] = ctb[k >> 6]; } } strcpy(tmp, i < h - 1 ? "\",\n" : "\"\n};\n"); fputs(buf, fp); ls_progress(settings, i, 10); } fclose(fp); if (!settings->silent) progress_end(); free(buf); return 0; } static int load_xbm(char *file_name, ls_settings *settings) { static const char XPMtext[] = "0123456789ABCDEFabcdef,} \t\n", XPMval[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16 }; unsigned char ctb[256], *dest; char lbuf[4096]; FILE *fp; int w , h, hx = -1, hy = -1, bpn = 16, res = -1; int i, j, k, c, v = 0; if (!(fp = fopen(file_name, "r"))) return (-1); /* Read & parse what serves as header to XBM */ fgetsC(lbuf, 0, fp); /* Reset reader */ /* Width and height - required part in fixed order */ if (!fgetsC(lbuf, 4096, fp)) goto fail; if (!sscanf(lbuf, "#define %*s%n %d", &i, &w)) goto fail; if (strncmp(lbuf + i - 5, "width", 5)) goto fail; if (!fgetsC(lbuf, 4096, fp)) goto fail; if (!sscanf(lbuf, "#define %*s%n %d", &i, &h)) goto fail; if (strncmp(lbuf + i - 6, "height", 6)) goto fail; /* Hotspot X and Y - optional part in fixed order */ if (!fgetsC(lbuf, 4096, fp)) goto fail; if (sscanf(lbuf, "#define %*s%n %d", &i, &hx)) { if (strncmp(lbuf + i - 5, "x_hot", 5)) goto fail; if (!fgetsC(lbuf, 4096, fp)) goto fail; if (!sscanf(lbuf, "#define %*s%n %d", &i, &hy)) goto fail; if (strncmp(lbuf + i - 5, "y_hot", 5)) goto fail; if (!fgetsC(lbuf, 4096, fp)) goto fail; } /* "Intro" string */ j = 0; sscanf(lbuf, " static short %*[^[]%n[] = {%n", &i, &j); if (!j) { bpn = 8; /* X11 format - 8-bit data */ j = 0; sscanf(lbuf, " static unsigned char %*[^[]%n[] = {%n", &i, &j); if (!j) sscanf(lbuf, " static char %*[^[]%n[] = {%n", &i, &j); if (!j) goto fail; } if (strncmp(lbuf + i - 4, "bits", 4)) goto fail; /* Store values */ settings->width = w; settings->height = h; settings->bpp = 1; settings->hot_x = hx; settings->hot_y = hy; /* Palette is white and black */ set_bw(settings); /* Allocate image */ if ((res = allocate_image(settings, CMASK_IMAGE))) goto fail; /* Prepare to read data */ memset(ctb, 17, sizeof(ctb)); for (i = 0; XPMtext[i]; i++) { ctb[(unsigned char)XPMtext[i]] = XPMval[i]; } /* Now, read the image */ if (!settings->silent) ls_init("XBM", 0); res = FILE_LIB_ERROR; dest = settings->img[CHN_IMAGE]; for (i = 0; i < h; i++) { for (j = k = 0; j < w; j++ , k--) { if (!k) /* Get next value, the way X itself does */ { v = 0; while (TRUE) { if ((c = getc(fp)) == EOF) goto fail2; c = ctb[c & 255]; if (c < 16) /* Accept hex digits */ { v = (v << 4) + c; k++; } /* Silently ignore out-of-place chars */ else if (c > 16) continue; /* Stop on delimiters after digits */ else if (k) break; } k = bpn; } *dest++ = v & 1; v >>= 1; } ls_progress(settings, i, 10); } res = 1; fail2: if (!settings->silent) progress_end(); fail: fclose(fp); return (res); } #define BPL 12 /* Bytes per line */ #define CPB 6 /* Chars per byte */ static int save_xbm(char *file_name, ls_settings *settings) { unsigned char *src; unsigned char row[MAX_WIDTH / 8]; char buf[CPB * BPL + 16], *tmp; FILE *fp; int i, j, k, l, w = settings->width, h = settings->height; if ((settings->bpp != 1) || (settings->colors > 2)) return WRONG_FORMAT; /* Extract valid C identifier from name */ tmp = extract_ident(file_name, &i); if (!i) return -1; if (!(fp = fopen(file_name, "w"))) return -1; fprintf(fp, "#define %.*s_width %i\n", i, tmp, w); fprintf(fp, "#define %.*s_height %i\n", i, tmp, h); if ((settings->hot_x >= 0) && (settings->hot_y >= 0)) { fprintf(fp, "#define %.*s_x_hot %i\n", i, tmp, settings->hot_x); fprintf(fp, "#define %.*s_y_hot %i\n", i, tmp, settings->hot_y); } fprintf(fp, "static unsigned char %.*s_bits[] = {\n", i, tmp); if (!settings->silent) ls_init("XBM", 1); j = k = (w + 7) >> 3; i = l = 0; while (TRUE) { if (j >= k) { if (i >= h) break; src = settings->img[CHN_IMAGE] + i * w; memset(row, 0, k); for (j = 0; j < w; j++) { if (src[j] == 1) row[j >> 3] |= 1 << (j & 7); } j = 0; ls_progress(settings, i, 10); i++; } for (; (l < BPL) && (j < k); l++ , j++) { tmp = buf + l * CPB; tmp[0] = ' '; tmp[1] = '0'; tmp[2] = 'x'; tmp[3] = hex[row[j] >> 4]; tmp[4] = hex[row[j] & 0xF]; tmp[5] = ','; } if ((l == BPL) && (j < k)) { buf[BPL * CPB] = '\n'; buf[BPL * CPB + 1] = '\0'; fputs(buf, fp); l = 0; } } strcpy(buf + l * CPB - 1, " };\n"); fputs(buf, fp); fclose(fp); if (!settings->silent) progress_end(); return 0; } /* * Those who don't understand PCX are condemned to reinvent it, poorly. :-) */ #define LSS_WIDTH 4 /* 16b */ #define LSS_HEIGHT 6 /* 16b */ #define LSS_PALETTE 8 /* 16 * 3 * 8b */ #define LSS_HSIZE 56 static int load_lss(char *file_name, ls_settings *settings) { unsigned char hdr[LSS_HSIZE], *dest, *tmp, *buf = NULL; FILE *fp; int i, j, k, w, h, bl, idx, last, cnt, res = -1; if (!(fp = fopen(file_name, "rb"))) return (-1); /* Read the header */ k = fread(hdr, 1, LSS_HSIZE, fp); /* Check general validity */ if (k < LSS_HSIZE) goto fail; /* Least supported header size */ if (strncmp(hdr, "\x3D\xF3\x13\x14", 4)) goto fail; /* Signature */ w = GET16(hdr + LSS_WIDTH); h = GET16(hdr + LSS_HEIGHT); settings->width = w; settings->height = h; settings->bpp = 1; settings->colors = 16; /* Read palette */ tmp = hdr + LSS_PALETTE; for (i = 0; i < 16; i++) { settings->pal[i].red = tmp[0] << 2 | tmp[0] >> 4; settings->pal[i].green = tmp[1] << 2 | tmp[1] >> 4; settings->pal[i].blue = tmp[2] << 2 | tmp[2] >> 4; tmp += 3; } /* If palette is all we need */ res = 1; if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) goto fail; /* Load all image at once */ fseek(fp, 0, SEEK_END); bl = ftell(fp) - LSS_HSIZE; fseek(fp, LSS_HSIZE, SEEK_SET); i = (w * h * 3) >> 1; if (bl > i) bl = i; /* Cannot possibly be longer */ buf = malloc(bl); res = FILE_MEM_ERROR; if (!buf) goto fail2; if ((res = allocate_image(settings, CMASK_IMAGE))) goto fail2; if (!settings->silent) ls_init("LSS16", 0); res = FILE_LIB_ERROR; j = fread(buf, 1, bl, fp); if (j < bl) goto fail3; dest = settings->img[CHN_IMAGE]; idx = 0; bl += bl; for (i = 0; i < h; i++) { last = 0; idx = (idx + 1) & ~1; for (j = 0; j < w; ) { if (idx >= bl) goto fail3; k = (buf[idx >> 1] >> ((idx & 1) << 2)) & 0xF; ++idx; if (k != last) { dest[j++] = last = k; continue; } if (idx >= bl) goto fail3; cnt = (buf[idx >> 1] >> ((idx & 1) << 2)) & 0xF; ++idx; if (!cnt) { if (idx >= bl) goto fail3; cnt = (buf[idx >> 1] >> ((idx & 1) << 2)) & 0xF; ++idx; if (idx >= bl) goto fail3; k = (buf[idx >> 1] >> ((idx & 1) << 2)) & 0xF; ++idx; cnt = (k << 4) + cnt + 16; } if (cnt > w - j) cnt = w - j; memset(dest + j, last, cnt); j += cnt; } dest += w; } res = 1; fail3: if (!settings->silent) progress_end(); fail2: free(buf); fail: fclose(fp); return (res); } static int save_lss(char *file_name, ls_settings *settings) { unsigned char *buf, *tmp, *src; FILE *fp; int i, j, k, last, cnt, idx; int w = settings->width, h = settings->height; if ((settings->bpp != 1) || (settings->colors > 16)) return WRONG_FORMAT; i = w > LSS_HSIZE ? w : LSS_HSIZE; buf = malloc(i); if (!buf) return -1; memset(buf, 0, i); if (!(fp = fopen(file_name, "wb"))) { free(buf); return -1; } /* Prepare header */ buf[0] = 0x3D; buf[1] = 0xF3; buf[2] = 0x13; buf[3] = 0x14; PUT16(buf + LSS_WIDTH, w); PUT16(buf + LSS_HEIGHT, h); j = settings->colors > 16 ? 16 : settings->colors; tmp = buf + LSS_PALETTE; for (i = 0; i < j; i++) { tmp[0] = settings->pal[i].red >> 2; tmp[1] = settings->pal[i].green >> 2; tmp[2] = settings->pal[i].blue >> 2; tmp += 3; } fwrite(buf, 1, LSS_HSIZE, fp); /* Write rows */ if (!settings->silent) ls_init("LSS16", 1); src = settings->img[CHN_IMAGE]; for (i = 0; i < h; i++) { memset(buf, 0, w); last = cnt = idx = 0; for (j = 0; j < w; ) { for (; j < w; j++) { k = *src++ & 0xF; if ((k != last) || (cnt >= 255 + 16)) break; cnt++; } if (cnt) { buf[idx >> 1] |= last << ((idx & 1) << 2); ++idx; if (cnt >= 16) { ++idx; /* Insert zero */ cnt -= 16; buf[idx >> 1] |= (cnt & 0xF) << ((idx & 1) << 2); ++idx; cnt >>= 4; } buf[idx >> 1] |= cnt << ((idx & 1) << 2); ++idx; } if (j++ >= w) break; /* Final repeat */ if (k == last) { cnt = 1; continue; /* Chain of repeats */ } cnt = 0; buf[idx >> 1] |= k << ((idx & 1) << 2); ++idx; last = k; } idx = (idx + 1) & ~1; fwrite(buf, 1, idx >> 1, fp); ls_progress(settings, i, 10); } fclose(fp); if (!settings->silent) progress_end(); free(buf); return 0; } /* *** PREFACE *** * No other format has suffered so much at the hands of inept coders. With TGA, * exceptions are the rule, and files perfectly following the specification are * impossible to find. While I did my best to handle the format's perversions * that I'm aware of, there surely exist other kinds of weird TGAs that will * load wrong, or not at all. If you encounter one such, send a bugreport with * the file attached to it. */ /* TGA header */ #define TGA_IDLEN 0 /* 8b */ #define TGA_PALTYPE 1 /* 8b */ #define TGA_IMGTYPE 2 /* 8b */ #define TGA_PALSTART 3 /* 16b */ #define TGA_PALCOUNT 5 /* 16b */ #define TGA_PALBITS 7 /* 8b */ #define TGA_X0 8 /* 16b */ #define TGA_Y0 10 /* 16b */ #define TGA_WIDTH 12 /* 16b */ #define TGA_HEIGHT 14 /* 16b */ #define TGA_BPP 16 /* 8b */ #define TGA_DESC 17 /* 8b */ #define TGA_HSIZE 18 /* Image descriptor bits */ #define TGA_ALPHA 0x0F #define TGA_R2L 0x10 #define TGA_T2B 0x20 #define TGA_IL 0xC0 /* Interleave mode - obsoleted in TGA 2.0 */ /* TGA footer */ #define TGA_EXTOFS 0 /* 32b */ #define TGA_DEVOFS 4 /* 32b */ #define TGA_SIGN 8 #define TGA_FSIZE 26 /* TGA extension area */ #define TGA_EXTLEN 0 /* 16b */ #define TGA_SOFTID 426 /* 41 bytes */ #define TGA_SOFTV 467 /* 16b */ #define TGA_ATYPE 494 /* 8b */ #define TGA_EXTSIZE 495 static int load_tga(char *file_name, ls_settings *settings) { unsigned char hdr[TGA_HSIZE], ftr[TGA_FSIZE], ext[TGA_EXTSIZE]; unsigned char pal[256 * 4], xlat5[32], xlat67[128], trans[256]; unsigned char *buf = NULL, *dest, *dsta, *src = NULL, *srca = NULL; FILE *fp; int i, k, w, h, bpp, ftype, ptype, ibpp, rbits, abits, itrans = FALSE; int rle, real_alpha = FALSE, assoc_alpha = FALSE, wmode = 0, res = -1; int fl, fofs, iofs, buflen; int ix, ishift, imask, ax, ashift, amask; int start, xstep, xstepb, ystep, bstart, bstop, ccnt, rcnt, strl, y; if (!(fp = fopen(file_name, "rb"))) return (-1); /* Read the header */ k = fread(hdr, 1, TGA_HSIZE, fp); if (k < TGA_HSIZE) goto fail; /* TGA has no signature as such - so check fields one by one */ ftype = hdr[TGA_IMGTYPE]; if (!(ftype & 3) || (ftype & 0xF4)) goto fail; /* Invalid type */ /* Fail on interleave, because of lack of example files */ if (hdr[TGA_DESC] & TGA_IL) goto fail; rle = ftype & 8; iofs = TGA_HSIZE + hdr[TGA_IDLEN]; rbits = hdr[TGA_BPP]; if (!rbits) goto fail; /* Zero bpp */ abits = hdr[TGA_DESC] & TGA_ALPHA; if (abits > rbits) goto fail; /* Weird alpha */ /* Workaround for a rather frequent bug */ if (abits == rbits) abits = 0; ibpp = (rbits + 7) >> 3; rbits -= abits; ptype = hdr[TGA_PALTYPE]; switch (ftype & 3) { case 1: /* Paletted */ { int pbpp, i, j, k, l; png_color *pptr; if (ptype != 1) goto fail; /* Invalid palette */ /* Don't want to bother with overlong palette without even * having one example where such a thing exists - WJ */ if (rbits > 8) goto fail; k = GET16(hdr + TGA_PALSTART); if (k >= 1 << rbits) goto fail; /* Weird palette start */ j = GET16(hdr + TGA_PALCOUNT); if (!j || (k + j > 1 << rbits)) goto fail; /* Weird size */ ptype = hdr[TGA_PALBITS]; /* The options are quite limited here in practice */ if (!ptype || (ptype > 32) || ((ptype & 7) && (ptype != 15))) goto fail; pbpp = (ptype + 7) >> 3; l = j * pbpp; /* Read the palette */ fseek(fp, iofs, SEEK_SET); if (fread(pal + k * pbpp, 1, l, fp) != l) goto fail; iofs += l; /* Store the palette */ settings->colors = j + k; memset(settings->pal, 0, 256 * 3); if (pbpp == 2) set_xlate(xlat5, 5); pptr = settings->pal + k; for (i = 0; i < l; i += pbpp , pptr++) { switch (pbpp) { case 1: /* 8-bit greyscale */ pptr->red = pptr->green = pptr->blue = pal[i]; break; case 2: /* 5:5:5 BGR */ pptr->blue = xlat5[pal[i] & 0x1F]; pptr->green = xlat5[(((pal[i + 1] << 8) + pal[i]) >> 5) & 0x1F]; pptr->red = xlat5[(pal[i + 1] >> 2) & 0x1F]; break; case 3: case 4: /* 8:8:8 BGR */ pptr->blue = pal[i + 0]; pptr->green = pal[i + 1]; pptr->red = pal[i + 2]; break; } } /* If palette is all we need */ res = 1; if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) goto fail; /* Assemble transparency table */ memset(trans, 255, 256); if (ptype == 15) { int i, n, tr; for (i = n = 0; i < j; i++) n += pal[i + i + 1] & 0x80; /* Assume the less frequent value is transparent */ tr = n >> 6 < j ? 0x80 : 0; for (i = 0; i < j; i++) { if ((pal[i + i + 1] & 0x80) == tr) trans[i + k] = 0; } } else if (ptype == 32) { for (i = 0; i < j; i++) trans[i + k] = pal[i * 4 + 3]; } else break; /* Cannot have transparent color at all */ /* If all alphas are identical, ignore them */ itrans = !is_filled(trans + k, trans[k], j); break; } case 2: /* RGB */ /* Options are very limited - and bugs abound. Presence or * absence of attribute bits can't be relied upon. */ switch (rbits) { case 16: /* 5:5:5 BGR or 5:6:5 BGR or 5:5:5:1 BGRA */ if (abits) goto fail; if (tga_565) { set_xlate(xlat5, 5); set_xlate(xlat67, 6); wmode = 4; break; } rbits = 15; /* Fallthrough */ case 15: /* 5:5:5 BGR or 5:5:5:1 BGRA */ if (abits > 1) goto fail; abits = 1; /* Here it's unreliable to uselessness */ set_xlate(xlat5, 5); wmode = 2; break; case 32: /* 8:8:8 BGR or 8:8:8:8 BGRA */ if (abits) goto fail; rbits = 24; abits = 8; wmode = 6; break; case 24: /* 8:8:8 BGR or 8:8:8:8 BGRA */ if (abits && (abits != 8)) goto fail; wmode = 6; break; default: goto fail; } break; case 3: /* Greyscale */ /* Not enough examples - easier to handle all possibilities */ /* Create palette */ settings->colors = rbits > 8 ? 256 : 1 << rbits; mem_bw_pal(settings->pal, 0, settings->colors - 1); break; } /* Prepare for reading bitfields */ i = abits > 8 ? abits - 8 : 0; abits -= i; i += rbits; ax = i >> 3; ashift = i & 7; amask = (1 << abits) - 1; i = rbits > 8 ? rbits - 8 : 0; rbits -= i; ix = i >> 3; ishift = i & 7; imask = (1 << rbits) - 1; /* Now read the footer if one is available */ fseek(fp, 0, SEEK_END); fl = ftell(fp); while (fl >= iofs + TGA_FSIZE) { fseek(fp, fl - TGA_FSIZE, SEEK_SET); k = fread(ftr, 1, TGA_FSIZE, fp); if (k < TGA_FSIZE) break; if (strcmp(ftr + TGA_SIGN, "TRUEVISION-XFILE.")) break; fofs = GET32(ftr + TGA_EXTOFS); if ((fofs < iofs) || (fofs + TGA_EXTSIZE + TGA_FSIZE > fl)) break; /* Invalid location */ fseek(fp, fofs, SEEK_SET); k = fread(ext, 1, TGA_EXTSIZE, fp); if ((k < TGA_EXTSIZE) || /* !!! 3D Studio writes 494 into this field */ (GET16(ext + TGA_EXTLEN) < TGA_EXTSIZE - 1)) break; /* Invalid size */ if ((ftype & 3) != 1) /* Premultiplied alpha? */ assoc_alpha = ext[TGA_ATYPE] == 4; /* Can believe alpha bits contain alpha if this field says so */ real_alpha |= assoc_alpha | (ext[TGA_ATYPE] == 3); /* !!! No private extensions for now */ #if 0 if (strcmp(ext + TGA_SOFTID, "mtPaint")) break; if (GET16(ext + TGA_SOFTV) <= 310) break; /* !!! Read and interpret developer directory */ #endif break; } /* Allocate buffer and image */ settings->width = w = GET16(hdr + TGA_WIDTH); settings->height = h = GET16(hdr + TGA_HEIGHT); settings->bpp = bpp = (ftype & 3) == 2 ? 3 : 1; buflen = ibpp * w; if (rle && (w < 129)) buflen = ibpp * 129; buf = malloc(buflen + 1); /* One extra byte for bitparser */ res = FILE_MEM_ERROR; if (!buf) goto fail; if ((res = allocate_image(settings, abits ? CMASK_RGBA : CMASK_IMAGE))) goto fail2; /* Don't even try reading alpha if nowhere to store it */ if (abits && settings->img[CHN_ALPHA]) wmode |= 1; res = -1; if (!settings->silent) ls_init("TGA", 0); fseek(fp, iofs, SEEK_SET); /* Seek to data */ /* Prepare loops */ start = 0; xstep = 1; ystep = 0; if (hdr[TGA_DESC] & TGA_R2L) { /* Right-to-left */ start = w - 1; xstep = -1; ystep = 2 * w; } if (!(hdr[TGA_DESC] & TGA_T2B)) { /* Bottom-to-top */ start += (h - 1) * w; ystep -= 2 * w; } xstepb = xstep * bpp; res = FILE_LIB_ERROR; dest = settings->img[CHN_IMAGE] + start * bpp; dsta = settings->img[CHN_ALPHA] + start; y = ccnt = rcnt = 0; bstart = bstop = buflen; strl = w; while (TRUE) { int j; j = bstop - bstart; if (j < ibpp) { if (bstop < buflen) goto fail3; /* Truncated file */ memcpy(buf, buf + bstart, j); bstart = 0; bstop = j + fread(buf + j, 1, buflen - j, fp); if (!rle) /* Uncompressed */ { if (bstop < buflen) goto fail3; /* Truncated file */ rcnt = w; /* "Copy block" a row long */ } } while (TRUE) { /* Read pixels */ if (rcnt) { int l; l = rcnt < strl ? rcnt : strl; if (bstart + ibpp * l > bstop) l = (bstop - bstart) / ibpp; rcnt -= l; strl -= l; while (l--) { switch (wmode) { case 1: /* Generic alpha */ *dsta = (((buf[bstart + ax + 1] << 8) + buf[bstart + ax]) >> ashift) & amask; case 0: /* Generic single channel */ *dest = (((buf[bstart + ix + 1] << 8) + buf[bstart + ix]) >> ishift) & imask; break; case 3: /* One-bit alpha for 16 bpp */ *dsta = buf[bstart + 1] >> 7; case 2: /* 5:5:5 BGR */ dest[0] = xlat5[(buf[bstart + 1] >> 2) & 0x1F]; dest[1] = xlat5[(((buf[bstart + 1] << 8) + buf[bstart]) >> 5) & 0x1F]; dest[2] = xlat5[buf[bstart] & 0x1F]; break; case 5: /* Cannot happen */ case 4: /* 5:6:5 BGR */ dest[0] = xlat5[buf[bstart + 1] >> 3]; dest[1] = xlat67[(((buf[bstart + 1] << 8) + buf[bstart]) >> 5) & 0x3F]; dest[2] = xlat5[buf[bstart] & 0x1F]; break; case 7: /* One-byte alpha for 32 bpp */ *dsta = buf[bstart + 3]; case 6: /* 8:8:8 BGR */ dest[0] = buf[bstart + 2]; dest[1] = buf[bstart + 1]; dest[2] = buf[bstart + 0]; break; } dest += xstepb; dsta += xstep; bstart += ibpp; } if (!strl || rcnt) break; /* Row end or buffer end */ } /* Copy pixels */ if (ccnt) { int i, l; l = ccnt < strl ? ccnt : strl; ccnt -= l; strl -= l; for (i = 0; i < l; i++ , dest += xstepb) { dest[0] = src[0]; if (bpp == 1) continue; dest[1] = src[1]; dest[2] = src[2]; } if (wmode & 1) memset(xstep < 0 ? dsta - l + 1 : dsta, *srca, l); dsta += xstep * l; if (!strl || ccnt) break; /* Row end or buffer end */ } /* Read block header */ if (bstart >= bstop) break; /* Nothing in buffer */ rcnt = buf[bstart++]; if (rcnt > 0x7F) /* Repeat block - one read + some copies */ { ccnt = rcnt & 0x7F; rcnt = 1; src = dest; srca = dsta; } else ++rcnt; /* Copy block - several reads */ } if (strl) continue; /* It was buffer end */ ls_progress(settings, y, 10); if (++y >= h) break; /* All done */ dest += ystep * bpp; if (dsta) dsta += ystep; strl = w; } /* Check if alpha channel is valid */ if (!real_alpha && settings->img[CHN_ALPHA]) { unsigned char *tmp = settings->img[CHN_ALPHA]; int i, j = w * h, k = tmp[0]; for (i = 1; (tmp[i] == k) && (i < j); i++); /* Delete flat "alpha" */ if (i >= j) deallocate_image(settings, CMASK_FOR(CHN_ALPHA)); } /* Check if alpha in 16-bpp BGRA is inverse */ if (settings->img[CHN_ALPHA] && (wmode == 3) && !assoc_alpha) { unsigned char *timg, *talpha; int i, j = w * h, k = 0, l; timg = settings->img[CHN_IMAGE]; talpha = settings->img[CHN_ALPHA]; for (i = 0; i < j; i++) { l = 5; if (!(timg[0] | timg[1] | timg[2])) l = 1; else if ((timg[0] & timg[1] & timg[2]) == 255) l = 4; k |= l << talpha[i]; if (k == 0xF) break; /* Colors independent of alpha */ timg += 3; } /* If 0-covered parts more colorful than 1-covered, invert alpha */ if ((k & 5) > ((k >> 1) & 5)) { for (i = 0; i < j; i++) talpha[i] ^= 1; } } /* Rescale alpha */ if (settings->img[CHN_ALPHA] && (abits < 8)) { unsigned char *tmp = settings->img[CHN_ALPHA]; int i, j = w * h; set_xlate(xlat67, abits); for (i = 0; i < j; i++) tmp[i] = xlat67[tmp[i]]; } /* Unassociate alpha */ if (settings->img[CHN_ALPHA] && assoc_alpha && (abits > 1)) { mem_demultiply(settings->img[CHN_IMAGE], settings->img[CHN_ALPHA], w * h, bpp); } res = 0; /* Apply palette transparency */ if (itrans) res = palette_trans(settings, trans); if (!res) res = 1; fail3: if (!settings->silent) progress_end(); fail2: free(buf); fail: fclose(fp); return (res); } static int save_tga(char *file_name, ls_settings *settings) { unsigned char hdr[TGA_HSIZE], ftr[TGA_FSIZE], pal[256 * 4]; unsigned char *buf, *src, *srca, *dest; FILE *fp; int i, j, y0, y1, vstep, pcn, pbpp = 3; int w = settings->width, h = settings->height, bpp = settings->bpp; int rle = settings->tga_RLE; /* Indexed images not supposed to have alpha in TGA standard */ if ((bpp == 3) && settings->img[CHN_ALPHA]) bpp = 4; i = w * bpp; if (rle) i += i + (w >> 7) + 3; buf = malloc(i); if (!buf) return -1; if (!(fp = fopen(file_name, "wb"))) { free(buf); return -1; } /* Prepare header */ memset(hdr, 0, TGA_HSIZE); switch (bpp) { case 1: /* Indexed */ hdr[TGA_PALTYPE] = 1; hdr[TGA_IMGTYPE] = 1; PUT16(hdr + TGA_PALCOUNT, settings->colors); if ((settings->xpm_trans >= 0) && (settings->xpm_trans < settings->colors)) pbpp = 4; hdr[TGA_PALBITS] = pbpp * 8; break; case 4: /* RGBA */ hdr[TGA_DESC] = 8; case 3: /* RGB */ hdr[TGA_IMGTYPE] = 2; break; } hdr[TGA_BPP] = bpp * 8; PUT16(hdr + TGA_WIDTH, w); PUT16(hdr + TGA_HEIGHT, h); if (rle) hdr[TGA_IMGTYPE] |= 8; if (!tga_defdir) hdr[TGA_DESC] |= TGA_T2B; fwrite(hdr, 1, TGA_HSIZE, fp); /* Write palette */ if (bpp == 1) { dest = pal; for (i = 0; i < settings->colors; i++ , dest += pbpp) { dest[0] = settings->pal[i].blue; dest[1] = settings->pal[i].green; dest[2] = settings->pal[i].red; if (pbpp > 3) dest[3] = 255; } /* Mark transparent color */ if (pbpp > 3) pal[settings->xpm_trans * 4 + 3] = 0; fwrite(pal, 1, dest - pal, fp); } /* Write rows */ if (!settings->silent) ls_init("TGA", 1); if (tga_defdir) { y0 = h - 1; y1 = -1; vstep = -1; } else { y0 = 0; y1 = h; vstep = 1; } for (i = y0 , pcn = 0; i != y1; i += vstep , pcn++) { prepare_row(buf, settings, bpp, i); /* Fill uncompressed row */ src = buf; dest = buf + w * bpp; if (rle) /* Compress */ { unsigned char *tmp; int k, l; for (j = 1; j <= w; j++) { tmp = srca = src; src += bpp; /* Scan row for repeats */ for (; j < w; j++ , src += bpp) { switch (bpp) { case 4: if (src[3] != srca[3]) break; case 3: if (src[2] != srca[2]) break; case 2: if (src[1] != srca[1]) break; case 1: if (src[0] != srca[0]) break; default: continue; } /* Useful repeat? */ if (src - srca > bpp + 2) break; srca = src; } /* Avoid too-short repeats at row ends */ if (src - srca <= bpp + 2) srca = src; /* Create copy blocks */ for (k = (srca - tmp) / bpp; k > 0; k -= 128) { l = k > 128 ? 128 : k; *dest++ = l - 1; memcpy(dest, tmp, l *= bpp); dest += l; tmp += l; } /* Create repeat blocks */ for (k = (src - srca) / bpp; k > 0; k -= 128) { l = k > 128 ? 128 : k; *dest++ = l + 127; memcpy(dest, srca, bpp); dest += bpp; } } } fwrite(src, 1, dest - src, fp); ls_progress(settings, pcn, 20); } /* Write footer */ memcpy(ftr + TGA_SIGN, "TRUEVISION-XFILE.", TGA_FSIZE - TGA_SIGN); /* !!! No private extensions for now */ memset(ftr, 0, TGA_SIGN); fwrite(ftr, 1, TGA_FSIZE, fp); fclose(fp); if (!settings->silent) progress_end(); free(buf); return 0; } /* PCX header */ #define PCX_ID 0 /* 8b */ #define PCX_VER 1 /* 8b */ #define PCX_ENC 2 /* 8b */ #define PCX_BPP 3 /* 8b */ #define PCX_X0 4 /* 16b */ #define PCX_Y0 6 /* 16b */ #define PCX_X1 8 /* 16b */ #define PCX_Y1 10 /* 16b */ #define PCX_HDPI 12 /* 16b */ #define PCX_VDPI 14 /* 16b */ #define PCX_PAL 16 /* 8b*3*16 */ #define PCX_NPLANES 65 /* 8b */ #define PCX_LINELEN 66 /* 16b */ #define PCX_PALTYPE 68 /* 16b */ #define PCX_HRES 70 /* 16b */ #define PCX_VRES 72 /* 16b */ #define PCX_HSIZE 128 #define PCX_BUFSIZE 16384 /* Bytes read at a time */ /* Default EGA/VGA palette */ static const png_color def_pal[16] = { {0x00, 0x00, 0x00}, {0x00, 0x00, 0xAA}, {0x00, 0xAA, 0x00}, {0x00, 0xAA, 0xAA}, {0xAA, 0x00, 0x00}, {0xAA, 0x00, 0xAA}, {0xAA, 0x55, 0x00}, {0xAA, 0xAA, 0xAA}, {0x55, 0x55, 0x55}, {0x55, 0x55, 0xFF}, {0x55, 0xFF, 0x55}, {0x55, 0xFF, 0xFF}, {0xFF, 0x55, 0x55}, {0xFF, 0x55, 0xFF}, {0xFF, 0xFF, 0x55}, {0xFF, 0xFF, 0xFF}, }; static void copy_rgb_pal(png_color *dest, unsigned char *src, int cnt) { while (cnt-- > 0) { dest->red = src[0]; dest->green = src[1]; dest->blue = src[2]; dest++; src += 3; } } static int load_pcx(char *file_name, ls_settings *settings) { static const unsigned char planarconfig[8] = { 0x11, /* BW */ 0x12, /* 4c */ 0x31, /* 8c */ 0x41, /* 16c */ 0x14, /* 16c */ 0x18, /* 256c */ 0x38, /* RGB */ 0x48 /* RGBA */ }; unsigned char hdr[PCX_HSIZE], pbuf[769]; unsigned char *buf, *row, *dest, *tmp; FILE *fp; int ver, bits, planes, ftype; int y, ccnt, bstart, bstop, strl, plane; int w, h, cols, buflen, bpp = 3, res = -1; if (!(fp = fopen(file_name, "rb"))) return (-1); /* Read the header */ if (fread(hdr, 1, PCX_HSIZE, fp) < PCX_HSIZE) goto fail; /* PCX has no real signature - so check fields one by one */ if ((hdr[PCX_ID] != 10) || (hdr[PCX_ENC] != 1)) goto fail; ver = hdr[PCX_VER]; if (ver > 5) goto fail; bits = hdr[PCX_BPP]; planes = hdr[PCX_NPLANES]; if ((bits | planes) > 15) goto fail; if (!(tmp = memchr(planarconfig, (planes << 4) | bits, 8))) goto fail; ftype = tmp - planarconfig; /* Prepare palette */ if (ftype < 6) { bpp = 1; settings->colors = cols = 1 << (bits * planes); /* BW (0 is black) */ if (cols == 2) { settings->pal[0] = def_pal[0]; settings->pal[1] = def_pal[15]; } /* Default 256-color palette - assumed greyscale */ else if ((ver == 3) && (cols == 256)) set_gray(settings); /* Default 16-color palette */ else if ((ver == 3) && (cols == 16)) memcpy(settings->pal, def_pal, sizeof(def_pal)); /* !!! CGA palette is evil: what the PCX spec describes is the way it * was handled by PC Paintbrush 3.0, while 4.0 was using an entirely * different, undocumented encoding for palette selection. * The only seemingly sane way to differentiate the two is to look at * paletteinfo field: zeroed in 3.0, set in 4.0+ - WJ */ else if (cols == 4) { /* Bits 2:1:0 in index: color burst:palette:intensity */ static const unsigned char cga_pals[8 * 3] = { 2, 4, 6, 10, 12, 14, 3, 5, 7, 11, 13, 15, 3, 4, 7, 11, 12, 15, 3, 4, 7, 11, 12, 15 }; int i, idx = hdr[PCX_PAL + 3] >> 5; // PB 3.0 if (GET16(hdr + PCX_PALTYPE)) // PB 4.0 { /* Pick green palette if G>B in slot 1 */ i = hdr[PCX_PAL + 5] >= hdr[PCX_PAL + 4]; /* Pick bright palette if max(G,B) > 200 */ idx = i * 2 + (hdr[PCX_PAL + 4 + i] > 200); } settings->pal[0] = def_pal[hdr[PCX_PAL] >> 4]; for (i = 1 , idx *= 3; i < 4; i++) settings->pal[i] = def_pal[cga_pals[idx++]]; } /* VGA palette - read from file */ else if (cols == 256) { if ((fseek(fp, -769, SEEK_END) < 0) || (fread(pbuf, 1, 769, fp) < 769) || (pbuf[0] != 0x0C)) goto fail; copy_rgb_pal(settings->pal, pbuf + 1, 256); } /* 8 or 16 colors - read from header */ else copy_rgb_pal(settings->pal, hdr + PCX_PAL, cols); /* If palette is all we need */ res = 1; if ((settings->mode == FS_PALETTE_LOAD) || (settings->mode == FS_PALETTE_DEF)) goto fail; } /* Allocate buffer and image */ settings->width = w = GET16(hdr + PCX_X1) - GET16(hdr + PCX_X0) + 1; settings->height = h = GET16(hdr + PCX_Y1) - GET16(hdr + PCX_Y0) + 1; settings->bpp = bpp; buflen = GET16(hdr + PCX_LINELEN); res = -1; if (buflen < ((w * bits + 7) >> 3)) goto fail; /* To accommodate bitparser's extra step */ buf = malloc(PCX_BUFSIZE + buflen + 1); res = FILE_MEM_ERROR; if (!buf) goto fail; row = buf + PCX_BUFSIZE; if ((res = allocate_image(settings, ftype > 6 ? CMASK_RGBA : CMASK_IMAGE))) goto fail2; /* Read and decode the file */ if (!settings->silent) ls_init("PCX", 0); res = FILE_LIB_ERROR; fseek(fp, PCX_HSIZE, SEEK_SET); dest = settings->img[CHN_IMAGE]; if (bits == 1) memset(dest, 0, w * h); // Write will be by OR y = plane = ccnt = 0; bstart = bstop = PCX_BUFSIZE; strl = buflen; while (TRUE) { unsigned char v; /* Keep the buffer filled */ if (bstart >= bstop) { bstart -= bstop; bstop = fread(buf, 1, PCX_BUFSIZE, fp); if (bstop <= bstart) goto fail3; /* Truncated file */ } /* Decode data */ v = buf[bstart]; if (ccnt) /* Middle of a run */ { int l = strl < ccnt ? strl : ccnt; memset(row + buflen - strl, v, l); strl -= l; ccnt -= l; } else if (v >= 0xC0) /* Start of a run */ { ccnt = v & 0x3F; bstart++; } else row[buflen - strl--] = v; bstart += !ccnt; if (strl) continue; /* Store a line */ if (bits == 1) // N planes of 1-bit data (MSB first) { unsigned char uninit_(v), *tmp = row; int i, n = 7 - plane; for (i = 0; i < w; i++ , v += v) { if (!(i & 7)) v = *tmp++; dest[i] |= (v & 0x80) >> n; } } else if (plane < 3) // BPP planes of 2/4/8-bit data (MSB first) stream_MSB(row, dest + plane, w, bits, 0, bits, bpp); else if (settings->img[CHN_ALPHA]) // 8-bit alpha plane memcpy(settings->img[CHN_ALPHA] + y * w, row, w); if (++plane >= planes) { ls_progress(settings, y, 10); if (++y >= h) break; dest += w * bpp; plane = 0; } strl = buflen; } res = 1; fail3: if (!settings->silent) progress_end(); fail2: free(buf); fail: fclose(fp); return (res); } static int save_pcx(char *file_name, ls_settings *settings) { unsigned char *buf, *src, *dest; FILE *fp; int w = settings->width, h = settings->height, bpp = settings->bpp; int i, l, plane, cnt; /* Allocate buffer */ i = w * 2; // Buffer one plane, with worst-case RLE expansion factor 2 if (i < PCX_HSIZE) i = PCX_HSIZE; if (i < 769) i = 769; // For palette buf = calloc(1, i); // Zeroing out is for header if (!buf) return (-1); if (!(fp = fopen(file_name, "wb"))) { free(buf); return (-1); } /* Prepare header */ memcpy(buf, "\x0A\x05\x01\x08", 4); // Version 5 PCX, 8 bits/plane PUT16(buf + PCX_X1, w - 1); PUT16(buf + PCX_Y1, h - 1); PUT16(buf + PCX_HDPI, 300); // GIMP sets DPI to this value PUT16(buf + PCX_VDPI, 300); buf[PCX_NPLANES] = bpp; PUT16(buf + PCX_LINELEN, w); buf[PCX_PALTYPE] = 1; fwrite(buf, 1, PCX_HSIZE, fp); /* Compress & write pixel rows */ if (!settings->silent) ls_init("PCX", 1); src = settings->img[CHN_IMAGE]; for (i = 0; i < h; i++ , src += w * bpp) { for (plane = 0; plane < bpp; plane++) { unsigned char v, *tmp = src + plane; dest = buf; cnt = 0; l = w; while (l > 0) { v = *tmp; tmp += bpp; cnt++; if ((--l <= 0) || (cnt == 0x3F) || (v != *tmp)) { if ((cnt > 1) || (v >= 0xC0)) *dest++ = cnt | 0xC0; *dest++ = v; cnt = 0; } } fwrite(buf, 1, dest - buf, fp); } ls_progress(settings, i, 20); } /* Write palette */ if (bpp == 1) { png_color *col = settings->pal; memset(dest = buf + 1, 0, 768); buf[0] = 0x0C; for (i = 0; i < settings->colors; i++ , dest += 3 , col++) { dest[0] = col->red; dest[1] = col->green; dest[2] = col->blue; } fwrite(buf, 1, 769, fp); } fclose(fp); if (!settings->silent) progress_end(); free(buf); return (0); } typedef void (*cvt_func)(unsigned char *dest, unsigned char *src, int len, int bpp, int step, int maxval); static void convert_16b(unsigned char *dest, unsigned char *src, int len, int bpp, int step, int maxval) { int i, v, m = maxval * 2; if (!(step -= bpp)) bpp *= len , len = 1; step *= 2; while (len-- > 0) { i = bpp; while (i--) { v = (src[0] << 8) + src[1]; src += 2; *dest++ = (v * (255 * 2) + maxval) / m; } src += step; } } static void copy_bytes(unsigned char *dest, unsigned char *src, int len, int bpp, int step, int maxval) { int i; if (!(step -= bpp)) bpp *= len , len = 1; while (len-- > 0) { i = bpp; while (i--) *dest++ = *src++; src += step; } } static void extend_bytes(unsigned char *dest, int len, int maxval) { unsigned char tb[256]; int i, j, m = maxval * 2; memset(tb, 255, 256); for (i = 0 , j = maxval; i <= maxval; i++ , j += 255 * 2) tb[i] = j / m; for (j = 0; j < len; j++ , dest++) *dest = tb[*dest]; } static int check_next_pnm(FILE *fp, char id) { char buf[2]; if (fread(buf, 2, 1, fp)) { fseek(fp, -2, SEEK_CUR); if ((buf[0] == 'P') && (buf[1] == id)) return (FILE_HAS_FRAMES); } return (1); } /* PAM loader does not support nonstandard types "GRAYSCALEFP" and "RGBFP", * because handling format variations which aren't found in the wild * is a waste of code - WJ */ static int load_pam_frame(FILE *fp, ls_settings *settings) { static const char *typenames[] = { "BLACKANDWHITE", "BLACKANDWHITE_ALPHA", "GRAYSCALE", "GRAYSCALE_ALPHA", "RGB", "RGB_ALPHA", "CMYK", "CMYK_ALPHA" }; static const char depths[] = { 1, 2, 1, 2, 3, 4, 4, 5 }; cvt_func cvt_stream; char wbuf[512], *t1, *t2, *tail; unsigned char *dest, *buf = NULL; int maxval = 0, w = 0, h = 0, depth = 0, ftype = -1; int i, j, l, ll, bpp, trans, vl, res; /* Read header */ if (!fgets(wbuf, sizeof(wbuf), fp) || strncmp(wbuf, "P7", 2)) return (-1); while (TRUE) { if (!fgets(wbuf, sizeof(wbuf), fp)) return (-1); if (!wbuf[0] || (wbuf[0] == '#')) continue; // Empty line or comment t2 = NULL; t1 = wbuf + strspn(wbuf, WHITESPACE); l = strcspn(t1, WHITESPACE); if (t1[l]) { t2 = t1 + l + strspn(t1 + l, WHITESPACE); t2[strcspn(t2, WHITESPACE)] = '\0'; } t1[l] = '\0'; if (!strcmp(t1, "ENDHDR")) break; if (!strcmp(t1, "TUPLTYPE")) { if (!t2) continue; for (i = 1; typenames[i]; i++) { if (strcmp(t2, typenames[i])) continue; ftype = i; break; } continue; } if (!t2) return (-1); // Failure - other fields are numeric i = strtol(t2, &tail, 10); if (*tail) return (-1); if (!strcmp(t1, "HEIGHT")) h = i; else if (!strcmp(t1, "WIDTH")) w = i; else if (!strcmp(t1, "DEPTH")) depth = i; else if (!strcmp(t1, "MAXVAL")) maxval = i; else return (-1); // Unknown IDs not allowed } /* Interpret unknown content as RGB or grayscale */ if (ftype < 0) ftype = depth >= 3 ? 4 : 2; /* Validate */ if ((depth < depths[ftype]) || (depth > 16) || (maxval < 1) || (maxval > 65535)) return (-1); bpp = ftype < 4 ? 1 : 3; trans = ftype & 1; vl = maxval < 256 ? 1 : 2; ll = w * depth * vl; if (ftype < 2) // BW { set_bw(settings); if (maxval > 1) return (-1); } else if (bpp == 1) set_gray(settings); // Grayscale /* Allocate row buffer if cannot read directly into image */ if (trans || (vl > 1) || (bpp != depth)) { buf = malloc(ll); if (!buf) return (FILE_MEM_ERROR); } /* Allocate image */ settings->width = w; settings->height = h; settings->bpp = bpp; res = allocate_image(settings, trans ? CMASK_RGBA : CMASK_IMAGE); if (res) goto fail; /* Read the image */ if (!settings->silent) ls_init("PAM", 0); res = FILE_LIB_ERROR; cvt_stream = vl > 1 ? convert_16b : copy_bytes; for (i = 0; i < h; i++) { dest = buf ? buf : settings->img[CHN_IMAGE] + ll * i; j = fread(dest, 1, ll, fp); if (j < ll) goto fail2; ls_progress(settings, i, 10); if (!buf) continue; // Nothing else to do here if (settings->img[CHN_ALPHA]) // Have alpha - parse it { cvt_stream(settings->img[CHN_ALPHA] + w * i, buf + depths[ftype] * vl - vl, w, 1, depth, maxval); } dest = settings->img[CHN_IMAGE] + w * bpp * i; if (ftype >= 6) // CMYK { cvt_stream(buf, buf, w, 4, depth, maxval); if (maxval < 255) extend_bytes(buf, w * 4, maxval); cmyk2rgb(dest, buf, w, FALSE, settings); } else cvt_stream(dest, buf, w, bpp, depth, maxval); } /* Check for next frame */ res = check_next_pnm(fp, '7'); fail2: if (maxval < 255) // Extend what we've read { j = w * h; if (settings->img[CHN_ALPHA]) extend_bytes(settings->img[CHN_ALPHA], j, maxval); j *= bpp; dest = settings->img[CHN_IMAGE]; if (ftype >= 6); // CMYK is done already else if (ftype > 1) extend_bytes(dest, j, maxval); else // Convert BW from 1-is-white to 1-is-black { for (i = 0; i < j; i++ , dest++) *dest = !*dest; } } if (!settings->silent) progress_end(); fail: free(buf); return (res); } #define PNM_BUFSIZE 4096 typedef struct { FILE *f; int ptr, end, eof, comment; char buf[PNM_BUFSIZE + 2]; } pnmbuf; /* What PBM documentation says is NOT what Netpbm actually does; skipping a * comment in file header, it does not consume the newline after it - WJ */ static void pnm_skip_comment(pnmbuf *pnm) { pnm->comment = !pnm->buf[pnm->ptr += strcspn(pnm->buf + pnm->ptr, "\r\n")]; } static char *pnm_gets(pnmbuf *pnm, int data) { int k, l; while (TRUE) { while (pnm->ptr < pnm->end) { l = pnm->ptr + strspn(pnm->buf + pnm->ptr, WHITESPACE); if (pnm->buf[l] == '#') { if (data) return (NULL); pnm->ptr = l; pnm_skip_comment(pnm); continue; } k = l + strcspn(pnm->buf + l, WHITESPACE "#"); if (pnm->buf[k] || pnm->eof) { pnm->ptr = k + 1; if (pnm->buf[k] == '#') { if (data) return (NULL); pnm_skip_comment(pnm); } pnm->buf[k] = '\0'; return (pnm->buf + l); } memmove(pnm->buf, pnm->buf + l, pnm->end -= l); pnm->ptr = 0; break; } if (pnm->eof) return (NULL); if (pnm->ptr >= pnm->end) pnm->ptr = pnm->end = 0; l = PNM_BUFSIZE - pnm->end; if (l <= 0) return (NULL); // A "token" of 4096 chars means failure pnm->end += k = fread(pnm->buf + pnm->end, 1, l, pnm->f); pnm->eof = k < l; if (pnm->comment) pnm_skip_comment(pnm); } } static int pnm_endhdr(pnmbuf *pnm, int plain) { while (pnm->comment) { pnm_skip_comment(pnm); if (!pnm->comment) break; if (pnm->eof) return (FALSE); pnm->end = fread(pnm->buf, 1, PNM_BUFSIZE, pnm->f); pnm->eof = pnm->end < PNM_BUFSIZE; } /* Last whitespace in header already got consumed while parsing */ /* Buffer will remain in use in plain mode */ if (!plain && (pnm->ptr < pnm->end)) fseek(pnm->f, pnm->ptr - pnm->end, SEEK_CUR); return (TRUE); } static int load_pnm_frame(FILE *fp, ls_settings *settings) { pnmbuf pnm; char *s, *tail; unsigned char *dest; int i, l, m, w, h, bpp, maxval, plain, mode, fid, res; /* Identify*/ memset(&pnm, 0, sizeof(pnm)); pnm.f = fp; fid = settings->ftype == FT_PBM ? 0 : settings->ftype == FT_PGM ? 1 : 2; if (!(s = pnm_gets(&pnm, FALSE))) return (-1); if ((s[0] != 'P') || ((s[1] != fid + '1') && (s[1] != fid + '4'))) return (-1); plain = s[1] < '4'; /* Read header */ if (!(s = pnm_gets(&pnm, FALSE))) return (-1); w = strtol(s, &tail, 10); if (*tail) return (-1); if (!(s = pnm_gets(&pnm, FALSE))) return (-1); h = strtol(s, &tail, 10); if (*tail) return (-1); bpp = maxval = 1; if (settings->ftype == FT_PBM) set_bw(settings); else { if (!(s = pnm_gets(&pnm, FALSE))) return (-1); maxval = strtol(s, &tail, 10); if (*tail) return (-1); if ((maxval <= 0) || (maxval > 65535)) return (-1); if (settings->ftype == FT_PGM) set_gray(settings); else bpp = 3; } if (!pnm_endhdr(&pnm, plain)) return (-1); /* Store values */ settings->width = w; settings->height = h; settings->bpp = bpp; /* Allocate image */ if ((res = allocate_image(settings, CMASK_IMAGE))) return (res); /* Now, read the image */ mode = settings->ftype == FT_PBM ? plain /* 0 and 1 */ : plain ? 2 : maxval < 255 ? 3 : maxval > 255 ? 4 : 5; s = ""; if (!settings->silent) ls_init("PNM", 0); res = FILE_LIB_ERROR; l = w * bpp; m = maxval * 2; for (i = 0; i < h; i++) { dest = settings->img[CHN_IMAGE] + l * i; switch (mode) { case 0: /* Raw packed bits */ { #if PNM_BUFSIZE * 8 < MAX_WIDTH #error "Buffer too small to read PBM row all at once" #endif int i, j, k; unsigned char *tp = pnm.buf; k = (w + 7) >> 3; j = fread(tp, 1, k, fp); for (i = 0; i < w; i++) *dest++ = (tp[i >> 3] >> (~i & 7)) & 1; if (j < k) goto fail2; break; } case 3: /* Raw byte values - extend later */ case 5: /* Raw 0..255 values - trivial */ if (fread(dest, 1, l, fp) < l) goto fail2; break; case 1: /* Chars "0" and "1" */ { int i; unsigned char ch; for (i = 0; i < l; i++) { if (!s[0] && !(s = pnm_gets(&pnm, TRUE))) goto fail2; ch = *s++ - '0'; if (ch > 1) goto fail2; *dest++ = ch; } break; } case 2: /* Integers in ASCII */ { int i, n; for (i = 0; i < l; i++) { if (!(s = pnm_gets(&pnm, TRUE))) goto fail2; n = strtol(s, &tail, 10); if (*tail) goto fail2; if ((n < 0) || (n > maxval)) goto fail2; n = (n * (255 * 2) + maxval) / m; *dest++ = n; } break; } case 4: /* Raw ushorts in MSB order */ { int i, j, k, ll; for (ll = l * 2; ll > 0; ll -= k) { k = PNM_BUFSIZE < ll ? PNM_BUFSIZE : ll; j = fread(pnm.buf, 1, k, fp); i = j >> 1; convert_16b(dest, pnm.buf, i, 1, 1, maxval); dest += i; if (j < k) goto fail2; } break; } } ls_progress(settings, i, 10); } res = 1; /* Check for next frame */ if (!plain) res = check_next_pnm(fp, fid + '4'); fail2: if (mode == 3) // Extend what we've read extend_bytes(settings->img[CHN_IMAGE], l * h, maxval); if (!settings->silent) progress_end(); return (res); } static int load_pnm_frames(char *file_name, ani_settings *ani) { FILE *fp; ls_settings w_set; int res, is_pam = ani->settings.ftype == FT_PAM, next = TRUE; if (!(fp = fopen(file_name, "rb"))) return (-1); while (next) { res = FILE_TOO_LONG; if (!check_next_frame(&ani->fset, ani->settings.mode, FALSE)) goto fail; w_set = ani->settings; res = (is_pam ? load_pam_frame : load_pnm_frame)(fp, &w_set); next = res == FILE_HAS_FRAMES; if ((res != 1) && !next) goto fail; res = process_page_frame(file_name, ani, &w_set); if (res) goto fail; } res = 1; fail: fclose(fp); return (res); } static int load_pnm(char *file_name, ls_settings *settings) { FILE *fp; int res; if (!(fp = fopen(file_name, "rb"))) return (-1); res = (settings->ftype == FT_PAM ? load_pam_frame : load_pnm_frame)(fp, settings); fclose(fp); return (res); } static int save_pbm(char *file_name, ls_settings *settings) { unsigned char buf[MAX_WIDTH / 8], *src; FILE *fp; int i, j, l, w = settings->width, h = settings->height; if ((settings->bpp != 1) || (settings->colors > 2)) return WRONG_FORMAT; if (!(fp = fopen(file_name, "wb"))) return (-1); if (!settings->silent) ls_init("PBM", 1); fprintf(fp, "P4\n%d %d\n", w, h); /* Write rows */ src = settings->img[CHN_IMAGE]; l = (w + 7) >> 3; for (i = 0; i < h; i++) { memset(buf, 0, l); for (j = 0; j < w; j++) buf[j >> 3] |= (*src++ == 1) << (~j & 7); fwrite(buf, l, 1, fp); ls_progress(settings, i, 20); } fclose(fp); if (!settings->silent) progress_end(); return (0); } static int save_ppm(char *file_name, ls_settings *settings) { FILE *fp; int i, l, m, w = settings->width, h = settings->height; if (settings->bpp != 3) return WRONG_FORMAT; if (!(fp = fopen(file_name, "wb"))) return (-1); if (!settings->silent) ls_init("PPM", 1); fprintf(fp, "P6\n%d %d\n255\n", w, h); /* Write rows */ m = (l = w * 3) * h; // Write entire file at once if no progressbar if (settings->silent) l = m; for (i = 0; m > 0; m -= l , i++) { fwrite(settings->img[CHN_IMAGE] + l * i, l, 1, fp); ls_progress(settings, i, 20); } fclose(fp); if (!settings->silent) progress_end(); return (0); } static int save_pam(char *file_name, ls_settings *settings) { unsigned char xv, xa, *dest, *src, *srca, *buf = NULL; FILE *fp; int ibpp = settings->bpp, w = settings->width, h = settings->height; int i, j, bpp; if ((ibpp != 3) && (settings->colors > 2)) return WRONG_FORMAT; bpp = ibpp + !!settings->img[CHN_ALPHA]; /* For BW: image XOR 1, alpha AND 1 */ xa = (xv = ibpp == 1) ? 1 : 255; if (bpp != 3) // BW needs inversion, and alpha, interlacing { buf = malloc(w * bpp); if (!buf) return (-1); } if (!(fp = fopen(file_name, "wb"))) { free(buf); return (-1); } if (!settings->silent) ls_init("PAM", 1); fprintf(fp, "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\n" "TUPLTYPE %s%s\nENDHDR\n", w, h, bpp, ibpp == 1 ? 1 : 255, ibpp == 1 ? "BLACKANDWHITE" : "RGB", bpp > ibpp ? "_ALPHA" : ""); for (i = 0; i < h; i++) { src = settings->img[CHN_IMAGE] + i * w * ibpp; if ((dest = buf)) { srca = NULL; if (settings->img[CHN_ALPHA]) srca = settings->img[CHN_ALPHA] + i * w; for (j = 0; j < w; j++) { *dest++ = *src++ ^ xv; if (ibpp > 1) { *dest++ = *src++; *dest++ = *src++; } if (srca) *dest++ = *srca++ & xa; } src = buf; } fwrite(src, 1, w * bpp, fp); ls_progress(settings, i, 20); } fclose(fp); if (!settings->silent) progress_end(); free(buf); return (0); } /* Put screenshots and X pixmaps on an equal footing with regular files */ #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 #include #include /* It's unclear who should free clipboard pixmaps and when, so I do the same * thing Qt does, destroying the next-to-last allocated pixmap each time a new * one is allocated - WJ */ static int save_pixmap(ls_settings *settings, memFILE *mf) { static GdkPixmap *exported[2]; unsigned char *src, *dest, *sel, *buf = NULL; int i, j, l, w = settings->width, h = settings->height; /* !!! Pixmap export used only for FS_CLIPBOARD, where the case of * selection without alpha is already prevented */ if ((settings->bpp == 1) || settings->img[CHN_ALPHA]) { buf = malloc(w * 3); if (!buf) return (-1); } if (exported[0]) { if (exported[1]) { /* Someone might have destroyed the X pixmap already, * so get ready to live through an X error */ gdk_error_trap_push(); gdk_pixmap_unref(exported[1]); gdk_error_trap_pop(); } exported[1] = exported[0]; } exported[0] = gdk_pixmap_new(main_window->window, w, h, -1); if (!exported[0]) { free(buf); return (-1); } /* Plain RGB - copy it whole */ if (!buf) gdk_draw_rgb_image(exported[0], main_window->style->black_gc, 0, 0, w, h, GDK_RGB_DITHER_NONE, settings->img[CHN_IMAGE], w * 3); /* Something else - render & copy row by row */ else { l = w * settings->bpp; for (i = 0; i < h; i++) { src = settings->img[CHN_IMAGE] + l * i; dest = buf; if (settings->bpp == 3) memcpy(dest, src, l); else /* Indexed to RGB */ { png_color *pal = settings->pal; for (j = 0; j < w; j++ , dest += 3) { png_color *col = pal + *src++; dest[0] = col->red; dest[1] = col->green; dest[2] = col->blue; } } /* There is no way to send alpha to XPaint, so I use * alpha (and selection if any) to blend image with * white and send the result - WJ */ if (settings->img[CHN_ALPHA]) { src = settings->img[CHN_ALPHA] + w * i; sel = settings->img[CHN_SEL] ? settings->img[CHN_SEL] + w * i : NULL; dest = buf; for (j = 0; j < w; j++) { int ii, jj, k = *src++; if (sel) { k *= *sel++; k = (k + (k >> 8) + 1) >> 8; } for (ii = 0; ii < 3; ii++) { jj = 255 * 255 + (*dest - 255) * k; *dest++ = (jj + (jj >> 8) + 1) >> 8; } } } gdk_draw_rgb_image(exported[0], main_window->style->black_gc, 0, i, w, 1, GDK_RGB_DITHER_NONE, buf, w * 3); } } free(buf); /* !!! '(void *)' is there to make GCC 4 shut up - WJ */ *(Pixmap *)(void *)&mf->buf = GDK_WINDOW_XWINDOW(exported[0]); mf->top = sizeof(Pixmap); return (0); } #else /* Pixmap export fails by definition in absence of X */ #define save_pixmap(A,B) (-1) #endif static int load_pixmap(char *pixmap_id, ls_settings *settings) { #if GTK_MAJOR_VERSION == 1 GdkWindow *mainwin = (GdkWindow *)&gdk_root_parent; #else /* #if GTK_MAJOR_VERSION == 2 */ GdkWindow *mainwin = gdk_get_default_root_window(); #endif int w, h, res = -1; if (pixmap_id) // Pixmap by ID { /* This ugly code imports X Window System's pixmaps; this allows mtPaint to * receive images from programs such as XPaint */ #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 GdkPixmap *pm; int d, dd; gdk_error_trap_push(); // No guarantee that we got a valid pixmap pm = gdk_pixmap_foreign_new(*(Pixmap *)pixmap_id); gdk_error_trap_pop(); // The above call returns NULL on failure anyway if (!pm) return (-1); dd = gdk_visual_get_system()->depth; #if GTK_MAJOR_VERSION == 1 gdk_window_get_geometry(pm, NULL, NULL, &w, &h, &d); #else /* #if GTK_MAJOR_VERSION == 2 */ gdk_drawable_get_size(pm, &w, &h); d = gdk_drawable_get_depth(pm); #endif settings->width = w; settings->height = h; settings->bpp = 3; if ((d == 1) || (d == dd)) res = allocate_image(settings, CMASK_IMAGE); if (!res) res = wj_get_rgb_image(d == 1 ? NULL : mainwin, pm, settings->img[CHN_IMAGE], 0, 0, w, h) ? 1 : -1; #if GTK_MAJOR_VERSION == 1 /* Don't let gdk_pixmap_unref() destroy another process's pixmap - * implement freeing the GdkPixmap structure here instead */ gdk_xid_table_remove(((GdkWindowPrivate *)pm)->xwindow); g_dataset_destroy(pm); g_free(pm); #else /* #if GTK_MAJOR_VERSION == 2 */ gdk_pixmap_unref(pm); #endif #endif } else // NULL means a screenshot { w = settings->width = gdk_screen_width(); h = settings->height = gdk_screen_height(); settings->bpp = 3; res = allocate_image(settings, CMASK_IMAGE); if (!res) res = wj_get_rgb_image(mainwin, NULL, settings->img[CHN_IMAGE], 0, 0, w, h) ? 1 : -1; } return (res); } /* Handle SVG import using gdk-pixbuf */ #if (GDK_PIXBUF_MAJOR > 2) || ((GDK_PIXBUF_MAJOR == 2) && (GDK_PIXBUF_MINOR >= 4)) #define MAY_HANDLE_SVG static int svg_ftype = -1; static int svg_supported() { GSList *tmp, *ff; int i, res = FALSE; ff = gdk_pixbuf_get_formats(); for (tmp = ff; tmp; tmp = tmp->next) { gchar **mime = gdk_pixbuf_format_get_mime_types(tmp->data); for (i = 0; mime[i]; i++) { res |= strstr(mime[i], "image/svg") == mime[i]; } g_strfreev(mime); if (res) break; } g_slist_free(ff); return (res); } static int load_svg(char *file_name, ls_settings *settings) { GdkPixbuf *pbuf; GError *err = NULL; guchar *src; unsigned char *dest, *dsta; int i, j, w, h, bpp, cmask, skip, res = -1; #if (GDK_PIXBUF_MAJOR == 2) && (GDK_PIXBUF_MINOR < 8) /* 2.4 can constrain size only while preserving aspect ratio; * 2.6 can constrain size fully, but not partially */ if (settings->req_w && settings->req_h) pbuf = gdk_pixbuf_new_from_file_at_scale(file_name, settings->req_w, settings->req_h, FALSE, &err); else pbuf = gdk_pixbuf_new_from_file(file_name, &err); #else /* 2.8+ is full-featured */ pbuf = gdk_pixbuf_new_from_file_at_scale(file_name, settings->req_w ? settings->req_w : -1, settings->req_h ? settings->req_h : -1, !(settings->req_w && settings->req_h), &err); #endif if (!pbuf) { if ((err->domain == GDK_PIXBUF_ERROR) && (err->code == GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY)) res = FILE_MEM_ERROR; g_error_free(err); return (res); } /* Prevent images loading wrong in case gdk-pixbuf ever starts using * something other than 8-bit RGB/RGBA without me noticing - WJ */ if (gdk_pixbuf_get_bits_per_sample(pbuf) != 8) goto fail; bpp = gdk_pixbuf_get_n_channels(pbuf); if (bpp == 4) cmask = CMASK_RGBA; else if (bpp == 3) cmask = CMASK_IMAGE; else goto fail; settings->width = w = gdk_pixbuf_get_width(pbuf); settings->height = h = gdk_pixbuf_get_height(pbuf); settings->bpp = 3; if ((res = allocate_image(settings, cmask))) goto fail; skip = gdk_pixbuf_get_rowstride(pbuf) - w * bpp; src = gdk_pixbuf_get_pixels(pbuf); dest = settings->img[CHN_IMAGE]; dsta = settings->img[CHN_ALPHA]; for (i = 0; i < h; i++ , src += skip) for (j = 0; j < w; j++ , src += bpp , dest += 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; if (dsta) *dsta++ = src[3]; } res = 1; fail: g_object_unref(pbuf); return (res); } #endif /* Handle textual palette file formats - GIMP's GPL and mtPaint's own TXT */ static void to_pal(png_color *c, int *rgb) { c->red = rgb[0] < 0 ? 0 : rgb[0] > 255 ? 255 : rgb[0]; c->green = rgb[1] < 0 ? 0 : rgb[1] > 255 ? 255 : rgb[1]; c->blue = rgb[2] < 0 ? 0 : rgb[2] > 255 ? 255 : rgb[2]; } static int load_txtpal(char *file_name, ls_settings *settings) { char lbuf[4096]; FILE *fp; png_color *c = settings->pal; int i, rgb[3], n = 0, res = -1; if (!(fp = fopen(file_name, "r"))) return (-1); if (!fgets(lbuf, 4096, fp)) goto fail; if (settings->ftype == FT_GPL) { if (strstr(lbuf, "GIMP Palette") != lbuf) goto fail; while (fgets(lbuf, 4096, fp) && (n < 256)) { /* Just ignore invalid/unknown lines */ if (sscanf(lbuf, "%d %d %d", rgb + 0, rgb + 1, rgb + 2) != 3) continue; to_pal(c++, rgb); n++; } } else { if (sscanf(lbuf, "%i", &n) != 1) goto fail; /* No further validation of anything at all */ n = n < 2 ? 2 : n > 256 ? 256 : n; for (i = 0; i < n; i++) { fscanf(fp, "%i,%i,%i\n", rgb + 0, rgb + 1, rgb + 2); to_pal(c++, rgb); } } settings->colors = n; if (n > 0) res = 1; fail: fclose(fp); return (res); } static int save_txtpal(char *file_name, ls_settings *settings) { FILE *fp; char *tpl; png_color *cp; int i, l, n = settings->colors; if ((fp = fopen(file_name, "w")) == NULL) return (-1); if (settings->ftype == FT_GPL) // .gpl file { tpl = extract_ident(file_name, &l); if (!l) tpl = "mtPaint" , l = strlen("mtPaint"); fprintf(fp, "GIMP Palette\nName: %.*s\nColumns: 16\n#\n", l, tpl); tpl = "%3i %3i %3i\tUntitled\n"; } else // .txt file { fprintf(fp, "%i\n", n); tpl = "%i,%i,%i\n"; } cp = settings->pal; for (i = 0; i < n; i++ , cp++) fprintf(fp, tpl, cp->red, cp->green, cp->blue); fclose(fp); return (0); } static int save_image_x(char *file_name, ls_settings *settings, memFILE *mf) { ls_settings setw = *settings; // Make a copy to safely modify png_color greypal[256]; int res; /* Prepare to handle clipboard export */ if (setw.mode != FS_CLIPBOARD); // not export else if (setw.ftype & FTM_EXTEND) setw.mode = FS_CLIP_FILE; // to mtPaint else if (setw.img[CHN_SEL] && !setw.img[CHN_ALPHA]) { /* Pass clipboard mask as alpha if there is no alpha already */ setw.img[CHN_ALPHA] = setw.img[CHN_SEL]; setw.img[CHN_SEL] = NULL; } setw.ftype &= FTM_FTYPE; /* Provide a grayscale palette if needed */ if ((setw.bpp == 1) && !setw.pal) mem_bw_pal(setw.pal = greypal, 0, 255); /* Validate transparent color (for now, forbid out-of-palette RGB * transparency altogether) */ if (setw.xpm_trans >= setw.colors) setw.xpm_trans = setw.rgb_trans = -1; switch (setw.ftype) { default: case FT_PNG: res = save_png(file_name, &setw, mf); break; #ifdef U_JPEG case FT_JPEG: res = save_jpeg(file_name, &setw); break; #endif #ifdef HANDLE_JP2 case FT_JP2: case FT_J2K: res = save_jpeg2000(file_name, &setw); break; #endif #ifdef U_TIFF case FT_TIFF: res = save_tiff(file_name, &setw); break; #endif #ifdef U_GIF case FT_GIF: res = save_gif(file_name, &setw); break; #endif case FT_BMP: res = save_bmp(file_name, &setw, mf); break; case FT_XPM: res = save_xpm(file_name, &setw); break; case FT_XBM: res = save_xbm(file_name, &setw); break; case FT_LSS: res = save_lss(file_name, &setw); break; case FT_TGA: res = save_tga(file_name, &setw); break; case FT_PCX: res = save_pcx(file_name, &setw); break; case FT_PBM: res = save_pbm(file_name, &setw); break; case FT_PPM: res = save_ppm(file_name, &setw); break; case FT_PAM: res = save_pam(file_name, &setw); break; case FT_PIXMAP: res = save_pixmap(&setw, mf); break; /* Palette files */ case FT_GPL: case FT_TXT: res = save_txtpal(file_name, &setw); break; /* !!! Not implemented yet */ // case FT_PAL: } return (res); } int save_image(char *file_name, ls_settings *settings) { return (save_image_x(file_name, settings, NULL)); } int save_mem_image(unsigned char **buf, int *len, ls_settings *settings) { memFILE mf; int res; memset(&mf, 0, sizeof(mf)); if ((settings->ftype & FTM_FTYPE) == FT_PIXMAP) { /* !!! Evil hack: we abuse memFILE struct, storing pixmap XID * in buffer pointer, and then copy it into passed-in buffer * pointer - WJ */ res = save_image_x(NULL, settings, &mf); if (!res) *buf = mf.buf , *len = mf.top; return (res); } if (!(file_formats[settings->ftype & FTM_FTYPE].flags & FF_WMEM)) return (-1); mf.buf = malloc(mf.size = 0x4000 - 64); /* Be silent when saving to memory */ settings->silent = TRUE; res = save_image_x(NULL, settings, &mf); if (res) free(mf.buf); else *buf = mf.buf , *len = mf.top; return (res); } static void store_image_extras(image_info *image, image_state *state, ls_settings *settings) { #if U_LCMS /* Apply ICC profile */ while ((settings->icc_size > 0) && (settings->bpp == 3)) { cmsHPROFILE from, to; cmsHTRANSFORM how = NULL; int l = settings->icc_size - sizeof(icHeader); unsigned char *iccdata = settings->icc + sizeof(icHeader); /* Do nothing if the profile seems to be the default sRGB one */ if ((l == 3016) && (hashf(HASHSEED, iccdata, l) == 0xBA0A8E52UL) && (hashf(HASH_RND(HASHSEED), iccdata, l) == 0x94C42C77UL)) break; from = cmsOpenProfileFromMem((void *)settings->icc, settings->icc_size); to = cmsCreate_sRGBProfile(); if (from && (cmsGetColorSpace(from) == icSigRgbData)) how = cmsCreateTransform(from, TYPE_RGB_8, to, TYPE_RGB_8, INTENT_PERCEPTUAL, 0); if (how) { unsigned char *img = settings->img[CHN_IMAGE]; size_t l = settings->width, sz = l * settings->height; int i, j; if (!settings->silent) progress_init(_("Applying colour profile"), 1); else if (sz < UINT_MAX) l = sz; j = sz / l; for (i = 0; i < j; i++ , img += l * 3) { if (!settings->silent && ((i * 20) % j >= j - 20)) if (progress_update((float)i / j)) break; cmsDoTransform(how, img, img, l); } progress_end(); cmsDeleteTransform(how); } if (from) cmsCloseProfile(from); cmsCloseProfile(to); break; } #endif // !!! Changing any values is frequently harmful in this mode, so don't do it if (settings->mode == FS_CHANNEL_LOAD) return; /* Stuff RGB transparency into color 255 */ if ((settings->rgb_trans >= 0) && (settings->bpp == 3)) { int i; // Look for transparent colour in palette for (i = 0; i < settings->colors; i++) { if (PNG_2_INT(settings->pal[i]) == settings->rgb_trans) break; } if (i < settings->colors) settings->xpm_trans = i; else { // Colour not in palette so force it into last entry settings->pal[255].red = INT_2_R(settings->rgb_trans); settings->pal[255].green = INT_2_G(settings->rgb_trans); settings->pal[255].blue = INT_2_B(settings->rgb_trans); settings->xpm_trans = 255; settings->colors = 256; } } /* Accept vars which make sense */ state->xbm_hot_x = settings->hot_x; state->xbm_hot_y = settings->hot_y; preserved_gif_delay = settings->gif_delay; /* Accept palette */ image->trans = settings->xpm_trans; mem_pal_copy(image->pal, settings->pal); image->cols = settings->colors; } static int load_image_x(char *file_name, memFILE *mf, int mode, int ftype) { layer_image *lim = NULL; png_color pal[256]; ls_settings settings; int i, tr, res, res0, undo = ftype & FTM_UNDO; /* Clipboard import - from mtPaint, or from something other? */ if ((mode == FS_CLIPBOARD) && (ftype & FTM_EXTEND)) mode = FS_CLIP_FILE; ftype &= FTM_FTYPE; /* Prepare layer slot */ if (mode == FS_LAYER_LOAD) { lim = layer_table[layers_total].image; if (!lim) lim = layer_table[layers_total].image = alloc_layer(0, 0, 1, 0, NULL); else if (layers_total) mem_free_image(&lim->image_, FREE_IMAGE); if (!lim) return (FILE_MEM_ERROR); } init_ls_settings(&settings, NULL); #ifdef U_LCMS /* Set size to -1 when we don't want color profile */ if (!apply_icc || ((mode == FS_CHANNEL_LOAD) ? (MEM_BPP != 3) : (mode != FS_PNG_LOAD) && (mode != FS_LAYER_LOAD))) settings.icc_size = -1; #endif /* 0th layer load is just an image load */ if ((mode == FS_LAYER_LOAD) && !layers_total) mode = FS_PNG_LOAD; settings.mode = mode; settings.ftype = ftype; settings.pal = pal; /* Clear hotspot & transparency */ settings.hot_x = settings.hot_y = -1; settings.xpm_trans = settings.rgb_trans = -1; /* Be silent if working from memory */ if (mf) settings.silent = TRUE; /* !!! Use default palette - for now */ mem_pal_copy(pal, mem_pal_def); settings.colors = mem_pal_def_i; switch (ftype) { default: case FT_PNG: res0 = load_png(file_name, &settings, mf); break; #ifdef U_GIF case FT_GIF: res0 = load_gif(file_name, &settings); break; #endif #ifdef U_JPEG case FT_JPEG: res0 = load_jpeg(file_name, &settings); break; #endif #ifdef HANDLE_JP2 case FT_JP2: case FT_J2K: res0 = load_jpeg2000(file_name, &settings); break; #endif #ifdef U_TIFF case FT_TIFF: res0 = load_tiff(file_name, &settings); break; #endif case FT_BMP: res0 = load_bmp(file_name, &settings, mf); break; case FT_XPM: res0 = load_xpm(file_name, &settings); break; case FT_XBM: res0 = load_xbm(file_name, &settings); break; case FT_LSS: res0 = load_lss(file_name, &settings); break; case FT_TGA: res0 = load_tga(file_name, &settings); break; case FT_PCX: res0 = load_pcx(file_name, &settings); break; case FT_PBM: case FT_PGM: case FT_PPM: case FT_PAM: res0 = load_pnm(file_name, &settings); break; case FT_PIXMAP: res0 = load_pixmap(file_name, &settings); break; #ifdef MAY_HANDLE_SVG case FT_SVG: res0 = load_svg(file_name, &settings); break; #endif /* Palette files */ case FT_GPL: case FT_TXT: res0 = load_txtpal(file_name, &settings); break; /* !!! Not implemented yet */ // case FT_PAL: } /* Consider animated GIF a success */ res = res0 == FILE_HAS_FRAMES ? 1 : res0; switch (mode) { case FS_PNG_LOAD: /* Image */ /* Success, or lib failure with single image - commit load */ if ((res == 1) || (!lim && (res == FILE_LIB_ERROR))) { if (!mem_img[CHN_IMAGE] || !undo) mem_new(settings.width, settings.height, settings.bpp, 0); else undo_next_core(UC_DELETE, settings.width, settings.height, settings.bpp, CMASK_ALL); memcpy(mem_img, settings.img, sizeof(chanlist)); store_image_extras(&mem_image, &mem_state, &settings); update_undo(&mem_image); mem_undo_prepare(); if (lim) layer_copy_from_main(0); /* Report whether the file is animated */ res = res0; } /* Failure */ else { mem_free_chanlist(settings.img); /* If loader managed to delete image before failing */ if (!mem_img[CHN_IMAGE]) create_default_image(); } break; case FS_CLIPBOARD: /* Imported clipboard */ if ((res == 1) && mem_clip_alpha && !mem_clip_mask) { /* "Alpha" likely means clipboard mask here */ mem_clip_mask = mem_clip_alpha; mem_clip_alpha = NULL; memcpy(settings.img, mem_clip.img, sizeof(chanlist)); } /* Fallthrough */ case FS_CLIP_FILE: /* Clipboard */ /* Convert color transparency to alpha */ tr = settings.bpp == 3 ? settings.rgb_trans : settings.xpm_trans; if ((res == 1) && (tr >= 0)) { /* Add alpha channel if no alpha yet */ if (!settings.img[CHN_ALPHA]) { i = settings.width * settings.height; /* !!! Create committed */ mem_clip_alpha = malloc(i); if (mem_clip_alpha) { settings.img[CHN_ALPHA] = mem_clip_alpha; memset(mem_clip_alpha, 255, i); } } if (!settings.img[CHN_ALPHA]) res = FILE_MEM_ERROR; else mem_mask_colors(settings.img[CHN_ALPHA], settings.img[CHN_IMAGE], 0, settings.width, settings.height, settings.bpp, tr, tr); } /* Success - accept data */ if (res == 1); /* !!! Clipboard data committed already */ /* Failure needing rollback */ else if (settings.img[CHN_IMAGE]) { /* !!! Too late to restore previous clipboard */ mem_free_image(&mem_clip, FREE_ALL); } break; case FS_CHANNEL_LOAD: /* Success - commit load */ if (res == 1) { /* Add frame & stuff data into it */ undo_next_core(UC_DELETE, mem_width, mem_height, mem_img_bpp, CMASK_CURR); mem_img[mem_channel] = settings.img[CHN_IMAGE]; update_undo(&mem_image); if (mem_channel == CHN_IMAGE) store_image_extras(&mem_image, &mem_state, &settings); mem_undo_prepare(); } /* Failure */ else free(settings.img[CHN_IMAGE]); break; case FS_LAYER_LOAD: /* Layer */ /* Success - commit load */ if (res == 1) { mem_alloc_image(0, &lim->image_, settings.width, settings.height, settings.bpp, 0, NULL); memcpy(lim->image_.img, settings.img, sizeof(chanlist)); store_image_extras(&lim->image_, &lim->state_, &settings); update_undo(&lim->image_); } /* Failure */ else mem_free_chanlist(settings.img); break; case FS_PATTERN_LOAD: /* Success - rebuild patterns */ if ((res == 1) && (settings.colors == 2)) set_patterns(settings.img[CHN_IMAGE]); free(settings.img[CHN_IMAGE]); break; case FS_PALETTE_LOAD: case FS_PALETTE_DEF: /* Drop image channels if any */ mem_free_chanlist(settings.img); /* This "failure" in this context serves as shortcut */ if (res == EXPLODE_FAILED) res = 1; /* Failure - do nothing */ // !!! In case of _image_ format here, re-recognize as palette and retry if ((res != 1) || (settings.colors <= 0)); /* Replace default palette */ else if (mode == FS_PALETTE_DEF) { mem_pal_copy(mem_pal_def, pal); mem_pal_def_i = settings.colors; } /* Change current palette */ else { mem_undo_next(UNDO_PAL); mem_pal_copy(mem_pal, pal); mem_cols = settings.colors; } break; } free(settings.icc); return (res); } int load_image(char *file_name, int mode, int ftype) { return (load_image_x(file_name, NULL, mode, ftype)); } int load_mem_image(unsigned char *buf, int len, int mode, int ftype) { memFILE mf; if ((ftype & FTM_FTYPE) == FT_PIXMAP) /* Special case: buf points to a pixmap ID */ return (load_image_x(buf, NULL, mode, ftype)); if (!(file_formats[ftype & FTM_FTYPE].flags & FF_RMEM)) return (-1); memset(&mf, 0, sizeof(mf)); mf.buf = buf; mf.top = mf.size = len; return (load_image_x(NULL, &mf, mode, ftype)); } // !!! The only allowed modes for now are FS_LAYER_LOAD and FS_EXPLODE_FRAMES static int load_frames_x(ani_settings *ani, int ani_mode, char *file_name, int mode, int ftype) { png_color pal[256]; ftype &= FTM_FTYPE; ani->mode = ani_mode; init_ls_settings(&ani->settings, NULL); ani->settings.mode = mode; ani->settings.ftype = ftype; ani->settings.pal = pal; /* Clear hotspot & transparency */ ani->settings.hot_x = ani->settings.hot_y = -1; ani->settings.xpm_trans = ani->settings.rgb_trans = -1; /* No load progressbar when exploding frames */ if (ani_mode == FS_EXPLODE_FRAMES) ani->settings.silent = TRUE; /* !!! Use default palette - for now */ mem_pal_copy(pal, mem_pal_def); ani->settings.colors = mem_pal_def_i; switch (ftype) { // case FT_PNG: return (load_apng_frames(file_name, ani)); #ifdef U_GIF case FT_GIF: return (load_gif_frames(file_name, ani)); #endif #ifdef U_TIFF case FT_TIFF: return (load_tiff_frames(file_name, ani)); #endif case FT_PBM: case FT_PGM: case FT_PPM: case FT_PAM: return (load_pnm_frames(file_name, ani)); } return (-1); } int load_frameset(frameset *frames, int ani_mode, char *file_name, int mode, int ftype) { ani_settings ani; int res; memset(&ani, 0, sizeof(ani_settings)); res = load_frames_x(&ani, ani_mode, file_name, mode, ftype); /* Treat out-of-memory error as fatal, to avoid worse things later */ if ((res == FILE_MEM_ERROR) || !ani.fset.cnt) mem_free_frames(&ani.fset); /* Pass too-many-frames error along */ else if (res == FILE_TOO_LONG); /* Consider all other errors partial failures */ else if (res != 1) res = FILE_LIB_ERROR; /* Just pass the frameset to the outside, for now */ *frames = ani.fset; return (res); } /* Write out the last frame to indexed sequence, and delete it */ static int write_out_frame(char *file_name, ani_settings *ani, ls_settings *f_set) { ls_settings w_set; image_frame *frame = ani->fset.frames + ani->fset.cnt - 1; char new_name[PATHBUF + 32], *tmp; int n, deftype = ani->desttype, res; /* Show progress, for unknown final count */ n = nextpow2(ani->cnt); if (n < 16) n = 16; progress_update((float)ani->cnt / n); tmp = strrchr(file_name, DIR_SEP); if (!tmp) tmp = file_name; else tmp++; file_in_dir(new_name, ani->destdir, tmp, PATHBUF); tmp = new_name + strlen(new_name); sprintf(tmp, ".%03d", ani->cnt); if (f_set) w_set = *f_set; else { init_ls_settings(&w_set, NULL); memcpy(w_set.img, frame->img, sizeof(chanlist)); w_set.width = frame->width; w_set.height = frame->height; w_set.pal = frame->pal ? frame->pal : ani->fset.pal; w_set.bpp = frame->bpp; w_set.colors = frame->cols; w_set.xpm_trans = frame->trans; } w_set.ftype = deftype; w_set.silent = TRUE; if (!(file_formats[deftype].flags & FF_SAVE_MASK_FOR(w_set))) { w_set.ftype = FT_PNG; ani->miss++; } w_set.mode = ani->mode; // Only FS_EXPLODE_FRAMES for now res = ani->error = save_image(new_name, &w_set); if (!res) ani->cnt++; if (f_set) // Delete { mem_free_chanlist(f_set->img); memset(f_set->img, 0, sizeof(chanlist)); } // Set for deletion else frame->flags |= FM_NUKE; return (res); } static void warn_miss(int miss, int total, int ftype) { char *txt = g_strdup_printf(_("%d out of %d frames could not be saved as %s - saved as PNG instead"), miss, total, file_formats[ftype].name); alert_box(_("Warning"), txt, NULL); g_free(txt); } int explode_frames(char *dest_path, int ani_mode, char *file_name, int ftype, int desttype) { ani_settings ani; int res; memset(&ani, 0, sizeof(ani_settings)); ani.desttype = desttype; ani.destdir = dest_path; progress_init(_("Explode frames"), 0); progress_update(0.0); res = load_frames_x(&ani, ani_mode, file_name, FS_EXPLODE_FRAMES, ftype); progress_update(1.0); if (res == 1); // Everything went OK else if (res == FILE_MEM_ERROR); // Report memory problem else if (ani.error) // Sequence write failure - soft or hard? res = ani.cnt ? FILE_EXP_BREAK : EXPLODE_FAILED; else if (ani.cnt) // Failed to read some middle frame res = FILE_LIB_ERROR; mem_free_frames(&ani.fset); progress_end(); if (ani.miss && (res == 1)) warn_miss(ani.miss, ani.cnt, ftype & FTM_FTYPE); return (res); } int export_undo(char *file_name, ls_settings *settings) { char new_name[PATHBUF + 32]; int start = mem_undo_done, res = 0, lenny, i, j; int deftype = settings->ftype, miss = 0; strncpy(new_name, file_name, PATHBUF); lenny = strlen( file_name ); ls_init("UNDO", 1); settings->silent = TRUE; for (j = 0; j < 2; j++) { for (i = 1; i <= start + 1; i++) { if (!res && (!j ^ (settings->mode == FS_EXPORT_UNDO))) { progress_update((float)i / (start + 1)); settings->ftype = deftype; if (!(file_formats[deftype].flags & FF_SAVE_MASK)) { settings->ftype = FT_PNG; miss++; } sprintf(new_name + lenny, "%03i.%s", i, file_formats[settings->ftype].ext); memcpy(settings->img, mem_img, sizeof(chanlist)); settings->pal = mem_pal; settings->width = mem_width; settings->height = mem_height; settings->bpp = mem_img_bpp; settings->colors = mem_cols; res = save_image(new_name, settings); } if (!j) /* Goto first image */ { if (mem_undo_done > 0) mem_undo_backward(); } else if (mem_undo_done < start) mem_undo_forward(); } } progress_end(); if (miss && !res) warn_miss(miss, mem_undo_done, deftype); return (res); } int export_ascii ( char *file_name ) { char ch[16] = " .,:;+=itIYVXRBM"; int i, j; unsigned char pix; FILE *fp; if ((fp = fopen(file_name, "w")) == NULL) return -1; for ( j=0; j= '1') && (buf[1] <= '6')) { static const unsigned char pnms[3] = { FT_PBM, FT_PGM, FT_PPM }; return (pnms[(buf[1] - '1') % 3]); } if (!memcmp(buf, "GIMP Palette", strlen("GIMP Palette"))) return (FT_GPL); /* Check layers signature and version */ if (!memcmp(buf, LAYERS_HEADER, strlen(LAYERS_HEADER))) { stop = strchr(buf, '\n'); if (!stop || (stop - buf > 32)) return (FT_NONE); i = atoi(++stop); if (i == 1) return (FT_LAYERS1); /* !!! Not implemented yet */ // if (i == 2) return (FT_LAYERS2); return (FT_NONE); } /* Assume generic XML is SVG */ i = 0; sscanf(buf, " 5) break; if (buf[1] > 1) return (FT_PCX); if (buf[2] != 1) break; /* Ambiguity - look at name as a last resort * Bias to PCX - TGAs usually have 0th byte = 0 */ stop = strrchr(name, '.'); if (!stop) return (FT_PCX); if (!strcasecmp(stop + 1, "tga")) break; return (FT_PCX); } /* Check if this is TGA */ if ((buf[1] < 2) && (buf[2] < 12) && ((1 << buf[2]) & 0x0E0F)) return (FT_TGA); /* Simple check for "txt" palette format */ if ((sscanf(buf, "%i", &i) == 1) && (i > 0) && (i <= 256)) return (FT_TXT); /* Simple check for XPM */ stop = strstr(buf, "XPM"); if (stop) { i = stop - buf; stop = strchr(buf, '\n'); if (!stop || (stop - buf > i)) return (FT_XPM); } /* Check possibility of XBM by absence of control chars */ for (i = 0; buf[i] && (buf[i] != '\n'); i++) { if (ISCNTRL(buf[i])) return (FT_NONE); } return (FT_XBM); } int detect_file_format(char *name, int need_palette) { FILE *fp; int i, f; if (!(fp = fopen(name, "rb"))) return (-1); i = do_detect_format(name, fp); f = file_formats[i].flags; if (need_palette) { #if 0 /* Check the raw "pal" format */ if (!(f & (FF_16 | FF_256 | FF_PALETTE))) { int l; fseek(fp, 0, SEEK_END); l = ftell(fp); i = l && (l <= 768) && !(l % 3) ? FT_PAL : FT_NONE; } #else if (!(f & (FF_16 | FF_256 | FF_PALETTE))) i = FT_NONE; #endif } else if (!(f & (FF_IMAGE | FF_LAYER))) i = FT_NONE; fclose(fp); return (i); } int valid_file( char *filename ) // Can this file be opened for reading? { FILE *fp; fp = fopen(filename, "r"); if (!fp) return (errno == ENOENT ? -1 : 1); else { fclose(fp); return 0; } } mtpaint-3.40/src/inifile.c0000644000175000000620000005214111647100527015013 0ustar muammarstaff/* inifile.c Copyright (C) 2007-2011 Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ /* *** PREFACE *** * This implementation has no comment preservation, and has nested sections - * because this is how we like our inifiles. :-) * Allocations are done in slabs, because no slot is ever deallocated or * reordered; only modified string values are allocated singly, since it is * probable they will keep being modified. * Implementation uses one 32-bit hash function as two 16-bit ones while * possible, but with 40000 keys or more, has to evaluate two 32-bit functions * instead. But such loads are expected to be rare. - WJ */ #include #include #include #include #include #include "global.h" #include "memory.h" #include "inifile.h" /* Make code not compile where it cannot run */ typedef char Integers_Do_Not_Fit_Into_Pointers[2 * (sizeof(int) <= sizeof(char *)) - 1]; #define SLAB_INCREMENT 16384 #define SLAB_RESERVED 64 /* Reserved for allocator overhead */ #define INI_LIMIT 0x40000000 /* Limit imposed by hashing scheme */ #define HASHFILL(X) ((X) * 3) /* Hash occupancy no more than 1/3 */ #define HASHSEED 0x811C9DC5 #define HASH_RND(X) ((X) * 0x10450405 + 1) #define HASH_MIN 256 /* Minimum hash capacity, so that it won't be too tiny */ /* Slot types */ #define INI_NONE 0 #define INI_UNDEF 1 #define INI_STR 2 #define INI_INT 3 #define INI_BOOL 4 // Negative types are section nesting levels /* Slot flags */ #define INI_STRING 0x0003 /* Index of strings block - must be the lower bits */ #define INI_SYSTEM 0x0000 /* Systemwide inifile */ #define INI_USER 0x0001 /* User inifile */ #define INI_NEW 0x0002 /* Memory only*/ #define INI_MALLOC 0x0004 /* Value is allocated (not in strings block) */ #define INI_DEFAULT 0x0008 /* Default value is defined */ #define SLOT_NAME(I,S) ((I)->sblock[(S)->flags & INI_STRING] + (S)->key) /* Escaping is needed for leading tabs and spaces, and for inline CR and LF */ static char *escape_string(char *src) { static const char *escaped = "\t\r\n \\"; char c, *cp, *tmp, *t2; if ((src[0] != '\t') && (src[0] != ' ') && !src[strcspn(src, "\r\n")]) return (NULL); t2 = tmp = calloc(1, strlen(src) * 2 + 1); if (tmp) { while ((c = *src++)) { if ((cp = strchr(escaped, c))) { *t2++ = '\\'; c = "trn \\"[cp - escaped]; } *t2++ = c; } *t2 = '\0'; } return (tmp); } #if GTK_MAJOR_VERSION == 1 /* GLib 1.2 doesn't provide g_strcompress() */ static void unescape_string(char *buf) { #define NUM_ESCAPES 5 static const char escapes[] = "bfnrt01234567"; static const char escaped[] = { 7, 12, 10, 13, 8, 0, 1, 2, 3, 4, 5, 6, 7 }; char c, cc, *tmp, *src = buf; int v; while ((c = *src++)) { if (c == '\\') { c = *src++; if (!c) break; while ((tmp = strchr(escapes, c))) { v = tmp - escapes; c = escaped[v]; if (v >= NUM_ESCAPES) { // Octal escape cc = *src - '0'; if (cc & ~7) break; c = c * 8 + cc; cc = *(++src) - '0'; if (cc & ~7) break; c = c * 8 + cc; ++src; } break; } } *buf++ = c; } *buf = '\0'; #undef NUM_ESCAPES } #else static void unescape_string(char *buf) { char *tmp = g_strcompress(buf); strcpy(buf, tmp); g_free(tmp); } #endif /* Thomas Wang's and "One at a time" hash functions */ static guint32 hashf(guint32 seed, int section, char *key) { seed += section; seed = (seed << 15) + ~seed; seed ^= (seed >> 12); seed += seed << 2; seed ^= seed >> 4; seed *= 2057; seed ^= seed >> 16; for (; *key; key++) { seed += *key; seed += seed << 10; seed ^= seed >> 6; } seed += seed << 3; seed ^= seed >> 11; seed += seed << 15; return (seed); } static int cuckoo_insert(inifile *inip, inislot *slotp) { static const unsigned char shift[4] = { 0, 16, 0, 0 }; gint32 idx, tmp; guint32 key; int i, j, d; /* Update section's last slot index */ i = slotp->sec; j = slotp - inip->slots; if (i && (inip->slots[i - 1].defv < j)) inip->slots[i - 1].defv = j; /* Decide if using one-key mode */ d = inip->seed[0] == inip->seed[1] ? 0 : 2; /* Normal cuckoo process */ idx = (slotp - inip->slots) + 1; for (i = 0; i < inip->maxloop; i++) { key = hashf(inip->seed[i & 1], slotp->sec, SLOT_NAME(inip, slotp)); key >>= shift[(i & 1) + d]; j = (key & inip->hmask) * 2 + (i & 1); tmp = inip->hash[j]; inip->hash[j] = idx; idx = tmp; if (!idx) return (TRUE); slotp = inip->slots + (idx - 1); } return (FALSE); } static int resize_hash(inifile *inip, int cnt) { int len; if (!cnt) return (0); /* Degenerate case */ len = nextpow2(HASHFILL(cnt) - 1); if (len <= inip->hmask * 2 + 2) return (0); /* Large enough */ free(inip->hash); inip->hash = calloc(1, len * sizeof(gint32)); if (!inip->hash) return (-1); /* Failure */ inip->hmask = (len >> 1) - 1; inip->maxloop = ceil(3.0 * log(len / 2) / log((double)(len / 2) / cnt)); return (1); /* Resized */ } static int rehash(inifile *inip) { int i, flag; flag = resize_hash(inip, inip->count); if (flag < 0) return (FALSE); /* Failed */ while (TRUE) /* Until done */ { if (!flag) /* No size change */ { inip->seed[0] = inip->seed[1] = HASH_RND(inip->seed[0]); memset(inip->hash, 0, (inip->hmask + 1) * 2 * sizeof(gint32)); } /* Enter two-key mode */ if (inip->hmask > 0xFFFF) inip->seed[1] = HASH_RND(inip->seed[0]); /* Re-insert items */ for (i = 0; (i < inip->count) && (flag = cuckoo_insert(inip, inip->slots + i)); i++); if (flag) return (TRUE); } } static inislot *cuckoo_find(inifile *inip, int section, char *name) { inislot *slotp; guint32 key; gint32 i; int j = 0; key = hashf(inip->seed[0], section, name); while (TRUE) { i = inip->hash[(key & inip->hmask) * 2 + j]; if (i) { slotp = inip->slots + i - 1; if ((slotp->sec == section) && !strcmp(name, SLOT_NAME(inip, slotp))) return (slotp); } if (j++) return (NULL); if (inip->seed[0] == inip->seed[1]) key >>= 16; else key = hashf(inip->seed[1], section, name); } } static inislot *add_slot(inifile *inip) { inislot *ra; int i, j; if (inip->count >= INI_LIMIT) return (NULL); /* Too many entries */ /* Extend the slab if needed */ i = inip->count * sizeof(inislot) + SLAB_RESERVED + SLAB_INCREMENT - 1; j = (i + sizeof(inislot)) / SLAB_INCREMENT; if (i / SLAB_INCREMENT < j) { ra = realloc(inip->slots, j * SLAB_INCREMENT - SLAB_RESERVED); if (!ra) return (NULL); inip->slots = ra; } ra = inip->slots + inip->count++; memset(ra, 0, sizeof(inislot)); return (ra); } static char *store_string(inifile *inip, char *str) { int i, j, l; char *ra; /* Zero offset for zero length */ if (!str || !*str) return (inip->sblock[INI_NEW]); /* Extend the slab if needed */ l = strlen(str) + 1; i = inip->slen + SLAB_RESERVED + SLAB_INCREMENT - 1; j = (i + l) / SLAB_INCREMENT; if (i / SLAB_INCREMENT < j) { ra = realloc(inip->sblock[INI_NEW], j * SLAB_INCREMENT - SLAB_RESERVED); if (!ra) return (NULL); inip->sblock[INI_NEW] = ra; } ra = inip->sblock[INI_NEW] + inip->slen; memcpy(ra, str, l); inip->slen += l; return (ra); } static inislot *key_slot(inifile *inip, int section, char *key, int type) { inislot *slot; if ((type < 0) && section) type = inip->slots[section - 1].type - 1; slot = cuckoo_find(inip, section, key); if (slot) { if (type == INI_NONE) return (slot); if (slot->flags & INI_MALLOC) { free(slot->value); slot->flags ^= INI_MALLOC; } #if VALIDATE_TYPE if ((slot->type != type) && (slot->type > INI_UNDEF)) g_warning("INI key '%s' changed type\n", key); #endif } else { key = store_string(inip, key); if (!key) return (NULL); slot = add_slot(inip); if (!slot) return (NULL); slot->sec = section; slot->key = key - inip->sblock[INI_NEW]; slot->flags = INI_NEW; if (!cuckoo_insert(inip, slot) && !rehash(inip)) return (NULL); } slot->type = type; return (slot); } int new_ini(inifile *inip) { memset(inip, 0, sizeof(inifile)); inip->sblock[INI_NEW] = malloc(SLAB_INCREMENT - SLAB_RESERVED); if (!inip->sblock[INI_NEW]) return (FALSE); inip->sblock[INI_NEW][0] = 0; inip->slen = 1; inip->slots = malloc(SLAB_INCREMENT - SLAB_RESERVED); inip->seed[0] = inip->seed[1] = HASHSEED; return (inip->slots && (resize_hash(inip, HASH_MIN) > 0)); } void forget_ini(inifile *inip) { int i; for (i = 0; i < inip->count; i++) { if (inip->slots[i].flags & INI_MALLOC) free(inip->slots[i].value); } free(inip->sblock[INI_SYSTEM]); free(inip->sblock[INI_USER]); free(inip->sblock[INI_NEW]); free(inip->slots); free(inip->hash); memset(inip, 0, sizeof(inifile)); } /* Load file whole into memory, with a zero byte before and two after */ char *slurp_file(char *fname) { FILE *fp; char *buf; int i, l; if (!fname || !(fp = fopen(fname, "rb"))) return (NULL); fseek(fp, 0, SEEK_END); l = ftell(fp); buf = calloc(1, l + 3); if (buf) { fseek(fp, 0, SEEK_SET); i = fread(buf + 1, 1, l, fp); if (i != l) { free(buf); buf = NULL; } } fclose(fp); return (buf); } int read_ini(inifile *inip, char *fname, int itype) { inifile ini; inislot *slot; char *tmp, *wrk, *w2, *str; int i, j, l, q, sec = 0; /* Read the file */ tmp = slurp_file(fname); if (!tmp) return (0); ini = *inip; ini.sblock[itype] = tmp; /* Parse the contents */ for (tmp++; ; tmp = str) { tmp += strspn(tmp, "\r\n\t "); if (!*tmp) break; str = tmp + strcspn(tmp, "\r\n"); if (*str) *str++ = '\0'; if ((*tmp == ';') || (*tmp == '#')) continue; /* Comment */ if (*tmp == '[') /* Section */ { if (!(w2 = strchr(tmp + 1, ']'))) goto error; for (l = i = 0; tmp[i + 1] == '>'; i++); if (i) /* Nested section */ { if (!sec || ((j = i + ini.slots[sec - 1].type) > 0)) goto error; l = sec; while (j--) l = ini.slots[l - 1].sec; } *w2 = '\0'; /* Hash this */ slot = cuckoo_find(&ini, l, tmp + ++i); if (!slot) /* New section */ { slot = add_slot(&ini); if (!slot) goto fail; slot->type = -i; slot->sec = l; slot->key = (tmp - ini.sblock[itype]) + i; slot->flags = itype; if (!cuckoo_insert(&ini, slot) && !rehash(&ini)) goto fail; } sec = slot - ini.slots + 1; /* Activate */ continue; } /* Variable (spaces in name allowed) */ w2 = strchr(tmp, '='); if (!w2) { error: g_printerr("Wrong INI line: '%s'\n", tmp); continue; } for (wrk = w2 - 1; wrk - tmp >= 0; wrk--) if ((*wrk != ' ') && (*wrk != '\t')) break; wrk[1] = '\0'; q = *(++w2) == '='; /* "==" means quoted value */ w2 += q + strspn(w2 + q, "\t "); // for (wrk = str - 1; *wrk && ((*wrk == '\t') || (*wrk == ' '); *wrk-- = '\0'); /* Hash this pair */ slot = cuckoo_find(&ini, sec, tmp); if (!slot) /* New key */ { slot = add_slot(&ini); if (!slot) goto fail; slot->sec = sec; slot->key = tmp - ini.sblock[itype]; slot->flags = itype; if (!cuckoo_insert(&ini, slot) && !rehash(&ini)) goto fail; } if (q) unescape_string(w2); slot->type = INI_UNDEF; slot->value = w2; } /* Return the result */ *inip = ini; return (1); /* Catastrophic failure - unable to add key */ fail: forget_ini(&ini); *inip = ini; return (-1); } int write_ini(inifile *inip, char *fname, char *header) { FILE *fp; inislot *slotp; char *name, *sv, *xv; int i, j, max, sec, var, defv; if (!(fp = fopen(fname, "w"))) return (FALSE); if (header) fprintf(fp, "%s\n", header); i = sec = 0; var = 0; while (TRUE) { max = sec ? inip->slots[sec - 1].defv : inip->count - 1; for (; i <= max; i++) { slotp = inip->slots + i; /* Only the current section */ if (slotp->sec != sec) continue; /* Variables first, subsections second */ if ((slotp->type < 0) ^ var) continue; name = SLOT_NAME(inip, slotp); if (slotp->type < 0) /* Section */ { if (slotp->defv <= i) continue; /* It's empty */ fputc('[', fp); for (j = -1; j > slotp->type; j--) fputc('>', fp); fprintf(fp, "%s]\n", name); sec = i + 1; max = slotp->defv; var = 0; continue; } /* Keys from system inifile ignore defaults, because * they exist to override the defaults - WJ */ defv = ((slotp->flags & INI_STRING) != INI_SYSTEM) && (slotp->flags & INI_DEFAULT); sv = slotp->value ? slotp->value : ""; switch (slotp->type) { case INI_STR: if (defv && !strcmp(inip->sblock[INI_NEW] + slotp->defv, sv)) break; case INI_UNDEF: default: /* Escape value if needed */ if ((xv = escape_string(sv))) { fprintf(fp, "%s == %s\n", name, xv); free(xv); } else fprintf(fp, "%s = %s\n", name, sv); break; case INI_INT: if (defv && ((int)slotp->value == slotp->defv)) break; fprintf(fp, "%s = %d\n", name, (int)slotp->value); break; case INI_BOOL: if (defv && (!!slotp->value == !!slotp->defv)) break; fprintf(fp, "%s = %s\n", name, slotp->value ? "true" : "false"); break; } } i = sec; if (!var) var = 1; /* Process subsections now */ else if (!sec) break; /* All done */ /* Return to scanning for parent's subsections */ else sec = inip->slots[sec - 1].sec; } fclose(fp); return (TRUE); } int ini_setstr(inifile *inip, int section, char *key, char *value) { inislot *slot; if (!(slot = key_slot(inip, section, key, INI_STR))) return (FALSE); slot->value = ""; /* NULLs are stored as empty strings, for less hazardous handling */ if (!value); /* Uncomment this instead if want NULLs to remain NULLs */ // if (!value) slot->value = NULL; else if (!*value); else { value = strdup(value); if (!value) return (FALSE); slot->value = value; slot->flags |= INI_MALLOC; } return (TRUE); } int ini_setint(inifile *inip, int section, char *key, int value) { inislot *slot; if (!(slot = key_slot(inip, section, key, INI_INT))) return (FALSE); slot->value = (char *)value; return (TRUE); } int ini_setbool(inifile *inip, int section, char *key, int value) { inislot *slot; if (!(slot = key_slot(inip, section, key, INI_BOOL))) return (FALSE); slot->value = (char *)!!value; return (TRUE); } char *ini_getstr(inifile *inip, int section, char *key, char *defv) { inislot *slot; char *tail; /* NULLs are stored as empty strings, for less hazardous handling */ if (!defv) defv = ""; /* Comment out the above if want NULLs to remain NULLs */ /* Read existing */ slot = key_slot(inip, section, key, INI_NONE); if (!slot) return (defv); if (slot->type == INI_STR) { #if VALIDATE_DEF if ((slot->flags & INI_DEFAULT) && strcmp(defv ? defv : "", inip->sblock[INI_NEW] + slot->defv)) g_warning("INI key '%s' new default\n", key); #endif if (slot->flags & INI_DEFAULT) return (slot->value); slot->type = INI_UNDEF; /* Fall through to storing default */ } /* Store default */ tail = store_string(inip, defv); if (tail) { slot->defv = tail - inip->sblock[INI_NEW]; slot->flags |= INI_DEFAULT; } else /* Cannot store the default */ { slot->defv = 0; slot->flags &= ~INI_DEFAULT; } if (slot->type != INI_UNDEF) { #if VALIDATE_TYPE if (slot->type != INI_NONE) g_printerr("INI key '%s' wrong type\n", key); #endif if (!defv) slot->value = NULL; else if (!*defv) slot->value = ""; else { slot->value = strdup(defv); if (slot->value) slot->flags |= INI_MALLOC; } } slot->type = INI_STR; return (slot->value); } int ini_getint(inifile *inip, int section, char *key, int defv) { inislot *slot; char *tail; long l; /* Read existing */ slot = key_slot(inip, section, key, INI_NONE); if (!slot) return (defv); if (slot->type == INI_INT) { #if VALIDATE_DEF if ((slot->flags & INI_DEFAULT) && (defv != slot->defv)) g_warning("INI key '%s' new default\n", key); #endif if (slot->flags & INI_DEFAULT) return ((int)(slot->value)); /* Fall through to storing default */ } /* Store default */ slot->defv = defv; slot->flags |= INI_DEFAULT; while (slot->type != INI_INT) { if (slot->type == INI_UNDEF) { l = strtol(slot->value, &tail, 10); slot->value = (void *)l; if (!*tail) break; } else if (slot->flags & INI_MALLOC) free(slot->value); #if VALIDATE_TYPE if (slot->type != INI_NONE) g_printerr("INI key '%s' wrong type\n", key); #endif slot->value = (char *)defv; break; } slot->type = INI_INT; return ((int)(slot->value)); } int ini_getbool(inifile *inip, int section, char *key, int defv) { static const char *YN[] = { "n", "y", "0", "1", "no", "yes", "off", "on", "false", "true", "disabled", "enabled", NULL }; inislot *slot; int i; defv = !!defv; /* Read existing */ slot = key_slot(inip, section, key, INI_NONE); if (!slot) return (defv); if (slot->type == INI_BOOL) { #if VALIDATE_DEF if ((slot->flags & INI_DEFAULT) && (defv != slot->defv)) g_warning("INI key '%s' new default\n", key); #endif if (slot->flags & INI_DEFAULT) return ((int)(slot->value)); /* Fall through to storing default */ } /* Store default */ slot->defv = defv; slot->flags |= INI_DEFAULT; while (slot->type != INI_BOOL) { if (slot->type == INI_UNDEF) { for (i = 0; YN[i] && strcasecmp(YN[i], slot->value); i++); slot->value = (char *)(i & 1); if (YN[i]) break; } else if (slot->flags & INI_MALLOC) free(slot->value); #if VALIDATE_TYPE if (slot->type != INI_NONE) g_printerr("INI key '%s' wrong type\n", key); #endif slot->value = (char *)defv; break; } slot->type = INI_BOOL; return ((int)(slot->value)); } int ini_setsection(inifile *inip, int section, char *key) { inislot *slot; slot = key_slot(inip, section, key, -1); if (!slot) return (-1); return (slot - inip->slots + 1); } int ini_getsection(inifile *inip, int section, char *key) { inislot *slot; int type; type = section ? inip->slots[section - 1].type - 1 : -1; slot = cuckoo_find(inip, section, key); if (!slot || (slot->type != type)) return (-1); return (slot - inip->slots + 1); } #ifdef WIN32 char *get_home_directory(void) { static char *homedir = NULL; if (homedir) return homedir; homedir = getenv("USERPROFILE"); // Gets the current users home directory in WinXP if (!homedir) homedir = ""; // And this, in Win9x :-) return homedir; } char *extend_path(const char *path) { char *dir, *name; if (path[0] == '~') return (g_strdup_printf("%s%s", get_home_directory(), path + 1)); if (path[0] && (path[1] == ':')) // Path w/drive letter is absolute return (g_strdup(path)); name = g_win32_get_package_installation_directory(NULL, NULL); dir = g_locale_from_utf8(name, -1, NULL, NULL, NULL); g_free(name); name = g_strdup_printf("%s%s", dir, path); g_free(dir); return (name); } #else #include #include /* * This function came from mhWaveEdit * by Magnus Hjorth, 2003. */ gchar *get_home_directory(void) { static char *homedir = NULL; struct passwd *p; if (homedir) return homedir; homedir = getenv("HOME"); if (!homedir) { p = getpwuid(getuid()); if (p) homedir = p->pw_dir; } if (!homedir) { g_warning(_("Could not find home directory. Using current directory as " "home directory.")); homedir = "."; } return homedir; } char *extend_path(const char *path) { if (path[0] == '~') return (g_strdup_printf("%s%s", get_home_directory(), path + 1)); return (g_strdup(path)); } #endif /* Compatibility functions */ static inifile main_ini; static char *main_ininame; void inifile_init(char *system_ini, char *user_ini) { char *tmp, *ini = user_ini; int res, mask = 3; while (new_ini(&main_ini)) { if ((mask & 1) && system_ini) { tmp = extend_path(system_ini); res = read_ini(&main_ini, tmp, INI_SYSTEM); g_free(tmp); if (res <= 0) mask ^= 1; // Don't try again if failed if (res < 0) continue; // Restart if struct got deleted /* !!! Allow system inifile to relocate user inifile */ ini = inifile_get("userINI", user_ini); if (!ini[0]) ini = system_ini; } if ((mask & 2) && user_ini) { main_ininame = extend_path(ini); res = read_ini(&main_ini, main_ininame, INI_USER); if (res <= 0) // Failed { mask ^= 2; if (res < 0) continue; } } break; } } void inifile_quit() { write_ini(&main_ini, main_ininame, "# Remove this file to restore default settings.\n"); forget_ini(&main_ini); g_free(main_ininame); } char *inifile_get(char *setting, char *defaultValue) { return (ini_getstr(&main_ini, 0, setting, defaultValue)); } int inifile_get_gint32(char *setting, int defaultValue) { return (ini_getint(&main_ini, 0, setting, defaultValue)); } int inifile_get_gboolean(char *setting, int defaultValue) { return (ini_getbool(&main_ini, 0, setting, defaultValue)); } int inifile_set(char *setting, char *value) { return (ini_setstr(&main_ini, 0, setting, value)); } int inifile_set_gint32(char *setting, int value) { return (ini_setint(&main_ini, 0, setting, value)); } int inifile_set_gboolean(char *setting, int value) { return (ini_setbool(&main_ini, 0, setting, value)); } mtpaint-3.40/src/font.h0000644000175000000620000000175211656220142014345 0ustar muammarstaff/* font.h Copyright (C) 2007-2011 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define TEXT_PASTE_NONE 0 // Not using text paste in the clipboard #define TEXT_PASTE_GTK 1 // GTK+ text paste #define TEXT_PASTE_FT 2 // FreeType text paste #ifdef U_FREETYPE void pressed_mt_text(); void ft_render_text(); // FreeType equivalent of render_text() #else #define pressed_mt_text() #define ft_render_text() #endif mtpaint-3.40/src/cpick.c0000644000175000000620000010513211647074734014476 0ustar muammarstaff/* cpick.c Copyright (C) 2008-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "inifile.h" #include "png.h" #include "mainwindow.h" #include "icons.h" #include "cpick.h" #ifdef U_CPICK_MTPAINT /* mtPaint dialog */ #if GTK_MAJOR_VERSION == 1 #include // Used by eye dropper #endif #define CPICKER(obj) GTK_CHECK_CAST (obj, cpicker_get_type (), cpicker) #define CPICKER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, cpicker_get_type (), cpickerClass) #define IS_CPICKER(obj) GTK_CHECK_TYPE (obj, cpicker_get_type ()) #define CPICK_KEY "mtPaint.cpicker" #define CPICK_PAL_STRIPS_MIN 1 #define CPICK_PAL_STRIPS_DEFAULT 2 #define CPICK_PAL_STRIPS_MAX 8 /* Max vertical strips the user can have */ #define CPICK_PAL_STRIP_ITEMS 8 /* Colours on each vertical strip */ #define CPICK_SIZE_MIN 64 /* Minimum size of mixer/palette areas */ #define CPICK_SIZE_DEFAULT 128 #define CPICK_SIZE_MAX 1024 /* Maximum size of mixer/palette areas */ #define CPICK_INPUT_RED 0 #define CPICK_INPUT_GREEN 1 #define CPICK_INPUT_BLUE 2 #define CPICK_INPUT_HUE 3 #define CPICK_INPUT_SATURATION 4 #define CPICK_INPUT_VALUE 5 #define CPICK_INPUT_HEX 6 #define CPICK_INPUT_OPACITY 7 #define CPICK_INPUT_TOT 8 /* Manual inputs on the right hand side */ #define CPICK_AREA_PRECUR 0 /* Current / Previous colour swatch */ #define CPICK_AREA_PICKER 1 /* Picker drawing area - Main */ #define CPICK_AREA_HUE 2 /* Picker drawing area - Hue slider */ #define CPICK_AREA_PALETTE 3 /* Palette */ #define CPICK_AREA_OPACITY 4 /* Opacity */ #define CPICK_AREA_TOT 5 #define CPICK_AREA_CURRENT 1 #define CPICK_AREA_PREVIOUS 2 static const GtkTargetEntry cpick_target = { "application/x-color", 0, 0 }; static GtkTargetList *cpick_tlist; typedef struct { GtkVBox vbox; // Parent class GtkWidget *hbox, // Main hbox *inputs[CPICK_INPUT_TOT], // Spin buttons / Hex input *opacity_label, *areas[CPICK_AREA_TOT] // wjpixmap's ; int size, // Vertical/horizontal size of main mixer pal_strips, // Number of palette strips input_vals[CPICK_INPUT_TOT], // Current input values rgb_previous[4], // Previous colour/opacity area_size[CPICK_AREA_TOT][2], // Width / height of each wjpixmap lock; // To block input handlers int drag_x, drag_y, may_drag; // For drag & drop unsigned char drag_rgba[4]; // The color being dragged out } cpicker; typedef struct { GtkVBoxClass parent_class; void (*color_changed)(cpicker *cp); } cpickerClass; enum { COLOR_CHANGED, LAST_SIGNAL }; static void cpicker_class_init (cpickerClass *klass); static void cpicker_init (cpicker *cp); static gint cpicker_signals[LAST_SIGNAL]; static GtkType cpicker_type; static GtkType cpicker_get_type() { if (!cpicker_type) { static const GtkTypeInfo cpicker_info = { "cpicker", sizeof (cpicker), sizeof(cpickerClass), (GtkClassInitFunc)cpicker_class_init, (GtkObjectInitFunc)cpicker_init, NULL, NULL, NULL }; cpicker_type = gtk_type_unique(GTK_TYPE_HBOX, &cpicker_info); } return cpicker_type; } static void cpicker_class_init( cpickerClass *class ) { GTK_WIDGET_CLASS(class)->show_all = gtk_widget_show; cpicker_signals[COLOR_CHANGED] = gtk_signal_new ("color_changed", GTK_RUN_FIRST, cpicker_type, GTK_SIGNAL_OFFSET(cpickerClass, color_changed), gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); #if GTK_MAJOR_VERSION == 1 gtk_object_class_add_signals(GTK_OBJECT_CLASS(class), cpicker_signals, LAST_SIGNAL); #endif class->color_changed = NULL; /* For drag & drop */ cpick_tlist = gtk_target_list_new(&cpick_target, 1); } static void cpick_area_picker_create(cpicker *win) { unsigned char *rgb, *dest, *bw, full[3]; int i, j, k, x, y, w, h, w1, h1, w3, col; double hsv[3]; w = win->area_size[CPICK_AREA_PICKER][0]; h = win->area_size[CPICK_AREA_PICKER][1]; rgb = malloc(w * h * 3); if (!rgb) return; w1 = w - 1; h1 = h - 1; w3 = w * 3; // Colour in top right corner hsv[0] = (double)win->input_vals[CPICK_INPUT_HUE] / 255.0; hsv[1] = 1; hsv[2] = 255; hsv2rgb( full, hsv ); /* Bottom row is black->white */ dest = bw = rgb + h1 * w3; for (i = 0; i < w; i++ , dest += 3) dest[0] = dest[1] = dest[2] = (255 * i) / w1; /* And now use it as multiplier for all other rows */ for (y = 0; y < h1; y++) { dest = rgb + y * w3; // Colour on right side, i.e. corner->white k = (255 * (h1 - y)) / h1; for (i = 0; i < 3; i++) { col = (255 * 255) + k * (full[i] - 255); col = (col + (col >> 8) + 1) >> 8; for (x = i; x < w3; x += 3) { j = col * bw[x]; dest[x] = (j + (j >> 8) + 1) >> 8; } } } wjpixmap_draw_rgb(win->areas[CPICK_AREA_PICKER], 0, 0, w, h, rgb, w3); free(rgb); } static void cpick_precur_paint(cpicker *win, int *col, int opacity, unsigned char *rgb, int dx, int w, int h) { int i, j, k, x, y; unsigned char cols[6], *dest = rgb; for (i = 0; i < 6; i++) { k = greyz[i & 1]; j = 255 * k + opacity * (col[i >> 1] - k); cols[i] = (j + (j >> 8) + 1) >> 8; } for (y = 0; y < h; y++) { j = (y >> 3) & 1; for (x = 0; x < w; x++) { k = (((x + dx) >> 3) & 1) ^ j; *dest++ = cols[k + 0]; *dest++ = cols[k + 2]; *dest++ = cols[k + 4]; } } wjpixmap_draw_rgb(win->areas[CPICK_AREA_PRECUR], dx, 0, w, h, rgb, w * 3); } static void cpick_area_precur_create( cpicker *win, int flag ) { unsigned char *rgb; int w, h, w2, w2p; w = win->area_size[CPICK_AREA_PRECUR][0]; h = win->area_size[CPICK_AREA_PRECUR][1]; w2 = w >> 1; w2p = w - w2; rgb = malloc(w2p * h * 3); if ( !rgb ) return; if (flag & CPICK_AREA_CURRENT) cpick_precur_paint(win, win->input_vals + CPICK_INPUT_RED, win->input_vals[CPICK_INPUT_OPACITY], rgb, w2, w2p, h); if (flag & CPICK_AREA_PREVIOUS) cpick_precur_paint(win, win->rgb_previous, win->rgb_previous[3], rgb, 0, w2, h); free(rgb); } // Forward references static void cpick_area_update_cursors(cpicker *cp); static void cpick_refresh_inputs_areas(cpicker *cp); static void cpick_get_rgb(cpicker *cp); static void cpick_populate_inputs( cpicker *win ) { int i; char txt[32]; win->lock = TRUE; for ( i=0; iinputs[i]), win->input_vals[i]); } sprintf(txt, "#%06X", RGB_2_INT( win->input_vals[CPICK_INPUT_RED], win->input_vals[CPICK_INPUT_GREEN], win->input_vals[CPICK_INPUT_BLUE])); gtk_entry_set_text( GTK_ENTRY(win->inputs[CPICK_INPUT_HEX]), txt ); win->lock = FALSE; } static void cpick_rgba_at(cpicker *cp, GtkWidget *widget, int x, int y, unsigned char *get, unsigned char *set) { if (widget == cp->areas[CPICK_AREA_PALETTE]) { char txt[128]; int col, ppc, ini_col; ppc = cp->area_size[CPICK_AREA_PALETTE][1] / CPICK_PAL_STRIP_ITEMS; x /= ppc; y /= ppc; col = y + CPICK_PAL_STRIP_ITEMS * x; snprintf(txt, 128, "cpick_pal_%i", col); if (get) { ini_col = inifile_get_gint32(txt, col > 255 ? 0 : RGB_2_INT(mem_pal_def[col].red, mem_pal_def[col].green, mem_pal_def[col].blue)); get[0] = INT_2_R(ini_col); get[1] = INT_2_G(ini_col); get[2] = INT_2_B(ini_col); get[3] = cp->input_vals[CPICK_INPUT_OPACITY]; } if (set) { ini_col = MEM_2_INT(set, 0); inifile_set_gint32(txt, ini_col); wjpixmap_fill_rgb(widget, x * ppc, y * ppc, ppc, ppc, ini_col); } } else if (widget == cp->areas[CPICK_AREA_PRECUR]) { int *irgb, *ialpha; int pc = x >= cp->area_size[CPICK_AREA_PRECUR][0] >> 1; if (pc || set) // Current { irgb = cp->input_vals + CPICK_INPUT_RED; ialpha = cp->input_vals + CPICK_INPUT_OPACITY; } else // Previous { irgb = cp->rgb_previous; ialpha = cp->rgb_previous + 3; } if (get) { get[0] = irgb[0]; get[1] = irgb[1]; get[2] = irgb[2]; get[3] = *ialpha; } if (set) { irgb[0] = set[0]; irgb[1] = set[1]; irgb[2] = set[2]; *ialpha = set[3]; if (pc) // Current color changed - announce it { cpick_set_colour(GTK_WIDGET(cp), MEM_2_INT(set, 0), set[3]); gtk_signal_emit(GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED]); } else cpick_area_precur_create(cp, CPICK_AREA_PREVIOUS); } } } static void cpick_area_mouse( GtkWidget *widget, cpicker *cp, int x, int y, int button ) { int idx, rx, ry, aw, ah, ah1; for (idx = 0; idx < CPICK_AREA_TOT; idx++) if (cp->areas[idx] == widget) break; if (idx >= CPICK_AREA_TOT) return; aw = cp->area_size[idx][0]; ah = cp->area_size[idx][1]; ah1 = ah - 1; rx = x < 0 ? 0 : x >= aw ? aw - 1 : x; ry = y < 0 ? 0 : y > ah1 ? ah1 : y; if ( idx == CPICK_AREA_OPACITY ) { wjpixmap_move_cursor(widget, aw / 2, ry); cp->input_vals[CPICK_INPUT_OPACITY] = 255 - (ry * 255) / ah1; } else if ( idx == CPICK_AREA_HUE ) { wjpixmap_move_cursor(widget, aw / 2, ry); cp->input_vals[CPICK_INPUT_HUE] = 1529 - (ry * 1529) / ah1; cpick_area_picker_create(cp); cpick_get_rgb(cp); } else if ( idx == CPICK_AREA_PICKER ) { wjpixmap_move_cursor(widget, rx, ry); cp->input_vals[CPICK_INPUT_VALUE] = (rx * 255) / (aw - 1); cp->input_vals[CPICK_INPUT_SATURATION] = 255 - (ry * 255) / ah1; cpick_get_rgb(cp); } else if ( idx == CPICK_AREA_PALETTE ) { unsigned char rgba[4]; int ini_col; cpick_rgba_at(cp, widget, rx, ry, rgba, NULL); ini_col = MEM_2_INT(rgba, 0); // Only update if colour is different if (ini_col == RGB_2_INT(cp->input_vals[CPICK_INPUT_RED], cp->input_vals[CPICK_INPUT_GREEN], cp->input_vals[CPICK_INPUT_BLUE])) return; cpick_set_colour(GTK_WIDGET(cp), ini_col, cp->input_vals[CPICK_INPUT_OPACITY]); } else return; if (idx != CPICK_AREA_PALETTE) // cpick_set_colour() does that and more { cpick_populate_inputs(cp); cpick_area_precur_create(cp, CPICK_AREA_CURRENT); } gtk_signal_emit(GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED]); } static void cpick_drag_get(GtkWidget *widget, GdkDragContext *drag_context, GtkSelectionData *data, guint info, guint time, gpointer user_data) { cpicker *cp = user_data; guint16 vals[4]; /* Source RGBA values prepared already - just export them */ vals[0] = cp->drag_rgba[0] * 257; vals[1] = cp->drag_rgba[1] * 257; vals[2] = cp->drag_rgba[2] * 257; vals[3] = cp->drag_rgba[3] * 257; gtk_selection_data_set(data, gdk_atom_intern("application/x-color", FALSE), 16, (guchar *)vals, 8); } static void cpick_drag_set(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { cpicker *cp = user_data; unsigned char rgba[4]; int i, idx, rx, ry, aw, ah; idx = widget == cp->areas[CPICK_AREA_PRECUR] ? CPICK_AREA_PRECUR : CPICK_AREA_PALETTE; aw = cp->area_size[idx][0]; ah = cp->area_size[idx][1]; wjpixmap_rxy(widget, x, y, &rx, &ry); rx = rx < 0 ? 0 : rx >= aw ? aw - 1 : rx; ry = ry < 0 ? 0 : ry >= ah ? ah - 1 : ry; /* Selection data format isn't checked because it's how GTK+2 does it, * reportedly to ignore a bug in (some versions of) KDE - WJ */ if (data->length != 8) return; for (i = 0; i < 4; i++) rgba[i] = (((guint16 *)data->data)[i] + 128) / 257; cpick_rgba_at(cp, widget, rx, ry, NULL, rgba); } #define RGB_DND_W 48 #define RGB_DND_H 32 static void set_drag_icon(GdkDragContext *context, GtkWidget *src, unsigned char *rgba) { GdkGCValues sv; GdkPixmap *swatch; if (!context) return; swatch = gdk_pixmap_new(src->window, RGB_DND_W, RGB_DND_H, -1); gdk_gc_get_values(src->style->black_gc, &sv); gdk_rgb_gc_set_foreground(src->style->black_gc, MEM_2_INT(rgba, 0)); gdk_draw_rectangle(swatch, src->style->black_gc, TRUE, 0, 0, RGB_DND_W, RGB_DND_H); gdk_gc_set_foreground(src->style->black_gc, &sv.foreground); gtk_drag_set_icon_pixmap(context, gtk_widget_get_colormap(src), swatch, NULL, -2, -2); gdk_pixmap_unref(swatch); } static gboolean cpick_area_event(GtkWidget *widget, GdkEvent *event, cpicker *cp) { int rx, ry, button = 0; GdkModifierType state; int can_drag = (widget == cp->areas[CPICK_AREA_PRECUR]) || (widget == cp->areas[CPICK_AREA_PALETTE]); if (event->type == GDK_BUTTON_PRESS) { rx = event->button.x; ry = event->button.y; button = event->button.button; if (can_drag && (button == 1)) // Only left button inits drag { cp->drag_x = rx; cp->drag_y = ry; cp->may_drag = TRUE; } gtk_widget_grab_focus(widget); } else if (event->type == GDK_BUTTON_RELEASE) { if (event->button.button == 1) cp->may_drag = FALSE; } else if (event->type == GDK_MOTION_NOTIFY) { if (event->motion.is_hint) gdk_window_get_pointer(event->motion.window, &rx, &ry, &state); else { rx = event->motion.x; ry = event->motion.y; state = event->motion.state; } /* May init drag */ if (state & GDK_BUTTON1_MASK) { /* No dragging where not allowed, or without clicking * on the widget first */ if (can_drag && cp->may_drag && #if GTK_MAJOR_VERSION == 1 ((abs(rx - cp->drag_x) > 3) || (abs(ry - cp->drag_y) > 3)) #else /* if GTK_MAJOR_VERSION == 2 */ gtk_drag_check_threshold(widget, cp->drag_x, cp->drag_y, rx, ry) #endif ) /* Initiate drag */ { GdkDragContext *context; cp->may_drag = FALSE; /* While technically, drag starts at current * position, read data from the saved one - * where user had clicked to begin drag - WJ */ cpick_rgba_at(cp, widget, cp->drag_x, cp->drag_y, cp->drag_rgba, NULL); context = gtk_drag_begin(widget, cpick_tlist, GDK_ACTION_COPY | GDK_ACTION_MOVE, 1, event); set_drag_icon(context, widget, cp->drag_rgba); return (TRUE); } } else cp->may_drag = FALSE; // Release events can be lost if ((state & (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) == (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) button = 13; else if (state & GDK_BUTTON1_MASK) button = 1; else if (state & GDK_BUTTON3_MASK) button = 3; else if (state & GDK_BUTTON2_MASK) button = 2; } if (button) cpick_area_mouse(widget, cp, rx, ry, button); return (TRUE); } static void cpick_realize_area(GtkWidget *widget, cpicker *cp) { static const unsigned char hue[7][3] = { {255, 0, 0}, {255, 0, 255}, {0, 0, 255}, {0, 255, 255}, {0, 255, 0}, {255, 255, 0}, {255, 0, 0} }; unsigned char *dest, *rgb = NULL; char txt[128]; int i, k, kk, w, h, w3, sz, x, y, dd, d1, hy, oy, idx; if (!wjpixmap_pixmap(widget)) return; if (!IS_CPICKER(cp)) return; for (idx = 0; idx < CPICK_AREA_TOT; idx++) if (cp->areas[idx] == widget) break; if (idx >= CPICK_AREA_TOT) return; w = cp->area_size[idx][0]; h = cp->area_size[idx][1]; w3 = w * 3; sz = w3 * h; switch (idx) { case CPICK_AREA_PRECUR: case CPICK_AREA_PICKER: wjpixmap_fill_rgb(widget, 0, 0, w, h, 0); break; case CPICK_AREA_HUE: if (!(dest = rgb = malloc(sz))) break; for (hy = y = k = 0; k < 6; k++) { oy = hy; hy = ((k + 1) * h) / 6; dd = hy - oy; for (; y < hy; y++) { d1 = y - oy; for (i = 0; i < 3; i++) *dest++ = hue[k][i] + ((hue[k + 1][i] - hue[k][i]) * d1) / dd; for (; i < w3; i++ , dest++) *dest = *(dest - 3); } } break; case CPICK_AREA_PALETTE: dd = cp->size / CPICK_PAL_STRIP_ITEMS; for (kk = 0; kk < cp->pal_strips; kk++) for (k = 0; k < CPICK_PAL_STRIP_ITEMS; k++) { i = kk * CPICK_PAL_STRIP_ITEMS + k; snprintf(txt, 128, "cpick_pal_%i", i); i = i < 256 ? RGB_2_INT(mem_pal_def[i].red, mem_pal_def[i].green, mem_pal_def[i].blue) : 0; i = inifile_get_gint32(txt, i); wjpixmap_fill_rgb(widget, dd * kk, dd * k, dd, dd, i); } break; case CPICK_AREA_OPACITY: if (!(dest = rgb = malloc(sz))) break; for (y = h - 1; y >= 0; y--) { k = 255 - (255 * y) / h; kk = (y >> 3) & 1; for (x = 0; x < w; x++ , dest += 3) { i = k * greyz[((x >> 3) & 1) ^ kk]; dest[0] = dest[1] = dest[2] = (i + (i >> 8) + 1) >> 8; } } break; } if (rgb) wjpixmap_draw_rgb(widget, 0, 0, w, h, rgb, w * 3); free(rgb); if ((idx == CPICK_AREA_HUE) || (idx == CPICK_AREA_PICKER) || (idx == CPICK_AREA_OPACITY)) { wjpixmap_set_cursor(widget, xbm_ring4_bits, xbm_ring4_mask_bits, xbm_ring4_width, xbm_ring4_height, xbm_ring4_x_hot, xbm_ring4_y_hot, FALSE); wjpixmap_move_cursor(widget, w/2, h/2); } } static void cpick_get_rgb(cpicker *cp) // Calculate RGB values from HSV { unsigned char rgb[3]; double hsv[3] = { (double)cp->input_vals[CPICK_INPUT_HUE] / 255.0, (double)cp->input_vals[CPICK_INPUT_SATURATION] / 255.0, (double)cp->input_vals[CPICK_INPUT_VALUE] }; hsv2rgb( rgb, hsv ); //printf("rgb = %i %i %i\n", rgb[0], rgb[1], rgb[2]); cp->input_vals[CPICK_INPUT_RED] = rgb[0]; cp->input_vals[CPICK_INPUT_GREEN] = rgb[1]; cp->input_vals[CPICK_INPUT_BLUE] = rgb[2]; } static void cpick_get_hsv(cpicker *cp) // Calculate HSV values from RGB { unsigned char rgb[3] = { cp->input_vals[CPICK_INPUT_RED], cp->input_vals[CPICK_INPUT_GREEN], cp->input_vals[CPICK_INPUT_BLUE] }; double hsv[3]; rgb2hsv( rgb, hsv ); // !!! rint() maybe? cp->input_vals[CPICK_INPUT_HUE] = 255 * hsv[0]; cp->input_vals[CPICK_INPUT_SATURATION] = 255 * hsv[1]; cp->input_vals[CPICK_INPUT_VALUE] = hsv[2]; } static void cpick_update(cpicker *cp, int what) { int new_rgb = FALSE, new_h = FALSE, new_sv = FALSE;//, new_opac = FALSE; switch (what) { case CPICK_INPUT_RED: case CPICK_INPUT_GREEN: case CPICK_INPUT_BLUE: case CPICK_INPUT_HEX: new_rgb = TRUE; break; case CPICK_INPUT_HUE: new_h = TRUE; break; case CPICK_INPUT_SATURATION: case CPICK_INPUT_VALUE: new_sv = TRUE; break; case CPICK_INPUT_OPACITY: // new_opac = TRUE; break; default: return; } if (new_h || new_sv || new_rgb) { if (new_rgb) cpick_get_hsv(cp); else cpick_get_rgb(cp); cpick_populate_inputs(cp); // Update all inputs in dialog // New RGB or Hue so recalc picker if (!new_sv) cpick_area_picker_create(cp); } cpick_area_update_cursors(cp); // Update current colour cpick_area_precur_create(cp, CPICK_AREA_CURRENT); gtk_signal_emit(GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED]); } static gboolean cpick_hex_change(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) { cpicker *cp = gtk_object_get_data(GTK_OBJECT(widget), CPICK_KEY); GdkColor col; int r, g, b; if (!cp || cp->lock) return (FALSE); if (!gdk_color_parse(gtk_entry_get_text( GTK_ENTRY(cp->inputs[CPICK_INPUT_HEX])), &col)) return (FALSE); r = ((int)col.red + 128) / 257; g = ((int)col.green + 128) / 257; b = ((int)col.blue + 128) / 257; if (!((r ^ cp->input_vals[CPICK_INPUT_RED]) | (g ^ cp->input_vals[CPICK_INPUT_GREEN]) | (b ^ cp->input_vals[CPICK_INPUT_BLUE]))) return (FALSE); cp->input_vals[CPICK_INPUT_RED] = r; cp->input_vals[CPICK_INPUT_GREEN] = g; cp->input_vals[CPICK_INPUT_BLUE] = b; cpick_update(cp, CPICK_INPUT_HEX); return (FALSE); } static void cpick_spin_change(GtkAdjustment *adjustment, gpointer user_data) { cpicker *cp = gtk_object_get_data(GTK_OBJECT(adjustment), CPICK_KEY); int i, input = (int)user_data; if (!cp || cp->lock) return; i = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(cp->inputs[input]) ); if (cp->input_vals[input] == i) return; cp->input_vals[input] = i; cpick_update(cp, input); } static void dropper_terminate(GtkWidget *widget, gpointer user_data) { GtkWidget *grab_widget = ((cpicker *)user_data)->hbox; gtk_signal_disconnect_by_data(GTK_OBJECT(grab_widget), user_data); undo_grab(grab_widget); } static void dropper_grab_colour(GtkWidget *widget, gint x, gint y, gpointer user_data) { cpicker *cp = user_data; unsigned char rgb[3]; #if GTK_MAJOR_VERSION == 1 if (!wj_get_rgb_image((GdkWindow *)&gdk_root_parent, NULL, rgb, x, y, 1, 1)) return; #else /* #if GTK_MAJOR_VERSION == 2 */ if (!wj_get_rgb_image(gdk_get_default_root_window(), NULL, rgb, x, y, 1, 1)) return; #endif /* Ungrab before sending signal - better safe than sorry */ dropper_terminate(widget, user_data); cpick_set_colour(GTK_WIDGET(cp), MEM_2_INT(rgb, 0), cp->input_vals[CPICK_INPUT_OPACITY]); gtk_signal_emit( GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED] ); } static gboolean dropper_key_press(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { int x, y; if (arrow_key(event, &x, &y, 20)) move_mouse_relative(x, y); else if (event->keyval == GDK_Escape) dropper_terminate(widget, user_data); else if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter) || (event->keyval == GDK_space) || (event->keyval == GDK_KP_Space)) { #if GTK_MAJOR_VERSION == 1 gdk_window_get_pointer((GdkWindow *)&gdk_root_parent, &x, &y, NULL); #else /* #if GTK_MAJOR_VERSION == 2 */ gdk_display_get_pointer(gtk_widget_get_display(widget), NULL, &x, &y, NULL); #endif dropper_grab_colour(widget, x, y, user_data); } #if GTK_MAJOR_VERSION == 1 /* Return value alone doesn't stop GTK1 from running other handlers */ gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event"); #endif return (TRUE); } static gboolean dropper_mouse_press(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->type != GDK_BUTTON_RELEASE) return (FALSE); dropper_grab_colour(widget, event->x_root, event->y_root, user_data); return (TRUE); } static void cpick_eyedropper(GtkButton *button, gpointer user_data) { static GdkCursor *cursor; cpicker *cp = user_data; GtkWidget *grab_widget = cp->hbox; // Using hbox avoids problems with mouse clicks in GTK+1 if (!cursor) cursor = make_cursor(xbm_picker_bits, xbm_picker_mask_bits, xbm_picker_width, xbm_picker_height, xbm_picker_x_hot, xbm_picker_y_hot); if (do_grab(GRAB_FULL, grab_widget, cursor)) { gtk_signal_connect(GTK_OBJECT(grab_widget), "button_release_event", GTK_SIGNAL_FUNC(dropper_mouse_press), cp); gtk_signal_connect(GTK_OBJECT(grab_widget), "key_press_event", GTK_SIGNAL_FUNC(dropper_key_press), cp); } } static gboolean cpick_area_key(GtkWidget *widget, GdkEventKey *event, cpicker *cp) { int dx, dy; if (!arrow_key(event, &dx, &dy, 16)) return (FALSE); if (widget == cp->areas[CPICK_AREA_PICKER]) { int new_sat = cp->input_vals[CPICK_INPUT_SATURATION] - dy, new_val = cp->input_vals[CPICK_INPUT_VALUE] + dx; new_sat = new_sat < 0 ? 0 : new_sat > 255 ? 255 : new_sat; new_val = new_val < 0 ? 0 : new_val > 255 ? 255 : new_val; if ( new_sat != cp->input_vals[CPICK_INPUT_SATURATION] || new_val != cp->input_vals[CPICK_INPUT_VALUE] ) { cp->input_vals[CPICK_INPUT_SATURATION] = new_sat; cp->input_vals[CPICK_INPUT_VALUE] = new_val; cpick_get_rgb(cp); // Update RGB values cpick_area_update_cursors(cp); // Update cursors cpick_refresh_inputs_areas(cp); // Update inputs gtk_signal_emit( GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED] ); } } else if (!dy); // X isn't used anywhere else else if (widget == cp->areas[CPICK_AREA_OPACITY]) { int new_opac = cp->input_vals[CPICK_INPUT_OPACITY] - dy; new_opac = new_opac < 0 ? 0 : new_opac > 255 ? 255 : new_opac; if ( new_opac != cp->input_vals[CPICK_INPUT_OPACITY] ) { cp->input_vals[CPICK_INPUT_OPACITY] = new_opac; cpick_area_update_cursors(cp); cpick_populate_inputs( cp ); // Update all inputs in dialog cpick_area_precur_create( cp, CPICK_AREA_CURRENT ); gtk_signal_emit( GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED] ); } } else if (widget == cp->areas[CPICK_AREA_HUE]) { int new_hue = cp->input_vals[CPICK_INPUT_HUE] - 8*dy; new_hue = new_hue < 0 ? 0 : new_hue > 1529 ? 1529 : new_hue; if ( new_hue != cp->input_vals[CPICK_INPUT_HUE] ) { cp->input_vals[CPICK_INPUT_HUE] = new_hue; // Change hue cpick_get_rgb(cp); // Update RGB values cpick_area_update_cursors(cp); // Update cursors cpick_area_picker_create(cp); // Repaint picker cpick_refresh_inputs_areas(cp); // Update inputs gtk_signal_emit( GTK_OBJECT(cp), cpicker_signals[COLOR_CHANGED] ); } } #if GTK_MAJOR_VERSION == 1 /* Return value alone doesn't stop GTK1 from running other handlers */ gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event"); #endif return (TRUE); } #if GTK_MAJOR_VERSION == 1 #define MIN_ENTRY_WIDTH 150 static void hex_size_req(GtkWidget *widget, GtkRequisition *requisition, gpointer user_data) { int l = gdk_string_width(widget->style->font, "#DDDDDDD"); // if (l > MIN_ENTRY_WIDTH) requisition->width += l - MIN_ENTRY_WIDTH; requisition->width = l + 30; /* Set requisition to a sane value */ } #endif static void cpicker_init( cpicker *cp ) { static const unsigned char pos[CPICK_AREA_TOT][2] = { {1,1}, {0,1}, {0,2}, {0,0}, {0,3} }; static const short input_vals[CPICK_INPUT_TOT][3] = { {0,0,255}, {0,0,255}, {0,0,255}, {0,0,1529}, {255,0,255}, {255,0,255}, {-1,-1,-1}, {128,0,255} }; char *in_txt[CPICK_INPUT_TOT] = { _("Red"), _("Green"), _("Blue"), _("Hue"), _("Saturation"), _("Value"), _("Hex"), _("Opacity") }; GtkWidget *widget, *hbox, *button, *table, *label, *iconw; GtkObject *obj; GdkPixmap *icon, *mask; int i; cp->size = inifile_get_gint32( "cpickerSize", CPICK_SIZE_DEFAULT ); if ( cp->size < CPICK_SIZE_MIN || cp->size > CPICK_SIZE_MAX ) cp->size = CPICK_SIZE_DEFAULT; /* Ensure palette swatches are identical in size by adjusting size of * whole area */ cp->size = cp->size - (cp->size % CPICK_PAL_STRIP_ITEMS); cp->pal_strips = inifile_get_gint32( "cpickerStrips", CPICK_PAL_STRIPS_DEFAULT ); if ( cp->pal_strips < CPICK_PAL_STRIPS_MIN || cp->pal_strips > CPICK_PAL_STRIPS_MAX ) cp->pal_strips = CPICK_PAL_STRIPS_DEFAULT; cp->rgb_previous[3] = 255; cp->input_vals[CPICK_INPUT_OPACITY] = 255; cp->area_size[CPICK_AREA_PRECUR][0] = cp->size; cp->area_size[CPICK_AREA_PRECUR][1] = 3 * cp->size / 16; cp->area_size[CPICK_AREA_PICKER][0] = cp->size; cp->area_size[CPICK_AREA_PICKER][1] = cp->size; cp->area_size[CPICK_AREA_HUE][0] = 3 * cp->size / 16; cp->area_size[CPICK_AREA_HUE][1] = cp->size; cp->area_size[CPICK_AREA_PALETTE][0] = cp->pal_strips * cp->size / CPICK_PAL_STRIP_ITEMS; cp->area_size[CPICK_AREA_PALETTE][1] = cp->size; cp->area_size[CPICK_AREA_OPACITY][0] = 3 * cp->size / 16; cp->area_size[CPICK_AREA_OPACITY][1] = cp->size; hbox = gtk_hbox_new(FALSE, 2); gtk_widget_show( hbox ); cp->hbox = hbox; gtk_container_add( GTK_CONTAINER (cp), hbox ); // --- Palette/Mixer table table = add_a_table( 2, 4, 0, hbox ); for (i = 0; i < CPICK_AREA_TOT; i++) { widget = cp->areas[i] = wjpixmap_new(cp->area_size[i][0], cp->area_size[i][1]); gtk_widget_show(widget); gtk_table_attach(GTK_TABLE(table), widget, pos[i][1], pos[i][1] + 1, pos[i][0], pos[i][0] + 1, (GtkAttachOptions)0, (GtkAttachOptions)0, 0, 0); gtk_signal_connect(GTK_OBJECT(widget), "realize", GTK_SIGNAL_FUNC(cpick_realize_area), cp); gtk_signal_connect(GTK_OBJECT(widget), "button_press_event", GTK_SIGNAL_FUNC(cpick_area_event), cp); gtk_signal_connect(GTK_OBJECT(widget), "button_release_event", GTK_SIGNAL_FUNC(cpick_area_event), cp); gtk_signal_connect(GTK_OBJECT(widget), "motion_notify_event", GTK_SIGNAL_FUNC(cpick_area_event), cp); if ((i == CPICK_AREA_PRECUR) || (i == CPICK_AREA_PALETTE)) { /* !!! Maybe handle "drag_motion" & "drag_drop" instead of GTK_DEST_DEFAULT_*, * !!! to prevent drops on borders outside of pixmap? */ gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, &cpick_target, 1, GDK_ACTION_COPY); gtk_signal_connect(GTK_OBJECT(widget), "drag_data_get", GTK_SIGNAL_FUNC(cpick_drag_get), cp); gtk_signal_connect(GTK_OBJECT(widget), "drag_data_received", GTK_SIGNAL_FUNC(cpick_drag_set), cp); } if ((i == CPICK_AREA_PICKER) || (i == CPICK_AREA_HUE) || (i == CPICK_AREA_OPACITY)) { gtk_signal_connect(GTK_OBJECT(widget), "key_press_event", GTK_SIGNAL_FUNC(cpick_area_key), cp); } } button = gtk_button_new(); icon = gdk_pixmap_create_from_data(main_window->window, xbm_picker_bits, xbm_picker_width, xbm_picker_height, -1, &main_window->style->white, &main_window->style->black); mask = gdk_bitmap_create_from_data(main_window->window, xbm_picker_mask_bits, xbm_picker_width, xbm_picker_height ); iconw = gtk_pixmap_new(icon, mask); gtk_widget_show(iconw); gdk_pixmap_unref( icon ); gdk_pixmap_unref( mask ); gtk_container_add( GTK_CONTAINER (button), iconw ); gtk_table_attach (GTK_TABLE (table), button, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 2, 2); gtk_widget_show(button); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cpick_eyedropper), cp); // --- Table for inputs on right hand side table = add_a_table( 8, 2, 0, hbox ); for ( i=0; iopacity_label = label; gtk_misc_set_alignment( GTK_MISC( label ), 1.0, 0.5 ); if ( i == CPICK_INPUT_HEX ) { cp->inputs[i] = gtk_entry_new(); #if GTK_MAJOR_VERSION == 1 gtk_signal_connect_after(GTK_OBJECT(cp->inputs[i]), "size_request", GTK_SIGNAL_FUNC(hex_size_req), NULL); #else /* #if GTK_MAJOR_VERSION == 2 */ gtk_entry_set_width_chars(GTK_ENTRY(cp->inputs[i]), 9); #endif obj = GTK_OBJECT(cp->inputs[i]); gtk_signal_connect(obj, "focus_out_event", GTK_SIGNAL_FUNC(cpick_hex_change), (gpointer)i); } else { cp->inputs[i] = add_a_spin( input_vals[i][0], input_vals[i][1], input_vals[i][2] ); obj = GTK_OBJECT(GTK_SPIN_BUTTON(cp->inputs[i])->adjustment); gtk_signal_connect(obj, "value_changed", GTK_SIGNAL_FUNC(cpick_spin_change), (gpointer)i); } gtk_object_set_data( obj, CPICK_KEY, cp ); gtk_widget_show (cp->inputs[i]); gtk_table_attach (GTK_TABLE (table), cp->inputs[i], 1, 2, i, i + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); } } GtkWidget *cpick_create() { return (gtk_widget_new(cpicker_get_type(), NULL)); } /* These formulas perfectly reverse ones in cpick_area_mouse() when possible; * however, for sizes > 255 it's impossible in principle - WJ */ static void cpick_area_update_cursors(cpicker *cp) { int x, y, l; l = cp->area_size[CPICK_AREA_PICKER][0] - 1; x = (cp->input_vals[CPICK_INPUT_VALUE] * l + l - 1) / 255; l = cp->area_size[CPICK_AREA_PICKER][1] - 1; y = ((255 - cp->input_vals[CPICK_INPUT_SATURATION]) * l + l - 1) / 255; wjpixmap_move_cursor(cp->areas[CPICK_AREA_PICKER], x, y); x = cp->area_size[CPICK_AREA_HUE][0] / 2; l = cp->area_size[CPICK_AREA_HUE][1] - 1; y = ((1529 - cp->input_vals[CPICK_INPUT_HUE]) * l + l - 1) / 1529; wjpixmap_move_cursor(cp->areas[CPICK_AREA_HUE], x, y); x = cp->area_size[CPICK_AREA_OPACITY][0] / 2; l = cp->area_size[CPICK_AREA_OPACITY][1] - 1; y = ((255 - cp->input_vals[CPICK_INPUT_OPACITY]) * l + l - 1) / 255; wjpixmap_move_cursor(cp->areas[CPICK_AREA_OPACITY], x, y); } /* Update whole dialog according to values */ static void cpick_refresh_inputs_areas(cpicker *cp) { cpick_populate_inputs( cp ); // Update all inputs in dialog cpick_area_precur_create( cp, CPICK_AREA_CURRENT ); // Update current colour cpick_area_picker_create( cp ); // Update picker colours cpick_area_update_cursors( cp ); // Update area cursors } int cpick_get_colour(GtkWidget *w, int *opacity) { cpicker *cp = CPICKER(w); if (!IS_CPICKER(cp)) return (0); if (opacity) *opacity = cp->input_vals[CPICK_INPUT_OPACITY]; return (RGB_2_INT(cp->input_vals[CPICK_INPUT_RED], cp->input_vals[CPICK_INPUT_GREEN], cp->input_vals[CPICK_INPUT_BLUE])); } void cpick_set_colour(GtkWidget *w, int rgb, int opacity) { cpicker *cp = CPICKER(w); if (!IS_CPICKER(cp)) return; cp->input_vals[CPICK_INPUT_RED] = INT_2_R(rgb); cp->input_vals[CPICK_INPUT_GREEN] = INT_2_G(rgb); cp->input_vals[CPICK_INPUT_BLUE] = INT_2_B(rgb); cp->input_vals[CPICK_INPUT_OPACITY] = opacity & 0xFF; cpick_get_hsv(cp); cpick_refresh_inputs_areas(cp); // Update everything } void cpick_set_colour_previous(GtkWidget *w, int rgb, int opacity) { cpicker *cp = CPICKER(w); if (!IS_CPICKER(cp)) return; cp->rgb_previous[0] = INT_2_R(rgb); cp->rgb_previous[1] = INT_2_G(rgb); cp->rgb_previous[2] = INT_2_B(rgb); cp->rgb_previous[3] = opacity & 0xFF; // Update previous colour cpick_area_precur_create(cp, CPICK_AREA_PREVIOUS); } void cpick_set_opacity_visibility( GtkWidget *w, int visible ) { void (*showhide)(GtkWidget *w); cpicker *cp = CPICKER(w); if (!IS_CPICKER(cp)) return; showhide = visible ? gtk_widget_show : gtk_widget_hide; showhide(cp->areas[CPICK_AREA_OPACITY]); showhide(cp->inputs[CPICK_INPUT_OPACITY]); showhide(cp->opacity_label); } #endif /* mtPaint dialog */ #ifdef U_CPICK_GTK /* GtkColorSelection dialog */ GtkWidget *cpick_create() { GtkWidget *w = gtk_color_selection_new(); #if GTK_MAJOR_VERSION == 2 gtk_color_selection_set_has_palette(GTK_COLOR_SELECTION(w), TRUE); #endif return (w); } int cpick_get_colour(GtkWidget *w, int *opacity) { gdouble color[4]; gtk_color_selection_get_color(GTK_COLOR_SELECTION(w), color); if (opacity) *opacity = rint(255 * color[3]); return (RGB_2_INT((int)rint(255 * color[0]), (int)rint(255 * color[1]), (int)rint(255 * color[2]))); } void cpick_set_colour(GtkWidget *w, int rgb, int opacity) { GtkColorSelection *cs = GTK_COLOR_SELECTION(w); gdouble current[4] = { (gdouble)INT_2_R(rgb) / 255.0, (gdouble)INT_2_G(rgb) / 255.0, (gdouble)INT_2_B(rgb) / 255.0, (gdouble)opacity / 255.0 }; #if GTK_MAJOR_VERSION == 1 gdouble previous[4]; // Set current without losing previous memcpy(previous, cs->old_values + 3, sizeof(previous)); gtk_color_selection_set_color( cs, previous ); #endif gtk_color_selection_set_color( cs, current ); } void cpick_set_colour_previous(GtkWidget *w, int rgb, int opacity) { #if GTK_MAJOR_VERSION == 1 gdouble current[4], previous[4] = { (gdouble)INT_2_R(rgb) / 255.0, (gdouble)INT_2_G(rgb) / 255.0, (gdouble)INT_2_B(rgb) / 255.0, (gdouble)opacity / 255.0 }; GtkColorSelection *cs = GTK_COLOR_SELECTION(w); // Set previous without losing current memcpy(current, cs->values + 3, sizeof(current)); gtk_color_selection_set_color( cs, previous ); gtk_color_selection_set_color( cs, current ); #else /* #if GTK_MAJOR_VERSION == 2 */ GdkColor c; c.pixel = 0; c.red = INT_2_R(rgb) * 257; c.green = INT_2_G(rgb) * 257; c.blue = INT_2_B(rgb) * 257; gtk_color_selection_set_previous_color(GTK_COLOR_SELECTION(w), &c); gtk_color_selection_set_previous_alpha(GTK_COLOR_SELECTION(w), opacity * 257); #endif } void cpick_set_opacity_visibility( GtkWidget *w, int visible ) { #if GTK_MAJOR_VERSION == 1 gtk_color_selection_set_opacity(GTK_COLOR_SELECTION(w), visible); #else /* #if GTK_MAJOR_VERSION == 2 */ gtk_color_selection_set_has_opacity_control(GTK_COLOR_SELECTION(w), visible); #endif } #endif /* GtkColorSelection dialog */ mtpaint-3.40/src/mainwindow.c0000644000175000000620000044623311654534660015570 0ustar muammarstaff/* mainwindow.c Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "viewer.h" #include "otherwindow.h" #include "inifile.h" #include "canvas.h" #include "polygon.h" #include "layer.h" #include "info.h" #include "prefs.h" #include "ani.h" #include "channels.h" #include "toolbar.h" #include "csel.h" #include "shifter.h" #include "spawn.h" #include "font.h" #include "icons.h" #include "thread.h" #define GREY_W 153 #define GREY_B 102 const unsigned char greyz[2] = {GREY_W, GREY_B}; // For opacity squares char *channames[NUM_CHANNELS + 1], *allchannames[NUM_CHANNELS + 1]; char *cspnames[NUM_CSPACES]; /// INIFILE ENTRY LISTS typedef struct { char *name; int *var; int defv; } inilist; static inilist ini_bool[] = { { "layermainToggle", &show_layers_main, FALSE }, { "sharperReduce", &sharper_reduce, FALSE }, { "tablet_USE", &tablet_working, FALSE }, { "tga565", &tga_565, FALSE }, { "tgaDefdir", &tga_defdir, FALSE }, { "disableTransparency", &opaque_view, FALSE }, { "smudgeOpacity", &smudge_mode, FALSE }, { "undoableLoad", &undo_load, FALSE }, { "showMenuIcons", &show_menu_icons, FALSE }, { "showTileGrid", &show_tile_grid, FALSE }, { "pasteCommit", &paste_commit, FALSE }, { "applyICC", &apply_icc, FALSE }, { "couple_RGBA", &RGBA_mode, TRUE }, { "gridToggle", &mem_show_grid, TRUE }, { "optimizeChequers", &chequers_optimize, TRUE }, { "quitToggle", &q_quit, TRUE }, { "continuousPainting", &mem_continuous, TRUE }, { "opacityToggle", &mem_undo_opacity, TRUE }, { "imageCentre", &canvas_image_centre, TRUE }, { "view_focus", &vw_focus_on, TRUE }, { "pasteToggle", &show_paste, TRUE }, { "cursorToggle", &cursor_tool, TRUE }, { "autopreviewToggle", &brcosa_auto, TRUE }, { "colorGrid", &color_grid, TRUE }, { "defaultGamma", &use_gamma, TRUE }, #if STATUS_ITEMS != 5 #error Wrong number of "status?Toggle" inifile items defined #endif { "status0Toggle", status_on + 0, TRUE }, { "status1Toggle", status_on + 1, TRUE }, { "status2Toggle", status_on + 2, TRUE }, { "status3Toggle", status_on + 3, TRUE }, { "status4Toggle", status_on + 4, TRUE }, { NULL, NULL } }; static inilist ini_int[] = { { "jpegQuality", &jpeg_quality, 85 }, { "pngCompression", &png_compression, 9 }, { "tgaRLE", &tga_RLE, 0 }, { "jpeg2000Rate", &jp2_rate, 1 }, { "silence_limit", &silence_limit, 18 }, { "gradientOpacity", &grad_opacity, 128 }, { "gridMin", &mem_grid_min, 8 }, { "undoMBlimit", &mem_undo_limit, 32 }, { "undoCommon", &mem_undo_common, 25 }, { "maxThreads", &maxthreads, 0 }, { "backgroundGrey", &mem_background, 180 }, { "pixelNudge", &mem_nudge, 8 }, { "recentFiles", &recent_files, 10 }, { "lastspalType", &spal_mode, 2 }, { "posterizeMode", &posterize_mode, 0 }, { "panSize", &max_pan, 128 }, { "undoDepth", &mem_undo_depth, DEF_UNDO }, { "tileWidth", &tgrid_dx, 32 }, { "tileHeight", &tgrid_dy, 32 }, { "gridRGB", grid_rgb + GRID_NORMAL, RGB_2_INT( 50, 50, 50) }, { "gridBorder", grid_rgb + GRID_BORDER, RGB_2_INT( 0, 219, 0) }, { "gridTrans", grid_rgb + GRID_TRANS, RGB_2_INT( 0, 109, 109) }, { "gridTile", grid_rgb + GRID_TILE, RGB_2_INT(170, 170, 170) }, { "gridSegment", grid_rgb + GRID_SEGMENT,RGB_2_INT(219, 219, 0) }, { NULL, NULL } }; GtkWidget *main_window, *vbox_main, *main_vsplit, *main_hsplit, *main_split, *drawing_palette, *drawing_canvas, *vbox_right, *vw_scrolledwindow, *scrolledwindow_canvas, *menu_widgets[TOTAL_MENU_IDS], *dock_pane, *dock_area; static GtkWidget *main_menubar; int view_image_only, viewer_mode, drag_index, q_quit, cursor_tool; int show_menu_icons, paste_commit; int files_passed, drag_index_vals[2], cursor_corner, show_dock, use_gamma; char **file_args; static int mouse_left_canvas; static int perim_status, perim_x, perim_y, perim_s; // Tool perimeter static void clear_perim_real( int ox, int oy ) { int x0, y0, x1, y1, zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); x0 = margin_main_x + ((perim_x + ox) * scale) / zoom; y0 = margin_main_y + ((perim_y + oy) * scale) / zoom; x1 = margin_main_x + ((perim_x + ox + perim_s - 1) * scale) / zoom + scale - 1; y1 = margin_main_y + ((perim_y + oy + perim_s - 1) * scale) / zoom + scale - 1; repaint_canvas(x0, y0, 1, y1 - y0 + 1); repaint_canvas(x1, y0, 1, y1 - y0 + 1); repaint_canvas(x0 + 1, y0, x1 - x0 - 1, 1); repaint_canvas(x0 + 1, y1, x1 - x0 - 1, 1); } typedef struct { GtkWidget *widget; int actmap; } dis_information; static dis_information *dis_array; static int dis_count, dis_allow; static int dis_miss = ~0; void mapped_dis_add(GtkWidget *widget, int actmap) { if (!actmap) return; if (dis_count >= dis_allow) dis_array = realloc(dis_array, (dis_allow += 128) * sizeof(dis_information)); /* If no memory, just die of SIGSEGV */ dis_array[dis_count].widget = widget; dis_array[dis_count].actmap = actmap; dis_count++; } /* Enable or disable menu items */ void mapped_item_state(int statemap) { int i; if (dis_miss == statemap) return; // Nothing changed for (i = 0; i < dis_count; i++) gtk_widget_set_sensitive(dis_array[i].widget, !!(dis_array[i].actmap & statemap)); dis_miss = statemap; } static void pressed_load_recent(int item) { char txt[64]; if ((layers_total ? check_layers_for_changes() : check_for_changes()) == 1) return; sprintf(txt, "file%i", item); do_a_load(inifile_get(txt, "."), undo_load); // Load requested file } static void pressed_crop() { int res, rect[4]; if ( marq_status != MARQUEE_DONE ) return; marquee_at(rect); if ((rect[0] == 0) && (rect[2] >= mem_width) && (rect[1] == 0) && (rect[3] >= mem_height)) return; res = mem_image_resize(rect[2], rect[3], -rect[0], -rect[1], 0); if (!res) { pressed_select(FALSE); change_to_tool(DEFAULT_TOOL_ICON); update_stuff(UPD_GEOM); } else memory_errors(res); } void pressed_select(int all) { int i = 0; /* Remove old selection */ if (marq_status != MARQUEE_NONE) { i = UPD_SEL; if (marq_status >= MARQUEE_PASTE) i = UPD_SEL | CF_DRAW; else paint_marquee(MARQ_HIDE, 0, 0, NULL); marq_status = MARQUEE_NONE; } if ((tool_type == TOOL_POLYGON) && (poly_status != POLY_NONE)) { poly_points = 0; poly_status = POLY_NONE; i = UPD_SEL | CF_DRAW; // Have to erase polygon } /* And deal with selection persistence too */ marq_x1 = marq_y1 = marq_x2 = marq_y2 = -1; while (all) /* Select entire canvas */ { i |= UPD_SEL; marq_x1 = 0; marq_y1 = 0; marq_x2 = mem_width - 1; marq_y2 = mem_height - 1; if (tool_type != TOOL_SELECT) { /* Switch tool, and let that & marquee persistence * do all the rest except full redraw */ change_to_tool(TTB_SELECT); i &= CF_DRAW; break; } marq_status = MARQUEE_DONE; if (i & CF_DRAW) break; // Full redraw will draw marquee too paint_marquee(MARQ_SHOW, 0, 0, NULL); break; } if (i) update_stuff(i); } static void pressed_remove_unused() { if (mem_remove_unused_check() <= 0) alert_box(_("Error"), _("There were no unused colours to remove!"), NULL); else { spot_undo(UNDO_XPAL); mem_remove_unused(); mem_undo_prepare(); update_stuff(UPD_TPAL); } } static void pressed_default_pal() { spot_undo(UNDO_PAL); mem_pal_copy( mem_pal, mem_pal_def ); mem_cols = mem_pal_def_i; update_stuff(UPD_PAL); } static void pressed_remove_duplicates() { char *mess; int dups = scan_duplicates(); if (!dups) { alert_box(_("Error"), _("The palette does not contain 2 colours that have identical RGB values"), NULL); return; } mess = g_strdup_printf(_("The palette contains %i colours that have identical RGB values. Do you really want to merge them into one index and realign the canvas?"), dups); if (alert_box(_("Warning"), mess, _("Yes"), _("No"), NULL) == 1) { spot_undo(UNDO_XPAL); remove_duplicates(); mem_undo_prepare(); update_stuff(UPD_PAL); } g_free(mess); } static void pressed_dither_A() { mem_find_dither(mem_col_A24.red, mem_col_A24.green, mem_col_A24.blue); update_stuff(UPD_ABP); } static void pressed_mask(int val) { mem_mask_setall(val); update_stuff(UPD_CMASK); } // System clipboard import static GtkTargetEntry clip_formats[] = { { NULL, 0, FT_NONE }, { "application/x-mtpaint-clipboard", 0, FT_PNG | FTM_EXTEND }, { "image/png", 0, FT_PNG }, { "image/bmp", 0, FT_BMP }, { "image/x-bmp", 0, FT_BMP }, { "image/x-MS-bmp", 0, FT_BMP }, #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 /* These two don't make sense without X */ { "PIXMAP", 0, FT_PIXMAP }, { "BITMAP", 0, FT_PIXMAP }, /* !!! BITMAP requests are handled same as PIXMAP - because it is only * done to appease buggy XPaint which requests both and crashes if * receiving only one - WJ */ #endif }; #define CLIP_TARGETS (sizeof(clip_formats) / sizeof(GtkTargetEntry)) static GdkAtom clip_atoms[CLIP_TARGETS]; /* Seems it'll be better to prefer BMP when talking to the likes of GIMP - * they send PNGs really slowly (likely, compressed to the max); but not * everyone supports alpha in BMPs. */ static int clipboard_check_fn(GtkSelectionData *data, gpointer user_data) { GdkAtom *targets, tst; int i, j, k, n = data->length / sizeof(GdkAtom); if ((n <= 0) || (data->format != 32) || (data->type != GDK_SELECTION_TYPE_ATOM)) return (FALSE); /* Convert names to atoms if not done already */ if (!clip_atoms[1]) { for (i = 1; i < CLIP_TARGETS; i++) clip_atoms[i] = gdk_atom_intern(clip_formats[i].target, FALSE); } /* Search for best match */ targets = (GdkAtom *)data->data; for (i = 0 , k = CLIP_TARGETS; i < n; i++) { tst = *targets++; //g_print("\"%s\" ", gdk_atom_name(tst)); for (j = 1; (j < k) && (tst != clip_atoms[j]); j++); k = j; } //g_print(": %d\n", k); *(int *)user_data = k; return (k < CLIP_TARGETS); } static int check_clipboard(int which) { int res; if (internal_clipboard(which)) return (0); // if we're who put data there if (!process_clipboard(which, "TARGETS", GTK_SIGNAL_FUNC(clipboard_check_fn), &res)) return (0); // no luck return (res); } static int clipboard_import_fn(GtkSelectionData *data, gpointer user_data) { //g_print("!!! %X %d\n", data->data, data->length); return (load_mem_image((unsigned char *)data->data, data->length, ((int *)user_data)[0], ((int *)user_data)[1]) == 1); } int import_clipboard(int mode) { int i = 0, n = 0, udata[2] = { mode }; #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 // If no luck with CLIPBOARD, check PRIMARY too for (; !i && (n < 2); n++) #endif if ((i = check_clipboard(n))) { udata[1] = (int)clip_formats[i].info; i = process_clipboard(n, clip_formats[i].target, GTK_SIGNAL_FUNC(clipboard_import_fn), udata); } return (i); } static void setup_clip_save(ls_settings *settings) { init_ls_settings(settings, NULL); memcpy(settings->img, mem_clip.img, sizeof(chanlist)); settings->pal = mem_pal; settings->width = mem_clip_w; settings->height = mem_clip_h; settings->bpp = mem_clip_bpp; settings->colors = mem_cols; } static int clipboard_export_fn(GtkSelectionData *data, gpointer user_data) { ls_settings settings; unsigned char *buf; int res, len, type = (int)user_data; //g_print("Entered! %X %d\n", data, type); if (!data) return (FALSE); // Someone else stole system clipboard if (!mem_clipboard) return (FALSE); // Our own clipboard got emptied /* Prepare settings */ setup_clip_save(&settings); settings.mode = FS_CLIPBOARD; settings.ftype = type; settings.png_compression = 1; // Speed is of the essence res = save_mem_image(&buf, &len, &settings); //g_print("Save returned %d\n", res); if (res) return (FALSE); // No luck creating in-memory image #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 if ((type & FTM_FTYPE) == FT_PIXMAP) { /* !!! XID of pixmap gets returned in buffer pointer */ gtk_selection_data_set(data, data->target, 32, (guchar *)&buf, len); return (TRUE); } #endif /* !!! Should allocation for data copying fail, GTK+ will die horribly - so * maybe it'll be better to hack up the function and pass the original data * instead; but to do so, I'd need to use g_try_*() allocation functions in * memFILE writing path - WJ */ gtk_selection_data_set(data, data->target, 8, buf, len); free(buf); return (TRUE); } static int export_clipboard() { int res; if (!mem_clipboard) return (FALSE); res = offer_clipboard(0, clip_formats + 1, CLIP_TARGETS - 1, GTK_SIGNAL_FUNC(clipboard_export_fn)); #if (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11 /* Offer both CLIPBOARD and PRIMARY */ res |= offer_clipboard(1, clip_formats + 1, CLIP_TARGETS - 1, GTK_SIGNAL_FUNC(clipboard_export_fn)); #endif return (res); } int gui_save(char *filename, ls_settings *settings) { int res = -2, fflags = file_formats[settings->ftype].flags; char *mess = NULL, *f8; /* Mismatched format - raise an error right here */ if ((fflags & FF_NOSAVE) || !(fflags & FF_SAVE_MASK)) { int maxc = 0; char *fform = NULL, *fname = file_formats[settings->ftype].name; /* RGB to indexed (or to unsaveable) */ if (mem_img_bpp == 3) fform = _("RGB"); /* Indexed to RGB, or to unsaveable format */ else if (!(fflags & FF_IDX) || (fflags & FF_NOSAVE)) fform = _("indexed"); /* More than 16 colors */ else if (fflags & FF_16) maxc = 16; /* More than 2 colors */ else maxc = 2; /* Build message */ if (fform) mess = g_strdup_printf(_("You are trying to save an %s image to an %s file which is not possible. I would suggest you save with a PNG extension."), fform, fname); else mess = g_strdup_printf(_("You are trying to save an %s file with a palette of more than %d colours. Either use another format or reduce the palette to %d colours."), fname, maxc, maxc); } else { /* Prepare to save image */ memcpy(settings->img, mem_img, sizeof(chanlist)); settings->pal = mem_pal; settings->width = mem_width; settings->height = mem_height; settings->bpp = mem_img_bpp; settings->colors = mem_cols; res = save_image(filename, settings); } if (res < 0) { if (res == -1) { f8 = gtkuncpy(NULL, filename, 0); mess = g_strdup_printf(_("Unable to save file: %s"), f8); g_free(f8); } else if ((res == WRONG_FORMAT) && (settings->ftype == FT_XPM)) mess = g_strdup(_("You are trying to save an XPM file with more than 4096 colours. Either use another format or posterize the image to 4 bits, or otherwise reduce the number of colours.")); if (mess) { alert_box(_("Error"), mess, NULL); g_free(mess); } } else { notify_unchanged(filename); register_file(filename); } return res; } static void pressed_save_file() { ls_settings settings; while (mem_filename) { init_ls_settings(&settings, NULL); settings.ftype = file_type_by_ext(mem_filename, FF_IMAGE); if (settings.ftype == FT_NONE) break; settings.mode = FS_PNG_SAVE; if (gui_save(mem_filename, &settings) < 0) break; return; } file_selector(FS_PNG_SAVE); } char mem_clip_file[PATHBUF]; static void load_clip(int item) { char clip[PATHBUF]; int i; if (item == -1) // System clipboard i = import_clipboard(FS_CLIPBOARD); else // Disk file { snprintf(clip, PATHBUF, "%s%i", mem_clip_file, item); i = load_image(clip, FS_CLIP_FILE, FT_PNG) == 1; } if (!i) alert_box(_("Error"), _("Unable to load clipboard"), NULL); update_stuff(UPD_XCOPY); if (i && (MEM_BPP >= mem_clip_bpp)) pressed_paste(TRUE); } static void save_clip(int item) { ls_settings settings; char clip[PATHBUF]; int i; if (item == -1) // Exporting clipboard { export_clipboard(); return; } /* Prepare settings */ setup_clip_save(&settings); settings.mode = FS_CLIP_FILE; settings.ftype = FT_PNG; snprintf(clip, PATHBUF, "%s%i", mem_clip_file, item); i = save_image(clip, &settings); if (i) alert_box(_("Error"), _("Unable to save clipboard"), NULL); } void pressed_opacity(int opacity) { if (IS_INDEXED) opacity = 255; tool_opacity = opacity < 1 ? 1 : opacity > 255 ? 255 : opacity; update_stuff(UPD_OPAC); } void pressed_value(int value) { if (mem_channel == CHN_IMAGE) return; channel_col_A[mem_channel] = value < 0 ? 0 : value > 255 ? 255 : value; update_stuff(UPD_CAB); } static void toggle_view() { if ((view_image_only = !view_image_only)) { int i; gtk_widget_hide(main_menubar); for (i = TOOLBAR_MAIN; i < TOOLBAR_MAX; i++) if (toolbar_boxes[i]) gtk_widget_hide(toolbar_boxes[i]); } else { gtk_widget_show(main_menubar); toolbar_showhide(); // Switch toolbar/status/palette on if needed } } void zoom_in() { if (can_zoom >= 1) align_size(can_zoom + 1); else align_size(1.0 / (rint(1.0 / can_zoom) - 1)); } void zoom_out() { if (can_zoom > 1) align_size(can_zoom - 1); else align_size(1.0 / (rint(1.0 / can_zoom) + 1)); } static void zoom_grid(int state) { mem_show_grid = state; update_stuff(UPD_RENDER); } static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data); static void quit_all(int mode) { if (mode || q_quit) delete_event( NULL, NULL, NULL ); } /* Autoscroll canvas if required */ static int real_move_mouse(int *vxy, int x, int y, int dx, int dy) { int nxy[4]; if ((x >= vxy[0]) && (x < vxy[2]) && (y >= vxy[1]) && (y < vxy[3]) && wjcanvas_scroll_in(drawing_canvas, x + dx, y + dy)) { wjcanvas_get_vport(drawing_canvas, nxy); dx += vxy[0] - nxy[0]; dy += vxy[1] - nxy[1]; } return (move_mouse_relative(dx, dy)); } /* Forward declaration */ static void mouse_event(int event, int xc, int yc, guint state, guint button, gdouble pressure, int mflag, int dx, int dy); /* For "dual" mouse control */ static int unreal_move, lastdx, lastdy; static void move_mouse(int dx, int dy, int button) { static GdkModifierType bmasks[4] = { 0, GDK_BUTTON1_MASK, GDK_BUTTON2_MASK, GDK_BUTTON3_MASK }; GdkModifierType state; int x, y, vxy[4], zoom = 1, scale = 1; if (!unreal_move) lastdx = lastdy = 0; if (!mem_img[CHN_IMAGE]) return; dx += lastdx; dy += lastdy; gdk_window_get_pointer(drawing_canvas->window, &x, &y, &state); wjcanvas_get_vport(drawing_canvas, vxy); x += vxy[0]; y += vxy[1]; if (button) /* Clicks simulated without extra movements */ { mouse_event(GDK_BUTTON_PRESS, x, y, state, button, 1.0, 1, dx, dy); state |= bmasks[button]; // Shows state _prior_ to event mouse_event(GDK_BUTTON_RELEASE, x, y, state, button, 1.0, 1, dx, dy); return; } if ((state & (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) == (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) button = 13; else if (state & GDK_BUTTON1_MASK) button = 1; else if (state & GDK_BUTTON3_MASK) button = 3; else if (state & GDK_BUTTON2_MASK) button = 2; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); if (zoom > 1) /* Fine control required */ { lastdx = dx; lastdy = dy; mouse_event(GDK_MOTION_NOTIFY, x, y, state, button, 1.0, 1, dx, dy); /* Nudge cursor when needed */ if ((abs(lastdx) >= zoom) || (abs(lastdy) >= zoom)) { dx = lastdx * can_zoom; dy = lastdy * can_zoom; lastdx -= dx * zoom; lastdy -= dy * zoom; unreal_move = 3; /* Event can be delayed or lost */ real_move_mouse(vxy, x, y, dx, dy); } else unreal_move = 2; } else /* Real mouse is precise enough */ { unreal_move = 1; /* Simulate movement if failed to actually move mouse */ if (!real_move_mouse(vxy, x, y, dx * scale, dy * scale)) { lastdx = dx; lastdy = dy; mouse_event(GDK_MOTION_NOTIFY, x, y, state, button, 1.0, 1, dx, dy); } } } void stop_line() { int i = line_status == LINE_LINE; line_status = LINE_NONE; if (i) repaint_line(NULL); } int check_zoom_keys_real(int act_m) { int action = act_m >> 16; if ((action == ACT_ZOOM) || (action == ACT_VIEW) || (action == ACT_VWZOOM)) { action_dispatch(action, (act_m & 0xFFFF) - 0x8000, 0, TRUE); return (TRUE); } return (FALSE); } int check_zoom_keys(int act_m) { int action = act_m >> 16; if (check_zoom_keys_real(act_m)) return (TRUE); if ((action == ACT_DOCK) || (action == ACT_QUIT) || (action == DLG_BRCOSA) || (action == ACT_PAN) || (action == ACT_CROP) || (action == ACT_SWAP_AB) || (action == DLG_CHOOSER) || (action == ACT_TOOL)) action_dispatch(action, (act_m & 0xFFFF) - 0x8000, 0, TRUE); else return (FALSE); return (TRUE); } #define _C (GDK_CONTROL_MASK) #define _S (GDK_SHIFT_MASK) #define _A (GDK_MOD1_MASK) #define _CS (GDK_CONTROL_MASK | GDK_SHIFT_MASK) #define _CSA (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK) static const int mod_bits[] = { 0, _C, _S, _CS, _CSA }; #define MOD_0 0x00 #define MOD_c 0x01 #define MOD_s 0x02 #define MOD_cs 0x03 #define MOD_csa 0x04 #define MOD_S 0x22 #define MOD_cS 0x23 #define MOD_Cs 0x13 #define MOD_CS 0x33 typedef struct { short action, mode; int key; unsigned char mod; } key_action; static key_action main_keys[] = { { ACT_QUIT, 0, GDK_q, MOD_0 }, { ACT_ZOOM, 0, GDK_plus, MOD_cs }, { ACT_ZOOM, 0, GDK_KP_Add, MOD_cs }, { ACT_ZOOM, -1, GDK_minus, MOD_cs }, { ACT_ZOOM, -1, GDK_KP_Subtract, MOD_cs }, { ACT_ZOOM, -10, GDK_KP_1, MOD_cs }, { ACT_ZOOM, -10, GDK_1, MOD_cs }, { ACT_ZOOM, -4, GDK_KP_2, MOD_cs }, { ACT_ZOOM, -4, GDK_2, MOD_cs }, { ACT_ZOOM, -2, GDK_KP_3, MOD_cs }, { ACT_ZOOM, -2, GDK_3, MOD_cs }, { ACT_ZOOM, 1, GDK_KP_4, MOD_cs }, { ACT_ZOOM, 1, GDK_4, MOD_cs }, { ACT_ZOOM, 4, GDK_KP_5, MOD_cs }, { ACT_ZOOM, 4, GDK_5, MOD_cs }, { ACT_ZOOM, 8, GDK_KP_6, MOD_cs }, { ACT_ZOOM, 8, GDK_6, MOD_cs }, { ACT_ZOOM, 12, GDK_KP_7, MOD_cs }, { ACT_ZOOM, 12, GDK_7, MOD_cs }, { ACT_ZOOM, 16, GDK_KP_8, MOD_cs }, { ACT_ZOOM, 16, GDK_8, MOD_cs }, { ACT_ZOOM, 20, GDK_KP_9, MOD_cs }, { ACT_ZOOM, 20, GDK_9, MOD_cs }, { ACT_VIEW, 0, GDK_Home, MOD_0 }, { DLG_BRCOSA, 0, GDK_Insert, MOD_cs }, { ACT_PAN, 0, GDK_End, MOD_cs }, { ACT_CROP, 0, GDK_Delete, MOD_cs }, { ACT_SWAP_AB, 0, GDK_x, MOD_csa }, { DLG_CHOOSER, CHOOSE_PATTERN, GDK_F2, MOD_csa }, { DLG_CHOOSER, CHOOSE_BRUSH, GDK_F3, MOD_csa }, { DLG_CHOOSER, CHOOSE_COLOR, GDK_e, MOD_csa }, { ACT_TOOL, TTB_PAINT, GDK_F4, MOD_csa }, { ACT_TOOL, TTB_SELECT, GDK_F9, MOD_csa }, { ACT_TOOL, TTB_FLOOD, GDK_f, MOD_csa }, { ACT_TOOL, TTB_LINE, GDK_d, MOD_csa }, { ACT_DOCK, 0, GDK_F12, MOD_csa }, { ACT_SEL_MOVE, 5, GDK_Left, MOD_cS }, { ACT_SEL_MOVE, 5, GDK_KP_Left, MOD_cS }, { ACT_SEL_MOVE, 7, GDK_Right, MOD_cS }, { ACT_SEL_MOVE, 7, GDK_KP_Right, MOD_cS }, { ACT_SEL_MOVE, 3, GDK_Down, MOD_cS }, { ACT_SEL_MOVE, 3, GDK_KP_Down, MOD_cS }, { ACT_SEL_MOVE, 9, GDK_Up, MOD_cS }, { ACT_SEL_MOVE, 9, GDK_KP_Up, MOD_cS }, { ACT_SEL_MOVE, 4, GDK_Left, MOD_cs }, { ACT_SEL_MOVE, 4, GDK_KP_Left, MOD_cs }, { ACT_SEL_MOVE, 6, GDK_Right, MOD_cs }, { ACT_SEL_MOVE, 6, GDK_KP_Right, MOD_cs }, { ACT_SEL_MOVE, 2, GDK_Down, MOD_cs }, { ACT_SEL_MOVE, 2, GDK_KP_Down, MOD_cs }, { ACT_SEL_MOVE, 8, GDK_Up, MOD_cs }, { ACT_SEL_MOVE, 8, GDK_KP_Up, MOD_cs }, { ACT_OPAC, 1, GDK_KP_1, MOD_Cs }, { ACT_OPAC, 1, GDK_1, MOD_Cs }, { ACT_OPAC, 2, GDK_KP_2, MOD_Cs }, { ACT_OPAC, 2, GDK_2, MOD_Cs }, { ACT_OPAC, 3, GDK_KP_3, MOD_Cs }, { ACT_OPAC, 3, GDK_3, MOD_Cs }, { ACT_OPAC, 4, GDK_KP_4, MOD_Cs }, { ACT_OPAC, 4, GDK_4, MOD_Cs }, { ACT_OPAC, 5, GDK_KP_5, MOD_Cs }, { ACT_OPAC, 5, GDK_5, MOD_Cs }, { ACT_OPAC, 6, GDK_KP_6, MOD_Cs }, { ACT_OPAC, 6, GDK_6, MOD_Cs }, { ACT_OPAC, 7, GDK_KP_7, MOD_Cs }, { ACT_OPAC, 7, GDK_7, MOD_Cs }, { ACT_OPAC, 8, GDK_KP_8, MOD_Cs }, { ACT_OPAC, 8, GDK_8, MOD_Cs }, { ACT_OPAC, 9, GDK_KP_9, MOD_Cs }, { ACT_OPAC, 9, GDK_9, MOD_Cs }, { ACT_OPAC, 10, GDK_KP_0, MOD_Cs }, { ACT_OPAC, 10, GDK_0, MOD_Cs }, { ACT_OPAC, 0, GDK_plus, MOD_Cs }, { ACT_OPAC, 0, GDK_KP_Add, MOD_Cs }, { ACT_OPAC, -1, GDK_minus, MOD_Cs }, { ACT_OPAC, -1, GDK_KP_Subtract, MOD_Cs }, { ACT_LR_MOVE, 5, GDK_Left, MOD_CS }, { ACT_LR_MOVE, 5, GDK_KP_Left, MOD_CS }, { ACT_LR_MOVE, 7, GDK_Right, MOD_CS }, { ACT_LR_MOVE, 7, GDK_KP_Right, MOD_CS }, { ACT_LR_MOVE, 3, GDK_Down, MOD_CS }, { ACT_LR_MOVE, 3, GDK_KP_Down, MOD_CS }, { ACT_LR_MOVE, 9, GDK_Up, MOD_CS }, { ACT_LR_MOVE, 9, GDK_KP_Up, MOD_CS }, { ACT_LR_MOVE, 4, GDK_Left, MOD_Cs }, { ACT_LR_MOVE, 4, GDK_KP_Left, MOD_Cs }, { ACT_LR_MOVE, 6, GDK_Right, MOD_Cs }, { ACT_LR_MOVE, 6, GDK_KP_Right, MOD_Cs }, { ACT_LR_MOVE, 2, GDK_Down, MOD_Cs }, { ACT_LR_MOVE, 2, GDK_KP_Down, MOD_Cs }, { ACT_LR_MOVE, 8, GDK_Up, MOD_Cs }, { ACT_LR_MOVE, 8, GDK_KP_Up, MOD_Cs }, { ACT_ESC, 0, GDK_Escape, MOD_cs }, { DLG_SCALE, 0, GDK_Page_Up, MOD_cs }, { DLG_SIZE, 0, GDK_Page_Down, MOD_cs }, { ACT_COMMIT, 0, GDK_Return, MOD_s }, { ACT_COMMIT, 1, GDK_Return, MOD_S }, { ACT_COMMIT, 0, GDK_KP_Enter, MOD_s }, { ACT_COMMIT, 1, GDK_KP_Enter, MOD_S }, { ACT_RCLICK, 0, GDK_BackSpace, MOD_0 }, { ACT_ARROW, 2, GDK_a, MOD_csa }, { ACT_ARROW, 3, GDK_s, MOD_csa }, { ACT_A, -1, GDK_bracketleft, MOD_cs }, { ACT_A, 1, GDK_bracketright, MOD_cs}, { ACT_B, -1, GDK_bracketleft, MOD_cS }, { ACT_B, -1, GDK_braceleft, MOD_cS }, { ACT_B, 1, GDK_bracketright, MOD_cS}, { ACT_B, 1, GDK_braceright, MOD_cS }, { ACT_CHANNEL, CHN_IMAGE, GDK_KP_1, MOD_cS }, { ACT_CHANNEL, CHN_IMAGE, GDK_1, MOD_cS }, { ACT_CHANNEL, CHN_ALPHA, GDK_KP_2, MOD_cS }, { ACT_CHANNEL, CHN_ALPHA, GDK_2, MOD_cS }, { ACT_CHANNEL, CHN_SEL, GDK_KP_3, MOD_cS }, { ACT_CHANNEL, CHN_SEL, GDK_3, MOD_cS }, { ACT_CHANNEL, CHN_MASK, GDK_KP_4, MOD_cS }, { ACT_CHANNEL, CHN_MASK, GDK_4, MOD_cS }, { ACT_VWZOOM, 0, GDK_plus, MOD_cS }, { ACT_VWZOOM, 0, GDK_KP_Add, MOD_cS }, { ACT_VWZOOM, -1, GDK_minus, MOD_cS }, { ACT_VWZOOM, -1, GDK_KP_Subtract, MOD_cS }, { 0, 0, 0, 0 } }; static guint main_keycodes[sizeof(main_keys) / sizeof(key_action)]; static void fill_keycodes() { int i; for (i = 0; main_keys[i].action; i++) { main_keycodes[i] = keyval_key(main_keys[i].key); } } /* "Tool of last resort" for when shortcuts don't work */ static void rebind_keys() { fill_keycodes(); #if GTK_MAJOR_VERSION > 1 gtk_signal_emit_by_name(GTK_OBJECT(main_window), "keys_changed", NULL); #endif } int wtf_pressed(GdkEventKey *event) { key_action *ap = main_keys, *cmatch = NULL; guint *kcd = main_keycodes; guint realkey = real_key(event); guint lowkey = low_key(event); for (; ap->action; kcd++ , ap++) { /* Relevant modifiers should match first */ if ((event->state & mod_bits[ap->mod & 0xF]) != mod_bits[ap->mod >> 4]) continue; /* Let keyval have priority; this is also a workaround for * GTK2 bug #136280 */ if (lowkey == ap->key) break; /* Let keycodes match when keyvals don't */ if (realkey == *kcd) cmatch = ap; } /* !!! If the starting layout has the keyval+mods combo mapped to one key, and * the current layout to another, both will work till "rebind keys" is done. * I like this better than shortcuts moving with every layout switch - WJ */ /* If we have only a keycode match */ if (cmatch && !ap->action) ap = cmatch; /* Return 0 if no match */ if (!ap->action) return (0); /* Return the matching action */ return ((ap->action << 16) + (ap->mode + 0x8000)); } int dock_focused() { GtkWidget *focus = GTK_WINDOW(main_window)->focus_widget; return (focus && dock_area && gtk_widget_is_ancestor(focus, dock_area)); } static int check_smart_menu_keys(GdkEventKey *event); static gboolean handle_keypress(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { static GdkEventKey *now_handling; int act_m = 0, handled = 0; /* Do nothing if called recursively */ if (event == now_handling) return (FALSE); /* Builtin handlers have priority outside of dock */ if (!dock_focused()); /* Pressing Escape moves focus out of dock - to nowhere */ else if (event->keyval == GDK_Escape) { gtk_window_set_focus(GTK_WINDOW(main_window), NULL); act_m = ACTMOD_DUMMY; } #if GTK_MAJOR_VERSION == 2 /* We let docked widgets process the keys first */ else if (gtk_window_propagate_key_event(GTK_WINDOW(widget), event)) return (TRUE); #endif /* Default handlers have priority inside dock */ else { // Be ready to handle nested events GdkEventKey *was_handling = now_handling; gint result = 0; now_handling = event; gtk_signal_emit_by_name(GTK_OBJECT(widget), "key_press_event", event, &result); now_handling = was_handling; if (result) act_m = ACTMOD_DUMMY; handled = ACTMOD_DUMMY; } if (!act_m) { act_m = wtf_pressed(event); if (!act_m) act_m = check_smart_menu_keys(event); if (!act_m) act_m = handled; if (!act_m) return (FALSE); } #if GTK_MAJOR_VERSION == 1 /* Return value alone doesn't stop GTK1 from running other handlers */ gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event"); #endif if (act_m != ACTMOD_DUMMY) action_dispatch(act_m >> 16, (act_m & 0xFFFF) - 0x8000, 0, TRUE); return (TRUE); } static void draw_arrow(int mode) { int i, xa1, xa2, ya1, ya2, minx, maxx, miny, maxy, w, h; double uvx, uvy; // Line length & unit vector lengths int oldmode = mem_undo_opacity; grad_info svgrad; if (!((tool_type == TOOL_LINE) && (line_status != LINE_NONE) && ((line_x1 != line_x2) || (line_y1 != line_y2)))) return; svgrad = gradient[mem_channel]; line_to_gradient(); // Calculate 2 coords for arrow corners uvy = sqrt((line_x1 - line_x2) * (line_x1 - line_x2) + (line_y1 - line_y2) * (line_y1 - line_y2)); uvx = (line_x1 - line_x2) / uvy; uvy = (line_y1 - line_y2) / uvy; xa1 = rint(line_x2 + tool_flow * (uvx - uvy * 0.5)); xa2 = rint(line_x2 + tool_flow * (uvx + uvy * 0.5)); ya1 = rint(line_y2 + tool_flow * (uvy + uvx * 0.5)); ya2 = rint(line_y2 + tool_flow * (uvy - uvx * 0.5)); // !!! Call this, or let undo engine do it? // mem_undo_prepare(); pen_down = 0; tool_action(GDK_NOTHING, line_x2, line_y2, 1, 1.0); line_status = LINE_LINE; // Draw arrow lines & circles mem_undo_opacity = TRUE; f_circle(xa1, ya1, tool_size); f_circle(xa2, ya2, tool_size); tline(xa1, ya1, line_x2, line_y2, tool_size); tline(xa2, ya2, line_x2, line_y2, tool_size); if (mode == 3) { // Draw 3rd line and fill arrowhead tline(xa1, ya1, xa2, ya2, tool_size ); poly_points = 0; poly_add(line_x2, line_y2); poly_add(xa1, ya1); poly_add(xa2, ya2); poly_paint(); poly_points = 0; } mem_undo_opacity = oldmode; gradient[mem_channel] = svgrad; mem_undo_prepare(); pen_down = 0; // Update screen areas minx = xa1 < xa2 ? xa1 : xa2; if (minx > line_x2) minx = line_x2; maxx = xa1 > xa2 ? xa1 : xa2; if (maxx < line_x2) maxx = line_x2; miny = ya1 < ya2 ? ya1 : ya2; if (miny > line_y2) miny = line_y2; maxy = ya1 > ya2 ? ya1 : ya2; if (maxy < line_y2) maxy = line_y2; i = (tool_size + 1) >> 1; minx -= i; miny -= i; maxx += i; maxy += i; w = maxx - minx + 1; h = maxy - miny + 1; update_stuff(UPD_IMGP); main_update_area(minx, miny, w, h); vw_update_area(minx, miny, w, h); } int check_for_changes() // 1=STOP, 2=IGNORE, -10=NOT CHANGED { if (!mem_changed) return (-10); return (alert_box(_("Warning"), _("This canvas/palette contains changes that have not been saved. Do you really want to lose these changes?"), _("Cancel Operation"), _("Lose Changes"), NULL)); } void var_init() { inilist *ilp; /* Load listed settings */ for (ilp = ini_bool; ilp->name; ilp++) *(ilp->var) = inifile_get_gboolean(ilp->name, ilp->defv); for (ilp = ini_int; ilp->name; ilp++) *(ilp->var) = inifile_get_gint32(ilp->name, ilp->defv); } void string_init() { char *cnames[NUM_CHANNELS + 1] = { _("Image"), _("Alpha"), _("Selection"), _("Mask"), NULL }; char *cspaces[NUM_CSPACES] = { _("RGB"), _("sRGB"), "LXN" }; int i; for (i = 0; i < NUM_CHANNELS + 1; i++) allchannames[i] = channames[i] = cnames[i]; channames[CHN_IMAGE] = ""; for (i = 0; i < NUM_CSPACES; i++) cspnames[i] = cspaces[i]; } static void toggle_dock(int state, int internal); static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { inilist *ilp; int i; i = layers_total ? check_layers_for_changes() : check_for_changes(); if (i == -10) { i = 2; if (inifile_get_gboolean("exitToggle", FALSE)) i = alert_box(MT_VERSION, _("Do you really want to quit?"), _("NO"), _("YES"), NULL); } if (i != 2) return (TRUE); // Cancel quitting toggle_dock(FALSE, TRUE); win_store_pos(main_window, "window"); // Get rid of extra windows + remember positions delete_layers_window(); toolbar_exit(); // Remember the toolbar settings /* Store listed settings */ for (ilp = ini_bool; ilp->name; ilp++) inifile_set_gboolean(ilp->name, *(ilp->var)); for (ilp = ini_int; ilp->name; ilp++) inifile_set_gint32(ilp->name, *(ilp->var)); gtk_main_quit(); return (FALSE); } #if GTK_MAJOR_VERSION == 2 gint canvas_scroll_gtk2( GtkWidget *widget, GdkEventScroll *event ) { if (inifile_get_gboolean( "scrollwheelZOOM", FALSE )) { if (event->direction == GDK_SCROLL_DOWN) zoom_out(); else zoom_in(); return (TRUE); } if (event->state & _C) /* Convert up-down into left-right */ { if (event->direction == GDK_SCROLL_UP) event->direction = GDK_SCROLL_LEFT; else if (event->direction == GDK_SCROLL_DOWN) event->direction = GDK_SCROLL_RIGHT; } /* Normal GTK+2 scrollwheel behaviour */ return (FALSE); } #endif int grad_tool(int event, int x, int y, guint state, guint button) { int i, j, old[4]; double d, stroke; grad_info *grad = gradient + mem_channel; /* Handle stroke gradients */ if (tool_type != TOOL_GRADIENT) { /* Not a gradient stroke */ if (!mem_gradient || (grad->status != GRAD_NONE) || (grad->wmode == GRAD_MODE_NONE) || (event == GDK_BUTTON_RELEASE) || !button) return (FALSE); /* Limit coordinates to canvas */ x = x < 0 ? 0 : x >= mem_width ? mem_width - 1 : x; y = y < 0 ? 0 : y >= mem_height ? mem_height - 1 : y; /* Standing still */ if ((tool_ox == x) && (tool_oy == y)) return (FALSE); if (!pen_down || (tool_type > TOOL_SPRAY)) /* Begin stroke */ { grad_path = grad->xv = grad->yv = 0.0; } else /* Continue stroke */ { i = x - tool_ox; j = y - tool_oy; stroke = sqrt(i * i + j * j); /* First step - anchor rear end */ if (grad_path == 0.0) { d = tool_size * 0.5 / stroke; grad_x0 = tool_ox - i * d; grad_y0 = tool_oy - j * d; } /* Scalar product */ d = (tool_ox - grad_x0) * (x - tool_ox) + (tool_oy - grad_y0) * (y - tool_oy); if (d < 0.0) /* Going backward - flip rear */ { d = tool_size * 0.5 / stroke; grad_x0 = x - i * d; grad_y0 = y - j * d; grad_path += tool_size + stroke; } else /* Going forward or sideways - drag rear */ { stroke = sqrt((x - grad_x0) * (x - grad_x0) + (y - grad_y0) * (y - grad_y0)); d = tool_size * 0.5 / stroke; grad_x0 = x + (grad_x0 - x) * d; grad_y0 = y + (grad_y0 - y) * d; grad_path += stroke - tool_size * 0.5; } d = 2.0 / (double)tool_size; grad->xv = (x - grad_x0) * d; grad->yv = (y - grad_y0) * d; } return (FALSE); /* Let drawing tools run */ } copy4(old, grad->xy); /* Left click sets points and picks them up again */ if ((event == GDK_BUTTON_PRESS) && (button == 1)) { /* Start anew */ if (grad->status == GRAD_NONE) { grad->xy[0] = grad->xy[2] = x; grad->xy[1] = grad->xy[3] = y; grad->status = GRAD_END; grad_update(grad); repaint_grad(NULL); } /* Place starting point */ else if (grad->status == GRAD_START) { grad->xy[0] = x; grad->xy[1] = y; grad->status = GRAD_DONE; grad_update(grad); if (grad_opacity) gtk_widget_queue_draw(drawing_canvas); } /* Place end point */ else if (grad->status == GRAD_END) { grad->xy[2] = x; grad->xy[3] = y; grad->status = GRAD_DONE; grad_update(grad); if (grad_opacity) gtk_widget_queue_draw(drawing_canvas); } /* Pick up nearest end */ else if (grad->status == GRAD_DONE) { i = (x - grad->xy[0]) * (x - grad->xy[0]) + (y - grad->xy[1]) * (y - grad->xy[1]); j = (x - grad->xy[2]) * (x - grad->xy[2]) + (y - grad->xy[3]) * (y - grad->xy[3]); if (i < j) { grad->xy[0] = x; grad->xy[1] = y; grad->status = GRAD_START; } else { grad->xy[2] = x; grad->xy[3] = y; grad->status = GRAD_END; } grad_update(grad); if (grad_opacity) gtk_widget_queue_draw(drawing_canvas); else repaint_grad(old); } } /* Everything but left click is irrelevant when no gradient */ else if (grad->status == GRAD_NONE); /* Right click deletes the gradient */ else if (event == GDK_BUTTON_PRESS) /* button != 1 */ { grad->status = GRAD_NONE; if (grad_opacity) gtk_widget_queue_draw(drawing_canvas); else repaint_grad(NULL); grad_update(grad); } /* Motion is irrelevant with gradient in place */ else if (grad->status == GRAD_DONE); /* Motion drags points around */ else if (event == GDK_MOTION_NOTIFY) { int *xy = grad->xy + (grad->status == GRAD_START ? 0 : 2); if ((xy[0] != x) || (xy[1] != y)) { xy[0] = x; xy[1] = y; grad_update(grad); repaint_grad(old); } } /* Leave hides the dragged line */ else if (event == GDK_LEAVE_NOTIFY) repaint_grad(NULL); return (TRUE); } static int get_bkg(int xc, int yc, int dclick); static inline int xmmod(int x, int y) { return (x - (x % y)); } /* Mouse event from button/motion on the canvas */ static void mouse_event(int event, int xc, int yc, guint state, guint button, gdouble pressure, int mflag, int dx, int dy) { static int tool_fix, tool_fixv; // Fixate on axis int new_cursor; int i, pixel, x0, y0, x, y, ox, oy, tox = tool_ox, toy = tool_oy; int zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); x = x0 = floor_div((xc - margin_main_x) * zoom, scale) + dx; y = y0 = floor_div((yc - margin_main_y) * zoom, scale) + dy; ox = x0 < 0 ? 0 : x0 >= mem_width ? mem_width - 1 : x0; oy = y0 < 0 ? 0 : y0 >= mem_height ? mem_height - 1 : y0; if (!mflag) /* Coordinate fixation */ { if (!(state & _S)) tool_fix = 0; else if (!(state & _C)) /* Shift */ { if (tool_fix != 1) tool_fixv = x0; tool_fix = 1; } else /* Ctrl+Shift */ { if (tool_fix != 2) tool_fixv = y0; tool_fix = 2; } } /* No use when moving cursor by keyboard */ else if (event == GDK_MOTION_NOTIFY) tool_fix = 0; if (tool_fix == 1) x = x0 = tool_fixv; if (tool_fix == 2) y = y0 = tool_fixv; if (tgrid_snap) /* Snap to grid */ { int xy[2] = { x0, y0 }; /* For everything but rectangular selection, snap with rounding * feels more natural than with flooring - WJ */ if (tool_type != TOOL_SELECT) { xy[0] += tgrid_dx >> 1; xy[1] += tgrid_dy >> 1; } snap_xy(xy); if ((x = x0 = xy[0]) < 0) x += xmmod(tgrid_dx - x - 1, tgrid_dx); if (x >= mem_width) x -= xmmod(tgrid_dx + x - mem_width, tgrid_dx); if ((y = y0 = xy[1]) < 0) y += xmmod(tgrid_dy - y - 1, tgrid_dy); if (y >= mem_height) y -= xmmod(tgrid_dy + y - mem_height, tgrid_dy); } x = x < 0 ? 0 : x >= mem_width ? mem_width - 1 : x; y = y < 0 ? 0 : y >= mem_height ? mem_height - 1 : y; /* ****** Release-event-specific code ****** */ if (event == GDK_BUTTON_RELEASE) { tint_mode[2] = 0; pen_down = 0; if ( col_reverse ) { col_reverse = FALSE; mem_swap_cols(FALSE); } if (grad_tool(event, x0, y0, state, button)) return; if ((tool_type == TOOL_LINE) && (button == 1) && (line_status == LINE_START)) { line_status = LINE_LINE; repaint_line(NULL); } if (((tool_type == TOOL_SELECT) || (tool_type == TOOL_POLYGON)) && (button == 1)) { if (marq_status == MARQUEE_SELECTING) marq_status = MARQUEE_DONE; if (marq_status == MARQUEE_PASTE_DRAG) marq_status = MARQUEE_PASTE; cursor_corner = -1; } // Finish off dragged polygon selection if ((tool_type == TOOL_POLYGON) && (poly_status == POLY_DRAGGING)) tool_action(event, x, y, button, pressure); mem_undo_prepare(); update_menus(); return; } /* ****** Common click/motion handling code ****** */ while ((state & _CS) == _C) // Set colour A/B { int ab = button == 3; /* A for left, B for right */ if (button == 2) /* Auto-dither */ { if ((mem_channel == CHN_IMAGE) && (mem_img_bpp == 3)) pressed_dither_A(); break; } if ((button != 1) && (button != 3)) break; /* Pick color from tracing image if possible */ pixel = get_bkg(xc + dx * scale, yc + dy * scale, event == GDK_2BUTTON_PRESS); /* Otherwise, average brush or selection area on Ctrl+double click */ while ((pixel < 0) && (event == GDK_2BUTTON_PRESS) && (MEM_BPP == 3)) { int rect[4]; /* Have brush square */ if (!NO_PERIM(tool_type)) { int ts2 = tool_size >> 1; rect[0] = ox - ts2; rect[1] = oy - ts2; rect[2] = rect[3] = tool_size; } /* Have selection marquee */ else if ((marq_status > MARQUEE_NONE) && (marq_status < MARQUEE_PASTE)) marquee_at(rect); else break; pixel = average_pixels(mem_img[CHN_IMAGE], mem_width, mem_height, rect[0], rect[1], rect[2], rect[3]); break; } /* Failing that, just pick color from image */ if (pixel < 0) pixel = get_pixel(ox, oy); if (mem_channel != CHN_IMAGE) { if (channel_col_[ab][mem_channel] == pixel) break; channel_col_[ab][mem_channel] = pixel; } else if (mem_img_bpp == 1) { if (mem_col_[ab] == pixel) break; mem_col_[ab] = pixel; mem_col_24[ab] = mem_pal[pixel]; } else { png_color *col = mem_col_24 + ab; if (PNG_2_INT(*col) == pixel) break; col->red = INT_2_R(pixel); col->green = INT_2_G(pixel); col->blue = INT_2_B(pixel); } update_stuff(UPD_CAB); break; } if ((state & _CS) == _C); /* Done above */ else if ((button == 2) || ((button == 3) && (state & _S))) set_zoom_centre(ox, oy); else if (grad_tool(event, x0, y0, state, button)); /* Pure moves are handled elsewhere */ else if (button) tool_action(event, x, y, button, pressure); update_sel_bar(); /* ****** Now to mouse-move-specific part ****** */ if (event != GDK_MOTION_NOTIFY) return; if ( tool_type == TOOL_CLONE ) { tool_ox = x; tool_oy = y; } if ( poly_status == POLY_SELECTING && button == 0 ) { stretch_poly_line(x, y); } if ( tool_type == TOOL_SELECT || tool_type == TOOL_POLYGON ) { if ( marq_status == MARQUEE_DONE ) { if (cursor_tool) { i = close_to(x, y); if (i != cursor_corner) // Stops excessive CPU/flickering gdk_window_set_cursor(drawing_canvas->window, corner_cursor[cursor_corner = i]); } else set_cursor(); } if ( marq_status >= MARQUEE_PASTE ) { new_cursor = (x >= marq_x1) && (x <= marq_x2) && (y >= marq_y1) && (y <= marq_y2); // Normal/4way if (new_cursor != cursor_corner) // Stops flickering on slow hardware { if (!cursor_tool || !new_cursor) set_cursor(); else gdk_window_set_cursor(drawing_canvas->window, move_cursor); cursor_corner = new_cursor; } } } update_xy_bar(x, y); /// TOOL PERIMETER BOX UPDATES if (perim_status > 0) clear_perim(); // Remove old perimeter box if ((tool_type == TOOL_CLONE) && (button == 0) && (state & _C)) { clone_x += tox - x; clone_y += toy - y; } if (tool_size * can_zoom > 4) { perim_x = x - (tool_size >> 1); perim_y = y - (tool_size >> 1); perim_s = tool_size; repaint_perim(NULL); // Repaint 4 sides } /// LINE UPDATES if ((tool_type == TOOL_LINE) && (line_status == LINE_LINE) && ((line_x2 != x) || (line_y2 != y))) { int old[4]; copy4(old, line_xy); line_x2 = x; line_y2 = y; repaint_line(old); } } static gboolean canvas_button(GtkWidget *widget, GdkEventButton *event) { int vport[4], pflag = event->type != GDK_BUTTON_RELEASE; gdouble pressure = 1.0; mouse_left_canvas = FALSE; if (pflag) /* For button press events only */ { /* Steal focus from dock window */ if (dock_focused()) { gtk_window_set_focus(GTK_WINDOW(main_window), NULL); return (TRUE); } if (!mem_img[CHN_IMAGE]) return (TRUE); if (tablet_working) #if GTK_MAJOR_VERSION == 1 pressure = event->pressure; #endif #if GTK_MAJOR_VERSION == 2 gdk_event_get_axis((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure); #endif } wjcanvas_get_vport(widget, vport); mouse_event(event->type, event->x + vport[0], event->y + vport[1], event->state, event->button, pressure, unreal_move & 1, 0, 0); return (pflag); } // Mouse enters the canvas static gint canvas_enter(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { /* !!! Have to skip grab/ungrab related events if doing something */ // if (event->mode != GDK_CROSSING_NORMAL) return (TRUE); mouse_left_canvas = FALSE; return (FALSE); } static gint canvas_left(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { /* Skip grab/ungrab related events */ if (event->mode != GDK_CROSSING_NORMAL) return (FALSE); /* Only do this if we have an image */ if (!mem_img[CHN_IMAGE]) return (FALSE); mouse_left_canvas = TRUE; if ( status_on[STATUS_CURSORXY] ) gtk_label_set_text( GTK_LABEL(label_bar[STATUS_CURSORXY]), "" ); if ( status_on[STATUS_PIXELRGB] ) gtk_label_set_text( GTK_LABEL(label_bar[STATUS_PIXELRGB]), "" ); if (perim_status > 0) clear_perim(); if (grad_tool(GDK_LEAVE_NOTIFY, 0, 0, 0, 0)) return (FALSE); if (((tool_type == TOOL_POLYGON) && (poly_status == POLY_SELECTING)) || ((tool_type == TOOL_LINE) && (line_status == LINE_LINE))) repaint_line(NULL); return (FALSE); } static int async_bk; static void render_background(unsigned char *rgb, int x0, int y0, int wid, int hgt, int fwid) { int i, j, k, scale, dx, dy, step, ii, jj, ii0, px, py; int xwid = 0, xhgt = 0, wid3 = wid * 3; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (!chequers_optimize) step = 8 , async_bk = TRUE; else if (can_zoom < 1.0) step = 6; else { scale = rint(can_zoom); step = scale < 4 ? 6 : scale == 4 ? 8 : scale; } dx = x0 % step; dy = y0 % step; py = (x0 / step + y0 / step) & 1; if (hgt + dy > step) { jj = step - dy; xhgt = (hgt + dy) % step; if (!xhgt) xhgt = step; hgt -= xhgt; xhgt -= step; } else jj = hgt--; if (wid + dx > step) { ii0 = step - dx; xwid = (wid + dx) % step; if (!xwid) xwid = step; wid -= xwid; xwid -= step; } else ii0 = wid--; for (j = 0; ; jj += step) { if (j >= hgt) { if (j > hgt) break; jj += xhgt; } px = py; ii = ii0; for (i = 0; ; ii += step) { if (i >= wid) { if (i > wid) break; ii += xwid; } k = (ii - i) * 3; memset(rgb, greyz[px], k); rgb += k; px ^= 1; i = ii; } rgb += fwid - wid3; for(j++; j < jj; j++) { memcpy(rgb, rgb - fwid, wid3); rgb += fwid; } py ^= 1; } } /// TRACING IMAGE unsigned char *bkg_rgb; int bkg_x, bkg_y, bkg_w, bkg_h, bkg_scale, bkg_flag; int config_bkg(int src) { image_info *img; int l; if (!src) return (TRUE); // No change // Remove old free(bkg_rgb); bkg_rgb = NULL; bkg_w = bkg_h = 0; img = src == 2 ? &mem_image : src == 3 ? &mem_clip : NULL; if (!img || !img->img[CHN_IMAGE]) return (TRUE); // No image l = img->width * img->height; bkg_rgb = malloc(l * 3); if (!bkg_rgb) return (FALSE); if (img->bpp == 1) { unsigned char *src = img->img[CHN_IMAGE], *dest = bkg_rgb; int i, j; for (i = 0; i < l; i++ , dest += 3) { j = *src++; dest[0] = mem_pal[j].red; dest[1] = mem_pal[j].green; dest[2] = mem_pal[j].blue; } } else memcpy(bkg_rgb, img->img[CHN_IMAGE], l * 3); bkg_w = img->width; bkg_h = img->height; return (TRUE); } static void render_bkg(rgbcontext *ctx) { unsigned char *src, *dest; int i, x0, x, y, ty, w3, l3, d0, dd, adj, bs, rxy[4]; int zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); bs = bkg_scale * zoom; adj = bs - scale > 0 ? bs - scale : 0; if (!clip(rxy, floor_div(bkg_x * scale + adj, bs) + margin_main_x, floor_div(bkg_y * scale + adj, bs) + margin_main_y, floor_div((bkg_x + bkg_w) * scale + adj, bs) + margin_main_x, floor_div((bkg_y + bkg_h) * scale + adj, bs) + margin_main_y, ctx->xy)) return; async_bk |= scale > 1; w3 = (ctx->xy[2] - ctx->xy[0]) * 3; dest = ctx->rgb + (rxy[1] - ctx->xy[1]) * w3 + (rxy[0] - ctx->xy[0]) * 3; l3 = (rxy[2] - rxy[0]) * 3; d0 = (rxy[0] - margin_main_x) * bs; x0 = floor_div(d0, scale); d0 -= x0 * scale; x0 -= bkg_x; for (ty = -1 , i = rxy[1]; i < rxy[3]; i++) { y = floor_div((i - margin_main_y) * bs, scale) - bkg_y; if (y != ty) { src = bkg_rgb + (y * bkg_w + x0) * 3; for (dd = d0 , x = rxy[0]; x < rxy[2]; x++ , dest += 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; for (dd += bs; dd >= scale; dd -= scale) src += 3; } ty = y; dest += w3 - l3; } else { memcpy(dest, dest - w3, l3); dest += w3; } } } static int get_bkg(int xc, int yc, int dclick) { int xb, yb, xi, yi, x, scale; /* No background / not RGB / wrong scale */ if (!bkg_flag || (mem_channel != CHN_IMAGE) || (mem_img_bpp != 3) || (can_zoom < 1.0)) return (-1); scale = rint(can_zoom); xi = floor_div(xc - margin_main_x, scale); yi = floor_div(yc - margin_main_y, scale); /* Inside image */ if ((xi >= 0) && (xi < mem_width) && (yi >= 0) && (yi < mem_height)) { /* Pixel must be transparent */ x = mem_width * yi + xi; if (mem_img[CHN_ALPHA] && !channel_dis[CHN_ALPHA] && !mem_img[CHN_ALPHA][x]); // Alpha transparency else if (mem_xpm_trans < 0) return (-1); else if (x *= 3 , MEM_2_INT(mem_img[CHN_IMAGE], x) != PNG_2_INT(mem_pal[mem_xpm_trans])) return (-1); /* Double click averages background under image pixel */ if (dclick) return (average_pixels(bkg_rgb, bkg_w, bkg_h, xi * bkg_scale - bkg_x, yi * bkg_scale - bkg_y, bkg_scale, bkg_scale)); } xb = floor_div((xc - margin_main_x) * bkg_scale, scale) - bkg_x; yb = floor_div((yc - margin_main_y) * bkg_scale, scale) - bkg_y; /* Outside of background */ if ((xb < 0) || (xb >= bkg_w) || (yb < 0) || (yb >= bkg_h)) return (-1); x = (bkg_w * yb + xb) * 3; return (MEM_2_INT(bkg_rgb, x)); } /* This is for a faster way to pass parameters into render_row() */ typedef struct { int dx; int width; int xwid; int zoom; int scale; int mw; int opac; int xpm; int bpp; png_color *pal; } renderstate; static renderstate rr; void setup_row(int x0, int width, double czoom, int mw, int xpm, int opac, int bpp, png_color *pal) { /* Horizontal zoom */ /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (czoom <= 1.0) { rr.zoom = rint(1.0 / czoom); rr.scale = 1; x0 = 0; } else { rr.zoom = 1; rr.scale = rint(czoom); x0 %= rr.scale; } if (width + x0 > rr.scale) { rr.dx = rr.scale - x0; x0 = (width + x0) % rr.scale; if (!x0) x0 = rr.scale; width -= x0; rr.xwid = x0 - rr.scale; } else { rr.dx = width--; rr.xwid = 0; } rr.width = width; rr.mw = mw; if ((xpm > -1) && (bpp == 3)) xpm = PNG_2_INT(pal[xpm]); rr.xpm = xpm; rr.opac = opac; rr.bpp = bpp; rr.pal = pal; } void render_row(unsigned char *rgb, chanlist base_img, int x, int y, chanlist xtra_img) { int alpha_blend = !overlay_alpha; unsigned char *src = NULL, *dest, *alpha = NULL, px, beta = 255; int i, j, k, ii, ds = rr.zoom * 3, da = 0; int w_bpp = rr.bpp, w_xpm = rr.xpm; if (xtra_img) { src = xtra_img[CHN_IMAGE]; alpha = xtra_img[CHN_ALPHA]; } if (channel_dis[CHN_ALPHA]) alpha = β /* Ignore alpha if disabled */ if (!src) src = base_img[CHN_IMAGE] + (rr.mw * y + x) * rr.bpp; if (!alpha) alpha = base_img[CHN_ALPHA] ? base_img[CHN_ALPHA] + rr.mw * y + x : β if (alpha != &beta) da = rr.zoom; dest = rgb; ii = rr.dx; if (hide_image) /* Substitute non-transparent "image overlay" colour */ { w_bpp = 3; w_xpm = -1; ds = 0; src = channel_rgb[CHN_IMAGE]; } if (!da && (w_xpm < 0) && (rr.opac == 255)) alpha_blend = FALSE; /* Indexed fully opaque */ if ((w_bpp == 1) && !alpha_blend) { for (i = 0; ; ii += rr.scale) { if (i >= rr.width) { if (i > rr.width) break; ii += rr.xwid; } px = *src; src += rr.zoom; for(; i < ii; i++) { dest[0] = rr.pal[px].red; dest[1] = rr.pal[px].green; dest[2] = rr.pal[px].blue; dest += 3; } } } /* Indexed transparent */ else if (w_bpp == 1) { for (i = 0; ; ii += rr.scale , alpha += da) { if (i >= rr.width) { if (i > rr.width) break; ii += rr.xwid; } px = *src; src += rr.zoom; if (!*alpha || (px == w_xpm)) { dest += (ii - i) * 3; i = ii; continue; } rr2_as: if (rr.opac == 255) { dest[0] = rr.pal[px].red; dest[1] = rr.pal[px].green; dest[2] = rr.pal[px].blue; } else { j = 255 * dest[0] + rr.opac * (rr.pal[px].red - dest[0]); dest[0] = (j + (j >> 8) + 1) >> 8; j = 255 * dest[1] + rr.opac * (rr.pal[px].green - dest[1]); dest[1] = (j + (j >> 8) + 1) >> 8; j = 255 * dest[2] + rr.opac * (rr.pal[px].blue - dest[2]); dest[2] = (j + (j >> 8) + 1) >> 8; } rr2_s: dest += 3; if (++i >= ii) continue; if (async_bk) goto rr2_as; dest[0] = *(dest - 3); dest[1] = *(dest - 2); dest[2] = *(dest - 1); goto rr2_s; } } /* RGB fully opaque */ else if (!alpha_blend) { for (i = 0; ; ii += rr.scale , src += ds) { if (i >= rr.width) { if (i > rr.width) break; ii += rr.xwid; } for(; i < ii; i++) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest += 3; } } } /* RGB transparent */ else { for (i = 0; ; ii += rr.scale , src += ds , alpha += da) { if (i >= rr.width) { if (i > rr.width) break; ii += rr.xwid; } if (!*alpha || (MEM_2_INT(src, 0) == w_xpm)) { dest += (ii - i) * 3; i = ii; continue; } k = rr.opac * alpha[0]; k = (k + (k >> 8) + 1) >> 8; rr4_as: if (k == 255) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } else { j = 255 * dest[0] + k * (src[0] - dest[0]); dest[0] = (j + (j >> 8) + 1) >> 8; j = 255 * dest[1] + k * (src[1] - dest[1]); dest[1] = (j + (j >> 8) + 1) >> 8; j = 255 * dest[2] + k * (src[2] - dest[2]); dest[2] = (j + (j >> 8) + 1) >> 8; } rr4_s: dest += 3; if (++i >= ii) continue; if (async_bk) goto rr4_as; dest[0] = *(dest - 3); dest[1] = *(dest - 2); dest[2] = *(dest - 1); goto rr4_s; } } } void overlay_row(unsigned char *rgb, chanlist base_img, int x, int y, chanlist xtra_img) { unsigned char *alpha, *sel, *mask, *dest; int i, j, k, ii, dw, opA, opS, opM, t0, t1, t2, t3; if (xtra_img) { alpha = xtra_img[CHN_ALPHA]; sel = xtra_img[CHN_SEL]; mask = xtra_img[CHN_MASK]; } else alpha = sel = mask = NULL; j = rr.mw * y + x; if (!alpha && base_img[CHN_ALPHA]) alpha = base_img[CHN_ALPHA] + j; if (!sel && base_img[CHN_SEL]) sel = base_img[CHN_SEL] + j; if (!mask && base_img[CHN_MASK]) mask = base_img[CHN_MASK] + j; /* Prepare channel weights (256-based) */ k = hide_image ? 256 : 256 - channel_opacity[CHN_IMAGE] - (channel_opacity[CHN_IMAGE] >> 7); opA = alpha && overlay_alpha && !channel_dis[CHN_ALPHA] ? channel_opacity[CHN_ALPHA] : 0; opS = sel && !channel_dis[CHN_SEL] ? channel_opacity[CHN_SEL] : 0; opM = mask && !channel_dis[CHN_MASK] ? channel_opacity[CHN_MASK] : 0; /* Nothing to do - don't waste time then */ j = opA + opS + opM; if (!k || !j) return; opA = (k * opA) / j; opS = (k * opS) / j; opM = (k * opM) / j; if (!(opA + opS + opM)) return; dest = rgb; ii = rr.dx; for (i = dw = 0; ; ii += rr.scale , dw += rr.zoom) { if (i >= rr.width) { if (i > rr.width) break; ii += rr.xwid; } t0 = t1 = t2 = t3 = 0; if (opA) { j = opA * (alpha[dw] ^ channel_inv[CHN_ALPHA]); t0 += j; t1 += j * channel_rgb[CHN_ALPHA][0]; t2 += j * channel_rgb[CHN_ALPHA][1]; t3 += j * channel_rgb[CHN_ALPHA][2]; } if (opS) { j = opS * (sel[dw] ^ channel_inv[CHN_SEL]); t0 += j; t1 += j * channel_rgb[CHN_SEL][0]; t2 += j * channel_rgb[CHN_SEL][1]; t3 += j * channel_rgb[CHN_SEL][2]; } if (opM) { j = opM * (mask[dw] ^ channel_inv[CHN_MASK]); t0 += j; t1 += j * channel_rgb[CHN_MASK][0]; t2 += j * channel_rgb[CHN_MASK][1]; t3 += j * channel_rgb[CHN_MASK][2]; } j = (256 * 255) - t0; or_as: k = t1 + j * dest[0]; dest[0] = (k + (k >> 8) + 0x100) >> 16; k = t2 + j * dest[1]; dest[1] = (k + (k >> 8) + 0x100) >> 16; k = t3 + j * dest[2]; dest[2] = (k + (k >> 8) + 0x100) >> 16; or_s: dest += 3; if (++i >= ii) continue; if (async_bk) goto or_as; dest[0] = *(dest - 3); dest[1] = *(dest - 2); dest[2] = *(dest - 1); goto or_s; } } /* Specialized renderer for irregular overlays */ void overlay_preview(unsigned char *rgb, unsigned char *map, int col, int opacity) { unsigned char *dest, crgb[3] = {INT_2_R(col), INT_2_G(col), INT_2_B(col)}; int i, j, k, ii, dw; dest = rgb; ii = rr.dx; for (i = dw = 0; ; ii += rr.scale , dw += rr.zoom) { if (i >= rr.width) { if (i > rr.width) break; ii += rr.xwid; } k = opacity * map[dw]; k = (k + (k >> 8) + 1) >> 8; op_as: j = 255 * dest[0] + k * (crgb[0] - dest[0]); dest[0] = (j + (j >> 8) + 1) >> 8; j = 255 * dest[1] + k * (crgb[1] - dest[1]); dest[1] = (j + (j >> 8) + 1) >> 8; j = 255 * dest[2] + k * (crgb[2] - dest[2]); dest[2] = (j + (j >> 8) + 1) >> 8; op_s: dest += 3; if (++i >= ii) continue; if (async_bk) goto op_as; dest[0] = *(dest - 3); dest[1] = *(dest - 2); dest[2] = *(dest - 1); goto op_s; } } typedef struct { unsigned char *wmask, *gmask, *walpha, *galpha; unsigned char *wimg, *gimg, *rgb, *xbuf; int opac, len, bpp; } grad_render_state; static unsigned char *init_grad_render(grad_render_state *g, int len, chanlist tlist) { unsigned char *gstore; int coupled_alpha, idx2rgb, opac = 0, bpp = MEM_BPP; // !!! Only the "slow path" for now if (gradient[mem_channel].status != GRAD_DONE) return (NULL); if (!IS_INDEXED) opac = grad_opacity; memset(g, 0, sizeof(grad_render_state)); coupled_alpha = (mem_channel == CHN_IMAGE) && RGBA_mode && mem_img[CHN_ALPHA]; idx2rgb = !opac && (grad_opacity < 255); gstore = multialloc(MA_SKIP_ZEROSIZE, &g->wmask, len, /* Mask */ &g->gmask, len, /* Gradient opacity */ &g->gimg, len * bpp, /* Gradient image */ &g->wimg, len * bpp, /* Resulting image */ &g->galpha, coupled_alpha * len, /* Gradient alpha */ &g->walpha, coupled_alpha * len, /* Resulting alpha */ &g->rgb, idx2rgb * len * 3, /* Indexed to RGB */ &g->xbuf, NEED_XBUF_DRAW * len * bpp, NULL); if (!gstore) return (NULL); tlist[mem_channel] = g->wimg; if (g->rgb) tlist[CHN_IMAGE] = g->rgb; if (g->walpha) tlist[CHN_ALPHA] = g->walpha; g->opac = opac; g->len = len; g->bpp = bpp; return (gstore); } static void grad_render(int start, int step, int cnt, int x, int y, unsigned char *mask0, grad_render_state *g) { int l = mem_width * y + x, li = l * mem_img_bpp; unsigned char *tmp = mem_img[mem_channel] + l * g->bpp; prep_mask(start, step, cnt, g->wmask, mask0, mem_img[CHN_IMAGE] + li); if (!g->opac) memset(g->gmask, 255, g->len); grad_pixels(start, step, cnt, x, y, g->wmask, g->gmask, g->gimg, g->galpha); if (g->walpha) memcpy(g->walpha, mem_img[CHN_ALPHA] + l, g->len); process_mask(start, step, cnt, g->wmask, g->walpha, mem_img[CHN_ALPHA] + l, g->galpha, g->gmask, g->opac, channel_dis[CHN_ALPHA]); memcpy(g->wimg, tmp, g->len * g->bpp); process_img(start, step, cnt, g->wmask, g->wimg, tmp, g->gimg, g->xbuf, g->bpp, g->opac); if (g->rgb) blend_indexed(start, step, cnt, g->rgb, mem_img[CHN_IMAGE] + l, g->wimg ? g->wimg : mem_img[CHN_IMAGE] + l, mem_img[CHN_ALPHA] + l, g->walpha, grad_opacity); } typedef struct { chanlist tlist; // Channel overrides unsigned char *mask0; // Active mask channel int px2, py2; // Clipped area position int pw2, ph2; // Clipped area size int dx; // Image-space X offset int lx; // Allocated row length int pww; // Logical row length int zoom; // Decimation factor int scale; // Replication factor int lop; // Base opacity int xpm; // Transparent color } main_render_state; typedef struct { unsigned char *pvi; // Temp image row unsigned char *pvm; // Temp mask row } xform_render_state; typedef struct { unsigned char *buf; // Allocation pointer, or NULL if none chanlist tlist; // Channel overrides for rendering clipboard unsigned char *clip_image; // Pasted into current channel unsigned char *clip_alpha; // Pasted into alpha channel unsigned char *t_alpha; // Fake pasted alpha unsigned char *pix, *alpha; // Destinations for the above unsigned char *mask, *wmask; // Temp mask: one we use, other we init unsigned char *mask0; // Image mask channel to use unsigned char *xform; // Buffer for color transform preview unsigned char *xbuf; // Extra buffer for process_img() int opacity, bpp; // Just that int pixf; // Flag: need current channel override filled int dx; // Memory-space X offset int lx; // Allocated row length int pww; // Logical row length } paste_render_state; /* !!! This function copies existing override set to build its own modified * !!! one, so override set must not be changed after calling it */ static int init_paste_render(paste_render_state *p, main_render_state *r, unsigned char *xmask) { int x, y, w, h, mx, my, ddx, bpp, scale = r->scale, zoom = r->zoom; int temp_image, temp_mask, temp_alpha, fake_alpha, xform_buffer, xbuf; /* Clip paste area to update area */ x = (marq_x1 * scale + zoom - 1) / zoom; y = (marq_y1 * scale + zoom - 1) / zoom; if (x < r->px2) x = r->px2; if (y < r->py2) y = r->py2; w = (marq_x2 * scale) / zoom + scale; h = (marq_y2 * scale) / zoom + scale; mx = r->px2 + r->pw2; w = (w < mx ? w : mx) - x; my = r->py2 + r->ph2; h = (h < my ? h : my) - y; if ((w <= 0) || (h <= 0)) return (FALSE); memset(p, 0, sizeof(paste_render_state)); memcpy(p->tlist, r->tlist, sizeof(chanlist)); /* Setup row position and size */ p->dx = (x * zoom) / scale; if (zoom > 1) p->lx = (w - 1) * zoom + 1 , p->pww = w; else p->lx = p->pww = (x + w - 1) / scale - p->dx + 1; /* Decide what goes where */ temp_alpha = fake_alpha = 0; if ((mem_channel == CHN_IMAGE) && !channel_dis[CHN_ALPHA]) { p->clip_alpha = mem_clip_alpha; if (mem_img[CHN_ALPHA]) { fake_alpha = !mem_clip_alpha && RGBA_mode; // Need fake alpha temp_alpha = mem_clip_alpha || fake_alpha; // Need temp alpha } } p->clip_image = mem_clipboard; ddx = p->dx - r->dx; /* Allocate temp area */ bpp = p->bpp = MEM_BPP; temp_mask = !xmask; // Need temp mask if not have one ready temp_image = p->clip_image && !p->tlist[mem_channel]; // Same for temp image xform_buffer = mem_preview_clip && (bpp == 3) && (mem_clip_bpp == 3); xbuf = NEED_XBUF_PASTE; if (temp_image | temp_alpha | temp_mask | fake_alpha | xform_buffer | xbuf) { p->buf = multialloc(MA_SKIP_ZEROSIZE, &p->tlist[mem_channel], temp_image * r->lx * bpp, &p->tlist[CHN_ALPHA], temp_alpha * r->lx, &p->mask, temp_mask * p->lx, &p->t_alpha, fake_alpha * p->lx, &p->xform, xform_buffer * p->lx * 3, &p->xbuf, xbuf * p->lx * bpp, NULL); if (!p->buf) return (FALSE); } /* Setup "image" (current) channel override */ p->pix = p->tlist[mem_channel] + ddx * bpp; p->pixf = temp_image; /* Need it prefilled if no override data incoming */ /* Setup alpha channel override */ if (temp_alpha) p->alpha = p->tlist[CHN_ALPHA] + ddx; /* Setup mask */ if (mem_channel <= CHN_ALPHA) p->mask0 = r->mask0; if (!(p->wmask = p->mask)) { p->mask = xmask + ddx; if (r->mask0 != p->mask0) /* Mask has wrong data - reuse memory but refill values */ p->wmask = p->mask; } /* Setup fake alpha */ if (fake_alpha) memset(p->t_alpha, channel_col_A[CHN_ALPHA], p->lx); /* Setup opacity mode */ if (!IS_INDEXED) p->opacity = tool_opacity; return (TRUE); } static void paste_render(int start, int step, int y, paste_render_state *p) { int ld = mem_width * y + p->dx; int dc = mem_clip_w * (y - marq_y1) + p->dx - marq_x1; int bpp = p->bpp; int cnt = p->pww; unsigned char *clip_src = mem_clipboard + dc * mem_clip_bpp; if (p->wmask) prep_mask(start, step, cnt, p->wmask, p->mask0 ? p->mask0 + ld : NULL, mem_img[CHN_IMAGE] + ld * mem_img_bpp); process_mask(start, step, cnt, p->mask, p->alpha, mem_img[CHN_ALPHA] + ld, p->clip_alpha ? p->clip_alpha + dc : p->t_alpha, mem_clip_mask ? mem_clip_mask + dc : NULL, p->opacity, 0); if (!p->pixf) /* Fill just the underlying part */ memcpy(p->pix, mem_img[mem_channel] + ld * bpp, p->lx * bpp); if (p->xform) /* Apply color transform if preview requested */ { do_transform(start, step, cnt, NULL, p->xform, clip_src); clip_src = p->xform; } if (mem_clip_bpp < bpp) { /* Convert paletted clipboard to RGB */ do_convert_rgb(start, step, cnt, p->xbuf, clip_src, mem_clip_paletted ? mem_clip_pal : mem_pal); clip_src = p->xbuf; } process_img(start, step, cnt, p->mask, p->pix, mem_img[mem_channel] + ld * bpp, clip_src, p->xbuf, bpp, p->opacity); } static int main_render_rgb(unsigned char *rgb, int x, int y, int w, int h, int pw) { main_render_state r; unsigned char **tlist = r.tlist; int j, jj, j0, l, pw23; unsigned char *xtemp = NULL; xform_render_state uninit_(xrstate); unsigned char *cstemp = NULL; unsigned char *gtemp = NULL; grad_render_state grstate; int pflag = FALSE; paste_render_state prstate; memset(&r, 0, sizeof(r)); /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ r.zoom = r.scale = 1; if (can_zoom < 1.0) r.zoom = rint(1.0 / can_zoom); else r.scale = rint(can_zoom); r.px2 = x; r.py2 = y; r.pw2 = w; r.ph2 = h; if (!channel_dis[CHN_MASK]) r.mask0 = mem_img[CHN_MASK]; r.xpm = mem_xpm_trans; r.lop = 255; if (show_layers_main && layers_total && layer_selected) r.lop = (layer_table[layer_selected].opacity * 255 + 50) / 100; /* Setup row position and size */ r.dx = (r.px2 * r.zoom) / r.scale; if (r.zoom > 1) r.lx = (r.pw2 - 1) * r.zoom + 1 , r.pww = r.pw2; else r.lx = r.pww = (r.px2 + r.pw2 - 1) / r.scale - r.dx + 1; /* Color transform preview */ if (mem_preview && (mem_img_bpp == 3)) { xtemp = xrstate.pvm = malloc(r.lx * 4); if (xtemp) r.tlist[CHN_IMAGE] = xrstate.pvi = xtemp + r.lx; } /* Color selective mode preview */ else if (csel_overlay) cstemp = malloc(r.lx); /* Gradient preview */ else if ((tool_type == TOOL_GRADIENT) && grad_opacity) { if (mem_channel > CHN_ALPHA) r.mask0 = NULL; gtemp = init_grad_render(&grstate, r.lx, r.tlist); } /* Paste preview - can only coexist with transform */ if (show_paste && (marq_status >= MARQUEE_PASTE) && !cstemp && !gtemp) pflag = init_paste_render(&prstate, &r, xtemp ? xrstate.pvm : NULL); /* Start rendering */ setup_row(r.px2, r.pw2, can_zoom, mem_width, r.xpm, r.lop, gtemp && grstate.rgb ? 3 : mem_img_bpp, mem_pal); j0 = -1; pw *= 3; pw23 = r.pw2 * 3; for (jj = 0; jj < r.ph2; jj++ , rgb += pw) { j = ((r.py2 + jj) * r.zoom) / r.scale; if (j != j0) { j0 = j; l = mem_width * j + r.dx; tlist = r.tlist; /* Default override */ /* Color transform preview */ if (xtemp) { prep_mask(0, r.zoom, r.pww, xrstate.pvm, r.mask0 ? r.mask0 + l : NULL, mem_img[CHN_IMAGE] + l * 3); do_transform(0, r.zoom, r.pww, xrstate.pvm, xrstate.pvi, mem_img[CHN_IMAGE] + l * 3); } /* Color selective mode preview */ else if (cstemp) { memset(cstemp, 0, r.lx); csel_scan(0, r.zoom, r.pww, cstemp, mem_img[CHN_IMAGE] + l * mem_img_bpp, csel_data); } /* Gradient preview */ else if (gtemp) grad_render(0, r.zoom, r.pww, r.dx, j, r.mask0 ? r.mask0 + l : NULL, &grstate); /* Paste preview - should be after transform */ if (pflag && (j >= marq_y1) && (j <= marq_y2)) { tlist = prstate.tlist; /* Paste-area override */ if (prstate.alpha) memcpy(tlist[CHN_ALPHA], mem_img[CHN_ALPHA] + l, r.lx); if (prstate.pixf) memcpy(tlist[mem_channel], mem_img[mem_channel] + l * prstate.bpp, r.lx * prstate.bpp); paste_render(0, r.zoom, j, &prstate); } } else if (!async_bk) { memcpy(rgb, rgb - pw, pw23); continue; } render_row(rgb, mem_img, r.dx, j, tlist); if (!cstemp) overlay_row(rgb, mem_img, r.dx, j, tlist); else overlay_preview(rgb, cstemp, csel_preview, csel_preview_a); } free(xtemp); free(cstemp); free(gtemp); if (pflag) free(prstate.buf); return (pflag); /* "There was paste" */ } /// GRID int grid_rgb[GRID_MAX]; // Grid colors to use int mem_show_grid; // Boolean show toggle int mem_grid_min; // Minimum zoom to show it at int color_grid; // If to use grid coloring int show_tile_grid; // Tile grid toggle int tgrid_x0, tgrid_y0; // Tile grid origin int tgrid_dx, tgrid_dy; // Tile grid spacing int tgrid_snap; // Coordinates snap toggle /* Snap coordinate pair to tile grid (floored) */ void snap_xy(int *xy) { int dx, dy; dx = (xy[0] - tgrid_x0) % tgrid_dx; xy[0] -= dx + (dx < 0 ? tgrid_dx : 0); dy = (xy[1] - tgrid_y0) % tgrid_dy; xy[1] -= dy + (dy < 0 ? tgrid_dy : 0); } /* Buffer stores interleaved transparency bits for two pixel rows; current * row in bits 0, 2, etc., previous one in bits 1, 3, etc. */ static void scan_trans(unsigned char *dest, int delta, int y, int x, int w) { static unsigned char beta = 255; unsigned char *src, *srca = β int i, ofs, bit, buf, xpm, da = 0, bpp = mem_img_bpp; delta += delta; dest += delta >> 3; delta &= 7; if (y >= mem_height) // Clear { for (i = 0; i < w; i++ , dest++) *dest = (*dest & 0x55) << 1; return; } xpm = mem_xpm_trans < 0 ? -1 : bpp == 1 ? mem_xpm_trans : PNG_2_INT(mem_pal[mem_xpm_trans]); ofs = y * mem_width + x; src = mem_img[CHN_IMAGE] + ofs * bpp; if (mem_img[CHN_ALPHA]) srca = mem_img[CHN_ALPHA] + ofs , da = 1; bit = 1 << delta; buf = (*dest & 0x55) << 1; for (i = 0; i < w; i++ , src += bpp , srca += da) { buf |= *srca && ((bpp == 1 ? *src : MEM_2_INT(src, 0)) != xpm) ? bit : 0; if ((bit <<= 2) < 0x100) continue; *dest++ = buf; buf = (*dest & 0x55) << 1; bit = 1; } *dest = buf; } /* Draw grid on rgb memory */ static void draw_grid(unsigned char *rgb, int x, int y, int w, int h, int l) { /* !!! This limit IN THEORY can be violated by a sufficiently huge screen, if * clipping to image isn't enforced in some fashion; this code can be made to * detect the violation and do the clipping (on X axis) for itself - really * colored is only the image proper + 1 pixel to bottom & right of it */ unsigned char lbuf[(MAX_WIDTH * 2 + 2 + 7) / 8 + 2]; int dx, dy, step = can_zoom; int i, j, k, yy, wx, ww, x0, xw; l *= 3; dx = (x - margin_main_x) % step; if (dx <= 0) dx += step; dy = (y - margin_main_y) % step; if (dy <= 0) dy += step; /* Use dumb code for uncolored grid */ if (!color_grid || (x + w <= margin_main_x) || (y + h <= margin_main_y) || (x > margin_main_x + mem_width * step) || (y > margin_main_y + mem_height * step)) { unsigned char *tmp; int i, j, k, step3, tc; tc = grid_rgb[color_grid ? GRID_TRANS : GRID_NORMAL]; dx = (step - dx) * 3; w *= 3; for (k = dy , i = 0; i < h; i++ , k++) { tmp = rgb + i * l; if (k == step) /* Filled line */ { j = k = 0; step3 = 3; } else /* Spaced dots */ { j = dx; step3 = step * 3; } for (tmp += j; j < w; j += step3 , tmp += step3) { tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); } } return; } wx = floor_div(x - margin_main_x - 1, step); ww = (w + dx + step - 1) / step + 1; memset(lbuf, 0, (ww + ww + 7 + 16) >> 3); // Init to transparent x0 = wx < 0 ? 0 : wx; xw = (wx + ww < mem_width ? wx + ww : mem_width) - x0; wx = x0 - wx; yy = floor_div(y - margin_main_y, step); /* Initial row fill */ if (dy == step) yy--; if ((yy >= 0) && (yy < mem_height)) // Else it stays cleared scan_trans(lbuf, wx, yy, x0, xw); for (k = dy , i = 0; i < h; i++ , k++) { unsigned char *tmp = rgb + i * l, *buf = lbuf + 2; // Horizontal span if (k == step) { int nv, tc, kk; yy++; k = 0; // Fill one more row if ((yy >= 0) && (yy <= mem_height + 1)) scan_trans(lbuf, wx, yy, x0, xw); nv = (lbuf[0] + (lbuf[1] << 8)) ^ 0x2FFFF; // Invert tc = grid_rgb[((nv & 3) + 1) >> 1]; for (kk = dx , j = 0; j < w; j++ , kk++ , tmp += 3) { if (kk != step) // Span { tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); continue; } // Intersection /* 0->0, 15->2, in-between remains between */ tc = grid_rgb[((nv & 0xF) * 9 + 0x79) >> 7]; tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); nv >>= 2; if (nv < 0x400) nv ^= (*buf++ << 8) ^ 0x2FD00; // Invert tc = grid_rgb[((nv & 3) + 1) >> 1]; kk = 0; } } // Vertical spans else { int nv = (lbuf[0] + (lbuf[1] << 8)) ^ 0x2FFFF; // Invert j = step - dx; tmp += j * 3; for (; j < w; j += step , tmp += step * 3) { /* 0->0, 5->2, in-between remains between */ int tc = grid_rgb[((nv & 5) + 3) >> 2]; tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); nv >>= 2; if (nv < 0x400) nv ^= (*buf++ << 8) ^ 0x2FD00; // Invert } } } } /* Draw tile grid on rgb memory */ static void draw_tgrid(unsigned char *rgb, int x, int y, int w, int h, int l) { unsigned char *tmp, *tm2; int i, j, k, dx, dy, nx, ny, xx, yy, tc, zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); if ((tgrid_dx < zoom * 2) || (tgrid_dy < zoom * 2)) return; // Too dense dx = tgrid_x0 ? tgrid_dx - tgrid_x0 : 0; nx = (x * zoom - dx) / (tgrid_dx * scale); if (nx < 0) nx = 0; nx++; dx++; dy = tgrid_y0 ? tgrid_dy - tgrid_y0 : 0; ny = (y * zoom - dy) / (tgrid_dy * scale); if (ny < 0) ny = 0; ny++; dy++; xx = ((nx * tgrid_dx - dx) * scale) / zoom + scale - 1; yy = ((ny * tgrid_dy - dy) * scale) / zoom + scale - 1; if ((xx >= x + w) && (yy >= y + h)) return; // Entirely inside grid cell l *= 3; tc = grid_rgb[GRID_TILE]; for (i = 0; i < h; i++) { tmp = rgb + l * i; if (y + i == yy) /* Filled line */ { for (j = 0; j < w; j++ , tmp += 3) { tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); } yy = ((++ny * tgrid_dy - dy) * scale) / zoom + scale - 1; continue; } /* Spaced dots */ for (k = xx , j = nx + 1; k < x + w; j++) { tm2 = tmp + (k - x) * 3; tm2[0] = INT_2_R(tc); tm2[1] = INT_2_G(tc); tm2[2] = INT_2_B(tc); k = ((j * tgrid_dx - dx) * scale) / zoom + scale - 1; } } } /* Draw segmentation contours on rgb memory */ static void draw_segments(unsigned char *rgb, int x, int y, int w, int h, int l) { unsigned char lbuf[(MAX_WIDTH * 2 + 7) / 8]; int i, j, k, j0, kk, dx, dy, wx, ww, yy, vf, tc, zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); l *= 3; dx = x % scale; wx = x / scale; ww = (w + dx + scale - 1) / scale; dy = y % scale; yy = y / scale; /* Initial row fill */ mem_seg_scan(lbuf, yy, wx, ww, zoom, seg_preview); tc = grid_rgb[GRID_SEGMENT]; j0 = !!dx; vf = (scale == 1) | 2; // Draw both edges in one pixel if no zoom for (k = dy , i = 0; i < h; i++ , k++) { unsigned char *tmp, *buf; int nv; if (k == scale) { mem_seg_scan(lbuf, ++yy, wx, ww, zoom, seg_preview); k = 0; } /* Horizontal lines */ if (!k && (scale > 1)) { tmp = rgb + i * l; buf = lbuf; nv = *buf++ + 0x100; for (kk = dx, j = 0; j < w; j++ , tmp += 3) { if (nv & 1) // Draw grid line { tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); } if (++kk == scale) { if ((nv >>= 2) == 1) nv = *buf++ + 0x100; kk = 0; } } } /* Vertical/mixed lines */ tmp = rgb + i * l + (j0 * scale - dx) * 3; buf = lbuf; nv = (*buf++ + 0x100) >> (j0 * 2); for (j = j0; j < ww; j++ , tmp += scale * 3) { if (nv & vf) { tmp[0] = INT_2_R(tc); tmp[1] = INT_2_G(tc); tmp[2] = INT_2_B(tc); } if ((nv >>= 2) == 1) nv = *buf++ + 0x100; } } } /* Redirectable RGB blitting */ void draw_rgb(int x, int y, int w, int h, unsigned char *rgb, int step, rgbcontext *ctx) { unsigned char *dest; int l, rxy[4], vxy[4]; if (!ctx) { wjcanvas_get_vport(drawing_canvas, vxy); if (!clip(rxy, x, y, x + w, y + h, vxy)) return; gdk_draw_rgb_image(drawing_canvas->window, drawing_canvas->style->black_gc, rxy[0] - vxy[0], rxy[1] - vxy[1], rxy[2] - rxy[0], rxy[3] - rxy[1], GDK_RGB_DITHER_NONE, rgb, step); } else { if (!clip(rxy, x, y, x + w, y + h, ctx->xy)) return; rgb += (rxy[1] - y) * step + (rxy[0] - x) * 3; l = (ctx->xy[2] - ctx->xy[0]) * 3; dest = ctx->rgb + (rxy[1] - ctx->xy[1]) * l + (rxy[0] - ctx->xy[0]) * 3; w = (rxy[2] - rxy[0]) * 3; for (h = rxy[3] - rxy[1]; h; h--) { memcpy(dest, rgb, w); dest += l; rgb += step; } } } /* Redirectable polygon drawing */ void draw_poly(int *xy, int cnt, int shift, int x00, int y00, rgbcontext *ctx) { #define PT_BATCH 100 GdkPoint white[PT_BATCH], black[PT_BATCH], *p; linedata line; unsigned char *rgb; int w = 0, nw = 0, nb = 0; int i, x0, y0, x1, y1, dx, dy, a0, a, vxy[4]; if (ctx) { copy4(vxy, ctx->xy); w = vxy[2] - vxy[0]; } else wjcanvas_get_vport(drawing_canvas, vxy); --vxy[2]; --vxy[3]; x1 = x00 + *xy++; y1 = y00 + *xy++; a = x1 < vxy[0] ? 1 : x1 > vxy[2] ? 2: y1 < vxy[1] ? 3 : y1 > vxy[3] ? 4 : 5; for (i = 1; i < cnt; i++) { x0 = x1; y0 = y1; a0 = a; x1 = x00 + *xy++; y1 = y00 + *xy++; dx = abs(x1 - x0); dy = abs(y1 - y0); if (dx < dy) dx = dy; shift += dx; switch (a0) // Basic clipping { // Already visible - skip if same point case 0: if (!dx) continue; break; // Left of window - skip if still there case 1: if (x1 < vxy[0]) continue; break; // Right of window case 2: if (x1 > vxy[2]) continue; break; // Top of window case 3: if (y1 < vxy[1]) continue; break; // Bottom of window case 4: if (y1 > vxy[3]) continue; break; // First point - never skip case 5: a0 = 0; break; } // May be visible - find where the other end goes a = x1 < vxy[0] ? 1 : x1 > vxy[2] ? 2 : y1 < vxy[1] ? 3 : y1 > vxy[3] ? 4 : 0; line_init(line, x0, y0, x1, y1); if (a0 + a) // If both ends inside area, no clipping needed { if (line_clip(line, vxy, &a0) < 0) continue; dx -= a0; } for (dx = shift - dx; line[2] >= 0; line_step(line) , dx++) { if (ctx) // Draw to RGB { rgb = ctx->rgb + ((line[1] - ctx->xy[1]) * w + (line[0] - ctx->xy[0])) * 3; rgb[0] = rgb[1] = rgb[2] = ((~dx >> 2) & 1) * 255; continue; } if (dx & 4) // Draw to canvas in black { p = black + nb++; p->x = line[0] - vxy[0]; p->y = line[1] - vxy[1]; if (nb < PT_BATCH) continue; } else // Draw to canvas in white { p = white + nw++; p->x = line[0] - vxy[0]; p->y = line[1] - vxy[1]; if (nw < PT_BATCH) continue; } // Batch drawing to canvas if (nb) gdk_draw_points(drawing_canvas->window, drawing_canvas->style->black_gc, black, nb); if (nw) gdk_draw_points(drawing_canvas->window, drawing_canvas->style->white_gc, white, nw); nb = nw = 0; } } // Finish drawing if (nb) gdk_draw_points(drawing_canvas->window, drawing_canvas->style->black_gc, black, nb); if (nw) gdk_draw_points(drawing_canvas->window, drawing_canvas->style->white_gc, white, nw); #undef PT_BATCH } /* Clip area to image & align rgb pointer with it */ static unsigned char *clip_to_image(int *rect, unsigned char *rgb, int *vxy) { int rxy[4], mw, mh; /* Clip update area to image bounds */ canvas_size(&mw, &mh); if (!clip(rxy, margin_main_x, margin_main_y, margin_main_x + mw, margin_main_y + mh, vxy)) return (NULL); rect[0] = rxy[0] - margin_main_x; rect[1] = rxy[1] - margin_main_y; rect[2] = rxy[2] - rxy[0]; rect[3] = rxy[3] - rxy[1]; /* Align buffer with image */ rgb += ((vxy[2] - vxy[0]) * (rxy[1] - vxy[1]) + (rxy[0] - vxy[0])) * 3; return (rgb); } /* Map clipping rectangle to line-space, for use with line_clip() */ void prepare_line_clip(int *lxy, int *vxy, int scale) { int i; for (i = 0; i < 4; i++) lxy[i] = floor_div(vxy[i] - margin_main_xy[i & 1] - (i >> 1), scale); } void repaint_canvas(int px, int py, int pw, int ph) { rgbcontext ctx; unsigned char *rgb, *irgb; int rect[4], vxy[4], vport[4], lx = 0, ly = 0, rpx, rpy; int i, lr, zoom = 1, scale = 1, paste_f = FALSE; /* Clip area & init context */ wjcanvas_get_vport(drawing_canvas, vport); if (!clip(ctx.xy, px, py, px + pw, py + ph, vport)) return; pw = ctx.xy[2] - (px = ctx.xy[0]); ph = ctx.xy[3] - (py = ctx.xy[1]); rgb = malloc(i = pw * ph * 3); if (!rgb) return; memset(rgb, mem_background, i); ctx.rgb = rgb; /* Find out which part is image */ irgb = clip_to_image(rect, rgb, ctx.xy); /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); rpx = px - margin_main_x; rpy = py - margin_main_y; lr = layers_total && show_layers_main; if (bkg_flag && bkg_rgb) render_bkg(&ctx); /* Tracing image */ else if (!lr) /* Render default background if no layers shown */ { if (irgb && ((mem_xpm_trans >= 0) || (!overlay_alpha && mem_img[CHN_ALPHA] && !channel_dis[CHN_ALPHA]))) render_background(irgb, rect[0], rect[1], rect[2], rect[3], pw * 3); } if (lr) /* Render underlying layers */ { if (layer_selected) { lx = floor_div(layer_table[layer_selected].x * scale, zoom); ly = floor_div(layer_table[layer_selected].y * scale, zoom); } render_layers(rgb, pw * 3, rpx + lx, rpy + ly, pw, ph, can_zoom, 0, layer_selected - 1, 1); } if (irgb) paste_f = main_render_rgb(irgb, rect[0], rect[1], rect[2], rect[3], pw); if (lr) render_layers(rgb, pw * 3, rpx + lx, rpy + ly, pw, ph, can_zoom, layer_selected + 1, layers_total, 1); /* No grid at all */ if (!mem_show_grid || (scale < mem_grid_min)); /* No paste - single area */ else if (!paste_f) draw_grid(rgb, px, py, pw, ph, pw); /* With paste - zero to four areas */ else { int n, x0, y0, w0, h0, rect04[5 * 4], *p = rect04; unsigned char *r; w0 = (marq_x2 < mem_width ? marq_x2 + 1 : mem_width) * scale; x0 = marq_x1 > 0 ? marq_x1 * scale : 0; w0 -= x0; x0 += margin_main_x; h0 = (marq_y2 < mem_height ? marq_y2 + 1 : mem_height) * scale; y0 = marq_y1 > 0 ? marq_y1 * scale : 0; h0 -= y0; y0 += margin_main_y; n = clip4(rect04, px, py, pw, ph, x0, y0, w0, h0); while (n--) { p += 4; r = rgb + ((p[1] - py) * pw + (p[0] - px)) * 3; draw_grid(r, p[0], p[1], p[2], p[3], pw); } } /* Tile grid */ if (show_tile_grid && irgb) draw_tgrid(irgb, rect[0], rect[1], rect[2], rect[3], pw); /* Segmentation preview */ if (seg_preview && irgb) draw_segments(irgb, rect[0], rect[1], rect[2], rect[3], pw); async_bk = FALSE; /* !!! All other over-the-image things have to be redrawn here as well !!! */ prepare_line_clip(vxy, ctx.xy, scale); /* Redraw gradient line if needed */ i = gradient[mem_channel].status; if ((mem_gradient || (tool_type == TOOL_GRADIENT)) && (mouse_left_canvas ? (i == GRAD_DONE) : (i != GRAD_NONE))) refresh_line(3, vxy, &ctx); /* Draw marquee as we may have drawn over it */ if (marq_status != MARQUEE_NONE) paint_marquee(MARQ_SHOW, 0, 0, &ctx); if ((tool_type == TOOL_POLYGON) && poly_points) paint_poly_marquee(&ctx, TRUE); /* Redraw line if needed */ if ((((tool_type == TOOL_POLYGON) && (poly_status == POLY_SELECTING)) || ((tool_type == TOOL_LINE) && (line_status == LINE_LINE))) && !mouse_left_canvas) refresh_line(tool_type == TOOL_LINE ? 1 : 2, vxy, &ctx); /* Redraw perimeter if needed */ if (perim_status && !mouse_left_canvas) repaint_perim(&ctx); gdk_draw_rgb_image(drawing_canvas->window, drawing_canvas->style->black_gc, px - vport[0], py - vport[1], pw, ph, GDK_RGB_DITHER_NONE, rgb, pw * 3); free(rgb); } /* Update x,y,w,h area of current image */ void main_update_area(int x, int y, int w, int h) { int zoom, scale, vport[4], rxy[4]; if (can_zoom < 1.0) { zoom = rint(1.0 / can_zoom); w += x; h += y; x = floor_div(x + zoom - 1, zoom); y = floor_div(y + zoom - 1, zoom); w = (w - x * zoom + zoom - 1) / zoom; h = (h - y * zoom + zoom - 1) / zoom; if ((w <= 0) || (h <= 0)) return; } else { scale = rint(can_zoom); x *= scale; y *= scale; w *= scale; h *= scale; if (color_grid && mem_show_grid && (scale >= mem_grid_min)) w++ , h++; // Redraw grid lines bordering the area } x += margin_main_x; y += margin_main_y; wjcanvas_get_vport(drawing_canvas, vport); if (clip(rxy, x, y, x + w, y + h, vport)) gtk_widget_queue_draw_area(drawing_canvas, rxy[0] - vport[0], rxy[1] - vport[1], rxy[2] - rxy[0], rxy[3] - rxy[1]); } /* Get zoomed canvas size */ void canvas_size(int *w, int *h) { int zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); *w = (mem_width * scale + zoom - 1) / zoom; *h = (mem_height * scale + zoom - 1) / zoom; } void clear_perim() { perim_status = 0; /* Cleared */ /* Don't bother if tool has no perimeter */ if (NO_PERIM(tool_type)) return; clear_perim_real(0, 0); if ( tool_type == TOOL_CLONE ) clear_perim_real(clone_x, clone_y); } void repaint_perim_real(int r, int g, int b, int ox, int oy, rgbcontext *ctx) { int i, j, w, h, x0, y0, x1, y1, zoom = 1, scale = 1; unsigned char *rgb; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); x0 = margin_main_x + ((perim_x + ox) * scale) / zoom; y0 = margin_main_y + ((perim_y + oy) * scale) / zoom; x1 = margin_main_x + ((perim_x + ox + perim_s - 1) * scale) / zoom + scale - 1; y1 = margin_main_y + ((perim_y + oy + perim_s - 1) * scale) / zoom + scale - 1; w = x1 - x0 + 1; h = y1 - y0 + 1; j = (w > h ? w : h) * 3; rgb = calloc(j + 2 * 3, 1); /* 2 extra pixels reserved for loop */ if (!rgb) return; for (i = 0; i < j; i += 6 * 3) { rgb[i + 0] = rgb[i + 3] = rgb[i + 6] = r; rgb[i + 1] = rgb[i + 4] = rgb[i + 7] = g; rgb[i + 2] = rgb[i + 5] = rgb[i + 8] = b; } draw_rgb(x0, y0, 1, h, rgb, 3, ctx); draw_rgb(x1, y0, 1, h, rgb, 3, ctx); draw_rgb(x0 + 1, y0, w - 2, 1, rgb, 0, ctx); draw_rgb(x0 + 1, y1, w - 2, 1, rgb, 0, ctx); free(rgb); } void repaint_perim(rgbcontext *ctx) { /* Don't bother if tool has no perimeter */ if (NO_PERIM(tool_type)) return; repaint_perim_real(255, 255, 255, 0, 0, ctx); if ( tool_type == TOOL_CLONE ) repaint_perim_real(255, 0, 0, clone_x, clone_y, ctx); perim_status = 1; /* Drawn */ } static gboolean canvas_motion(GtkWidget *widget, GdkEventMotion *event, gpointer user_data) { int x, y, rm, vport[4], button = 0; GdkModifierType state; gdouble pressure = 1.0; mouse_left_canvas = FALSE; /* Skip synthetic mouse moves */ if (unreal_move == 3) { unreal_move = 2; return TRUE; } rm = unreal_move; unreal_move = 0; /* Do nothing if no image */ if (!mem_img[CHN_IMAGE]) return (TRUE); #if GTK_MAJOR_VERSION == 1 if (event->is_hint) { gdk_input_window_get_pointer(event->window, event->deviceid, NULL, NULL, &pressure, NULL, NULL, &state); gdk_window_get_pointer(event->window, &x, &y, &state); } else { x = event->x; y = event->y; pressure = event->pressure; state = event->state; } #endif #if GTK_MAJOR_VERSION == 2 if (event->is_hint) gdk_device_get_state(event->device, event->window, NULL, &state); x = event->x; y = event->y; state = event->state; if (tablet_working) gdk_event_get_axis((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure); #endif if ((state & (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) == (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)) button = 13; else if (state & GDK_BUTTON1_MASK) button = 1; else if (state & GDK_BUTTON3_MASK) button = 3; else if (state & GDK_BUTTON2_MASK) button = 2; /* If cursor got warped, will have another movement event to handle */ if (button && (tool_type == TOOL_SELECT) && wjcanvas_bind_mouse(widget, event, x, y)) return (TRUE); wjcanvas_get_vport(widget, vport); mouse_event(event->type, x + vport[0], y + vport[1], state, button, pressure, rm & 1, 0, 0); return TRUE; } static gboolean configure_canvas( GtkWidget *widget, GdkEventConfigure *event ) { int w, h, new_margin_x = 0, new_margin_y = 0; if ( canvas_image_centre ) { canvas_size(&w, &h); w = drawing_canvas->allocation.width - w; h = drawing_canvas->allocation.height - h; if (w > 0) new_margin_x = w >> 1; if (h > 0) new_margin_y = h >> 1; } if ((new_margin_x != margin_main_x) || (new_margin_y != margin_main_y)) { margin_main_x = new_margin_x; margin_main_y = new_margin_y; gtk_widget_queue_draw(drawing_canvas); // Force redraw of whole canvas as the margin has shifted } vw_realign(); // Update the view window as needed return (TRUE); } void force_main_configure() { if (drawing_canvas) configure_canvas(drawing_canvas, NULL); if (view_showing && vw_drawing) vw_configure(vw_drawing, NULL); } #define REPAINT_CANVAS_COST 512 static gboolean expose_canvas(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { int vport[4]; /* Stops excess jerking in GTK+1 when zooming */ if (zoom_flag) return (TRUE); wjcanvas_get_vport(widget, vport); repaint_expose(event, vport, repaint_canvas, REPAINT_CANVAS_COST); return (TRUE); } void set_cursor() // Set mouse cursor { if (!drawing_canvas->window) return; /* Do nothing if canvas hidden */ gdk_window_set_cursor(drawing_canvas->window, cursor_tool ? m_cursor[tool_type] : NULL); } void change_to_tool(int icon) { grad_info *grad; int i, t, update = CF_SELBAR | CF_MENU | CF_CURSOR; if (!GTK_WIDGET_SENSITIVE(icon_buttons[icon])) return; // Blocked if (!GTK_TOGGLE_BUTTON(icon_buttons[icon])->active) // Toggle the button gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(icon_buttons[icon]), TRUE); switch (icon) { case TTB_PAINT: t = brush_type; break; case TTB_SHUFFLE: t = TOOL_SHUFFLE; break; case TTB_FLOOD: t = TOOL_FLOOD; break; case TTB_LINE: t = TOOL_LINE; break; case TTB_SMUDGE: t = TOOL_SMUDGE; break; case TTB_CLONE: t = TOOL_CLONE; break; case TTB_SELECT: t = TOOL_SELECT; break; case TTB_POLY: t = TOOL_POLYGON; break; case TTB_GRAD: t = TOOL_GRADIENT; break; default: return; } /* Tool hasn't changed (likely, recursion changed it from under us) */ if (t == tool_type) return; if (perim_status) clear_perim(); i = tool_type; tool_type = t; grad = gradient + mem_channel; if (i == TOOL_LINE) stop_line(); if ((i == TOOL_GRADIENT) && (grad->status != GRAD_NONE)) { if (grad->status != GRAD_DONE) grad->status = GRAD_NONE; else if (grad_opacity) update |= CF_DRAW; else if (!mem_gradient) repaint_grad(NULL); } if ( marq_status != MARQUEE_NONE) { if (paste_commit && (marq_status >= MARQUEE_PASTE)) { commit_paste(FALSE, NULL); pen_down = 0; mem_undo_prepare(); } marq_status = MARQUEE_NONE; // Marquee is on so lose it! update |= CF_DRAW; // Needed to clear selection } if ( poly_status != POLY_NONE) { poly_status = POLY_NONE; // Marquee is on so lose it! poly_points = 0; update |= CF_DRAW; // Needed to clear selection } if ( tool_type == TOOL_CLONE ) { clone_x = -tool_size; clone_y = tool_size; } /* Persistent selection frame */ // !!! To NOT show selection frame while placing gradient // if ((tool_type == TOOL_SELECT) if (((tool_type == TOOL_SELECT) || (tool_type == TOOL_GRADIENT)) && (marq_x1 >= 0) && (marq_y1 >= 0) && (marq_x2 >= 0) && (marq_y2 >= 0)) { marq_status = MARQUEE_DONE; paint_marquee(MARQ_SHOW, 0, 0, NULL); } if ((tool_type == TOOL_GRADIENT) && (grad->status != GRAD_NONE)) { if (grad_opacity) update |= CF_DRAW; else repaint_grad(NULL); } update_stuff(update); if (!(update & CF_DRAW)) repaint_perim(NULL); } static void pressed_view_hori(int state) { gboolean vs = view_showing; if (state) { if (main_split == main_hsplit) return; view_hide(); main_split = main_hsplit; } else { if (main_split == main_vsplit) return; view_hide(); main_split = main_vsplit; } if (vs) view_show(); } void set_image(gboolean state) { static int depth = 0; if (state ? --depth : depth++) return; (state ? gtk_widget_show_all : gtk_widget_hide)(view_showing ? main_split : scrolledwindow_canvas); if (state) set_cursor(); /* Canvas window is now a new one */ } static char read_hex_dub(char *in) // Read hex double { static const char chars[] = "0123456789abcdef0123456789ABCDEF"; const char *p1, *p2; p1 = strchr(chars, in[0]); p2 = strchr(chars, in[1]); return (p1 && p2 ? (((p1 - chars) & 15) << 4) + ((p2 - chars) & 15) : '?'); } static void parse_drag( char *txt ) { #ifdef WIN32 char fname[PATHTXT]; #else char fname[PATHBUF]; #endif char ch, *tp, *tp2; int i, j, nlayer = TRUE; set_image(FALSE); tp = txt; while ((layers_total < MAX_LAYERS) && (tp2 = strstr(tp, "file:"))) { tp = tp2 + 5; while (*tp == '/') tp++; #ifndef WIN32 // If not windows keep a leading slash tp--; // If windows strip away all leading slashes #endif i = 0; while ((ch = *tp++) > 31) // Copy filename { if (ch == '%') // Weed out those ghastly % substitutions { ch = read_hex_dub(tp); tp += 2; } fname[i++] = ch; if (i >= sizeof(fname) - 1) break; } fname[i] = 0; tp--; #ifdef WIN32 /* !!! GTK+ uses UTF-8 encoding for URIs on Windows */ gtkncpy(fname, fname, PATHBUF); reseparate(fname); #endif j = detect_image_format(fname); if ((j > 0) && (j != FT_NONE) && (j != FT_LAYERS1)) { if (!nlayer || layer_add(0, 0, 1, 0, mem_pal_def, 0)) nlayer = load_image(fname, FS_LAYER_LOAD, j) == 1; if (nlayer) set_new_filename(layers_total, fname); } } if (!nlayer) layer_delete(layers_total); layer_refresh_list(); layer_choose(layers_total); layers_notify_changed(); if (layers_total) view_show(); set_image(TRUE); } static const GtkTargetEntry uri_list = { "text/uri-list", 0, 1 }; static gboolean drag_n_drop_tried(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer user_data) { GdkAtom target = gdk_atom_intern("text/uri-list", FALSE); gpointer tp = GUINT_TO_POINTER(target); GList *src; /* Check if drop could provide a supported format */ for (src = context->targets; src && (src->data != tp); src = src->next); if (!src) return (FALSE); /* Trigger "drag_data_received" event */ gtk_drag_get_data(widget, context, target, time); return (TRUE); } static void drag_n_drop_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { int success; if ((success = ((data->length >= 0) && (data->format == 8)))) parse_drag((gchar *)data->data); /* Accept move as a copy (disallow deleting source) */ gtk_drag_finish(context, success, FALSE, time); } typedef struct { char *path; /* Full path for now */ signed char radio_BTS; /* -2..-5 are for BTS */ unsigned short ID; int actmap; char *shortcut; /* Text form for now */ short action, mode; XPM_TYPE xpm_icon_image; } menu_item; /* The following is main menu auto-rearrange code. If the menu is too long for * the window, some of its items are moved into "overflow" submenu - and moved * back to menubar when the window is made wider. This way, we can support * small-screen devices without penalizing large-screen ones. - WJ */ #define MENU_RESIZE_MAX 16 typedef struct { GtkWidget *item, *fallback; guint key; int width; } r_menu_slot; int r_menu_state; r_menu_slot r_menu[MENU_RESIZE_MAX]; /* Handle keyboard accels for overflow menu */ static int check_smart_menu_keys(GdkEventKey *event) { guint lowkey; int i; /* View mode - do nothing */ if (view_image_only) return (0); /* No overflow - nothing to do */ if (r_menu_state == 0) return (0); /* Alt+key only */ if ((event->state & _CSA) != _A) return (0); lowkey = low_key(event); for (i = 1; i <= r_menu_state; i++) { if (r_menu[i].key != lowkey) continue; /* Just popup - if we're here, overflow menu is offscreen anyway */ gtk_menu_popup(GTK_MENU(GTK_MENU_ITEM(r_menu[i].fallback)->submenu), NULL, NULL, NULL, NULL, 0, 0); return (ACTMOD_DUMMY); } return (0); } /* Invalidate width cache after width-affecting change */ static void check_width_cache(int width) { r_menu_slot *slot; if (r_menu[r_menu_state].width == width) return; if (r_menu[r_menu_state].width) for (slot = r_menu; slot->item; slot++) slot->width = 0; r_menu[r_menu_state].width = width; } /* Show/hide widgets according to new state */ static void change_to_state(int state) { GtkWidget *w; int i, oldst = r_menu_state; if (oldst < state) { for (i = oldst + 1; i <= state; i++) gtk_widget_hide(r_menu[i].item); if (oldst == 0) { w = r_menu[0].item; gtk_widget_set_state(w, GTK_STATE_NORMAL); gtk_widget_show(w); } } else { for (i = oldst; i > state; i--) { w = r_menu[i].item; gtk_widget_set_state(w, GTK_STATE_NORMAL); gtk_widget_show(w); } if (state == 0) gtk_widget_hide(r_menu[0].item); } r_menu_state = state; } /* Move submenus between menubar and overflow submenu */ static void switch_states(int newstate, int oldstate) { GtkWidget *submenu; GtkMenuItem *item; int i; if (newstate < oldstate) /* To main menu */ { for (i = oldstate; i > newstate; i--) { gtk_widget_hide(r_menu[i].fallback); item = GTK_MENU_ITEM(r_menu[i].fallback); gtk_widget_ref(submenu = item->submenu); gtk_menu_item_remove_submenu(item); item = GTK_MENU_ITEM(r_menu[i].item); gtk_menu_item_set_submenu(item, submenu); gtk_widget_unref(submenu); } } else /* To overflow submenu */ { for (i = oldstate + 1; i <= newstate; i++) { item = GTK_MENU_ITEM(r_menu[i].item); gtk_widget_ref(submenu = item->submenu); gtk_menu_item_remove_submenu(item); item = GTK_MENU_ITEM(r_menu[i].fallback); gtk_menu_item_set_submenu(item, submenu); gtk_widget_unref(submenu); gtk_widget_show(r_menu[i].fallback); } } } /* Get width request for default state */ static int smart_menu_full_width(GtkWidget *widget, int width) { check_width_cache(width); if (!r_menu[0].width) { GtkRequisition req; GtkWidget *child = BOX_CHILD_0(widget); int oldst = r_menu_state; gpointer lock = toggle_updates(widget, NULL); change_to_state(0); gtk_widget_size_request(child, &req); r_menu[0].width = req.width; change_to_state(oldst); child->requisition.width = width; toggle_updates(widget, lock); } return (r_menu[0].width); } /* Switch to the state which best fits the allocated width */ static void smart_menu_state_to_width(GtkWidget *widget, int rwidth, int awidth) { GtkWidget *child = BOX_CHILD_0(widget); gpointer lock = NULL; int state, oldst, newst; check_width_cache(rwidth); state = oldst = r_menu_state; while (TRUE) { newst = rwidth < awidth ? state - 1 : state + 1; if ((newst < 0) || !r_menu[newst].item) break; if (!r_menu[newst].width) { GtkRequisition req; if (!lock) lock = toggle_updates(widget, NULL); change_to_state(newst); gtk_widget_size_request(child, &req); r_menu[newst].width = req.width; } state = newst; if ((rwidth < awidth) ^ (r_menu[state].width <= awidth)) break; } while ((r_menu[state].width > awidth) && r_menu[state + 1].item) state++; if (state != r_menu_state) { if (!lock) lock = toggle_updates(widget, NULL); change_to_state(state); child->requisition.width = r_menu[state].width; } if (state != oldst) switch_states(state, oldst); if (lock) toggle_updates(widget, lock); } static void smart_menu_size_req(GtkWidget *widget, GtkRequisition *req, gpointer user_data) { GtkRequisition child_req; GtkWidget *child; int fullw; req->width = req->height = GTK_CONTAINER(widget)->border_width * 2; if (!GTK_BOX(widget)->children) return; child = BOX_CHILD_0(widget); if (!GTK_WIDGET_VISIBLE(child)) return; gtk_widget_size_request(child, &child_req); fullw = smart_menu_full_width(widget, child_req.width); req->width += fullw; req->height += child_req.height; } static void smart_menu_size_alloc(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) { static int in_alloc; GtkRequisition child_req; GtkAllocation child_alloc; GtkWidget *child; int border = GTK_CONTAINER(widget)->border_width, border2 = border * 2; widget->allocation = *alloc; if (!GTK_BOX(widget)->children) return; child = BOX_CHILD_0(widget); if (!GTK_WIDGET_VISIBLE(child)) return; /* Maybe recursive calls to this cannot happen, but if they can, * crash would be quite spectacular - so, better safe than sorry */ if (in_alloc) /* Postpone reaction */ { in_alloc |= 2; return; } /* !!! Always keep child widget requisition set according to its * !!! mode, or this code will break down in interesting ways */ gtk_widget_get_child_requisition(child, &child_req); /* !!! Alternative approach - reliable but slow */ // gtk_widget_size_request(child, &child_req); while (TRUE) { in_alloc = 1; child_alloc.x = alloc->x + border; child_alloc.y = alloc->y + border; child_alloc.width = alloc->width > border2 ? alloc->width - border2 : 0; child_alloc.height = alloc->height > border2 ? alloc->height - border2 : 0; if ((child_alloc.width != child->allocation.width) && (r_menu_state > 0 ? child_alloc.width != child_req.width : child_alloc.width < child_req.width)) smart_menu_state_to_width(widget, child_req.width, child_alloc.width); if (in_alloc < 2) break; alloc = &widget->allocation; } in_alloc = 0; gtk_widget_size_allocate(child, &child_alloc); } static void pressed_pal_copy(); static void pressed_pal_paste(); static void pressed_sel_ramp(int vert); static const signed char arrow_dx[4] = { 0, -1, 1, 0 }, arrow_dy[4] = { 1, 0, 0, -1 }; static void move_marquee(int action, int *xy, int change, int dir) { int dx = tgrid_dx, dy = tgrid_dy; if (!tgrid_snap) dx = dy = change; paint_marquee(action, xy[0] + dx * arrow_dx[dir], xy[1] + dy * arrow_dy[dir], NULL); update_stuff(UPD_SGEOM); } void action_dispatch(int action, int mode, int state, int kbd) { int change = mode & 1 ? mem_nudge : 1, dir = (mode >> 1) - 1; switch (action) { case ACT_QUIT: quit_all(mode); break; case ACT_ZOOM: if (!mode) zoom_in(); else if (mode == -1) zoom_out(); else align_size(mode > 0 ? mode : -1.0 / mode); break; case ACT_VIEW: toggle_view(); break; case ACT_PAN: pressed_pan(); break; case ACT_CROP: pressed_crop(); break; case ACT_SWAP_AB: mem_swap_cols(TRUE); break; case ACT_TOOL: if (state || kbd) change_to_tool(mode); // Ignore DEactivating buttons break; case ACT_SEL_MOVE: /* Gradient tool has precedence over selection */ if ((tool_type != TOOL_GRADIENT) && (marq_status > MARQUEE_NONE)) move_marquee(MARQ_MOVE, marq_xy, change, dir); else move_mouse(change * arrow_dx[dir], change * arrow_dy[dir], 0); break; case ACT_OPAC: pressed_opacity(mode > 0 ? (255 * mode) / 10 : tool_opacity + 1 + mode + mode); break; case ACT_LR_MOVE: /* User is selecting so allow CTRL+arrow keys to resize the * marquee; for consistency, gradient tool blocks this */ if ((tool_type != TOOL_GRADIENT) && (marq_status == MARQUEE_DONE)) move_marquee(MARQ_SIZE, marq_xy + 2, change, dir); else if (layer_selected) move_layer_relative(layer_selected, change * arrow_dx[dir], change * arrow_dy[dir]); else if (bkg_flag) { /* !!! Later, maybe localize redraw to the changed part */ bkg_x += change * arrow_dx[dir]; bkg_y += change * arrow_dy[dir]; update_stuff(UPD_RENDER); } break; case ACT_ESC: if ((tool_type == TOOL_SELECT) || (tool_type == TOOL_POLYGON)) pressed_select(FALSE); else if (tool_type == TOOL_LINE) stop_line(); else if ((tool_type == TOOL_GRADIENT) && (gradient[mem_channel].status != GRAD_NONE)) { gradient[mem_channel].status = GRAD_NONE; if (grad_opacity) update_stuff(UPD_RENDER); else repaint_grad(NULL); } break; case ACT_COMMIT: if (marq_status >= MARQUEE_PASTE) { commit_paste(mode, NULL); pen_down = 0; // Ensure each press of enter is a new undo level mem_undo_prepare(); } else move_mouse(0, 0, 1); break; case ACT_RCLICK: if (marq_status < MARQUEE_PASTE) move_mouse(0, 0, 3); break; case ACT_ARROW: draw_arrow(mode); break; case ACT_A: case ACT_B: action = action == ACT_B; if (mem_channel == CHN_IMAGE) { mode += mem_col_[action]; if ((mode >= 0) && (mode < mem_cols)) mem_col_[action] = mode; mem_col_24[action] = mem_pal[mem_col_[action]]; } else { mode += channel_col_[action][mem_channel]; if ((mode >= 0) && (mode <= 255)) channel_col_[action][mem_channel] = mode; } update_stuff(UPD_CAB); break; case ACT_CHANNEL: if (kbd) state = TRUE; if (mode < 0) pressed_channel_create(mode); else pressed_channel_edit(state, mode); break; case ACT_VWZOOM: if (!mode) { if (vw_zoom >= 1) vw_align_size(vw_zoom + 1); else vw_align_size(1.0 / (rint(1.0 / vw_zoom) - 1)); } else if (mode == -1) { if (vw_zoom > 1) vw_align_size(vw_zoom - 1); else vw_align_size(1.0 / (rint(1.0 / vw_zoom) + 1)); } // else vw_align_size(mode > 0 ? mode : -1.0 / mode); break; case ACT_SAVE: pressed_save_file(); break; case ACT_FACTION: pressed_file_action(mode); break; case ACT_LOAD_RECENT: pressed_load_recent(mode); break; case ACT_UNDO: main_undo(); break; case ACT_REDO: main_redo(); break; case ACT_COPY: pressed_copy(mode); break; case ACT_PASTE: pressed_paste(mode); break; case ACT_COPY_PAL: pressed_pal_copy(); break; case ACT_PASTE_PAL: pressed_pal_paste(); break; case ACT_LOAD_CLIP: load_clip(mode); break; case ACT_SAVE_CLIP: save_clip(mode); break; case ACT_TBAR: pressed_toolbar_toggle(state, mode); break; case ACT_DOCK: if (!kbd) toggle_dock(show_dock = state, FALSE); else if (GTK_WIDGET_SENSITIVE(menu_widgets[MENU_DOCK])) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_DOCK]), !show_dock); break; case ACT_CENTER: pressed_centralize(state); break; case ACT_GRID: zoom_grid(state); break; case ACT_SNAP: tgrid_snap = state; break; case ACT_VWWIN: if (state) view_show(); else view_hide(); break; case ACT_VWSPLIT: pressed_view_hori(state); break; case ACT_VWFOCUS: pressed_view_focus(state); break; case ACT_FLIP_V: pressed_flip_image_v(); break; case ACT_FLIP_H: pressed_flip_image_h(); break; case ACT_ROTATE: pressed_rotate_image(mode); break; case ACT_SELECT: pressed_select(mode); break; case ACT_LASSO: pressed_lasso(mode); break; case ACT_OUTLINE: pressed_rectangle(mode); break; case ACT_ELLIPSE: pressed_ellipse(mode); break; case ACT_SEL_FLIP_V: pressed_flip_sel_v(); break; case ACT_SEL_FLIP_H: pressed_flip_sel_h(); break; case ACT_SEL_ROT: pressed_rotate_sel(mode); break; case ACT_RAMP: pressed_sel_ramp(mode); break; case ACT_SEL_ALPHA_AB: pressed_clip_alpha_scale(); break; case ACT_SEL_ALPHAMASK: pressed_clip_alphamask(); break; case ACT_SEL_MASK_AB: pressed_clip_mask(mode); break; case ACT_SEL_MASK: if (!mode) pressed_clip_mask_all(); else pressed_clip_mask_clear(); break; case ACT_PAL_DEF: pressed_default_pal(); break; case ACT_PAL_MASK: pressed_mask(mode); break; case ACT_DITHER_A: pressed_dither_A(); break; case ACT_PAL_MERGE: pressed_remove_duplicates(); break; case ACT_PAL_CLEAN: pressed_remove_unused(); break; case ACT_ISOMETRY: iso_trans(mode); break; case ACT_CHN_DIS: pressed_channel_disable(state, mode); break; case ACT_SET_RGBA: pressed_RGBA_toggle(state); break; case ACT_SET_OVERLAY: pressed_channel_toggle(state, mode); break; case ACT_LR_SAVE: layer_press_save(); break; case ACT_LR_ADD: if (mode == LR_NEW) generic_new_window(1); else if (mode == LR_DUP) layer_press_duplicate(); else if (mode == LR_PASTE) pressed_paste_layer(); else /* if (mode == LR_COMP) */ layer_add_composite(); break; case ACT_LR_DEL: if (!mode) layer_press_delete(); else layer_press_remove_all(); break; case ACT_DOCS: show_html(inifile_get(HANDBOOK_BROWSER_INI, NULL), inifile_get(HANDBOOK_LOCATION_INI, NULL)); break; case ACT_REBIND_KEYS: rebind_keys(); break; case ACT_MODE: mode_change(mode, state); break; case ACT_LR_SHIFT: shift_layer(mode); break; case ACT_LR_CENTER: layer_press_centre(); break; case DLG_BRCOSA: pressed_brcosa(); break; case DLG_CHOOSER: choose_pattern(mode); break; case DLG_SCALE: pressed_scale_size(TRUE); break; case DLG_SIZE: pressed_scale_size(FALSE); break; case DLG_NEW: generic_new_window(0); break; case DLG_FSEL: file_selector(mode); break; case DLG_FACTIONS: pressed_file_configure(); break; case DLG_TEXT: pressed_text(); break; case DLG_TEXT_FT: pressed_mt_text(); break; case DLG_LAYERS: if (mode) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_LAYER]), FALSE); // Closed by toolbar else if (state) pressed_layers(); else delete_layers_window(); break; case DLG_INDEXED: pressed_quantize(mode); break; case DLG_ROTATE: pressed_rotate_free(); break; case DLG_INFO: pressed_information(); break; case DLG_PREFS: pressed_preferences(); break; case DLG_COLORS: colour_selector(mode); break; case DLG_PAL_SIZE: pressed_add_cols(); break; case DLG_PAL_SORT: pressed_sort_pal(); break; case DLG_PAL_SHIFTER: pressed_shifter(); break; case DLG_CHN_DEL: pressed_channel_delete(); break; case DLG_ANI: pressed_animate_window(); break; case DLG_ANI_VIEW: ani_but_preview(); break; case DLG_ANI_KEY: pressed_set_key_frame(); break; case DLG_ANI_KILLKEY: pressed_remove_key_frames(); break; case DLG_ABOUT: pressed_help(); break; case DLG_SKEW: pressed_skew(); break; case DLG_FLOOD: flood_settings(); break; case DLG_SMUDGE: smudge_settings(); break; case DLG_GRAD: gradient_setup(mode); break; case DLG_STEP: step_settings(); break; case DLG_FILT: blend_settings(); break; case DLG_TRACE: bkg_setup(); break; case DLG_PICK_GRAD: pressed_pick_gradient(); break; case DLG_SEGMENT: pressed_segment(); break; case FILT_2RGB: pressed_convert_rgb(); break; case FILT_INVERT: pressed_invert(); break; case FILT_GREY: pressed_greyscale(mode); break; case FILT_EDGE: pressed_edge_detect(); break; case FILT_DOG: pressed_dog(); break; case FILT_SHARPEN: pressed_sharpen(); break; case FILT_UNSHARP: pressed_unsharp(); break; case FILT_SOFTEN: pressed_soften(); break; case FILT_GAUSS: pressed_gauss(); break; case FILT_FX: pressed_fx(mode); break; case FILT_BACT: pressed_bacteria(); break; case FILT_THRES: pressed_threshold(); break; case FILT_UALPHA: pressed_unassociate(); break; case FILT_KUWAHARA: pressed_kuwahara(); break; } } static void menu_action(GtkMenuItem *widget, gpointer user_data, gint data) { menu_item *item = user_data; action_dispatch(item->action, item->mode, item->radio_BTS < 0 ? TRUE : GTK_CHECK_MENU_ITEM(widget)->active, FALSE); } static GtkWidget *fill_menu(menu_item *items, GtkAccelGroup *accel_group) { static char *bts[6] = { "", NULL, "", "", "", "" }; GtkItemFactoryEntry wf; GtkItemFactory *factory; GtkWidget *widget, *wrap, *rwidgets[MENU_RESIZE_MAX]; wjmem *mem; char *radio[32], *rnames[MENU_RESIZE_MAX], buf[64]; char *tmp, *s, *s2, *t; int i, j, l, itp, rn = 0, nsep = 0; #if GTK_MAJOR_VERSION == 1 GSList *en; #endif mem = wjmemnew(0, 0); memset(&wf, 0, sizeof(wf)); memset(radio, 0, sizeof(radio)); rnames[0] = NULL; factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); tmp = ""; for (; items->path; items++) { s = items->path; if (!s[strspn(s, "/")]) /* Generate an unique name */ { sprintf(buf, "%sitem%d", s, nsep++); s = buf; } else s = _(s); /* Translate an existing name */ /* Text up to the last "/" gets copied from the previous item, * so that untranslated items in submenus do not mess up the * menu structure. In addition, omitting text between "//" pairs * saves some space - WJ */ t = tmp; while ((s2 = strchr(s, '/'))) { s = s2; t += strcspn(t, "/"); if (*t != '/') break; s++; t++; } l = t - tmp; t = wjmalloc(mem, l + strlen(s) + 1, 1); memcpy(t, tmp, l); strcpy(t + l, s); wf.path = t; itp = items->radio_BTS; wf.item_type = itp < 1 ? bts[-itp & 15] : radio[itp] ? radio[itp] : ""; wf.accelerator = items->shortcut; wf.callback = items->action ? menu_action : NULL; // wf.callback_action = 0; #if GTK_MAJOR_VERSION == 2 if (show_menu_icons && items->xpm_icon_image) { wf.item_type = ""; wf.extra_data = NULL; gtk_item_factory_create_item(factory, &wf, items, 2); widget = gtk_item_factory_get_item(factory, ((GtkItemFactoryItem *)factory->items->data)->path); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(widget), xpm_image(items->xpm_icon_image)); } else #endif gtk_item_factory_create_item(factory, &wf, items, 2); /* !!! Internal path may differ from input path */ tmp = strchr(((GtkItemFactoryItem *)factory->items->data)->path, '/'); if ((itp > 0) && !radio[itp]) radio[itp] = tmp; widget = gtk_item_factory_get_item(factory, tmp); mapped_dis_add(widget, items->actmap); /* For now, remember only requested widgets */ if (items->ID) menu_widgets[items->ID] = widget; /* Remember what is size-aware */ if (items->radio_BTS > -16) continue; rnames[rn] = wf.path; rwidgets[rn++] = widget; } /* Setup overflow submenu */ r_menu[0].item = rwidgets[--rn]; l = strlen(rnames[rn]); memset(&wf, 0, sizeof(wf)); for (i = 0; i < rn; i++) { j = rn - i; widget = r_menu[j].item = rwidgets[i]; #if GTK_MAJOR_VERSION == 1 en = gtk_accel_group_entries_from_object(GTK_OBJECT(widget)); /* !!! This'll get confused if both underline and normal accelerators * are defined for the item */ r_menu[j].key = en ? ((GtkAccelEntry *)en->data)->accelerator_key : GDK_VoidSymbol; #else r_menu[j].key = gtk_label_get_mnemonic_keyval(GTK_LABEL( GTK_BIN(widget)->child)); #endif wf.path = wjmalloc(mem, l + strlen(rnames[i]) + 1, 1); memcpy(wf.path, rnames[rn], l); strcpy(wf.path + l, rnames[i]); wf.item_type = ""; gtk_item_factory_create_item(factory, &wf, NULL, 2); /* !!! Internal path may differ from input path */ widget = gtk_item_factory_get_item(factory, ((GtkItemFactoryItem *)factory->items->data)->path); r_menu[j].fallback = widget; gtk_widget_hide(widget); } gtk_widget_hide(r_menu[0].item); /* Wrap menubar with resize-controller widget */ widget = gtk_item_factory_get_widget(factory, "
"); gtk_widget_show(widget); wrap = wj_size_box(); gtk_container_add(GTK_CONTAINER(wrap), widget); gtk_signal_connect(GTK_OBJECT(wrap), "size_request", GTK_SIGNAL_FUNC(smart_menu_size_req), NULL); gtk_signal_connect(GTK_OBJECT(wrap), "size_allocate", GTK_SIGNAL_FUNC(smart_menu_size_alloc), NULL); wjmemfree(mem); return (wrap); } static int do_pal_copy(png_color *tpal, unsigned char *img, unsigned char *alpha, unsigned char *mask, unsigned char *mask2, png_color *wpal, int w, int h, int bpp, int step) { int i, j, n; mem_pal_copy(tpal, mem_pal); for (n = i = 0; i < h; i++) { for (j = 0; j < w; j++ , img += bpp) { /* Skip empty parts */ if ((mask2 && !mask2[j]) || (mask && !mask[j]) || (alpha && !alpha[j])) continue; if (bpp == 1) tpal[n] = wpal[*img]; else { tpal[n].red = img[0]; tpal[n].green = img[1]; tpal[n].blue = img[2]; } if (++n >= 256) return (256); } img += (step - w) * bpp; if (alpha) alpha += step; if (mask) mask += step; if (mask2) mask2 += w; } return (n); } static void pressed_pal_copy() { png_color tpal[256]; int n = 0; /* Source is selection */ if ((marq_status == MARQUEE_DONE) || (poly_status == POLY_DONE)) { unsigned char *mask2 = NULL; int i, bpp, rect[4]; marquee_at(rect); if ((poly_status == POLY_DONE) && (mask2 = calloc(1, rect[2] * rect[3]))) poly_draw(TRUE, mask2, rect[2]); i = rect[1] * mem_width + rect[0]; bpp = MEM_BPP; n = do_pal_copy(tpal, mem_img[mem_channel] + i * bpp, (mem_channel == CHN_IMAGE) && mem_img[CHN_ALPHA] ? mem_img[CHN_ALPHA] + i : NULL, (mem_channel <= CHN_ALPHA) && mem_img[CHN_SEL] ? mem_img[CHN_SEL] + i : NULL, mask2, mem_pal, rect[2], rect[3], bpp, mem_width); if (mask2) free(mask2); } /* Source is clipboard */ else if (mem_clipboard) n = do_pal_copy(tpal, mem_clipboard, mem_clip_alpha, mem_clip_mask, NULL, mem_clip_paletted ? mem_clip_pal : mem_pal, mem_clip_w, mem_clip_h, mem_clip_bpp, mem_clip_w); if (!n) return; // Empty set - ignore spot_undo(UNDO_PAL); mem_pal_copy(mem_pal, tpal); mem_cols = n; update_stuff(UPD_PAL); } static void pressed_pal_paste() { unsigned char *dest; int i, h, w = mem_cols; // If selection exists, use it to set the width of the clipboard if ((tool_type == TOOL_SELECT) && (marq_status == MARQUEE_DONE)) { w = abs(marq_x1 - marq_x2) + 1; if (w > mem_cols) w = mem_cols; } h = (mem_cols + w - 1) / w; mem_clip_new(w, h, 1, CMASK_IMAGE, FALSE); if (!mem_clipboard) { memory_errors(1); return; } mem_clip_paletted = 1; mem_pal_copy(mem_clip_pal, mem_pal); memset(dest = mem_clipboard, 0, w * h); for (i = 0; i < mem_cols; i++) dest[i] = i; pressed_paste(TRUE); } /// DOCK AREA static GtkWidget *dock_book, *dock_pages[2], *dock_lr_pane; static int dock_state, dock_lr_h; static void add_dock_page1() { GtkWidget *vbox, *pane; vbox = gtk_vbox_new(FALSE, 5); pack(vbox, gtk_hseparator_new()); pane = xpack(vbox, gtk_vpaned_new()); paned_mouse_fix(pane); /* Initialize from layers window, then persist throughout session */ if (dock_lr_h <= 0) dock_lr_h = inifile_get_gint32("layers_h", 400); gtk_paned_set_position(GTK_PANED(pane), dock_lr_h); gtk_paned_pack2(GTK_PANED(pane), gtk_vbox_new(FALSE, 0), TRUE, TRUE); gtk_widget_show_all(vbox); gtk_notebook_append_page(GTK_NOTEBOOK(dock_book), vbox, xpm_image(XPM_ICON(layers))); dock_lr_pane = pane; dock_pages[1] = vbox; } static void pack_0(GtkWidget *box, GtkWidget *widget) { gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(box), widget, 0); } static void toggle_dock(int state, int internal) { GtkWidget *vbox, *pane = dock_pane; int w, w2; if (!pane ^ state) return; gdk_window_get_size(main_window->window, &w2, NULL); gtk_widget_ref(vbox_main); if (state) { /* First, create the dock pane */ pane = gtk_hpaned_new(); paned_mouse_fix(pane); /* Restore dock size if set, autodetect otherwise */ w = inifile_get_gint32("dockSize", -1); if (w >= 0) { /* Window size isn't yet valid */ if (internal) gtk_object_get(GTK_OBJECT(main_window), "default_width", &w2, NULL); gtk_paned_set_position(GTK_PANED(pane), w2 - w); } vbox = gtk_vbox_new(FALSE, 0); // New vbox for pane on the right gtk_paned_pack2(GTK_PANED(pane), vbox, FALSE, TRUE); dock_book = xpack(vbox, gtk_notebook_new()); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(dock_book), GTK_POS_TOP); // Don't shrink when contents get removed widget_set_keepsize(dock_book, FALSE); gtk_widget_show_all(pane); /* Commandline box in a page all its own */ if (files_passed > 1) { dock_state |= (1 << DOCK_CLINE); dock_pages[0] = gtk_vbox_new(FALSE, 0); gtk_widget_show(dock_pages[0]); gtk_notebook_append_page(GTK_NOTEBOOK(dock_book), dock_pages[0], xpm_image(XPM_ICON(cline))); create_cline_area(dock_pages[0]); } /* Settings + layers page */ if (!layers_window || !toolbar_status[TOOLBAR_SETTINGS]) add_dock_page1(); if (!toolbar_status[TOOLBAR_SETTINGS]) { dock_state |= (1 << DOCK_SETTINGS); create_settings_box(); pack_0(dock_pages[1], settings_box); gtk_widget_unref(settings_box); } if (!layers_window) { dock_state |= (1 << DOCK_LAYERS); create_layers_box(); gtk_paned_pack1(GTK_PANED(dock_lr_pane), layers_box, FALSE, TRUE); gtk_widget_unref(layers_box); } /* Show tabs only when it makes sense */ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(dock_book), g_list_length(GTK_NOTEBOOK(dock_book)->children) > 1); /* Now, let's juggle the widgets */ gtk_container_remove(GTK_CONTAINER(main_window), vbox_main); gtk_paned_pack1(GTK_PANED(pane), vbox_main, TRUE, TRUE); dock_pane = pane; dock_area = vbox; gtk_container_add(GTK_CONTAINER(main_window), pane); toolbar_update_settings(); } else { /* Destroy dock pane */ inifile_set_gint32("dockSize", w2 - GTK_PANED(pane)->child1_size); if (!internal) /* Else, don't bother destroying */ { if (dock_pages[1]) // Remember layers box height dock_lr_h = GTK_PANED(dock_lr_pane)->child1_size; dock_state = 0; dock_pages[0] = dock_pages[1] = NULL; dock_pane = dock_area = NULL; gtk_widget_ref(pane); gtk_container_remove(GTK_CONTAINER(main_window), pane); gtk_container_remove(GTK_CONTAINER(pane), vbox_main); gtk_widget_unref(pane); gtk_container_add(GTK_CONTAINER(main_window), vbox_main); } } set_cursor(); /* Because canvas window is now a new one */ gtk_widget_unref(vbox_main); } void dock_undock(int what, int state) { GtkWidget *box; GtkContainer *cont; int mode, flag, cnt; /* Enable/disable menu item */ cnt = state ? state : DOCKABLE(); gtk_widget_set_sensitive(menu_widgets[MENU_DOCK], cnt > 0); if (what == DOCK_LAYERS) box = layers_box; else if (what == DOCK_SETTINGS) box = settings_box; else return; // Nonexistent or unmovable if (!state && !box) /* Create boxes on undock request, if needed */ { if (what == DOCK_LAYERS) create_layers_box(); else if (what == DOCK_SETTINGS) create_settings_box(); return; // Do nothing else } if (!dock_pane) return; // Do nothing if no dock flag = 1 << what; if (!(dock_state & flag) ^ state) return; // Already that way /* To prevent flicker */ cont = GTK_CONTAINER(dock_area); mode = cont->resize_mode; /* !!! Immediate resize is too prone to crashing */ if (dock_pages[1] || !dock_pages[0]) cont->resize_mode = GTK_RESIZE_QUEUE; // gtk_container_set_resize_mode(cont, GTK_RESIZE_QUEUE); // Steal the widget gtk_widget_ref(box); gtk_container_remove(GTK_CONTAINER(box->parent), box); if (state) // Dock { dock_state |= flag; #if GTK_MAJOR_VERSION == 2 gtk_widget_unmap(dock_area); // To prevent flicker #endif if (!dock_pages[1]) add_dock_page1(); if (what == DOCK_LAYERS) { gtk_paned_pack1(GTK_PANED(dock_lr_pane), box, FALSE, TRUE); } else /* if (what == DOCK_SETTINGS) */ { pack_0(dock_pages[1], box); } gtk_widget_unref(box); toolbar_update_settings(); #if GTK_MAJOR_VERSION == 2 gtk_widget_map(dock_area); #endif } else // Undock { dock_state ^= flag; /* Remove settings + layers page if it's empty but other page(s) remain */ if (dock_state && !(dock_state & ((1 << DOCK_LAYERS) | (1 << DOCK_SETTINGS)))) { gtk_container_remove(GTK_CONTAINER(dock_book), dock_pages[1]); dock_pages[1] = NULL; } } /* Show tabs only when it makes sense */ if (dock_state) gtk_notebook_set_show_tabs(GTK_NOTEBOOK(dock_book), g_list_length(GTK_NOTEBOOK(dock_book)->children) > 1); cont->resize_mode = mode; // gtk_container_set_resize_mode(cont, mode); /* Close dock if nothing left in it */ if (!dock_state) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_DOCK]), FALSE); } static void pressed_sel_ramp(int vert) { unsigned char *c0, *c1, *img, *dest; int i, j, k, l, s1, s2, bpp = MEM_BPP, rect[4]; if (marq_status != MARQUEE_DONE) return; marquee_at(rect); if (vert) // Vertical ramp { k = rect[3] - 1; l = rect[2]; s1 = mem_width * bpp; s2 = bpp; } else // Horizontal ramp { k = rect[2] - 1; l = rect[3]; s1 = bpp; s2 = mem_width * bpp; } spot_undo(UNDO_FILT); img = mem_img[mem_channel] + (rect[1] * mem_width + rect[0]) * bpp; for (i = 0; i < l; i++) { c0 = img; c1 = img + k * s1; dest = img; for (j = 1; j < k; j++) { dest += s1; dest[0] = (c0[0] * (k - j) + c1[0] * j) / k; if (bpp == 1) continue; dest[1] = (c0[1] * (k - j) + c1[1] * j) / k; dest[2] = (c0[2] * (k - j) + c1[2] * j) / k; } img += s2; } update_stuff(UPD_IMG); } #undef _ #define _(X) X /* !!! Keep MENU_RESIZE_MAX larger than number of resize-enabled items */ static menu_item main_menu[] = { { _("/_File"), -2 -16 }, { "//", -3 }, { _("//New"), -1, 0, 0, "N", DLG_NEW, 0, XPM_ICON(new) }, { _("//Open ..."), -1, 0, 0, "O", DLG_FSEL, FS_PNG_LOAD, XPM_ICON(open) }, { _("//Save"), -1, 0, 0, "S", ACT_SAVE, 0, XPM_ICON(save) }, { _("//Save As ..."), -1, 0, 0, NULL, DLG_FSEL, FS_PNG_SAVE }, { "//", -4 }, { _("//Export Undo Images ..."), -1, 0, NEED_UNDO, NULL, DLG_FSEL, FS_EXPORT_UNDO }, { _("//Export Undo Images (reversed) ..."), -1, 0, NEED_UNDO, NULL, DLG_FSEL, FS_EXPORT_UNDO2 }, { _("//Export ASCII Art ..."), -1, 0, NEED_IDX, NULL, DLG_FSEL, FS_EXPORT_ASCII }, { _("//Export Animated GIF ..."), -1, 0, NEED_IDX, NULL, DLG_FSEL, FS_EXPORT_GIF }, { "//", -4 }, { _("//Actions"), -2 }, { "///", -3 }, { "///", -1, MENU_FACTION1, 0, NULL, ACT_FACTION, 1 }, { "///", -1, MENU_FACTION2, 0, NULL, ACT_FACTION, 2 }, { "///", -1, MENU_FACTION3, 0, NULL, ACT_FACTION, 3 }, { "///", -1, MENU_FACTION4, 0, NULL, ACT_FACTION, 4 }, { "///", -1, MENU_FACTION5, 0, NULL, ACT_FACTION, 5 }, { "///", -1, MENU_FACTION6, 0, NULL, ACT_FACTION, 6 }, { "///", -1, MENU_FACTION7, 0, NULL, ACT_FACTION, 7 }, { "///", -1, MENU_FACTION8, 0, NULL, ACT_FACTION, 8 }, { "///", -1, MENU_FACTION9, 0, NULL, ACT_FACTION, 9 }, { "///", -1, MENU_FACTION10, 0, NULL, ACT_FACTION, 10 }, { "///", -1, MENU_FACTION11, 0, NULL, ACT_FACTION, 11 }, { "///", -1, MENU_FACTION12, 0, NULL, ACT_FACTION, 12 }, { "///", -1, MENU_FACTION13, 0, NULL, ACT_FACTION, 13 }, { "///", -1, MENU_FACTION14, 0, NULL, ACT_FACTION, 14 }, { "///", -1, MENU_FACTION15, 0, NULL, ACT_FACTION, 15 }, { "///", -4, MENU_FACTION_S }, { _("///Configure"), -1, 0, 0, NULL, DLG_FACTIONS, 0 }, { "//", -4, MENU_RECENT_S }, { "//", -1, MENU_RECENT1, 0, "F1", ACT_LOAD_RECENT, 1 }, { "//", -1, MENU_RECENT2, 0, "F2", ACT_LOAD_RECENT, 2 }, { "//", -1, MENU_RECENT3, 0, "F3", ACT_LOAD_RECENT, 3 }, { "//", -1, MENU_RECENT4, 0, "F4", ACT_LOAD_RECENT, 4 }, { "//", -1, MENU_RECENT5, 0, "F5", ACT_LOAD_RECENT, 5 }, { "//", -1, MENU_RECENT6, 0, "F6", ACT_LOAD_RECENT, 6 }, { "//", -1, MENU_RECENT7, 0, "F7", ACT_LOAD_RECENT, 7 }, { "//", -1, MENU_RECENT8, 0, "F8", ACT_LOAD_RECENT, 8 }, { "//", -1, MENU_RECENT9, 0, "F9", ACT_LOAD_RECENT, 9 }, { "//", -1, MENU_RECENT10, 0, "F10", ACT_LOAD_RECENT, 10 }, { "//", -1, MENU_RECENT11, 0, NULL, ACT_LOAD_RECENT, 11 }, { "//", -1, MENU_RECENT12, 0, NULL, ACT_LOAD_RECENT, 12 }, { "//", -1, MENU_RECENT13, 0, NULL, ACT_LOAD_RECENT, 13 }, { "//", -1, MENU_RECENT14, 0, NULL, ACT_LOAD_RECENT, 14 }, { "//", -1, MENU_RECENT15, 0, NULL, ACT_LOAD_RECENT, 15 }, { "//", -1, MENU_RECENT16, 0, NULL, ACT_LOAD_RECENT, 16 }, { "//", -1, MENU_RECENT17, 0, NULL, ACT_LOAD_RECENT, 17 }, { "//", -1, MENU_RECENT18, 0, NULL, ACT_LOAD_RECENT, 18 }, { "//", -1, MENU_RECENT19, 0, NULL, ACT_LOAD_RECENT, 19 }, { "//", -1, MENU_RECENT20, 0, NULL, ACT_LOAD_RECENT, 20 }, { "//", -4 }, { _("//Quit"), -1, 0, 0, "Q", ACT_QUIT, 1 }, { _("/_Edit"), -2 -16 }, { "//", -3 }, { _("//Undo"), -1, 0, NEED_UNDO, "Z", ACT_UNDO, 0, XPM_ICON(undo) }, { _("//Redo"), -1, 0, NEED_REDO, "R", ACT_REDO, 0, XPM_ICON(redo) }, { "//", -4 }, { _("//Cut"), -1, 0, NEED_SEL2, "X", ACT_COPY, 1, XPM_ICON(cut) }, { _("//Copy"), -1, 0, NEED_SEL2, "C", ACT_COPY, 0, XPM_ICON(copy) }, { _("//Copy To Palette"), -1, 0, NEED_PSEL, NULL, ACT_COPY_PAL, 0 }, { _("//Paste To Centre"), -1, 0, NEED_CLIP, "V", ACT_PASTE, 1, XPM_ICON(paste) }, { _("//Paste To New Layer"), -1, 0, NEED_PCLIP, "V", ACT_LR_ADD, LR_PASTE }, { _("//Paste"), -1, 0, NEED_CLIP, "K", ACT_PASTE, 0 }, { _("//Paste Text"), -1, 0, 0, "T", DLG_TEXT, 0, XPM_ICON(text) }, #ifdef U_FREETYPE { _("//Paste Text (FreeType)"), -1, 0, 0, "T", DLG_TEXT_FT, 0 }, #endif { _("//Paste Palette"), -1, 0, 0, NULL, ACT_PASTE_PAL, 0 }, { "//", -4 }, { _("//Load Clipboard"), -2 }, { "///", -3 }, { "///1", -1, 0, 0, "F1", ACT_LOAD_CLIP, 1 }, { "///2", -1, 0, 0, "F2", ACT_LOAD_CLIP, 2 }, { "///3", -1, 0, 0, "F3", ACT_LOAD_CLIP, 3 }, { "///4", -1, 0, 0, "F4", ACT_LOAD_CLIP, 4 }, { "///5", -1, 0, 0, "F5", ACT_LOAD_CLIP, 5 }, { "///6", -1, 0, 0, "F6", ACT_LOAD_CLIP, 6 }, { "///7", -1, 0, 0, "F7", ACT_LOAD_CLIP, 7 }, { "///8", -1, 0, 0, "F8", ACT_LOAD_CLIP, 8 }, { "///9", -1, 0, 0, "F9", ACT_LOAD_CLIP, 9 }, { "///10", -1, 0, 0, "F10", ACT_LOAD_CLIP, 10 }, { "///11", -1, 0, 0, "F11", ACT_LOAD_CLIP, 11 }, { "///12", -1, 0, 0, "F12", ACT_LOAD_CLIP, 12 }, { _("//Save Clipboard"), -2 }, { "///", -3 }, { "///1", -1, 0, NEED_CLIP, "F1", ACT_SAVE_CLIP, 1 }, { "///2", -1, 0, NEED_CLIP, "F2", ACT_SAVE_CLIP, 2 }, { "///3", -1, 0, NEED_CLIP, "F3", ACT_SAVE_CLIP, 3 }, { "///4", -1, 0, NEED_CLIP, "F4", ACT_SAVE_CLIP, 4 }, { "///5", -1, 0, NEED_CLIP, "F5", ACT_SAVE_CLIP, 5 }, { "///6", -1, 0, NEED_CLIP, "F6", ACT_SAVE_CLIP, 6 }, { "///7", -1, 0, NEED_CLIP, "F7", ACT_SAVE_CLIP, 7 }, { "///8", -1, 0, NEED_CLIP, "F8", ACT_SAVE_CLIP, 8 }, { "///9", -1, 0, NEED_CLIP, "F9", ACT_SAVE_CLIP, 9 }, { "///10", -1, 0, NEED_CLIP, "F10", ACT_SAVE_CLIP, 10 }, { "///11", -1, 0, NEED_CLIP, "F11", ACT_SAVE_CLIP, 11 }, { "///12", -1, 0, NEED_CLIP, "F12", ACT_SAVE_CLIP, 12 }, { _("//Import Clipboard from System"), -1, 0, 0, NULL, ACT_LOAD_CLIP, -1 }, { _("//Export Clipboard to System"), -1, 0, NEED_CLIP, NULL, ACT_SAVE_CLIP, -1 }, { "//", -4 }, { _("//Choose Pattern ..."), -1, 0, 0, "F2", DLG_CHOOSER, CHOOSE_PATTERN }, { _("//Choose Brush ..."), -1, 0, 0, "F3", DLG_CHOOSER, CHOOSE_BRUSH }, { _("//Choose Colour ..."), -1, 0, 0, "E", DLG_CHOOSER, CHOOSE_COLOR }, { _("/_View"), -2 -16 }, { "//", -3 }, { _("//Show Main Toolbar"), 0, MENU_TBMAIN, 0, "F5", ACT_TBAR, TOOLBAR_MAIN }, { _("//Show Tools Toolbar"), 0, MENU_TBTOOLS, 0, "F6", ACT_TBAR, TOOLBAR_TOOLS }, { _("//Show Settings Toolbar"), 0, MENU_TBSET, 0, "F7", ACT_TBAR, TOOLBAR_SETTINGS }, { _("//Show Dock"), 0, MENU_DOCK, 0, "F12", ACT_DOCK, 0 }, { _("//Show Palette"), 0, MENU_SHOWPAL, 0, "F8", ACT_TBAR, TOOLBAR_PALETTE }, { _("//Show Status Bar"), 0, MENU_SHOWSTAT, 0, NULL, ACT_TBAR, TOOLBAR_STATUS }, { "//", -4 }, { _("//Toggle Image View"), -1, 0, 0, "Home", ACT_VIEW, 0 }, { _("//Centralize Image"), 0, MENU_CENTER, 0, NULL, ACT_CENTER, 0 }, { _("//Show Zoom Grid"), 0, MENU_SHOWGRID, 0, NULL, ACT_GRID, 0 }, { _("//Snap To Tile Grid"), 0, 0, 0, "B", ACT_SNAP, 0 }, { _("//Configure Grid ..."), -1, 0, 0, NULL, DLG_COLORS, COLSEL_GRID }, { _("//Tracing Image ..."), -1, 0, 0, NULL, DLG_TRACE, 0 }, { "//", -4 }, { _("//View Window"), 0, MENU_VIEW, 0, "V", ACT_VWWIN, 0 }, { _("//Horizontal Split"), 0, 0, 0, "H", ACT_VWSPLIT, 0 }, { _("//Focus View Window"), 0, MENU_VWFOCUS, 0, NULL, ACT_VWFOCUS, 0 }, { "//", -4 }, { _("//Pan Window"), -1, 0, 0, "End", ACT_PAN, 0, XPM_ICON(pan) }, { _("//Layers Window"), 0, MENU_LAYER, 0, "L", DLG_LAYERS, 0 }, { _("/_Image"), -2 -16 }, { "//", -3 }, { _("//Convert To RGB"), -1, 0, NEED_IDX, NULL, FILT_2RGB, 0 }, { _("//Convert To Indexed ..."), -1, 0, NEED_24, NULL, DLG_INDEXED, 0 }, { "//", -4 }, { _("//Scale Canvas ..."), -1, 0, 0, "Page_Up", DLG_SCALE, 0 }, { _("//Resize Canvas ..."), -1, 0, 0, "Page_Down", DLG_SIZE, 0 }, { _("//Crop"), -1, 0, NEED_CROP, "X", ACT_CROP, 0 }, { "//", -4 }, { _("//Flip Vertically"), -1, 0, 0, NULL, ACT_FLIP_V, 0 }, { _("//Flip Horizontally"), -1, 0, 0, "M", ACT_FLIP_H, 0 }, { _("//Rotate Clockwise"), -1, 0, 0, NULL, ACT_ROTATE, 0 }, { _("//Rotate Anti-Clockwise"), -1, 0, 0, NULL, ACT_ROTATE, 1 }, { _("//Free Rotate ..."), -1, 0, 0, NULL, DLG_ROTATE, 0 }, { _("//Skew ..."), -1, 0, 0, NULL, DLG_SKEW, 0 }, { "//", -4 }, // !!! Maybe support indexed mode too, later { _("//Segment ..."), -1, 0, NEED_24, NULL, DLG_SEGMENT, 0 }, { "//", -4 }, { _("//Information ..."), -1, 0, 0, "I", DLG_INFO, 0 }, { _("//Preferences ..."), -1, MENU_PREFS, 0, "P", DLG_PREFS, 0 }, { _("/_Selection"), -2 -16 }, { "//", -3 }, { _("//Select All"), -1, 0, 0, "A", ACT_SELECT, 1 }, { _("//Select None (Esc)"), -1, 0, NEED_MARQ, "A", ACT_SELECT, 0 }, { _("//Lasso Selection"), -1, 0, NEED_LAS2, "J", ACT_LASSO, 0, XPM_ICON(lasso) }, { _("//Lasso Selection Cut"), -1, 0, NEED_LASSO, NULL, ACT_LASSO, 1 }, { "//", -4 }, { _("//Outline Selection"), -1, 0, NEED_SEL2, "T", ACT_OUTLINE, 0, XPM_ICON(rect1) }, { _("//Fill Selection"), -1, 0, NEED_SEL2, "T", ACT_OUTLINE, 1, XPM_ICON(rect2) }, { _("//Outline Ellipse"), -1, 0, NEED_SEL, "L", ACT_ELLIPSE, 0, XPM_ICON(ellipse2) }, { _("//Fill Ellipse"), -1, 0, NEED_SEL, "L", ACT_ELLIPSE, 1, XPM_ICON(ellipse) }, { "//", -4 }, { _("//Flip Vertically"), -1, 0, NEED_CLIP, NULL, ACT_SEL_FLIP_V, 0, XPM_ICON(flip_vs) }, { _("//Flip Horizontally"), -1, 0, NEED_CLIP, NULL, ACT_SEL_FLIP_H, 0, XPM_ICON(flip_hs) }, { _("//Rotate Clockwise"), -1, 0, NEED_CLIP, NULL, ACT_SEL_ROT, 0, XPM_ICON(rotate_cs) }, { _("//Rotate Anti-Clockwise"), -1, 0, NEED_CLIP, NULL, ACT_SEL_ROT, 1, XPM_ICON(rotate_as) }, { "//", -4 }, { _("//Horizontal Ramp"), -1, 0, NEED_SEL, NULL, ACT_RAMP, 0 }, { _("//Vertical Ramp"), -1, 0, NEED_SEL, NULL, ACT_RAMP, 1 }, { "//", -4 }, { _("//Alpha Blend A,B"), -1, 0, NEED_ACLIP, NULL, ACT_SEL_ALPHA_AB, 0 }, { _("//Move Alpha to Mask"), -1, 0, NEED_CLIP, NULL, ACT_SEL_ALPHAMASK, 0 }, { _("//Mask Colour A,B"), -1, 0, NEED_CLIP, NULL, ACT_SEL_MASK_AB, 0 }, { _("//Unmask Colour A,B"), -1, 0, NEED_CLIP, NULL, ACT_SEL_MASK_AB, 255 }, { _("//Mask All Colours"), -1, 0, NEED_CLIP, NULL, ACT_SEL_MASK, 0 }, { _("//Clear Mask"), -1, 0, NEED_CLIP, NULL, ACT_SEL_MASK, 255 }, { _("/_Palette"), -2 -16 }, { "//", -3 }, { _("//Load ..."), -1, 0, 0, NULL, DLG_FSEL, FS_PALETTE_LOAD, XPM_ICON(open) }, { _("//Save As ..."), -1, 0, 0, NULL, DLG_FSEL, FS_PALETTE_SAVE, XPM_ICON(save) }, { _("//Load Default"), -1, 0, 0, NULL, ACT_PAL_DEF, 0 }, { "//", -4 }, { _("//Mask All"), -1, 0, 0, NULL, ACT_PAL_MASK, 255 }, { _("//Mask None"), -1, 0, 0, NULL, ACT_PAL_MASK, 0 }, { "//", -4 }, { _("//Swap A & B"), -1, 0, 0, "X", ACT_SWAP_AB, 0 }, { _("//Edit Colour A & B ..."), -1, 0, 0, "E", DLG_COLORS, COLSEL_EDIT_AB }, { _("//Dither A"), -1, 0, NEED_24, NULL, ACT_DITHER_A, 0 }, { _("//Palette Editor ..."), -1, 0, 0, "W", DLG_COLORS, COLSEL_EDIT_ALL }, { _("//Set Palette Size ..."), -1, 0, 0, NULL, DLG_PAL_SIZE, 0 }, { _("//Merge Duplicate Colours"), -1, 0, NEED_IDX, NULL, ACT_PAL_MERGE, 0 }, { _("//Remove Unused Colours"), -1, 0, NEED_IDX, NULL, ACT_PAL_CLEAN, 0 }, { "//", -4 }, { _("//Create Quantized ..."), -1, 0, NEED_24, NULL, DLG_INDEXED, 1 }, { "//", -4 }, { _("//Sort Colours ..."), -1, 0, 0, NULL, DLG_PAL_SORT, 0 }, { _("//Palette Shifter ..."), -1, 0, 0, NULL, DLG_PAL_SHIFTER, 0 }, { _("//Pick Gradient ..."), -1, 0, 0, NULL, DLG_PICK_GRAD, 0 }, { _("/Effe_cts"), -2 -16 }, { "//", -3 }, { _("//Transform Colour ..."), -1, 0, 0, "C", DLG_BRCOSA, 0, XPM_ICON(brcosa) }, { _("//Invert"), -1, 0, 0, "I", FILT_INVERT, 0 }, { _("//Greyscale"), -1, 0, 0, "G", FILT_GREY, 0 }, { _("//Greyscale (Gamma corrected)"), -1, 0, 0, "G", FILT_GREY, 1 }, { _("//Isometric Transformation"), -2 }, { "///", -3 }, { _("///Left Side Down"), -1, 0, 0, NULL, ACT_ISOMETRY, 0 }, { _("///Right Side Down"), -1, 0, 0, NULL, ACT_ISOMETRY, 1 }, { _("///Top Side Right"), -1, 0, 0, NULL, ACT_ISOMETRY, 2 }, { _("///Bottom Side Right"), -1, 0, 0, NULL, ACT_ISOMETRY, 3 }, { "//", -4 }, { _("//Edge Detect ..."), -1, 0, NEED_NOIDX, NULL, FILT_EDGE, 0 }, { _("//Difference of Gaussians ..."), -1, 0, NEED_NOIDX, NULL, FILT_DOG, 0 }, { _("//Sharpen ..."), -1, 0, NEED_NOIDX, NULL, FILT_SHARPEN, 0 }, { _("//Unsharp Mask ..."), -1, 0, NEED_NOIDX, NULL, FILT_UNSHARP, 0 }, { _("//Soften ..."), -1, 0, NEED_NOIDX, NULL, FILT_SOFTEN, 0 }, { _("//Gaussian Blur ..."), -1, 0, NEED_NOIDX, NULL, FILT_GAUSS, 0 }, { _("//Kuwahara-Nagao Blur ..."), -1, 0, NEED_24, NULL, FILT_KUWAHARA, 0 }, { _("//Emboss"), -1, 0, NEED_NOIDX, NULL, FILT_FX, FX_EMBOSS }, { _("//Dilate"), -1, 0, NEED_NOIDX, NULL, FILT_FX, FX_DILATE }, { _("//Erode"), -1, 0, NEED_NOIDX, NULL, FILT_FX, FX_ERODE }, { "//", -4 }, { _("//Bacteria ..."), -1, 0, NEED_IDX, NULL, FILT_BACT, 0 }, { _("/Cha_nnels"), -2 -16 }, { "//", -3 }, { _("//New ..."), -1, 0, 0, NULL, ACT_CHANNEL, -1 }, { _("//Load ..."), -1, 0, 0, NULL, DLG_FSEL, FS_CHANNEL_LOAD, XPM_ICON(open) }, { _("//Save As ..."), -1, 0, 0, NULL, DLG_FSEL, FS_CHANNEL_SAVE, XPM_ICON(save) }, { _("//Delete ..."), -1, 0, NEED_CHAN, NULL, DLG_CHN_DEL, -1 }, { "//", -4 }, { _("//Edit Image"), 1, MENU_CHAN0, 0, "1", ACT_CHANNEL, CHN_IMAGE }, { _("//Edit Alpha"), 1, MENU_CHAN1, 0, "2", ACT_CHANNEL, CHN_ALPHA }, { _("//Edit Selection"), 1, MENU_CHAN2, 0, "3", ACT_CHANNEL, CHN_SEL }, { _("//Edit Mask"), 1, MENU_CHAN3, 0, "4", ACT_CHANNEL, CHN_MASK }, { "//", -4 }, { _("//Hide Image"), 0, MENU_DCHAN0, 0, NULL, ACT_SET_OVERLAY, 1 }, { _("//Disable Alpha"), 0, MENU_DCHAN1, 0, NULL, ACT_CHN_DIS, CHN_ALPHA }, { _("//Disable Selection"), 0, MENU_DCHAN2, 0, NULL, ACT_CHN_DIS, CHN_SEL }, { _("//Disable Mask"), 0, MENU_DCHAN3, 0, NULL, ACT_CHN_DIS, CHN_MASK }, { "//", -4 }, { _("//Couple RGBA Operations"), 0, MENU_RGBA, 0, NULL, ACT_SET_RGBA, 0 }, { _("//Threshold ..."), -1, 0, 0, NULL, FILT_THRES, 0 }, { _("//Unassociate Alpha"), -1, 0, NEED_RGBA, NULL, FILT_UALPHA, 0 }, { "//", -4 }, { _("//View Alpha as an Overlay"), 0, 0, 0, NULL, ACT_SET_OVERLAY, 0 }, { _("//Configure Overlays ..."), -1, 0, 0, NULL, DLG_COLORS, COLSEL_OVERLAYS }, { _("/_Layers"), -2 -16 }, { "//", -3 }, { _("//New Layer"), -1, 0, 0, NULL, ACT_LR_ADD, LR_NEW, XPM_ICON(new) }, { _("//Save"), -1, 0, 0, "S", ACT_LR_SAVE, 0, XPM_ICON(save) }, { _("//Save As ..."), -1, 0, 0, NULL, DLG_FSEL, FS_LAYER_SAVE }, { _("//Save Composite Image ..."), -1, 0, 0, NULL, DLG_FSEL, FS_COMPOSITE_SAVE }, { _("//Composite to New Layer"), -1, 0, 0, NULL, ACT_LR_ADD, LR_COMP }, { _("//Remove All Layers"), -1, 0, 0, NULL, ACT_LR_DEL, 1 }, { "//", -4 }, { _("//Configure Animation ..."), -1, 0, 0, NULL, DLG_ANI, 0 }, { _("//Preview Animation ..."), -1, 0, 0, NULL, DLG_ANI_VIEW, 0 }, { _("//Set Key Frame ..."), -1, 0, 0, NULL, DLG_ANI_KEY, 0 }, { _("//Remove All Key Frames ..."), -1, 0, 0, NULL, DLG_ANI_KILLKEY, 0 }, { _("/More..."), -2 -16 }, /* This will hold overflow submenu */ { _("/_Help"), -5 }, { _("//Documentation"), -1, 0, 0, NULL, ACT_DOCS, 0 }, { _("//About"), -1, MENU_HELP, 0, "F1", DLG_ABOUT, 0 }, { "//", -4 }, { _("//Rebind Shortcut Keycodes"), -1, 0, 0, NULL, ACT_REBIND_KEYS, 0 }, { NULL, 0 } }; #undef _ #define _(X) __(X) void main_init() { GtkRequisition req; GdkPixmap *icon_pix = NULL; GtkAdjustment *adj; GtkWidget *hbox_bar, *hbox_bottom; GtkAccelGroup *accel_group; char txt[PATHBUF]; int i; gdk_rgb_init(); init_tablet(); // Set up the tablet toolbar_boxes[TOOLBAR_MAIN] = NULL; // Needed as test to avoid segfault in toolbar.c accel_group = gtk_accel_group_new (); /// MAIN WINDOW main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_usize(main_window, 100, 100); // Set minimum width/height win_restore_pos(main_window, "window", 0, 0, 630, 400); gtk_window_set_title (GTK_WINDOW (main_window), MT_VERSION ); /* !!! If main window receives these events, GTK+ will be able to * direct them to current modal window. Which makes it possible to * close popups by clicking on the main window outside popup - WJ */ gtk_widget_add_events(main_window, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); /* !!! Konqueror needs GDK_ACTION_MOVE to do a drop; we never accept * move as a move, so have to do some non-default processing - WJ */ gtk_drag_dest_set(main_window, GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_MOTION, &uri_list, 1, GDK_ACTION_COPY | GDK_ACTION_MOVE); gtk_signal_connect(GTK_OBJECT(main_window), "drag_data_received", GTK_SIGNAL_FUNC(drag_n_drop_received), NULL); gtk_signal_connect(GTK_OBJECT(main_window), "drag_drop", GTK_SIGNAL_FUNC(drag_n_drop_tried), NULL); vbox_main = add_vbox(main_window); // we need to realize the window because we use pixmaps for // items on the toolbar & menus in the context of it gtk_widget_realize( main_window ); /// MENU main_menubar = fill_menu(main_menu, accel_group); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_widgets[MENU_RGBA]), RGBA_mode); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_widgets[MENU_VWFOCUS]), vw_focus_on); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_widgets[MENU_CENTER]), canvas_image_centre); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_widgets[MENU_SHOWGRID]), mem_show_grid); pack(vbox_main, main_menubar); gtk_accel_group_lock( accel_group ); // Stop dynamic allocation of accelerators during runtime gtk_window_add_accel_group(GTK_WINDOW(main_window), accel_group); /// TOOLBARS toolbar_init(vbox_main); /// PALETTE hbox_bottom = xpack(vbox_main, gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox_bottom); toolbar_palette_init(hbox_bottom); vbox_right = xpack(hbox_bottom, gtk_vbox_new(FALSE, 0)); gtk_widget_show(vbox_right); /// DRAWING AREA main_vsplit = gtk_hpaned_new (); paned_mouse_fix(main_vsplit); gtk_widget_show (main_vsplit); gtk_widget_ref(main_vsplit); gtk_object_sink(GTK_OBJECT(main_vsplit)); main_hsplit = gtk_vpaned_new (); paned_mouse_fix(main_hsplit); gtk_widget_show (main_hsplit); gtk_widget_ref(main_hsplit); gtk_object_sink(GTK_OBJECT(main_hsplit)); main_split = main_vsplit; // VIEW WINDOW vw_scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (vw_scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(vw_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_ref(vw_scrolledwindow); gtk_object_sink(GTK_OBJECT(vw_scrolledwindow)); vw_drawing = wjcanvas_new(); wjcanvas_size(vw_drawing, 1, 1); gtk_widget_show(vw_drawing); add_with_wjframe(vw_scrolledwindow, vw_drawing); init_view(); // MAIN WINDOW drawing_canvas = wjcanvas_new(); wjcanvas_size(drawing_canvas, 48, 48); gtk_widget_show(drawing_canvas); scrolledwindow_canvas = xpack(vbox_right, gtk_scrolled_window_new(NULL, NULL)); gtk_widget_show(scrolledwindow_canvas); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_canvas), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); adj = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(scrolledwindow_canvas)); gtk_signal_connect(GTK_OBJECT(adj), "value_changed", GTK_SIGNAL_FUNC(vw_focus_idle), NULL); adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolledwindow_canvas)); gtk_signal_connect(GTK_OBJECT(adj), "value_changed", GTK_SIGNAL_FUNC(vw_focus_idle), NULL); add_with_wjframe(scrolledwindow_canvas, drawing_canvas); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "configure_event", GTK_SIGNAL_FUNC (configure_canvas), NULL ); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "expose_event", GTK_SIGNAL_FUNC (expose_canvas), NULL ); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "button_press_event", GTK_SIGNAL_FUNC (canvas_button), NULL ); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "button_release_event", GTK_SIGNAL_FUNC (canvas_button), NULL ); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "motion_notify_event", GTK_SIGNAL_FUNC (canvas_motion), NULL ); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "enter_notify_event", GTK_SIGNAL_FUNC (canvas_enter), NULL ); gtk_signal_connect( GTK_OBJECT(drawing_canvas), "leave_notify_event", GTK_SIGNAL_FUNC (canvas_left), NULL ); #if GTK_MAJOR_VERSION == 2 gtk_signal_connect( GTK_OBJECT(drawing_canvas), "scroll_event", GTK_SIGNAL_FUNC (canvas_scroll_gtk2), NULL ); #endif gtk_widget_set_events (drawing_canvas, GDK_ALL_EVENTS_MASK); gtk_widget_set_extension_events (drawing_canvas, GDK_EXTENSION_EVENTS_CURSOR); //// STATUS BAR hbox_bar = pack_end(vbox_right, gtk_hbox_new(FALSE, 0)); if ( toolbar_status[TOOLBAR_STATUS] ) gtk_widget_show (hbox_bar); for (i = 0; i < STATUS_ITEMS; i++) { label_bar[i] = gtk_label_new(""); gtk_misc_set_alignment(GTK_MISC(label_bar[i]), (i == STATUS_CURSORXY) || (i == STATUS_UNDOREDO) ? 0.5 : 0.0, 0.0); gtk_widget_show(label_bar[i]); } for (i = 0; i < STATUS_ITEMS; i++) { if (i < 3) pack(hbox_bar, label_bar[i]); else pack_end(hbox_bar, label_bar[(STATUS_ITEMS - 1) + 3 - i]); } if ( status_on[STATUS_CURSORXY] ) gtk_widget_set_usize(label_bar[STATUS_CURSORXY], 90, -2); if ( status_on[STATUS_UNDOREDO] ) gtk_widget_set_usize(label_bar[STATUS_UNDOREDO], 70, -2); gtk_label_set_text( GTK_LABEL(label_bar[STATUS_UNDOREDO]), "0+0" ); /* To prevent statusbar wobbling */ gtk_widget_size_request(hbox_bar, &req); gtk_widget_set_usize(hbox_bar, -1, req.height); ///////// End of main window widget setup gtk_signal_connect( GTK_OBJECT (main_window), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL ); gtk_signal_connect( GTK_OBJECT(main_window), "key_press_event", GTK_SIGNAL_FUNC (handle_keypress), NULL ); mapped_item_state(0); recent_files = recent_files < 0 ? 0 : recent_files > 20 ? 20 : recent_files; update_recent_files(); toolbar_boxes[TOOLBAR_STATUS] = hbox_bar; view_hide(); // Hide paned view initially // Display dock area if requested show_dock = (files_passed > 1); if (show_dock) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_DOCK]), TRUE); // !!! Filelist in the dock should have focus now } else { // Stops first icon in toolbar being selected gtk_widget_grab_focus(scrolledwindow_canvas); } gtk_widget_show(main_window); /* !!! Have to wait till canvas is displayed, to init keyboard */ fill_keycodes(main_keys); gdk_window_raise( main_window->window ); icon_pix = gdk_pixmap_create_from_xpm_d( main_window->window, NULL, NULL, icon_xpm ); gdk_window_set_icon( main_window->window, NULL, icon_pix, NULL ); // gdk_pixmap_unref(icon_pix); set_cursor(); init_status_bar(); init_factions(); // Initialize file action menu file_in_homedir(txt, ".clipboard", PATHBUF); strncpy0(mem_clip_file, inifile_get("clipFilename", txt), PATHBUF); change_to_tool(DEFAULT_TOOL_ICON); toolbar_showhide(); if (viewer_mode) toggle_view(); } void spot_undo(int mode) { mem_undo_next(mode); // Do memory stuff for undo update_menus(); // Update menu undo issues } #ifdef U_NLS void setup_language() // Change language { char *txt = inifile_get( "languageSETTING", "system" ), txt2[64]; if ( strcmp( "system", txt ) != 0 ) { snprintf( txt2, 60, "LANGUAGE=%s", txt ); putenv( txt2 ); snprintf( txt2, 60, "LANG=%s", txt ); putenv( txt2 ); snprintf( txt2, 60, "LC_ALL=%s", txt ); putenv( txt2 ); } #if GTK_MAJOR_VERSION == 1 else txt=""; setlocale(LC_ALL, txt); #endif /* !!! Slow or not, but NLS is *really* broken on GTK+1 without it - WJ */ gtk_set_locale(); // GTK+1 hates this - it really slows things down } #endif void update_titlebar() // Update filename in titlebar { static int changed = -1; static char *name = ""; char txt[300], txt2[PATHTXT]; /* Don't send needless updates */ if (!main_window || ((mem_changed == changed) && (mem_filename == name))) return; changed = mem_changed; name = mem_filename; snprintf(txt, 290, "%s %s %s", MT_VERSION, changed ? _("(Modified)") : "-", name ? gtkuncpy(txt2, name, PATHTXT) : _("Untitled")); gtk_window_set_title(GTK_WINDOW(main_window), txt); } void notify_changed() // Image/palette has just changed - update vars as needed { mem_tempfiles = NULL; if (!mem_changed) { mem_changed = TRUE; update_titlebar(); } } /* Image has just been unchanged: saved to file, or loaded if "filename" is NULL */ void notify_unchanged(char *filename) { if (mem_changed) { if (filename) mem_file_modified(filename); mem_changed = FALSE; update_titlebar(); } } mtpaint-3.40/src/mtlib.c0000644000175000000620000001134310654662452014511 0ustar muammarstaff/* mtlib.c Copyright (C) 2005-2006 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include #include #include #include "mtlib.h" MT_Coor MT_coze() // Return zero coordinates { MT_Coor ret; ret.x = 0; ret.y = 0; ret.z = 0; return ret; } MT_Coor MT_co_div_k(MT_Coor AA, double BB) // Divide coords/vector by constant { MT_Coor ret; ret.x = AA.x / BB; ret.y = AA.y / BB; ret.z = AA.z / BB; return ret; } MT_Coor MT_co_mul_k(MT_Coor AA, double BB) // Multiply coords/vector by constant { MT_Coor ret; ret.x = AA.x * BB; ret.y = AA.y * BB; ret.z = AA.z * BB; return ret; } MT_Coor MT_addco(MT_Coor AA, MT_Coor BB) // Add two coords together (AA+BB) { MT_Coor ret; ret.x = AA.x + BB.x; ret.y = AA.y + BB.y; ret.z = AA.z + BB.z; return ret; } MT_Coor MT_subco(MT_Coor AA, MT_Coor BB) // Add two coords together (AA-BB) { MT_Coor ret; ret.x = AA.x - BB.x; ret.y = AA.y - BB.y; ret.z = AA.z - BB.z; return ret; } double MT_lin_len(MT_Coor AA, MT_Coor BB) // Return length of line between two coordinates { return sqrt( (BB.x-AA.x)*(BB.x-AA.x) + (BB.y-AA.y)*(BB.y-AA.y) + (BB.z-AA.z)*(BB.z-AA.z) ); } double MT_lin_len2(MT_Coor AA) // Return length of vector { return sqrt( AA.x*AA.x + AA.y*AA.y + AA.z*AA.z ); } MT_Coor MT_uni_vec(MT_Coor AA, MT_Coor BB) // Return unit vector between two coords (A to B) { MT_Coor ret; double lenny = MT_lin_len(AA, BB); if (lenny != 0) { ret.x = (BB.x - AA.x) / lenny; ret.y = (BB.y - AA.y) / lenny; ret.z = (BB.z - AA.z) / lenny; } else { ret.x = 0; ret.y = 0; ret.z = 0; } return ret; } MT_Coor MT_uni_vec2(MT_Coor AA) // Return unit vector { MT_Coor ret; double lenny = MT_lin_len2(AA); ret = MT_co_div_k(AA, lenny); return ret; } MT_Coor MT_palin(double position, double ratio, MT_Coor p1, MT_Coor p2, MT_Coor p3, MT_Coor p4, MT_Coor lenz) { // Parabolic Linear Interpolation from point 2 to point 3 at position (0-1) and ratio (0=flat, 0.25=curvy, 1=very bendy). lenz contains 3 valuess for the number of frames in each of the 3 lines : p1->p2, p2->p3, p3->p4 MT_Coor res, mmm, mmm2, d[4], dd[4]; double lenny, lenny1, lenny2, qa, qb, fac, fbc; lenny = ratio * MT_lin_len(p2, p3); // Distance of mid line lenny1 = ratio * MT_lin_len(p1, p2); // Distance of 1st line lenny2 = ratio * MT_lin_len(p3, p4); // Distance of 3rd line if (lenny == 0) { mmm = MT_coze(); mmm2 = MT_coze(); } else { qa = lenny1 / lenny; // Adjust acceleration for line length qb = lenny2 / lenny; if (qa > 1) qa = 0; else qa = (qa-1.0) / 3.0; if (qb > 1) qb = 0; else qb = -(qb-1.0) / 3.0; fac = 1.0/3.0 + qa; fbc = 2.0/3.0 + qb; position = 3*position*(1-position)*(1-position)*fac + 3*position*position*(1-position)*fbc + position*position*position; qa = lenz.y / lenz.x; // Adjust acceleration for points in between qb = lenz.y / lenz.z; if (qa >= 1) qa = 0; else qa = (qa-1.0) / 3.0; if (qb >= 1) qb = 0; else qb = -(qb-1.0) / 3.0; fac = 1.0/3.0 + qa; fbc = 2.0/3.0 + qb; position = 3*position*(1-position)*(1-position)*fac + 3*position*position*(1-position)*fbc + position*position*position; d[0] = MT_uni_vec(p1, p2); // Get unit vectors for 1st 2 lines d[1] = MT_uni_vec(p2, p3); // Get unit vectors for 1st 2 lines mmm = MT_addco(d[0], d[1]); mmm = MT_uni_vec2(mmm); mmm = MT_co_mul_k(mmm, lenny); // mult by lenny d[2] = MT_uni_vec(p4, p3); // Get unit vectors for 2nd 2 lines d[3] = MT_uni_vec(p3, p2); mmm2 = MT_addco(d[2], d[3]); mmm2 = MT_uni_vec2(mmm2); mmm2 = MT_co_mul_k(mmm2, lenny); // mult by lenny } dd[1] = MT_addco(p2, mmm); // Control point 1 dd[2] = MT_addco(p3, mmm2); // Control point 2 res.x = (1-position)*(1-position)*(1-position)*p2.x + 3*position*(1-position)*(1-position)*dd[1].x + 3*(1-position)*position*position*dd[2].x + position*position*position*p3.x; res.y = (1-position)*(1-position)*(1-position)*p2.y + 3*position*(1-position)*(1-position)*dd[1].y + 3*(1-position)*position*position*dd[2].y + position*position*position*p3.y; res.z = (1-position)*(1-position)*(1-position)*p2.z + 3*position*(1-position)*(1-position)*dd[1].z + 3*(1-position)*position*position*dd[2].z + position*position*position*p3.z; return res; } mtpaint-3.40/src/csel.h0000644000175000000620000000431311626536051014327 0ustar muammarstaff/* csel.h Copyright (C) 2006-2011 Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define CMAPSIZE (64 * 64 * 64 / 16) typedef struct { /* Input fields */ int center, limit, center_a, limit_a; int mode, invert; double range; /* Cache fields */ guint32 colormap[CMAPSIZE * 2]; guint32 pmap[256 / 32]; int pcache[256], cbase, irange, amin, amax; double clxn[3], cvec, range2; } csel_info; #define CSEL_SVSIZE offsetof(csel_info, colormap) csel_info *csel_data; int csel_preview, csel_preview_a, csel_overlay; double gamma256[256], gamma64[64]; double midgamma256[256]; int kgamma256; extern unsigned char ungamma256[]; /* This gamma table is for when we need numeric stability */ #ifdef NATIVE_DOUBLES #define Fgamma256 gamma256 #else float Fgamma256[256]; #endif static inline int UNGAMMA256(double x) { int j = (int)(x * kgamma256); return (ungamma256[j] - (x < midgamma256[ungamma256[j]])); } static inline int UNGAMMA256X(double x) { int j = (int)(x * kgamma256); return (j < 0 ? 0 : j >= kgamma256 ? 255 : ungamma256[j] - (x < midgamma256[ungamma256[j]])); } //double gamma65536(int idx); //int ungamma65536(double v); /* Used in and around gradient engine */ double gamma65281(int idx); int ungamma65281(double v); double rgb2B(double r, double g, double b); void rgb2LXN(double *tmp, double r, double g, double b); //void rgb2Lab(double *tmp, double r, double g, double b); void init_cols(); void get_lxn(double *lxn, int col); int csel_scan(int start, int step, int cnt, unsigned char *mask, unsigned char *img, csel_info *info); double csel_eval(int mode, int center, int limit); void csel_reset(csel_info *info); void csel_init(); mtpaint-3.40/src/png.h0000644000175000000620000001135411651500354014163 0ustar muammarstaff/* png.h Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ // Loading/Saving errors #define WRONG_FORMAT -10 #define TOO_BIG -11 #define EXPLODE_FAILED -12 #define FILE_LIB_ERROR 0xBAD01 #define FILE_MEM_ERROR 0xBAD02 #define FILE_HAS_FRAMES 0xBAD03 #define FILE_TOO_LONG 0xBAD04 #define FILE_EXP_BREAK 0xBAD05 /* File types */ enum { FT_NONE = 0, FT_PNG, FT_JPEG, FT_JP2, FT_J2K, FT_TIFF, FT_GIF, FT_BMP, FT_XPM, FT_XBM, FT_LSS, FT_TGA, FT_PCX, FT_PBM, FT_PGM, FT_PPM, FT_PAM, FT_GPL, FT_TXT, FT_PAL, FT_LAYERS1, FT_LAYERS2, FT_PIXMAP, FT_SVG, NUM_FTYPES }; #define FTM_FTYPE 0x00FF /* File type mask */ #define FTM_EXTEND 0x0100 /* Allow extended format */ #define FTM_UNDO 0x0200 /* Allow undoing */ #define FTM_FRAMES 0x0400 /* Allow frameset use */ /* Features supported by file formats */ #define FF_BW 0x00001 /* Black and white */ #define FF_16 0x00002 /* 16 colors */ #define FF_256 0x00004 /* 256 colors */ #define FF_IDX 0x00007 /* Indexed image */ #define FF_RGB 0x00008 /* Truecolor */ #define FF_IMAGE 0x0000F /* Image of any kind */ #define FF_ANIM 0x00010 /* Animation */ #define FF_ALPHAI 0x00020 /* Alpha channel for indexed images */ #define FF_ALPHAR 0x00040 /* Alpha channel for RGB images */ #define FF_ALPHA 0x00060 /* Alpha channel for all images */ #define FF_MULTI 0x00080 /* Multiple channels */ #define FF_TRANS 0x00100 /* Indexed transparency */ #define FF_COMP 0x00E00 /* Configurable compression */ #define FF_COMPJ 0x00200 /* JPEG compression */ #define FF_COMPZ 0x00400 /* zlib compression */ #define FF_COMPR 0x00600 /* RLE compression */ #define FF_COMPJ2 0x00800 /* JPEG2000 compression */ #define FF_SPOT 0x01000 /* "Hot spot" */ #define FF_LAYER 0x02000 /* Layered images */ #define FF_PALETTE 0x04000 /* Palette file (not image) */ #define FF_RMEM 0x08000 /* Can be read from memory */ #define FF_WMEM 0x10000 /* Can be written to memory */ #define FF_MEM 0x18000 /* Both of the above */ #define FF_NOSAVE 0x20000 /* Can be read but not written */ #define FF_SCALE 0x40000 /* Freely scalable (vector format) */ #define FF_SAVE_MASK (mem_img_bpp == 3 ? FF_RGB : mem_cols > 16 ? FF_256 : \ mem_cols > 2 ? FF_16 | FF_256 : FF_IDX) #define FF_SAVE_MASK_FOR(X) ((X).bpp == 3 ? FF_RGB : (X).colors > 16 ? FF_256 : \ (X).colors > 2 ? FF_16 | FF_256 : FF_IDX) /* Animation loading modes */ #define ANM_RAW 0 /* Raw frames (as written) */ #define ANM_COMP 1 /* Composited frames (as displayed) */ #define ANM_NOZERO 2 /* Composited frames with nonzero delays (as seen) */ #define LONGEST_EXT 5 typedef struct { char *name, *ext, *ext2; unsigned int flags; } fformat; extern fformat file_formats[]; /* All-in-one transport container for save/load */ typedef struct { /* Configuration data */ int mode, ftype; int xpm_trans; int hot_x, hot_y; int req_w, req_h; // Size request for scalable formats int jpeg_quality; int png_compression; int tga_RLE; int jp2_rate; int gif_delay; int rgb_trans; int silent; /* Image data */ chanlist img; png_color *pal; int width, height, bpp, colors; int x, y; /* Extra data */ int icc_size; char *icc; } ls_settings; int silence_limit, jpeg_quality, png_compression; int tga_RLE, tga_565, tga_defdir, jp2_rate; int apply_icc; int file_type_by_ext(char *name, guint32 mask); int save_image(char *file_name, ls_settings *settings); int save_mem_image(unsigned char **buf, int *len, ls_settings *settings); int load_image(char *file_name, int mode, int ftype); int load_mem_image(unsigned char *buf, int len, int mode, int ftype); // !!! The only allowed mode for now is FS_LAYER_LOAD int load_frameset(frameset *frames, int ani_mode, char *file_name, int mode, int ftype); int explode_frames(char *dest_path, int ani_mode, char *file_name, int ftype, int desttype); int export_undo(char *file_name, ls_settings *settings); int export_ascii ( char *file_name ); int detect_file_format(char *name, int need_palette); #define detect_image_format(X) detect_file_format(X, FALSE) #define detect_palette_format(X) detect_file_format(X, TRUE) int valid_file(char *filename); // Can this file be opened for reading? mtpaint-3.40/src/canvas.c0000644000175000000620000024755611651615000014657 0ustar muammarstaff/* canvas.c Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "otherwindow.h" #include "inifile.h" #include "canvas.h" #include "viewer.h" #include "layer.h" #include "polygon.h" #include "wu.h" #include "prefs.h" #include "ani.h" #include "spawn.h" #include "channels.h" #include "toolbar.h" #include "font.h" #include "fpick.h" float can_zoom = 1; // Zoom factor 1..MAX_ZOOM int margin_main_xy[2]; // Top left of image from top left of canvas int margin_view_xy[2]; int zoom_flag; int marq_status = MARQUEE_NONE, marq_xy[4] = { -1, -1, -1, -1 }; // Selection marquee int marq_drag_x, marq_drag_y; // Marquee dragging offset int line_status = LINE_NONE, line_xy[4]; // Line tool int poly_status = POLY_NONE; // Polygon selection tool int clone_x, clone_y; // Clone offsets int recent_files; // Current recent files setting int show_paste, // Show contents of clipboard while pasting col_reverse, // Painting with right button text_paste, // Are we pasting text? canvas_image_centre = TRUE, // Are we centering the image? chequers_optimize = TRUE // Are we optimizing the chequers for speed? ; int brush_spacing; // Step in non-continuous mode; 0 means use event coords int preserved_gif_delay = 10, undo_load; /// STATUS BAR GtkWidget *label_bar[STATUS_ITEMS]; static void update_image_bar() { char txt[128], txt2[16], *tmp = cspnames[CSPACE_RGB]; if (!status_on[STATUS_GEOMETRY]) return; if (mem_img_bpp == 1) sprintf(tmp = txt2, "%i", mem_cols); tmp = txt + snprintf(txt, 80, "%s %i x %i x %s", channames[mem_channel], mem_width, mem_height, tmp); if ( mem_img[CHN_ALPHA] || mem_img[CHN_SEL] || mem_img[CHN_MASK] ) { strcpy(tmp, " + "); tmp += 3; if (mem_img[CHN_ALPHA]) *tmp++ = 'A'; if (mem_img[CHN_SEL]) *tmp++ = 'S'; if (mem_img[CHN_MASK]) *tmp++ = 'M'; // !!! String not NUL-terminated at this point } if ( layers_total>0 ) tmp += sprintf(tmp, " (%i/%i)", layer_selected, layers_total); if ( mem_xpm_trans>=0 ) tmp += sprintf(tmp, " (T=%i)", mem_xpm_trans); strcpy(tmp, " "); gtk_label_set_text( GTK_LABEL(label_bar[STATUS_GEOMETRY]), txt ); } void update_sel_bar() // Update selection stats on status bar { char txt[64] = ""; int rect[4]; float lang, llen; grad_info *grad = gradient + mem_channel; if (!status_on[STATUS_SELEGEOM]) return; if ((((tool_type == TOOL_SELECT) || (tool_type == TOOL_POLYGON)) && (marq_status > MARQUEE_NONE)) || ((tool_type == TOOL_GRADIENT) && (grad->status != GRAD_NONE)) || ((tool_type == TOOL_LINE) && (line_status != LINE_NONE))) { if (tool_type == TOOL_GRADIENT) { copy4(rect, grad->xy); rect[2] -= rect[0]; rect[3] -= rect[1]; lang = (180.0 / M_PI) * atan2(rect[2], -rect[3]); } else if (tool_type == TOOL_LINE) { copy4(rect, line_xy); rect[2] -= rect[0]; rect[3] -= rect[1]; lang = (180.0 / M_PI) * atan2(rect[2], -rect[3]); } else { marquee_at(rect); lang = (180.0 / M_PI) * atan2(marq_x2 - marq_x1, marq_y1 - marq_y2); } llen = sqrt(rect[2] * rect[2] + rect[3] * rect[3]); snprintf(txt, 60, " %i,%i : %i x %i %.1f' %.1f\"", rect[0], rect[1], rect[2], rect[3], lang, llen); } else if (tool_type == TOOL_POLYGON) { snprintf(txt, 60, " (%i)%c", poly_points, poly_status != POLY_DONE ? '+' : '\0'); } gtk_label_set_text(GTK_LABEL(label_bar[STATUS_SELEGEOM]), txt); } static char *chan_txt_cat(char *txt, int chan, int x, int y) { if (!mem_img[chan]) return (txt); return (txt + sprintf(txt, "%i", mem_img[chan][x + mem_width*y])); } void update_xy_bar(int x, int y) { char txt[96], *tmp = txt; int pixel; if (status_on[STATUS_CURSORXY]) { snprintf(txt, 60, "%i,%i", x, y); gtk_label_set_text(GTK_LABEL(label_bar[STATUS_CURSORXY]), txt); } if (!status_on[STATUS_PIXELRGB]) return; *tmp = '\0'; if ((x >= 0) && (x < mem_width) && (y >= 0) && (y < mem_height)) { pixel = get_pixel_img(x, y); if (mem_img_bpp == 1) tmp += sprintf(tmp, "[%u] = {%i,%i,%i}", pixel, mem_pal[pixel].red, mem_pal[pixel].green, mem_pal[pixel].blue); else tmp += sprintf(tmp, "{%i,%i,%i}", INT_2_R(pixel), INT_2_G(pixel), INT_2_B(pixel)); if (mem_img[CHN_ALPHA] || mem_img[CHN_SEL] || mem_img[CHN_MASK]) { strcpy(tmp, " + {"); tmp += 4; tmp = chan_txt_cat(tmp, CHN_ALPHA, x, y); *tmp++ = ','; tmp = chan_txt_cat(tmp, CHN_SEL, x, y); *tmp++ = ','; tmp = chan_txt_cat(tmp, CHN_MASK, x, y); strcpy(tmp, "}"); } } gtk_label_set_text(GTK_LABEL(label_bar[STATUS_PIXELRGB]), txt); } static void update_undo_bar() { char txt[32]; if (status_on[STATUS_UNDOREDO]) { sprintf(txt, "%i+%i", mem_undo_done, mem_undo_redo); gtk_label_set_text(GTK_LABEL(label_bar[STATUS_UNDOREDO]), txt); } } void init_status_bar() { if ( !status_on[STATUS_GEOMETRY] ) gtk_label_set_text( GTK_LABEL(label_bar[STATUS_GEOMETRY]), "" ); else update_image_bar(); if ( status_on[STATUS_CURSORXY] ) gtk_widget_set_usize(label_bar[STATUS_CURSORXY], 90, -2); else { gtk_widget_set_usize(label_bar[STATUS_CURSORXY], 0, -2); gtk_label_set_text( GTK_LABEL(label_bar[STATUS_CURSORXY]), "" ); } if ( !status_on[STATUS_PIXELRGB] ) gtk_label_set_text( GTK_LABEL(label_bar[STATUS_PIXELRGB]), "" ); if ( !status_on[STATUS_SELEGEOM] ) gtk_label_set_text( GTK_LABEL(label_bar[STATUS_SELEGEOM]), "" ); if (status_on[STATUS_UNDOREDO]) { gtk_widget_set_usize(label_bar[STATUS_UNDOREDO], 70, -2); update_undo_bar(); } else { gtk_widget_set_usize(label_bar[STATUS_UNDOREDO], 0, -2); gtk_label_set_text( GTK_LABEL(label_bar[STATUS_UNDOREDO]), "" ); } } void commit_paste(int swap, int *update) { image_info ti; unsigned char *image, *xbuf, *mask, *alpha = NULL; unsigned char *old_image, *old_alpha; int op = 255, opacity = tool_opacity, bpp = MEM_BPP; int fx, fy, fw, fh, fx2, fy2; // Screen coords int i, ua, cmask, ofs, iofs, upd = UPD_IMGP, fail = TRUE; fx = marq_x1 > 0 ? marq_x1 : 0; fy = marq_y1 > 0 ? marq_y1 : 0; fx2 = marq_x2 < mem_width ? marq_x2 : mem_width - 1; fy2 = marq_y2 < mem_height ? marq_y2 : mem_height - 1; fw = fx2 - fx + 1; fh = fy2 - fy + 1; mask = multialloc(MA_SKIP_ZEROSIZE, &mask, fw, &alpha, ((mem_channel == CHN_IMAGE) && RGBA_mode && mem_img[CHN_ALPHA] && !mem_clip_alpha && !channel_dis[CHN_ALPHA]) * fw, &xbuf, NEED_XBUF_PASTE * fw * bpp, NULL); if (!mask) goto quit; // Not enough memory if (alpha) memset(alpha, channel_col_A[CHN_ALPHA], fw); /* Ignore clipboard alpha if disabled */ ua = channel_dis[CHN_ALPHA] | !mem_clip_alpha; if (swap) /* Prepare to convert image contents into new clipboard */ { cmask = CMASK_IMAGE | CMASK_FOR(CHN_SEL); if ((mem_channel == CHN_IMAGE) && mem_img[CHN_ALPHA] && !channel_dis[CHN_ALPHA]) cmask |= CMASK_FOR(CHN_ALPHA); if (!mem_alloc_image(AI_CLEAR | AI_NOINIT, &ti, fw, fh, MEM_BPP, cmask, NULL)) goto quit; copy_area(&ti, &mem_image, fx, fy); } /* Offset in memory */ ofs = (fy - marq_y1) * mem_clip_w + (fx - marq_x1); image = mem_clipboard + ofs * mem_clip_bpp; iofs = fy * mem_width + fx; mem_undo_next(UNDO_PASTE); // Do memory stuff for undo old_image = mem_img[mem_channel]; old_alpha = mem_img[CHN_ALPHA]; if (mem_undo_opacity) { old_image = mem_undo_previous(mem_channel); old_alpha = mem_undo_previous(CHN_ALPHA); } if (IS_INDEXED) op = opacity = 0; for (i = 0; i < fh; i++) { unsigned char *wa = ua ? alpha : mem_clip_alpha + ofs; unsigned char *wm = mem_clip_mask ? mem_clip_mask + ofs : NULL; unsigned char *img = image; row_protected(fx, fy + i, fw, mask); if (swap) { unsigned char *ws = ti.img[CHN_SEL] + i * fw; memcpy(ws, mask, fw); process_mask(0, 1, fw, ws, NULL, NULL, ti.img[CHN_ALPHA] ? NULL : wa, wm, op, 0); } process_mask(0, 1, fw, mask, mem_img[CHN_ALPHA] && wa ? mem_img[CHN_ALPHA] + iofs : NULL, old_alpha + iofs, wa, wm, opacity, 0); if (mem_clip_bpp < bpp) { /* Convert paletted clipboard to RGB */ do_convert_rgb(0, 1, fw, xbuf, img, mem_clip_paletted ? mem_clip_pal : mem_pal); img = xbuf; } process_img(0, 1, fw, mask, mem_img[mem_channel] + iofs * bpp, old_image + iofs * bpp, img, xbuf, bpp, opacity); image += mem_clip_w * mem_clip_bpp; ofs += mem_clip_w; iofs += mem_width; } if (swap) { if ((fw - mem_clip_w) | (fh - mem_clip_h)) upd |= UPD_CGEOM & ~UPD_IMGMASK; /* Remove new mask if it's all 255 */ if (is_filled(ti.img[CHN_SEL], 255, fw * fh)) { free(ti.img[CHN_SEL]); ti.img[CHN_SEL] = NULL; } mem_clip_new(fw, fh, MEM_BPP, 0, FALSE); memcpy(mem_clip.img, ti.img, sizeof(chanlist)); // !!! marq_x2, marq_y2 will be set by update_stuff() mem_clip_x = marq_x1 = fx; mem_clip_y = marq_y1 = fy; } fail = FALSE; quit: free(mask); if (fail) memory_errors(1); /* Warn and not update */ else if (!update) /* Update right now */ { update_stuff(upd); vw_update_area(fx, fy, fw, fh); main_update_area(fx, fy, fw, fh); } else /* Accumulate update area for later */ { /* !!! Swap does not use this branch, and isn't supported here */ fw += fx; fh += fy; if (fx < update[0]) update[0] = fx; if (fy < update[1]) update[1] = fy; if (fw > update[2]) update[2] = fw; if (fh > update[3]) update[3] = fh; } } void iso_trans(int mode) { int i = mem_isometrics(mode); if (!i) update_stuff(UPD_GEOM); else if (i == -5) alert_box(_("Error"), _("The image is too large to transform."), NULL); else memory_errors(i); } void pressed_invert() { spot_undo(UNDO_INV); mem_invert(); mem_undo_prepare(); update_stuff(UPD_COL); } static int edge_mode; static int do_edge(GtkWidget *box, gpointer fdata) { static const unsigned char fxmap[] = { FX_EDGE, FX_SOBEL, FX_PREWITT, FX_KIRSCH, FX_GRADIENT, FX_ROBERTS, FX_LAPLACE, FX_MORPHEDGE }; spot_undo(UNDO_FILT); do_effect(fxmap[edge_mode], 0); mem_undo_prepare(); return TRUE; } void pressed_edge_detect() { char *fnames[] = { _("MT"), _("Sobel"), _("Prewitt"), _("Kirsch"), _("Gradient"), _("Roberts"), _("Laplace"), _("Morphological"), NULL }; GtkWidget *box; box = wj_radio_pack(fnames, -1, 4, edge_mode, &edge_mode, NULL); filter_window(_("Edge Detect"), box, do_edge, NULL, FALSE); } static int do_fx(GtkWidget *spin, gpointer fdata) { int i; i = read_spin(spin); spot_undo(UNDO_FILT); do_effect((int)fdata, i); mem_undo_prepare(); return TRUE; } void pressed_sharpen() { GtkWidget *spin = add_a_spin(50, 1, 100); filter_window(_("Edge Sharpen"), spin, do_fx, (gpointer)FX_SHARPEN, FALSE); } void pressed_soften() { GtkWidget *spin = add_a_spin(50, 1, 100); filter_window(_("Edge Soften"), spin, do_fx, (gpointer)FX_SOFTEN, FALSE); } void pressed_fx(int what) { spot_undo(UNDO_FILT); do_effect(what, 0); mem_undo_prepare(); update_stuff(UPD_IMG); } static int do_gauss(GtkWidget *box, gpointer fdata) { GtkWidget *spinX, *spinY, *toggleXY; double radiusX, radiusY; int gcor = FALSE; spinX = BOX_CHILD(box, 0); spinY = BOX_CHILD(box, 1); toggleXY = BOX_CHILD(box, 2); if (mem_channel == CHN_IMAGE) gcor = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(BOX_CHILD(box, 3))); radiusX = radiusY = read_float_spin(spinX); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggleXY))) radiusY = read_float_spin(spinY); spot_undo(UNDO_DRAW); mem_gauss(radiusX, radiusY, gcor); mem_undo_prepare(); return TRUE; } static void gauss_xy_click(GtkButton *button, GtkWidget *spin) { gtk_widget_set_sensitive(spin, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))); } void pressed_gauss() { int i; GtkWidget *box, *spin, *check; box = gtk_vbox_new(FALSE, 5); gtk_widget_show(box); for (i = 0; i < 2; i++) { spin = pack(box, add_float_spin(1, 0, 200)); } gtk_widget_set_sensitive(spin, FALSE); check = add_a_toggle(_("Different X/Y"), box, FALSE); gtk_signal_connect(GTK_OBJECT(check), "clicked", GTK_SIGNAL_FUNC(gauss_xy_click), (gpointer)spin); if (mem_channel == CHN_IMAGE) pack(box, gamma_toggle()); filter_window(_("Gaussian Blur"), box, do_gauss, NULL, FALSE); } static int do_unsharp(GtkWidget *box, gpointer fdata) { GtkWidget *table, *spinR, *spinA, *spinT; double radius, amount; int threshold, gcor = FALSE; table = BOX_CHILD(box, 0); spinR = table_slot(table, 0, 1); spinA = table_slot(table, 1, 1); spinT = table_slot(table, 2, 1); if (mem_channel == CHN_IMAGE) gcor = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(BOX_CHILD(box, 1))); radius = read_float_spin(spinR); amount = read_float_spin(spinA); threshold = read_float_spin(spinT); // !!! No RGBA mode for now, so UNDO_DRAW isn't needed spot_undo(UNDO_FILT); mem_unsharp(radius, amount, threshold, gcor); mem_undo_prepare(); return TRUE; } void pressed_unsharp() { GtkWidget *box, *table; box = gtk_vbox_new(FALSE, 5); table = add_a_table(3, 2, 0, box); gtk_widget_show_all(box); float_spin_to_table(table, 0, 1, 5, 5, 0, 200); float_spin_to_table(table, 1, 1, 5, 0.5, 0, 10); spin_to_table(table, 2, 1, 5, 0, 0, 255); add_to_table(_("Radius"), table, 0, 0, 5); add_to_table(_("Amount"), table, 1, 0, 5); add_to_table(_("Threshold "), table, 2, 0, 5); if (mem_channel == CHN_IMAGE) pack(box, gamma_toggle()); filter_window(_("Unsharp Mask"), box, do_unsharp, NULL, FALSE); } static int do_dog(GtkWidget *box, gpointer fdata) { GtkWidget *table, *spinW, *spinN; double radW, radN; int norm, gcor = FALSE; table = BOX_CHILD(box, 0); spinW = table_slot(table, 0, 1); spinN = table_slot(table, 1, 1); norm = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(BOX_CHILD(box, 1))); if (mem_channel == CHN_IMAGE) gcor = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(BOX_CHILD(box, 2))); radW = read_float_spin(spinW); radN = read_float_spin(spinN); if (radW <= radN) return (FALSE); /* Invalid parameters */ spot_undo(UNDO_FILT); mem_dog(radW, radN, norm, gcor); mem_undo_prepare(); return TRUE; } void pressed_dog() { GtkWidget *box, *table; box = gtk_vbox_new(FALSE, 5); table = add_a_table(3, 2, 0, box); gtk_widget_show_all(box); float_spin_to_table(table, 0, 1, 5, 3, 0, 200); float_spin_to_table(table, 1, 1, 5, 1, 0, 200); add_to_table(_("Outer radius"), table, 0, 0, 5); add_to_table(_("Inner radius"), table, 1, 0, 5); add_a_toggle(_("Normalize"), box, TRUE); if (mem_channel == CHN_IMAGE) pack(box, gamma_toggle()); filter_window(_("Difference of Gaussians"), box, do_dog, NULL, FALSE); } static int do_kuwahara(GtkWidget *box, gpointer fdata) { GtkWidget *spin = BOX_CHILD_0(box), *tog = BOX_CHILD_1(box); GtkWidget *gamma = BOX_CHILD_2(box); int r, detail, gcor; r = read_spin(spin); detail = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tog)); gcor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gamma)); spot_undo(UNDO_COL); // Always processes RGB image channel mem_kuwahara(r, gcor, detail); mem_undo_prepare(); return (TRUE); } void pressed_kuwahara() { GtkWidget *box; box = gtk_vbox_new(FALSE, 5); gtk_widget_show(box); pack(box, add_a_spin(1, 1, 127)); add_a_toggle(_("Protect details"), box, FALSE); pack(box, gamma_toggle()); filter_window(_("Kuwahara-Nagao Blur"), box, do_kuwahara, NULL, FALSE); } void pressed_convert_rgb() { int i = mem_convert_rgb(); if (i) memory_errors(i); else update_stuff(UPD_2RGB); } void pressed_greyscale(int mode) { spot_undo(UNDO_COL); mem_greyscale(mode); mem_undo_prepare(); update_stuff(UPD_COL); } void pressed_rotate_image(int dir) { int i = mem_image_rot(dir); if (i) memory_errors(i); else update_stuff(UPD_GEOM); } void pressed_rotate_sel(int dir) { if (mem_sel_rot(dir)) memory_errors(1); else update_stuff(UPD_CGEOM); } static int do_rotate_free(GtkWidget *box, gpointer fdata) { GtkWidget *spin = BOX_CHILD_0(box); int j, smooth = 0, gcor = 0; double angle; angle = read_float_spin(spin); if (mem_img_bpp == 3) { GtkWidget *gch = BOX_CHILD_1(box); GtkWidget *check = BOX_CHILD_2(box); gcor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gch)); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))) smooth = 1; } j = mem_rotate_free(angle, smooth, gcor, 0); if (!j) update_stuff(UPD_GEOM); else { if (j == -5) alert_box(_("Error"), _("The image is too large for this rotation."), NULL); else memory_errors(j); } return TRUE; } void pressed_rotate_free() { GtkWidget *box; box = gtk_vbox_new(FALSE, 5); gtk_widget_show(box); pack(box, add_float_spin(45, -360, 360)); if (mem_img_bpp == 3) { pack(box, gamma_toggle()); add_a_toggle(_("Smooth"), box, TRUE); } filter_window(_("Free Rotate"), box, do_rotate_free, NULL, FALSE); } void pressed_clip_mask(int val) { int i; if ( mem_clip_mask == NULL ) { i = mem_clip_mask_init(val ^ 255); if (i) { memory_errors(1); // Not enough memory return; } } mem_clip_mask_set(val); update_stuff(UPD_CLIP); } static int do_clip_alphamask() { unsigned char *old_mask = mem_clip_mask; int i, j = mem_clip_w * mem_clip_h, k; if (!mem_clipboard || !mem_clip_alpha) return FALSE; mem_clip_mask = mem_clip_alpha; mem_clip_alpha = NULL; if (old_mask) { for (i = 0; i < j; i++) { k = old_mask[i] * mem_clip_mask[i]; mem_clip_mask[i] = (k + (k >> 8) + 1) >> 8; } free(old_mask); } return TRUE; } void pressed_clip_alphamask() { if (do_clip_alphamask()) update_stuff(UPD_CLIP); } void pressed_clip_alpha_scale() { if (!mem_clipboard || (mem_clip_bpp != 3)) return; if (!mem_clip_mask) mem_clip_mask_init(255); if (!mem_clip_mask) return; if (mem_scale_alpha(mem_clipboard, mem_clip_mask, mem_clip_w, mem_clip_h, TRUE)) return; update_stuff(UPD_CLIP); } void pressed_clip_mask_all() { if (mem_clip_mask_init(0)) memory_errors(1); // Not enough memory else update_stuff(UPD_CLIP); } void pressed_clip_mask_clear() { if (!mem_clip_mask) return; mem_clip_mask_clear(); update_stuff(UPD_CLIP); } void pressed_flip_image_v() { int i; unsigned char *temp; temp = malloc(mem_width * mem_img_bpp); if (!temp) return; /* Not enough memory for temp buffer */ spot_undo(UNDO_XFORM); for (i = 0; i < NUM_CHANNELS; i++) { if (!mem_img[i]) continue; mem_flip_v(mem_img[i], temp, mem_width, mem_height, BPP(i)); } free(temp); mem_undo_prepare(); update_stuff(UPD_IMG); } void pressed_flip_image_h() { int i; spot_undo(UNDO_XFORM); for (i = 0; i < NUM_CHANNELS; i++) { if (!mem_img[i]) continue; mem_flip_h(mem_img[i], mem_width, mem_height, BPP(i)); } mem_undo_prepare(); update_stuff(UPD_IMG); } void pressed_flip_sel_v() { unsigned char *temp; int i, bpp = mem_clip_bpp; temp = malloc(mem_clip_w * mem_clip_bpp); if (!temp) return; /* Not enough memory for temp buffer */ for (i = 0; i < NUM_CHANNELS; i++ , bpp = 1) { if (!mem_clip.img[i]) continue; mem_flip_v(mem_clip.img[i], temp, mem_clip_w, mem_clip_h, bpp); } update_stuff(UPD_CLIP); } void pressed_flip_sel_h() { int i, bpp = mem_clip_bpp; for (i = 0; i < NUM_CHANNELS; i++ , bpp = 1) { if (!mem_clip.img[i]) continue; mem_flip_h(mem_clip.img[i], mem_clip_w, mem_clip_h, bpp); } update_stuff(UPD_CLIP); } static void locate_marquee(int *xy, int snap); #define MIN_VISIBLE 16 /* No less than a square this large must be visible */ void pressed_paste(int centre) { if (!mem_clipboard) return; pressed_select(FALSE); change_to_tool(TTB_SELECT); marq_status = MARQUEE_PASTE; cursor_corner = -1; marq_x1 = mem_clip_x; marq_y1 = mem_clip_y; if (centre) { canvas_center(mem_ic); marq_x1 = mem_width * mem_icx - mem_clip_w * 0.5; marq_y1 = mem_height * mem_icy - mem_clip_h * 0.5; /* Snap to grid, if it leaves enough of paste area visible */ if (tgrid_snap) { int marq0[4], mxy[4], vxy[4]; copy4(marq0, marq_xy); locate_marquee(mxy, TRUE); wjcanvas_get_vport(drawing_canvas, vxy); if (!clip(vxy, vxy[0] - margin_main_x, vxy[1] - margin_main_y, vxy[2] - margin_main_x, vxy[3] - margin_main_y, mxy) || ((vxy[2] - vxy[0] < MIN_VISIBLE) && (vxy[2] - vxy[0] < mxy[2] - mxy[0])) || ((vxy[3] - vxy[1] < MIN_VISIBLE) && (vxy[3] - vxy[1] < mxy[3] - mxy[1]))) copy4(marq_xy, marq0); } } // !!! marq_x2, marq_y2 will be set by update_stuff() update_stuff(UPD_PASTE); } #undef MIN_VISIBLE void pressed_rectangle(int filled) { int sb; spot_undo(UNDO_DRAW); /* Shapeburst mode */ sb = STROKE_GRADIENT; if ( tool_type == TOOL_POLYGON ) { if (sb) { int l2, l3, ixy[4] = { 0, 0, mem_width, mem_height }; l2 = l3 = filled ? 1 : tool_size; l2 >>= 1; l3 -= l2; clip(sb_rect, poly_min_x - l2, poly_min_y - l2, poly_max_x + l3, poly_max_y + l3, ixy); sb_rect[2] -= sb_rect[0]; sb_rect[3] -= sb_rect[1]; sb = init_sb(); } if (!filled) poly_outline(); else poly_paint(); } else { int l2 = 2 * tool_size, rect[4]; marquee_at(rect); if (sb) { copy4(sb_rect, rect); sb = init_sb(); } if (filled || (l2 >= rect[2]) || (l2 >= rect[3])) f_rectangle(rect[0], rect[1], rect[2], rect[3]); else { f_rectangle(rect[0], rect[1], rect[2], tool_size); f_rectangle(rect[0], rect[1] + rect[3] - tool_size, rect[2], tool_size); f_rectangle(rect[0], rect[1] + tool_size, tool_size, rect[3] - l2); f_rectangle(rect[0] + rect[2] - tool_size, rect[1] + tool_size, tool_size, rect[3] - l2); } } if (sb) render_sb(NULL); mem_undo_prepare(); update_stuff(UPD_IMG); } void pressed_ellipse(int filled) { spot_undo(UNDO_DRAW); mem_ellipse(marq_x1, marq_y1, marq_x2, marq_y2, filled ? 0 : tool_size); mem_undo_prepare(); update_stuff(UPD_IMG); } static int copy_clip() { int rect[4], bpp = MEM_BPP, cmask = CMASK_IMAGE; if ((mem_channel == CHN_IMAGE) && mem_img[CHN_ALPHA] && !channel_dis[CHN_ALPHA]) cmask = CMASK_RGBA; marquee_at(rect); mem_clip_new(rect[2], rect[3], bpp, cmask, FALSE); if (!mem_clipboard) { alert_box(_("Error"), _("Not enough memory to create clipboard"), NULL); return (FALSE); } mem_clip_x = rect[0]; mem_clip_y = rect[1]; copy_area(&mem_clip, &mem_image, mem_clip_x, mem_clip_y); return (TRUE); } static void channel_mask() { int i, j, ofs, delta; if (!mem_img[CHN_SEL] || channel_dis[CHN_SEL]) return; if (mem_channel > CHN_ALPHA) return; if (!mem_clip_mask) mem_clip_mask_init(255); if (!mem_clip_mask) return; ofs = mem_clip_y * mem_width + mem_clip_x; delta = 0; for (i = 0; i < mem_clip_h; i++) { for (j = 0; j < mem_clip_w; j++) mem_clip_mask[delta + j] &= mem_img[CHN_SEL][ofs + j]; ofs += mem_width; delta += mem_clip_w; } } static void cut_clip() { int i, sb = 0; spot_undo(UNDO_DRAW); /* Shapeburst mode */ if (STROKE_GRADIENT) { sb_rect[0] = mem_clip_x; sb_rect[1] = mem_clip_y; sb_rect[2] = mem_clip_w; sb_rect[3] = mem_clip_h; sb = init_sb(); } for (i = 0; i < mem_clip_h; i++) { put_pixel_row(mem_clip_x, mem_clip_y + i, mem_clip_w, mem_clip_mask ? mem_clip_mask + i * mem_clip_w : NULL); } if (sb) render_sb(mem_clip_mask); mem_undo_prepare(); } static void trim_clip() { int i, j, k, offs, offd, maxx, maxy, minx, miny, nw, nh; unsigned char *tmp; minx = MAX_WIDTH; miny = MAX_HEIGHT; maxx = maxy = 0; /* Find max & min values for shrink wrapping */ for (j = 0; j < mem_clip_h; j++) { offs = mem_clip_w * j; for (i = 0; i < mem_clip_w; i++) { if (!mem_clip_mask[offs + i]) continue; if (i < minx) minx = i; if (i > maxx) maxx = i; if (j < miny) miny = j; if (j > maxy) maxy = j; } } /* No live pixels found */ if (minx > maxx) return; nw = maxx - minx + 1; nh = maxy - miny + 1; /* No decrease so no resize either */ if ((nw == mem_clip_w) && (nh == mem_clip_h)) return; /* Pack data to front */ for (j = miny; j <= maxy; j++) { offs = j * mem_clip_w + minx; offd = (j - miny) * nw; memmove(mem_clipboard + offd * mem_clip_bpp, mem_clipboard + offs * mem_clip_bpp, nw * mem_clip_bpp); for (k = 1; k < NUM_CHANNELS; k++) { if (!(tmp = mem_clip.img[k])) continue; memmove(tmp + offd, tmp + offs, nw); } } /* Try to realloc memory for smaller clipboard */ tmp = realloc(mem_clipboard, nw * nh * mem_clip_bpp); if (tmp) mem_clipboard = tmp; for (k = 1; k < NUM_CHANNELS; k++) { if (!(tmp = mem_clip.img[k])) continue; tmp = realloc(tmp, nw * nh); if (tmp) mem_clip.img[k] = tmp; } mem_clip_w = nw; mem_clip_h = nh; mem_clip_x += minx; mem_clip_y += miny; if (marq_status >= MARQUEE_PASTE) // We're trimming live paste area { marq_x2 = (marq_x1 += minx) + nw - 1; marq_y2 = (marq_y1 += miny) + nh - 1; } } void pressed_copy(int cut) { if (!copy_clip()) return; if (tool_type == TOOL_POLYGON) poly_mask(); channel_mask(); if (cut) cut_clip(); update_stuff(cut ? UPD_CUT : UPD_COPY); } void pressed_lasso(int cut) { /* Lasso a new selection */ if (((marq_status > MARQUEE_NONE) && (marq_status < MARQUEE_PASTE)) || (poly_status == POLY_DONE)) { if (!copy_clip()) return; if (tool_type == TOOL_POLYGON) poly_mask(); else mem_clip_mask_init(255); poly_lasso(); channel_mask(); trim_clip(); if (cut) cut_clip(); pressed_paste(TRUE); } /* Trim an existing clipboard */ else { unsigned char *oldmask = mem_clip_mask; mem_clip_mask = NULL; mem_clip_mask_init(255); poly_lasso(); if (mem_clip_mask && oldmask) { int i, j = mem_clip_w * mem_clip_h; for (i = 0; i < j; i++) oldmask[i] &= mem_clip_mask[i]; mem_clip_mask_clear(); } if (!mem_clip_mask) mem_clip_mask = oldmask; trim_clip(); update_stuff(UPD_CGEOM); } } void update_menus() // Update edit/undo menu { int i, j, statemap; update_undo_bar(); statemap = mem_img_bpp == 3 ? NEED_24 | NEED_NOIDX : NEED_IDX; if (mem_channel != CHN_IMAGE) statemap |= NEED_NOIDX; if ((mem_img_bpp == 3) && mem_img[CHN_ALPHA]) statemap |= NEED_RGBA; if (mem_clipboard) statemap |= NEED_PCLIP; if (mem_clipboard && (mem_clip_bpp == 3)) statemap |= NEED_ACLIP; if ( marq_status == MARQUEE_NONE ) { // statemap &= ~(NEED_SEL | NEED_CROP); if (poly_status == POLY_DONE) statemap |= NEED_MARQ | NEED_LASSO; } else { statemap |= NEED_MARQ; /* If we are pasting disallow copy/cut/crop */ if (marq_status < MARQUEE_PASTE) statemap |= NEED_SEL | NEED_CROP | NEED_LASSO; /* Only offer the crop option if the user hasn't selected everything */ if (!((abs(marq_x1 - marq_x2) < mem_width - 1) || (abs(marq_y1 - marq_y2) < mem_height - 1))) statemap &= ~NEED_CROP; } /* Forbid RGB-to-indexed paste, but allow indexed-to-RGB */ if (mem_clipboard && (mem_clip_bpp <= MEM_BPP)) statemap |= NEED_CLIP; if (mem_undo_done) statemap |= NEED_UNDO; if (mem_undo_redo) statemap |= NEED_REDO; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_CHAN0 + mem_channel]), TRUE); for (i = j = 0; i < NUM_CHANNELS; i++) // Enable/disable channel enable/disable { if (mem_img[i]) j++; gtk_widget_set_sensitive(menu_widgets[MENU_DCHAN0 + i], !!mem_img[i]); } if (j > 1) statemap |= NEED_CHAN; mapped_item_state(statemap); /* Switch to default tool if active smudge tool got disabled */ if ((tool_type == TOOL_SMUDGE) && !GTK_WIDGET_IS_SENSITIVE(icon_buttons[SMUDGE_TOOL_ICON])) change_to_tool(DEFAULT_TOOL_ICON); } void update_stuff(int flags) { /* Always check current channel first */ if (!mem_img[mem_channel]) { mem_channel = CHN_IMAGE; flags |= UPD_CHAN; } /* And check paste validity too */ if ((marq_status >= MARQUEE_PASTE) && (!mem_clipboard || (mem_clip_bpp > MEM_BPP))) pressed_select(FALSE); if (flags & CF_CAB) flags |= mem_channel == CHN_IMAGE ? UPD_AB : UPD_GRAD; if (flags & CF_NAME) update_titlebar(); if (flags & CF_GEOM) { int w, h; canvas_size(&w, &h); wjcanvas_size(drawing_canvas, w, h); } if (flags & CF_CGEOM) if (marq_status >= MARQUEE_PASTE) flags |= CF_DRAW; if (flags & (CF_GEOM | CF_CGEOM)) check_marquee(); if (flags & CF_PAL) { if (mem_col_A >= mem_cols) mem_col_A = 0; if (mem_col_B >= mem_cols) mem_col_B = 0; mem_mask_init(); // Reinit RGB masks wjcanvas_size(drawing_palette, PALETTE_WIDTH, mem_cols * PALETTE_SWATCH_H + PALETTE_SWATCH_Y * 2); } if (flags & CF_AB) { mem_pat_update(); if (text_paste && (marq_status >= MARQUEE_PASTE)) { if (text_paste == TEXT_PASTE_FT) ft_render_text(); else /* if ( text_paste == TEXT_PASTE_GTK ) */ render_text( drawing_col_prev ); check_marquee(); flags |= CF_PMODE; } } if (flags & CF_GRAD) grad_def_update(-1); if (flags & CF_PREFS) { update_undo_depth(); // If undo depth was changed update_recent_files(); init_status_bar(); // Takes care of all statusbar parts } if (flags & CF_MENU) update_menus(); if (flags & CF_SET) toolbar_update_settings(); if (flags & CF_IMGBAR) update_image_bar(); if (flags & CF_SELBAR) update_sel_bar(); #if 0 // !!! Too risky for now - need a safe path which only calls update_xy_bar() if (flags & CF_PIXEL) move_mouse(0, 0, 0); // To cause update of XY bar #endif if (flags & CF_CURSOR) set_cursor(); if (flags & CF_PMODE) if ((marq_status >= MARQUEE_PASTE) && show_paste) flags |= CF_DRAW; if (flags & CF_GMODE) if ((tool_type == TOOL_GRADIENT) && grad_opacity) flags |= CF_DRAW; if (flags & CF_DRAW) if (drawing_canvas) gtk_widget_queue_draw(drawing_canvas); if (flags & CF_VDRAW) if (view_showing && vw_drawing) gtk_widget_queue_draw(vw_drawing); if (flags & CF_PDRAW) { mem_pal_init(); // Update palette RGB on screen gtk_widget_queue_draw(drawing_palette); } if (flags & CF_TDRAW) { update_top_swatch(); gtk_widget_queue_draw(drawing_col_prev); } if (flags & CF_ALIGN) realign_size(); if (flags & CF_VALIGN) vw_realign(); if (flags & CF_TRANS) layer_show_trans(); } void main_undo() { mem_undo_backward(); update_stuff(UPD_ALL | CF_NAME); } void main_redo() { mem_undo_forward(); update_stuff(UPD_ALL | CF_NAME); } static int load_pal(char *filename) // Load palette file { int ftype, res = -1; ftype = detect_palette_format(filename); if (ftype < 0) return (-1); /* Silently fail if no file */ if (ftype != FT_NONE) res = load_image(filename, FS_PALETTE_LOAD, ftype); /* Successful... */ if (res == 1) update_stuff(UPD_UPAL); /* ...or not */ else alert_box(_("Error"), _("Invalid palette file"), NULL); return (res == 1 ? 0 : -1); } void set_new_filename(int layer, char *fname) { mem_replace_filename(layer, fname); if (layer == layer_selected) update_stuff(UPD_NAME); } static int populate_channel(char *filename) { int ftype, res = -1; ftype = detect_image_format(filename); if (ftype < 0) return (-1); /* Silently fail if no file */ /* Don't bother with mismatched formats */ if (file_formats[ftype].flags & (MEM_BPP == 1 ? FF_IDX : FF_RGB)) res = load_image(filename, FS_CHANNEL_LOAD, ftype); /* Successful */ if (res == 1) update_stuff(UPD_UIMG); /* Not enough memory available */ else if (res == FILE_MEM_ERROR) memory_errors(1); /* Unspecified error */ else alert_box(_("Error"), _("Invalid channel file."), NULL); return (res == 1 ? 0 : -1); } static int anim_mode = ANM_COMP; static void anim_dialog_fn(char *key) { *(key - *key) = *key; } static int anim_file_dialog(int ftype) { char *modes[] = { _("Raw frames"), _("Composited frames"), _("Composited frames with nonzero delay") }; char *opts[] = { _("Load First Frame"), _("Explode Frames"), #ifndef WIN32 _("View Animation"), #endif NULL }; char keys[] = { 0, 1, 2, 3, 4, 5 }; char *tmp; GtkWidget *win, *vbox, *hbox, *label, *button; GtkAccelGroup* ag = gtk_accel_group_new(); int i, is_anim; /* This function is better be immune to pointer grabs */ release_grab(); ftype &= FTM_FTYPE; is_anim = file_formats[ftype].flags & FF_ANIM; if (!is_anim) opts[2] = NULL; // No view if not animated win = add_a_window(GTK_WINDOW_TOPLEVEL, _("Load Frames"), GTK_WIN_POS_CENTER, TRUE); vbox = add_vbox(win); tmp = g_strdup_printf(is_anim ? _("This is an animated %s file.") : _("This is a multipage %s file."), file_formats[ftype].name); label = pack5(vbox, gtk_label_new(tmp)); gtk_misc_set_padding(GTK_MISC(label), 0, 5); g_free(tmp); // add_hseparator(vbox, -2, 10); hbox = pack(vbox, gtk_hbox_new(TRUE, 0)); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); button = add_a_button(_("Load into Layers"), 5, hbox, TRUE); gtk_widget_grab_focus(button); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(anim_dialog_fn), (gpointer)(keys + 5)); if (is_anim) pack(vbox, wj_radio_pack(modes, 3, 0, anim_mode, &anim_mode, NULL)); add_hseparator(vbox, -2, 10); hbox = pack(vbox, gtk_hbox_new(TRUE, 0)); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); for (i = 0; opts[i]; i++) { button = add_a_button(opts[i], 5, hbox, TRUE); if (!i) gtk_widget_add_accelerator(button, "clicked", ag, GDK_Escape, 0, (GtkAccelFlags)0); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(anim_dialog_fn), (gpointer)(keys + i + 2)); } gtk_signal_connect_object(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(anim_dialog_fn), (gpointer)(keys + 1)); gtk_widget_show_all(vbox); gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(main_window)); gtk_window_add_accel_group(GTK_WINDOW(win), ag); gtk_widget_show(win); gdk_window_raise(win->window); while (!keys[0]) gtk_main_iteration(); i = keys[0]; // !!! To save it from "destroy" event handler if (i > 1) gtk_widget_destroy(win); else i = 2; return (i - 2); } static void handle_file_error(int res) { char mess[256], *txt = NULL; /* Image was too large for OS */ if (res == FILE_MEM_ERROR) memory_errors(1); else if (res == TOO_BIG) snprintf(txt = mess, 250, _("File is too big, must be <= to width=%i height=%i"), MAX_WIDTH, MAX_HEIGHT); else if (res == EXPLODE_FAILED) txt = _("Unable to explode frames"); else if (res <= 0) txt = _("Unable to load file"); else if (res == FILE_LIB_ERROR) txt = _("The file import library had to terminate due to a problem with the file (possibly corrupt image data or a truncated file). I have managed to load some data as the header seemed fine, but I would suggest you save this image to a new file to ensure this does not happen again."); else if (res == FILE_TOO_LONG) txt = _("The animation is too long to load all of it into layers."); else if (res == FILE_EXP_BREAK) txt = _("Could not explode all the frames in the animation."); if (txt) alert_box(_("Error"), txt, NULL); } static GtkWidget *file_selector_create(int action_type); #define FS_XNAME_KEY "mtPaint.fs_xname" #define FS_XTYPE_KEY "mtPaint.fs_xtype" int do_a_load(char *fname, int undo) { char real_fname[PATHBUF]; int res, ftype, mult = 0; resolve_path(real_fname, PATHBUF, fname); ftype = detect_image_format(real_fname); if ((ftype < 0) || (ftype == FT_NONE)) { alert_box(_("Error"), ftype < 0 ? _("Cannot open file") : _("Unsupported file format"), NULL); return (1); } set_image(FALSE); if (ftype == FT_LAYERS1) mult = res = load_layers(real_fname); else res = load_image(real_fname, FS_PNG_LOAD, undo ? ftype | FTM_UNDO : ftype); loaded: /* Multiframe file was loaded so tell user */ if (res == FILE_HAS_FRAMES) { int i; /* Don't ask user in viewer mode */ // !!! When implemented, load as frameset & run animation in that case instead if (viewer_mode && view_image_only) i = 0; else i = anim_file_dialog(ftype); if (i == 3) { /* Make current layer, with first frame in it, background */ if (layer_selected) { /* Simply swap layer data pointers */ layer_image *tip = layer_table[layer_selected].image; layer_table[layer_selected].image = layer_table[0].image; layer_table[0].image = tip; layer_selected = 0; } mult = res = load_to_layers(real_fname, ftype, anim_mode); goto loaded; } else if (i == 1) /* Ask for directory to explode frames to */ { GtkWidget *fs = file_selector_create(FS_EXPLODE_FRAMES); if (fs) { /* Needed when starting new mtpaint process later */ gtk_object_set_data_full(GTK_OBJECT(fs), FS_XNAME_KEY, g_strdup(real_fname), (GtkDestroyNotify)g_free); gtk_object_set_data(GTK_OBJECT(fs), FS_XTYPE_KEY, (gpointer)ftype); fs_setup(fs, FS_EXPLODE_FRAMES); } } else if (i == 2) run_def_action(DA_GIF_PLAY, real_fname, NULL, 0); } /* An error happened */ else if (res != 1) { handle_file_error(res); if (res <= 0) // Hard error { set_image(TRUE); return (1); } } /* Whether we loaded something or failed to, old image is gone anyway */ register_file(real_fname); if (!mult) /* A single image */ { /* To prevent 1st frame overwriting a multiframe file */ char *nm = g_strconcat(real_fname, res == FILE_HAS_FRAMES ? ".000" : NULL, NULL); set_new_filename(layer_selected, nm); g_free(nm); if ( layers_total>0 ) layers_notify_changed(); // We loaded an image into the layers, so notify change } else /* A whole bunch of layers */ { // pressed_layers(); // We have just loaded a layers file so ensure view window is open view_show(); } /* Show new image */ if (!undo) reset_tools(); else // No reason to reset tools in undoable mode { notify_unchanged(NULL); update_stuff(UPD_ALL); } set_image(TRUE); return (0); } /// FILE SELECTION WINDOW int check_file( char *fname ) // Does file already exist? Ask if OK to overwrite { char *msg, *f8; int res = 0; if ( valid_file(fname) == 0 ) { f8 = gtkuncpy(NULL, fname, 0); msg = g_strdup_printf(_("File: %s already exists. Do you want to overwrite it?"), f8); res = alert_box(_("File Found"), msg, _("NO"), _("YES"), NULL) != 2; g_free(msg); g_free(f8); } return (res); } #define FORMAT_SPINS 7 static void change_image_format(GtkMenuItem *menuitem, GtkWidget *box) { static int flags[FORMAT_SPINS] = { FF_TRANS, FF_COMPJ, FF_COMPZ, FF_COMPR, FF_COMPJ2, FF_SPOT, FF_SPOT }; GList *chain = GTK_BOX(box)->children->next->next; int i, j, ftype; ftype = (int)gtk_object_get_user_data(GTK_OBJECT(menuitem)); /* Hide/show name/value widget pairs */ for (i = 0; i < FORMAT_SPINS; i++) { j = flags[i] & FF_COMP ? FF_COMP : flags[i]; if ((file_formats[ftype].flags & j) == flags[i]) { gtk_widget_show(((GtkBoxChild*)chain->data)->widget); gtk_widget_show(((GtkBoxChild*)chain->next->data)->widget); } else { gtk_widget_hide(((GtkBoxChild*)chain->data)->widget); gtk_widget_hide(((GtkBoxChild*)chain->next->data)->widget); } chain = chain->next->next; } } static void image_widgets(GtkWidget *box, char *name, int mode) { char *spinnames[FORMAT_SPINS] = { _("Transparency index"), _("JPEG Save Quality (100=High)"), _("PNG Compression (0=None)"), _("TGA RLE Compression"), _("JPEG2000 Compression (0=Lossless)"), _("Hotspot at X ="), _("Y =") }; int spindata[FORMAT_SPINS][3] = { {mem_xpm_trans, -1, mem_cols - 1}, {jpeg_quality, 0, 100}, {png_compression, 0, 9}, {tga_RLE, 0, 1}, {jp2_rate, 0, 100}, {mem_xbm_hot_x, -1, mem_width - 1}, {mem_xbm_hot_y, -1, mem_height - 1} }; GtkWidget *opt, *menu, *item; fformat *ff; int i, j, k, l, ft_sort[NUM_FTYPES][2], mask = FF_256; char *ext = strrchr(name, '.'); ext = ext ? ext + 1 : ""; switch (mode) { default: return; case FS_CHANNEL_SAVE: if (mem_channel != CHN_IMAGE) break; case FS_PNG_SAVE: mask = FF_SAVE_MASK; break; case FS_COMPOSITE_SAVE: mask = FF_RGB; } /* Create controls (!!! two widgets per value - used in traversal) */ pack5(box, gtk_label_new(_("File Format"))); opt = pack5(box, gtk_option_menu_new()); for (i = 0; i < FORMAT_SPINS; i++) { pack5(box, gtk_label_new(spinnames[i])); pack5(box, add_a_spin(spindata[i][0], spindata[i][1], spindata[i][2])); } gtk_widget_show_all(box); menu = gtk_menu_new(); for (i = k = 0; i < NUM_FTYPES; i++) // Populate sorted filetype list { ff = file_formats + i; if (ff->flags & FF_NOSAVE) continue; if (!(ff->flags & mask)) continue; l = (ff->name[0] << 16) + (ff->name[1] << 8) + ff->name[2]; for (j = k; j > 0; j--) { if (ft_sort[j - 1][0] < l) break; ft_sort[j][0] = ft_sort[j - 1][0]; ft_sort[j][1] = ft_sort[j - 1][1]; } ft_sort[j][0] = l; ft_sort[j][1] = i; k++; } j=-1; for ( l=0; lext, LONGEST_EXT) || (ff->ext2[0] && !strncasecmp(ext, ff->ext2, LONGEST_EXT))) j = l; item = gtk_menu_item_new_with_label(ff->name); gtk_object_set_user_data(GTK_OBJECT(item), (gpointer)i); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(change_image_format), (gpointer)box); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); } gtk_widget_show_all(menu); gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); gtk_option_menu_set_history(GTK_OPTION_MENU(opt), j); FIX_OPTION_MENU_SIZE(opt); gtk_signal_emit_by_name(GTK_OBJECT(g_list_nth_data( GTK_MENU_SHELL(menu)->children, j)), "activate", (gpointer)box); } static void ftype_widgets(GtkWidget *box, char *name, int mode) { GtkWidget *opt, *menu, *item; fformat *ff; int i, j, k, mask; char *ext = strrchr(name, '.'); mask = mode == FS_PALETTE_SAVE ? FF_PALETTE : FF_IMAGE; ext = mode == FS_EXPLODE_FRAMES ? name : ext ? ext + 1 : ""; pack5(box, gtk_label_new(_("File Format"))); opt = pack5(box, gtk_option_menu_new()); menu = gtk_menu_new(); for (i = j = k = 0; i < NUM_FTYPES; i++) { ff = file_formats + i; if (ff->flags & FF_NOSAVE) continue; if (!(ff->flags & mask)) continue; if (!strncasecmp(ext, ff->ext, LONGEST_EXT) || (ff->ext2[0] && !strncasecmp(ext, ff->ext2, LONGEST_EXT))) j = k; item = gtk_menu_item_new_with_label(ff->name); gtk_object_set_user_data(GTK_OBJECT(item), (gpointer)i); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); k++; } gtk_widget_show_all(box); gtk_widget_show_all(menu); gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); gtk_option_menu_set_history(GTK_OPTION_MENU(opt), j); FIX_OPTION_MENU_SIZE(opt); } static void loader_widgets(GtkWidget *box, char *name, int mode) { #ifdef U_LCMS GtkWidget *undo, *icc; undo = add_a_toggle(_("Undoable"), box, undo_load); icc = add_a_toggle(_("Apply colour profile"), box, apply_icc); gtk_widget_show_all(box); if (mode == FS_PNG_LOAD) return; /* Hide unapplicable controls for FS_CHANNEL_LOAD */ gtk_widget_hide(undo); if (MEM_BPP != 3) gtk_widget_hide(icc); #else /* No CMS support */ if (mode != FS_PNG_LOAD) return; add_a_toggle(_("Undoable"), box, undo_load); gtk_widget_show_all(box); #endif } /* Note: "name" is in system encoding */ static GtkWidget *ls_settings_box(GtkWidget *fs, char *name, int mode) { GtkWidget *box; int ftype; box = gtk_hbox_new(FALSE, 0); gtk_object_set_user_data(GTK_OBJECT(box), (gpointer)mode); switch (mode) /* Only save operations need settings */ { case FS_PNG_SAVE: case FS_CHANNEL_SAVE: case FS_COMPOSITE_SAVE: image_widgets(box, name, mode); break; case FS_LAYER_SAVE: /* !!! No selectable layer file format yet */ break; case FS_EXPORT_GIF: /* !!! No selectable formats yet */ pack5(box, gtk_label_new(_("Animation delay"))); pack5(box, add_a_spin(preserved_gif_delay, 1, MAX_DELAY)); gtk_widget_show_all(box); break; case FS_EXPLODE_FRAMES: ftype = (int)gtk_object_get_data(GTK_OBJECT(fs), FS_XTYPE_KEY); ftype_widgets(box, file_formats[ftype].ext, mode); break; case FS_EXPORT_UNDO: case FS_EXPORT_UNDO2: case FS_PALETTE_SAVE: ftype_widgets(box, name, mode); break; case FS_CHANNEL_LOAD: case FS_PNG_LOAD: loader_widgets(box, name, mode); break; default: /* Give a hidden empty box */ break; } return (box); } static int selected_file_type(GtkWidget *box) { GtkWidget *opt; opt = BOX_CHILD(box, 1); opt = gtk_option_menu_get_menu(GTK_OPTION_MENU(opt)); if (!opt) return (FT_NONE); opt = gtk_menu_get_active(GTK_MENU(opt)); return ((int)gtk_object_get_user_data(GTK_OBJECT(opt))); } void init_ls_settings(ls_settings *settings, GtkWidget *box) { int xmode; /* Set defaults */ memset(settings, 0, sizeof(ls_settings)); settings->ftype = FT_NONE; settings->xpm_trans = mem_xpm_trans; settings->hot_x = mem_xbm_hot_x; settings->hot_y = mem_xbm_hot_y; settings->req_w = settings->req_h = 0; settings->jpeg_quality = jpeg_quality; settings->png_compression = png_compression; settings->tga_RLE = tga_RLE; settings->jp2_rate = jp2_rate; settings->gif_delay = preserved_gif_delay; /* Read in settings */ if (box) { xmode = (int)gtk_object_get_user_data(GTK_OBJECT(box)); settings->mode = xmode; switch (xmode) { case FS_PNG_SAVE: case FS_CHANNEL_SAVE: case FS_COMPOSITE_SAVE: settings->ftype = selected_file_type(box); settings->xpm_trans = read_spin(BOX_CHILD(box, 3)); settings->jpeg_quality = read_spin(BOX_CHILD(box, 5)); settings->png_compression = read_spin(BOX_CHILD(box, 7)); settings->tga_RLE = read_spin(BOX_CHILD(box, 9)); settings->jp2_rate = read_spin(BOX_CHILD(box, 11)); settings->hot_x = read_spin(BOX_CHILD(box, 13)); settings->hot_y = read_spin(BOX_CHILD(box, 15)); break; case FS_LAYER_SAVE: /* Nothing to do yet */ break; case FS_EXPORT_GIF: /* Hardcoded GIF format for now */ settings->ftype = FT_GIF; settings->gif_delay = read_spin(BOX_CHILD(box, 1)); break; case FS_EXPLODE_FRAMES: case FS_EXPORT_UNDO: case FS_EXPORT_UNDO2: case FS_PALETTE_SAVE: settings->ftype = selected_file_type(box); break; case FS_PNG_LOAD: undo_load = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(BOX_CHILD_0(box))); #ifdef U_LCMS case FS_CHANNEL_LOAD: apply_icc = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(BOX_CHILD_1(box))); #endif break; default: /* Use defaults */ break; } } /* Default expansion of xpm_trans */ settings->rgb_trans = settings->xpm_trans < 0 ? -1 : PNG_2_INT(mem_pal[settings->xpm_trans]); } static void store_ls_settings(ls_settings *settings) { guint32 fflags = file_formats[settings->ftype].flags; switch (settings->mode) { case FS_PNG_SAVE: case FS_CHANNEL_SAVE: case FS_COMPOSITE_SAVE: if (fflags & FF_TRANS) mem_set_trans(settings->xpm_trans); if (fflags & FF_SPOT) { mem_xbm_hot_x = settings->hot_x; mem_xbm_hot_y = settings->hot_y; } fflags &= FF_COMP; if (fflags == FF_COMPJ) jpeg_quality = settings->jpeg_quality; else if (fflags == FF_COMPZ) png_compression = settings->png_compression; else if (fflags == FF_COMPR) tga_RLE = settings->tga_RLE; else if (fflags == FF_COMPJ2) jp2_rate = settings->jp2_rate; break; case FS_EXPORT_GIF: preserved_gif_delay = settings->gif_delay; break; } } static void fs_destroy(GtkWidget *fs) { win_store_pos(fs, "fs_window"); fpick_destroy(fs); } static void fs_ok(GtkWidget *fs) { ls_settings settings; GtkWidget *xtra, *entry; char fname[PATHTXT], *msg, *f8; char *c, *ext, *ext2, *gif, *gif2; int i, j, res; /* Pick up extra info */ xtra = GTK_WIDGET(gtk_object_get_user_data(GTK_OBJECT(fs))); init_ls_settings(&settings, xtra); /* Needed to show progress in Windows GTK+2 */ gtk_window_set_modal(GTK_WINDOW(fs), FALSE); /* Looks better if no dialog under progressbar */ win_store_pos(fs, "fs_window"); /* Save the location */ gtk_widget_hide(fs); /* File extension */ fpick_get_filename(fs, fname, PATHTXT, TRUE); c = strrchr(fname, '.'); while (TRUE) { /* Cut the extension off */ if ((settings.mode == FS_CLIP_FILE) || (settings.mode == FS_EXPLODE_FRAMES) || (settings.mode == FS_EXPORT_UNDO) || (settings.mode == FS_EXPORT_UNDO2)) { if (!c) break; *c = '\0'; } /* Modify the file extension if needed */ else { ext = file_formats[settings.ftype].ext; if (!ext[0]) break; if (c) /* There is an extension */ { /* Same extension? */ if (!strncasecmp(c + 1, ext, 256)) break; /* Alternate extension? */ ext2 = file_formats[settings.ftype].ext2; if (ext2[0] && !strncasecmp(c + 1, ext2, 256)) break; /* Another file type? */ for (i = 0; i < NUM_FTYPES; i++) { if (strncasecmp(c + 1, file_formats[i].ext, 256) && strncasecmp(c + 1, file_formats[i].ext2, 256)) continue; /* Truncate */ *c = '\0'; break; } } i = strlen(fname); j = strlen(ext); if (i + j >= PATHTXT - 1) break; /* Too long */ fname[i] = '.'; strncpy(fname + i + 1, ext, j + 1); } fpick_set_filename(fs, fname, TRUE); break; } /* Get filename the proper way, in system filename encoding */ fpick_get_filename(fs, fname, PATHBUF, FALSE); switch (settings.mode) { case FS_PNG_LOAD: if (do_a_load(fname, undo_load) == 1) goto redo; break; case FS_PNG_SAVE: if (check_file(fname)) goto redo; store_ls_settings(&settings); // Update data in memory if (gui_save(fname, &settings) < 0) goto redo; if (layers_total > 0) { /* Filename has changed so layers file needs re-saving to be correct */ if (!mem_filename || strcmp(fname, mem_filename)) layers_notify_changed(); } set_new_filename(layer_selected, fname); break; case FS_PALETTE_LOAD: if (load_pal(fname)) goto redo; notify_changed(); break; case FS_PALETTE_SAVE: if (check_file(fname)) goto redo; settings.pal = mem_pal; settings.colors = mem_cols; if (save_image(fname, &settings)) goto redo_name; break; case FS_CLIP_FILE: case FS_SELECT_FILE: case FS_SELECT_DIR: entry = gtk_object_get_data(GTK_OBJECT(fs), FS_ENTRY_KEY); if (entry) { f8 = gtkuncpy(NULL, fname, 0); gtk_entry_set_text(GTK_ENTRY(entry), f8); g_free(f8); } break; case FS_EXPORT_UNDO: case FS_EXPORT_UNDO2: if (export_undo(fname, &settings)) alert_box(_("Error"), _("Unable to export undo images"), NULL); break; case FS_EXPORT_ASCII: if (check_file(fname)) goto redo; if (export_ascii(fname)) alert_box(_("Error"), _("Unable to export ASCII file"), NULL); break; case FS_LAYER_SAVE: if (check_file(fname)) goto redo; if (save_layers(fname) != 1) goto redo; break; case FS_EXPLODE_FRAMES: gif = gtk_object_get_data(GTK_OBJECT(fs), FS_XNAME_KEY); res = (int)gtk_object_get_data(GTK_OBJECT(fs), FS_XTYPE_KEY); res = explode_frames(fname, anim_mode, gif, res, settings.ftype); if (res != 1) handle_file_error(res); if (res > 0) // Success or nonfatal error { c = strrchr(gif, DIR_SEP); if (!c) c = gif; else c++; c = file_in_dir(NULL, fname, c, PATHBUF); run_def_action(DA_GIF_EDIT, c, NULL, preserved_gif_delay); free(c); } else goto redo; // Fatal error break; case FS_EXPORT_GIF: if (check_file(fname)) goto redo; store_ls_settings(&settings); // Update data in memory gif2 = g_strdup(mem_filename); // Guaranteed to be non-NULL for (i = strlen(gif2) - 1; i >= 0; i--) { if (gif2[i] == DIR_SEP) break; if ((unsigned char)(gif2[i] - '0') <= 9) gif2[i] = '?'; } run_def_action(DA_GIF_CREATE, gif2, fname, settings.gif_delay); run_def_action(DA_GIF_PLAY, fname, NULL, 0); g_free(gif2); break; case FS_CHANNEL_LOAD: if (populate_channel(fname)) goto redo; break; case FS_CHANNEL_SAVE: if (check_file(fname)) goto redo; settings.img[CHN_IMAGE] = mem_img[mem_channel]; settings.width = mem_width; settings.height = mem_height; if (mem_channel == CHN_IMAGE) { settings.pal = mem_pal; settings.bpp = mem_img_bpp; settings.colors = mem_cols; } else { settings.pal = NULL; /* Greyscale one 'll be created */ settings.bpp = 1; settings.colors = 256; settings.xpm_trans = -1; } if (save_image(fname, &settings)) goto redo_name; break; case FS_COMPOSITE_SAVE: if (check_file(fname)) goto redo; if (layer_save_composite(fname, &settings)) goto redo_name; break; } update_menus(); fpick_destroy(fs); return; redo_name: f8 = gtkuncpy(NULL, fname, 0); msg = g_strdup_printf(_("Unable to save file: %s"), f8); alert_box(_("Error"), msg, NULL); g_free(msg); g_free(f8); redo: gtk_widget_show(fs); gtk_window_set_modal(GTK_WINDOW(fs), TRUE); } void fs_setup(GtkWidget *fs, int action_type) { char txt[PATHBUF]; GtkWidget *xtra; /* If we have a filename and saving */ if ((action_type == FS_PNG_SAVE) && mem_filename) strncpy(txt, mem_filename, PATHBUF); else if ((action_type == FS_LAYER_SAVE) && layers_filename[0]) strncpy(txt, layers_filename, PATHBUF); else /* Default */ { file_in_dir(txt, inifile_get("last_dir", get_home_directory()), action_type == FS_LAYER_SAVE ? "layers.txt" : "", PATHBUF); } gtk_window_set_modal(GTK_WINDOW(fs), TRUE); win_restore_pos(fs, "fs_window", 0, 0, 550, 500); xtra = ls_settings_box(fs, txt, action_type); gtk_object_set_user_data(GTK_OBJECT(fs), xtra); fpick_setup(fs, xtra, GTK_SIGNAL_FUNC(fs_ok), GTK_SIGNAL_FUNC(fs_destroy)); fpick_set_filename(fs, txt, FALSE); gtk_widget_show(fs); gtk_window_set_transient_for(GTK_WINDOW(fs), GTK_WINDOW(main_window)); gdk_window_raise(fs->window); // Needed to ensure window is at the top } static GtkWidget *file_selector_create(int action_type) { char *title = NULL; int fpick_flags = FPICK_ENTRY; switch (action_type) { case FS_PNG_LOAD: if ((layers_total ? check_layers_for_changes() : check_for_changes()) == 1) return (NULL); title = _("Load Image File"); fpick_flags = FPICK_LOAD; break; case FS_PNG_SAVE: title = _("Save Image File"); break; case FS_PALETTE_LOAD: title = _("Load Palette File"); fpick_flags = FPICK_LOAD; break; case FS_PALETTE_SAVE: title = _("Save Palette File"); break; case FS_EXPORT_UNDO: if (!mem_undo_done) return (NULL); title = _("Export Undo Images"); break; case FS_EXPORT_UNDO2: if (!mem_undo_done) return (NULL); title = _("Export Undo Images (reversed)"); break; case FS_EXPORT_ASCII: if (mem_cols > 16) { alert_box( _("Error"), _("You must have 16 or fewer palette colours to export ASCII art."), NULL); return (NULL); } title = _("Export ASCII Art"); break; case FS_LAYER_SAVE: if (check_layers_all_saved()) return (NULL); title = _("Save Layer Files"); break; case FS_EXPLODE_FRAMES: title = _("Choose frames directory"); fpick_flags = FPICK_DIRS_ONLY; break; case FS_EXPORT_GIF: if (!mem_filename) { alert_box(_("Error"), _("You must save at least one frame to create an animated GIF."), NULL); return (NULL); } title = _("Export GIF animation"); break; case FS_CHANNEL_LOAD: title = _("Load Channel"); fpick_flags = FPICK_LOAD; break; case FS_CHANNEL_SAVE: title = _("Save Channel"); break; case FS_COMPOSITE_SAVE: title = _("Save Composite Image"); break; } return (fpick_create(title, fpick_flags)); } void file_selector(int action_type) { GtkWidget *fs = file_selector_create(action_type); if (fs) fs_setup(fs, action_type); } void canvas_center(float ic[2]) // Center of viewable area { GtkAdjustment *hori, *vert; int w, h; hori = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW( scrolledwindow_canvas)); vert = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW( scrolledwindow_canvas)); canvas_size(&w, &h); ic[0] = hori->page_size < w ? (hori->value + hori->page_size * 0.5) / w : 0.5; ic[1] = vert->page_size < h ? (vert->value + vert->page_size * 0.5) / h : 0.5; } void align_size(float new_zoom) // Set new zoom level { if (zoom_flag) return; // Needed as we could be called twice per iteration if (new_zoom < MIN_ZOOM) new_zoom = MIN_ZOOM; if (new_zoom > MAX_ZOOM) new_zoom = MAX_ZOOM; if (new_zoom == can_zoom) return; zoom_flag = 1; if (!mem_ics) canvas_center(mem_ic); mem_ics = 0; can_zoom = new_zoom; realign_size(); zoom_flag = 0; } void realign_size() // Reapply old zoom { GtkAdjustment *hori, *vert; int w, h, nv_h = 0, nv_v = 0; // New positions of scrollbar hori = gtk_scrolled_window_get_hadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas)); vert = gtk_scrolled_window_get_vadjustment( GTK_SCROLLED_WINDOW(scrolledwindow_canvas)); canvas_size(&w, &h); if (hori->page_size < w) nv_h = rint(w * mem_icx - hori->page_size * 0.5); if (vert->page_size < h) nv_v = rint(h * mem_icy - vert->page_size * 0.5); hori->value = nv_h; hori->upper = w; vert->value = nv_v; vert->upper = h; wjcanvas_size(drawing_canvas, w, h); vw_focus_view(); // View window position may need updating toolbar_zoom_update(); // Zoom factor may have been reset } /* This tool is seamless: doesn't draw pixels twice if not requested to - WJ */ static void rec_continuous(int nx, int ny, int w, int h) { linedata line1, line2, line3, line4; int ws2 = w >> 1, hs2 = h >> 1; int i, j, i2, j2, *xv; int dx[3] = {-ws2, w - ws2 - 1, -ws2}; int dy[3] = {-hs2, h - hs2 - 1, -hs2}; i = nx < tool_ox; j = ny < tool_oy; /* Redraw starting square only if need to fill in possible gap when * size changes, or to draw stroke gradient in the proper direction */ if (!tablet_working && !STROKE_GRADIENT) { i2 = tool_ox + dx[i + 1] + 1 - i * 2; j2 = tool_oy + dy[j + 1] + 1 - j * 2; xv = &line3[0]; } else { i2 = tool_ox + dx[i]; j2 = tool_oy + dy[j]; xv = &i2; } if (tool_ox == nx) { line_init(line1, tool_ox + dx[i], j2, tool_ox + dx[i], ny + dy[j + 1]); line_init(line3, tool_ox + dx[i + 1], j2, tool_ox + dx[i + 1], ny + dy[j + 1]); line2[2] = line4[2] = -1; } else { line_init(line2, tool_ox + dx[i], tool_oy + dy[j + 1], nx + dx[i], ny + dy[j + 1]); line_nudge(line2, i2, j2); line_init(line3, tool_ox + dx[i + 1], tool_oy + dy[j], nx + dx[i + 1], ny + dy[j]); line_nudge(line3, i2, j2); line_init(line1, *xv, line3[1], *xv, line2[1]); line_init(line4, nx + dx[i + 1], ny + dy[j], nx + dx[i + 1], ny + dy[j + 1]); } draw_quad(line1, line2, line3, line4); } void update_all_views() // Update whole canvas on all views { if ( view_showing && vw_drawing ) gtk_widget_queue_draw( vw_drawing ); if ( drawing_canvas ) gtk_widget_queue_draw( drawing_canvas ); } static struct { float c_zoom; int points; int xy[2 * MAX_POLY + 2], step[MAX_POLY + 1]; } poly_cache; static void poly_update_cache() { int i, i0, last, dx, dy, *pxy, *ps, ds, zoom = 1, scale = 1; i0 = poly_cache.c_zoom == can_zoom ? poly_cache.points : 0; last = poly_points + (poly_status == POLY_DONE); if (i0 >= last) return; // Up to date /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); ds = scale >> 1; poly_cache.c_zoom = can_zoom; poly_cache.points = last; /* Get locations */ pxy = poly_cache.xy + i0 * 2; for (i = i0; i < poly_points; i++) { *pxy++ = floor_div(poly_mem[i][0] * scale, zoom) + ds; *pxy++ = floor_div(poly_mem[i][1] * scale, zoom) + ds; } /* Join 1st & last point if finished */ if (poly_status == POLY_DONE) { *pxy++ = poly_cache.xy[0]; *pxy++ = poly_cache.xy[1]; } /* Get distances */ poly_cache.step[0] = 0; if (!i0) i0 = 1; ps = poly_cache.step + i0 - 1; pxy = poly_cache.xy + i0 * 2 - 2; for (i = i0; i < last; i++ , pxy += 2 , ps++) { dx = abs(pxy[2] - pxy[0]); dy = abs(pxy[3] - pxy[1]); ps[1] = ps[0] + (dx > dy ? dx : dy); } } void stretch_poly_line(int x, int y) // Clear old temp line, draw next temp line { int old[4]; if (!poly_points || (poly_points >= MAX_POLY)) return; if ((line_x2 == x) && (line_y2 == y)) return; // This check reduces flicker copy4(old, line_xy); line_x2 = x; line_y2 = y; line_x1 = poly_mem[poly_points - 1][0]; line_y1 = poly_mem[poly_points - 1][1]; repaint_line(old); } static void poly_conclude() { if (!poly_points) poly_status = POLY_NONE; else { poly_status = POLY_DONE; repaint_line(NULL); check_marquee(); paint_poly_marquee(NULL, FALSE); } update_stuff(UPD_PSEL); } static void poly_add_po(int x, int y) { if (!poly_points) poly_cache.c_zoom = 0; // Invalidate else if (!((x - poly_mem[poly_points - 1][0]) | (y - poly_mem[poly_points - 1][1]))) return; // Never stack poly_add(x, y); if (poly_points >= MAX_POLY) poly_conclude(); else { int old[4]; copy4(old, line_xy); line_x1 = line_x2 = x; line_y1 = line_y2 = y; repaint_line(old); paint_poly_marquee(NULL, FALSE); update_sel_bar(); } } static int first_point; static int tool_draw(int x, int y, int *update) { static int ncx, ncy; int minx, miny, xw, yh, ts2, tr2; int i, j, k, ox, oy, px, py, rx, ry, sx, sy, off1, off2; ts2 = tool_size >> 1; tr2 = tool_size - ts2 - 1; minx = x - ts2; miny = y - ts2; xw = yh = tool_size; /* Save the brush coordinates for next step */ ox = ncx; oy = ncy; ncx = x; ncy = y; switch (tool_type) { case TOOL_SQUARE: f_rectangle(x - ts2, y - ts2, tool_size, tool_size); break; case TOOL_CIRCLE: f_circle(x, y, tool_size); break; case TOOL_HORIZONTAL: miny = y; yh = 1; sline(x - ts2, y, x + tr2, y); break; case TOOL_VERTICAL: minx = x; xw = 1; sline(x, y - ts2, x, y + tr2); break; case TOOL_SLASH: sline(x + tr2, y - ts2, x - ts2, y + tr2); break; case TOOL_BACKSLASH: sline(x - ts2, y - ts2, x + tr2, y + tr2); break; case TOOL_SPRAY: for (j = 0; j < tool_flow; j++) { rx = x - ts2 + rand() % tool_size; ry = y - ts2 + rand() % tool_size; IF_IN_RANGE(rx, ry) put_pixel(rx, ry); } break; case TOOL_SHUFFLE: for (j = 0; j < tool_flow; j++) { rx = x - ts2 + rand() % tool_size; ry = y - ts2 + rand() % tool_size; sx = x - ts2 + rand() % tool_size; sy = y - ts2 + rand() % tool_size; IF_IN_RANGE(rx, ry) IF_IN_RANGE(sx, sy) { /* !!! Or do something for partial mask too? !!! */ if (pixel_protected(rx, ry) || pixel_protected(sx, sy)) continue; off1 = rx + ry * mem_width; off2 = sx + sy * mem_width; if ((mem_channel == CHN_IMAGE) && RGBA_mode && mem_img[CHN_ALPHA]) { px = mem_img[CHN_ALPHA][off1]; py = mem_img[CHN_ALPHA][off2]; mem_img[CHN_ALPHA][off1] = py; mem_img[CHN_ALPHA][off2] = px; } k = MEM_BPP; off1 *= k; off2 *= k; for (i = 0; i < k; i++) { px = mem_img[mem_channel][off1]; py = mem_img[mem_channel][off2]; mem_img[mem_channel][off1++] = py; mem_img[mem_channel][off2++] = px; } } } break; case TOOL_SMUDGE: if (first_point) return (FALSE); mem_smudge(ox, oy, x, y); break; case TOOL_CLONE: if (first_point || (ox != x) || (oy != y)) mem_clone(x + clone_x, y + clone_y, x, y); else return (TRUE); /* May try again with other x & y */ break; case TOOL_SELECT: case TOOL_POLYGON: /* Adjust paste location */ marq_x2 += x - marq_x1; marq_y2 += y - marq_y1; marq_x1 = x; marq_y1 = y; commit_paste(FALSE, update); return (TRUE); /* Area updated already */ break; default: return (FALSE); /* Stop this nonsense now! */ } /* Accumulate update info */ if (minx < update[0]) update[0] = minx; if (miny < update[1]) update[1] = miny; xw += minx; yh += miny; if (xw > update[2]) update[2] = xw; if (yh > update[3]) update[3] = yh; return (TRUE); } void line_to_gradient() { if (STROKE_GRADIENT) { grad_info *grad = gradient + mem_channel; grad->gmode = GRAD_MODE_LINEAR; grad->status = GRAD_DONE; copy4(grad->xy, line_xy); grad_update(grad); } } void tool_action(int event, int x, int y, int button, gdouble pressure) { static double lstep; linedata ncline; double len1; int update_area[4]; int minx = -1, miny = -1, xw = -1, yh = -1; tool_info o_tool = tool_state; int i, j, k, ts2, tr2, res, ox, oy; int oox, ooy; // Continuous smudge stuff gboolean rmb_tool; /* Does tool draw with color B when right button pressed? */ rmb_tool = (tool_type <= TOOL_SPRAY) || (tool_type == TOOL_FLOOD); if (rmb_tool) tint_mode[2] = button; /* Swap tint +/- */ if ((first_point = !pen_down)) { lstep = 0.0; if ((button == 3) && rmb_tool && !tint_mode[0]) { col_reverse = TRUE; mem_swap_cols(FALSE); } } else if ( tool_ox == x && tool_oy == y ) return; // Only do something with a new point if ( tablet_working ) { pressure = pressure <= 0.2 ? -1.0 : pressure >= 1.0 ? 0.0 : (pressure - 1.0) * (1.0 / 0.8); for (i = 0; i < 3; i++) { if (!tablet_tool_use[i]) continue; tool_state.var[i] *= (tablet_tool_factor[i] > 0) + tablet_tool_factor[i] * pressure; if (tool_state.var[i] < 1) tool_state.var[i] = 1; } } ts2 = tool_size >> 1; tr2 = tool_size - ts2 - 1; /* Handle "exceptional" tools */ res = 1; if (tool_type == TOOL_LINE) { if ( button == 1 ) { line_x2 = x; line_y2 = y; if ( line_status == LINE_NONE ) { line_x1 = x; line_y1 = y; } // Draw circle at x, y if ( line_status == LINE_LINE ) { grad_info svgrad = gradient[mem_channel]; /* If not called from draw_arrow() */ if (event != GDK_NOTHING) line_to_gradient(); mem_undo_next(UNDO_TOOL); if ( tool_size > 1 ) { int oldmode = mem_undo_opacity; mem_undo_opacity = TRUE; f_circle( line_x1, line_y1, tool_size ); f_circle( line_x2, line_y2, tool_size ); // Draw tool_size thickness line from 1-2 tline( line_x1, line_y1, line_x2, line_y2, tool_size ); mem_undo_opacity = oldmode; } else sline( line_x1, line_y1, line_x2, line_y2 ); minx = (line_x1 < line_x2 ? line_x1 : line_x2) - ts2; miny = (line_y1 < line_y2 ? line_y1 : line_y2) - ts2; xw = abs( line_x2 - line_x1 ) + 1 + tool_size; yh = abs( line_y2 - line_y1 ) + 1 + tool_size; line_x1 = line_x2; line_y1 = line_y2; gradient[mem_channel] = svgrad; } line_status = LINE_START; } else stop_line(); // Right button pressed so stop line process } else if ((tool_type == TOOL_SELECT) || (tool_type == TOOL_POLYGON)) { if ( marq_status == MARQUEE_PASTE ) // User wants to drag the paste box { if ( x>=marq_x1 && x<=marq_x2 && y>=marq_y1 && y<=marq_y2 ) { marq_status = MARQUEE_PASTE_DRAG; marq_drag_x = x - marq_x1; marq_drag_y = y - marq_y1; } } if ( marq_status == MARQUEE_PASTE_DRAG && ( button == 1 || button == 13 || button == 2 ) ) { // User wants to drag the paste box paint_marquee(MARQ_MOVE, x - marq_drag_x, y - marq_drag_y, NULL); } if ( (marq_status == MARQUEE_PASTE_DRAG || marq_status == MARQUEE_PASTE ) && (((button == 3) && (event == GDK_BUTTON_PRESS)) || ((button == 13) && (event == GDK_MOTION_NOTIFY)))) { // User wants to commit the paste res = 0; /* Fall through to noncontinuous tools */ } if ( tool_type == TOOL_SELECT && button == 3 && (marq_status == MARQUEE_DONE ) ) { pressed_select(FALSE); } if ( tool_type == TOOL_SELECT && button == 1 && (marq_status == MARQUEE_NONE || marq_status == MARQUEE_DONE) ) // Starting a selection { if ( marq_status == MARQUEE_DONE ) { paint_marquee(MARQ_HIDE, 0, 0, NULL); i = close_to(x, y); if (!(i & 1) ^ (marq_x1 > marq_x2)) marq_x1 = marq_x2; if (!(i & 2) ^ (marq_y1 > marq_y2)) marq_y1 = marq_y2; set_cursor(); } else { marq_x1 = x; marq_y1 = y; } marq_x2 = x; marq_y2 = y; marq_status = MARQUEE_SELECTING; paint_marquee(MARQ_SNAP, 0, 0, NULL); } else { if (marq_status == MARQUEE_SELECTING) // Continuing to make a selection paint_marquee(MARQ_SIZE, x, y, NULL); } if ( tool_type == TOOL_POLYGON ) { if ( poly_status == POLY_NONE && marq_status == MARQUEE_NONE ) { // Start doing something if (button == 1) poly_status = POLY_SELECTING; else if (button) poly_status = POLY_DRAGGING; } if ( poly_status == POLY_SELECTING ) { /* Add another point to polygon */ if (button == 1) poly_add_po(x, y); /* Stop adding points */ else if (button == 3) poly_conclude(); } if ( poly_status == POLY_DRAGGING ) { /* Stop forming polygon */ if (event == GDK_BUTTON_RELEASE) poly_conclude(); /* Add another point to polygon */ else poly_add_po(x, y); } } } else /* Some other kind of tool */ { /* If proper button for tool */ if ((button == 1) || ((button == 3) && rmb_tool)) { // Do memory stuff for undo if (tool_type != TOOL_FLOOD) mem_undo_next(UNDO_TOOL); res = 0; } } /* Handle floodfill here, as too irregular a non-continuous tool */ if (!res && (tool_type == TOOL_FLOOD)) { /* Non-masked start point */ if (pixel_protected(x, y) < 255) { j = get_pixel(x, y); k = mem_channel != CHN_IMAGE ? channel_col_A[mem_channel] : mem_img_bpp == 1 ? mem_col_A : PNG_2_INT(mem_col_A24); if (j != k) /* And never start on colour A */ { spot_undo(UNDO_TOOL); flood_fill(x, y, j); update_all_views(); } } /* Undo the color swap if fill failed */ if (!pen_down && col_reverse) { col_reverse = FALSE; mem_swap_cols(FALSE); } res = 1; } /* Handle continuous mode */ while (!res && mem_continuous && !first_point) { minx = tool_ox < x ? tool_ox : x; xw = (tool_ox > x ? tool_ox : x) - minx + tool_size; minx -= ts2; miny = tool_oy < y ? tool_oy : y; yh = (tool_oy > y ? tool_oy : y) - miny + tool_size; miny -= ts2; res = 1; if (ts2 ? tool_type == TOOL_SQUARE : tool_type < TOOL_SPRAY) { rec_continuous(x, y, tool_size, tool_size); break; } if (tool_type == TOOL_CIRCLE) { /* Redraw stroke gradient in proper direction */ if (STROKE_GRADIENT) f_circle(tool_ox, tool_oy, tool_size); tline(tool_ox, tool_oy, x, y, tool_size); f_circle(x, y, tool_size); break; } if (tool_type == TOOL_HORIZONTAL) { miny += ts2; yh -= tool_size - 1; rec_continuous(x, y, tool_size, 1); break; } if (tool_type == TOOL_VERTICAL) { minx += ts2; xw -= tool_size - 1; rec_continuous(x, y, 1, tool_size); break; } if (tool_type == TOOL_SLASH) { g_para(x + tr2, y - ts2, x - ts2, y + tr2, tool_ox - x, tool_oy - y); break; } if (tool_type == TOOL_BACKSLASH) { g_para(x - ts2, y - ts2, x + tr2, y + tr2, tool_ox - x, tool_oy - y); break; } if (tool_type == TOOL_SMUDGE) { linedata line; if (button != 1) break; /* Do nothing on right button */ line_init(line, tool_ox, tool_oy, x, y); while (TRUE) { oox = line[0]; ooy = line[1]; if (line_step(line) < 0) break; mem_smudge(oox, ooy, line[0], line[1]); } break; } xw = yh = -1; /* Nothing was done */ res = 0; /* Non-continuous tool */ break; } /* Handle non-continuous mode & tools */ if (!res) { update_area[0] = update_area[1] = MAX_WIDTH; update_area[2] = update_area[3] = 0; /* Use marquee coords for paste */ i = j = 0; ox = marq_x1; oy = marq_y1; if ((tool_type == TOOL_SELECT) || (tool_type == TOOL_POLYGON)) { i = marq_x1 - x; j = marq_y1 - y; } if (first_point || !brush_spacing) /* Single point */ tool_draw(x + i, y + j, update_area); else /* Multiple points */ { line_init(ncline, tool_ox + i, tool_oy + j, x + i, y + j); i = abs(x - tool_ox); j = abs(y - tool_oy); len1 = sqrt(i * i + j * j) / (i > j ? i : j); while (TRUE) { if (lstep + (1.0 / 65536.0) >= brush_spacing) { /* Drop error for 1-pixel step */ lstep = brush_spacing == 1 ? 0.0 : lstep - brush_spacing; if (!tool_draw(ncline[0], ncline[1], update_area)) break; } if (line_step(ncline) < 0) break; lstep += len1; } marq_x2 += ox - marq_x1; marq_y2 += oy - marq_y1; marq_x1 = ox; marq_y1 = oy; } /* Convert update limits */ minx = update_area[0]; miny = update_area[1]; xw = update_area[2] - minx; yh = update_area[3] - miny; } if ((xw > 0) && (yh > 0)) /* Some drawing action */ { if (xw + minx > mem_width) xw = mem_width - minx; if (yh + miny > mem_height) yh = mem_height - miny; if (minx < 0) xw += minx , minx = 0; if (miny < 0) yh += miny , miny = 0; if ((xw > 0) && (yh > 0)) { main_update_area(minx, miny, xw, yh); vw_update_area(minx, miny, xw, yh); } } tool_ox = x; // Remember the coords just used as they are needed in continuous mode tool_oy = y; if (tablet_working) tool_state = o_tool; } void check_marquee() // Check marquee boundaries are OK - may be outside limits via arrow keys { if (marq_status >= MARQUEE_PASTE) { marq_x1 = marq_x1 < 1 - mem_clip_w ? 1 - mem_clip_w : marq_x1 > mem_width - 1 ? mem_width - 1 : marq_x1; marq_y1 = marq_y1 < 1 - mem_clip_h ? 1 - mem_clip_h : marq_y1 > mem_height - 1 ? mem_height - 1 : marq_y1; marq_x2 = marq_x1 + mem_clip_w - 1; marq_y2 = marq_y1 + mem_clip_h - 1; return; } /* Reinit marquee from polygon bounds */ if (poly_status == POLY_DONE) copy4(marq_xy, poly_xy); else if (marq_status == MARQUEE_NONE) return; /* Selection mode in operation */ marq_x1 = marq_x1 < 0 ? 0 : marq_x1 >= mem_width ? mem_width - 1 : marq_x1; marq_x2 = marq_x2 < 0 ? 0 : marq_x2 >= mem_width ? mem_width - 1 : marq_x2; marq_y1 = marq_y1 < 0 ? 0 : marq_y1 >= mem_height ? mem_height - 1 : marq_y1; marq_y2 = marq_y2 < 0 ? 0 : marq_y2 >= mem_height ? mem_height - 1 : marq_y2; } void paint_poly_marquee(rgbcontext *ctx, int whole) // Paint polygon marquee { int i; if ((tool_type != TOOL_POLYGON) || !poly_points) return; // !!! Maybe check boundary clipping too poly_update_cache(); i = poly_cache.points; if (whole) draw_poly(poly_cache.xy, i, 0, margin_main_x, margin_main_y, ctx); else { i -= 2; draw_poly(poly_cache.xy + i * 2, 2, poly_cache.step[i], margin_main_x, margin_main_y, ctx); } } static void repaint_clipped(int x0, int y0, int x1, int y1, const int *vxy) { int rxy[4]; if (clip(rxy, x0, y0, x1, y1, vxy)) repaint_canvas(margin_main_x + rxy[0], margin_main_y + rxy[1], rxy[2] - rxy[0], rxy[3] - rxy[1]); } void marquee_at(int *rect) // Read marquee location & size { rect[0] = marq_x1 < marq_x2 ? marq_x1 : marq_x2; rect[1] = marq_y1 < marq_y2 ? marq_y1 : marq_y2; rect[2] = abs(marq_x2 - marq_x1) + 1; rect[3] = abs(marq_y2 - marq_y1) + 1; } static void locate_marquee(int *xy, int snap) { int rxy[4]; int x1, y1, x2, y2, w, h, zoom = 1, scale = 1; if (snap && tgrid_snap) { copy4(rxy, marq_xy); snap_xy(marq_xy); if (marq_status < MARQUEE_PASTE) { snap_xy(marq_xy + 2); marq_xy[(rxy[2] >= rxy[0]) * 2 + 0] += tgrid_dx - 1; marq_xy[(rxy[3] >= rxy[1]) * 2 + 1] += tgrid_dy - 1; } } check_marquee(); /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); /* Get onscreen coords */ x1 = (marq_x1 * scale) / zoom; y1 = (marq_y1 * scale) / zoom; x2 = (marq_x2 * scale) / zoom; y2 = (marq_y2 * scale) / zoom; w = abs(x2 - x1) + scale; h = abs(y2 - y1) + scale; xy[2] = (xy[0] = x1 < x2 ? x1 : x2) + w; xy[3] = (xy[1] = y1 < y2 ? y1 : y2) + h; } void paint_marquee(int action, int new_x, int new_y, rgbcontext *ctx) { unsigned char *rgb; int xy[4], vxy[4], nxy[4], rxy[4], clips[4 * 3]; int i, j, nc, r, g, b, rw, rh, offx, offy, wx, wy, mst = marq_status; nxy[0] = nxy[1] = 0; canvas_size(nxy + 2, nxy + 3); if (ctx) copy4(vxy, ctx->xy); else wjcanvas_get_vport(drawing_canvas, vxy); if (!clip(vxy, vxy[0] - margin_main_x, vxy[1] - margin_main_y, vxy[2] - margin_main_x, vxy[3] - margin_main_y, nxy) && ctx) return; /* If not in a refresh, must update location anyhow */ locate_marquee(xy, action == MARQ_SNAP); copy4(nxy, xy); copy4(clips, xy); nc = action < MARQ_HIDE ? 0 : 4; // No clear if showing anew /* Determine which parts moved outside */ while (action >= MARQ_MOVE) { if (action == MARQ_MOVE) // Move { marq_x2 += new_x - marq_x1; marq_x1 = new_x; marq_y2 += new_y - marq_y1; marq_y1 = new_y; } else marq_x2 = new_x , marq_y2 = new_y; // Resize locate_marquee(nxy, TRUE); /* No intersection? */ if (!clip(rxy, xy[0], xy[1], xy[2], xy[3], nxy)) break; /* Horizontal slab */ if (rxy[1] > xy[1]) clips[3] = rxy[1]; // Top else if (rxy[3] < xy[3]) clips[1] = rxy[3]; // Bottom else nc = 0; // None /* Inside area, if left unfilled */ if (!(show_paste && (mst >= MARQUEE_PASTE))) { clips[nc + 0] = nxy[0] + 1; clips[nc + 1] = nxy[1] + 1; clips[nc + 2] = nxy[2] - 1; clips[nc + 3] = nxy[3] - 1; nc += 4; } /* Vertical block */ if (rxy[0] > xy[0]) // Left clips[nc + 0] = xy[0] , clips[nc + 2] = rxy[0]; else if (rxy[2] < xy[2]) // Right clips[nc + 0] = rxy[2] , clips[nc + 2] = xy[2]; else break; // None clips[nc + 1] = rxy[1]; clips[nc + 3] = rxy[3]; nc += 4; break; } /* Clear - only happens in void context */ marq_status = 0; for (i = 0; i < nc; i += 4) { /* Clip to visible portion */ if (!clip(rxy, clips[i + 0], clips[i + 1], clips[i + 2], clips[i + 3], vxy)) continue; /* Redraw entire area */ if (show_paste && (mst >= MARQUEE_PASTE)) repaint_clipped(xy[0], xy[1], xy[2], xy[3], rxy); /* Redraw only borders themselves */ else { repaint_clipped(xy[0], xy[1] + 1, xy[0] + 1, xy[3] - 1, rxy); repaint_clipped(xy[2] - 1, xy[1] + 1, xy[2], xy[3] - 1, rxy); repaint_clipped(xy[0], xy[1], xy[2], xy[1] + 1, rxy); repaint_clipped(xy[0], xy[3] - 1, xy[2], xy[3], rxy); } } marq_status = mst; if (action == MARQ_HIDE) return; // All done for clear /* Determine visible area */ if (!clip(rxy, nxy[0], nxy[1], nxy[2], nxy[3], vxy)) return; /* Draw */ r = 255; g = b = 0; /* Draw in red */ if (marq_status >= MARQUEE_PASTE) { /* Display paste RGB, only if not being called from repaint_canvas */ if (show_paste && !ctx) repaint_clipped(marq_x1 < 0 ? 0 : nxy[0] + 1, marq_y1 < 0 ? 0 : nxy[1] + 1, nxy[2] - 1, nxy[3] - 1, vxy); r = g = 0; b = 255; /* Draw in blue */ } rw = rxy[2] - rxy[0]; rh = rxy[3] - rxy[1]; /* Create pattern */ j = (rw > rh ? rw : rh) * 3; rgb = malloc(j + 6 * 3); /* 6 pixels for offset */ if (!rgb) return; rgb[0] = rgb[3] = rgb[6] = r; rgb[1] = rgb[4] = rgb[7] = g; rgb[2] = rgb[5] = rgb[8] = b; memset(rgb + 9, 255, 9); for (i = 0; i < j; i++) rgb[i + 6 * 3] = rgb[i]; offx = ((rxy[0] - nxy[0]) % 6) * 3; offy = ((rxy[1] - nxy[1]) % 6) * 3; wx = margin_main_x + rxy[0]; wy = margin_main_y + rxy[1]; if ((nxy[0] >= vxy[0]) && (marq_x1 >= 0) && (marq_x2 >= 0)) draw_rgb(wx, wy, 1, rh, rgb + offy, 3, ctx); if ((nxy[2] <= vxy[2]) && (marq_x1 < mem_width) && (marq_x2 < mem_width)) draw_rgb(wx + rw - 1, wy, 1, rh, rgb + offy, 3, ctx); if ((nxy[1] >= vxy[1]) && (marq_y1 >= 0) && (marq_y2 >= 0)) draw_rgb(wx, wy, rw, 1, rgb + offx, 0, ctx); if ((nxy[3] <= vxy[3]) && (marq_y1 < mem_height) && (marq_y2 < mem_height)) draw_rgb(wx, wy + rh - 1, rw, 1, rgb + offx, 0, ctx); free(rgb); } int close_to( int x1, int y1 ) // Which corner of selection is coordinate closest to? { return ((x1 + x1 <= marq_x1 + marq_x2 ? 0 : 1) + (y1 + y1 <= marq_y1 + marq_y2 ? 0 : 2)); } static void line_get_xy(int xy[4], linedata line, int y1) { int k, x0, x1, y; xy[1] = y = line[1]; x0 = x1 = line[0]; while ((line[1] < y1) && (line_step(line) >= 0)) x1 = line[0] , y = line[1]; xy[3] = y; k = (x0 > x1) * 2; xy[k] = x0; xy[k ^ 2] = x1; } static void repaint_xy(int xy[4], int scale) { repaint_canvas(margin_main_x + xy[0] * scale, margin_main_y + xy[1] * scale, (xy[2] - xy[0] + 1) * scale, (xy[3] - xy[1] + 1) * scale); } // !!! For now, this function is hardcoded to merge 2 areas static int merge_xy(int cnt, int *xy, int step) { if ((xy[0 + 0] > xy[4 + 2] + step + 1) || (xy[4 + 0] > xy[0 + 2] + step + 1)) return (2); if (xy[0 + 0] > xy[4 + 0]) xy[0 + 0] = xy[4 + 0]; if (xy[0 + 1] > xy[4 + 1]) xy[0 + 1] = xy[4 + 1]; if (xy[0 + 2] < xy[4 + 2]) xy[0 + 2] = xy[4 + 2]; if (xy[0 + 3] < xy[4 + 3]) xy[0 + 3] = xy[4 + 3]; return (1); } /* Only 2 line-quads for now, but will be extended to 4 for line-join drag */ static void refresh_lines(const int xy0[4], const int xy1[4]) { linedata ll1, ll2; int ixy[4], getxy[8], *lines[2] = { ll1, ll2 }; int i, j, y, y1, y2, cnt, step, zoom = 1, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); else scale = rint(can_zoom); wjcanvas_get_vport(drawing_canvas, ixy); prepare_line_clip(ixy, ixy, scale); for (i = j = 0; j < 2; j++) { const int *xy; int tmp; xy = j ? xy1 : xy0; if (!xy) continue; line_init(lines[i], floor_div(xy[0], zoom), floor_div(xy[1], zoom), floor_div(xy[2], zoom), floor_div(xy[3], zoom)); if (line_clip(lines[i], ixy, &tmp) < 0) continue; if (lines[i][9] < 0) line_flip(lines[i]); i++; } step = scale < 8 ? (16 + scale - 1) / scale : 2; for (cnt = i , y1 = ixy[1]; cnt; y1 += step) { y2 = ixy[3] + 1; for (j = i = 0; i < cnt; i++) { y = lines[i][1]; if (lines[i][2] < 0) // Remove used-up line { lines[i--] = lines[--cnt]; } else if (y >= y1) // Remember not-yet-started line { if (y2 > y) y2 = y; } else line_get_xy(getxy + j++ * 4, lines[i], y1); } if (j) { if (j > 1) j = merge_xy(j, getxy, step); for (i = 0; i < j; i++) repaint_xy(getxy + i * 4, scale); } else y1 = y2; } } static void render_line(int mode, linedata line, int ofs, rgbcontext *ctx) { int rxy[4], cxy[4]; int i, j, x, y, tx, ty, w3, rgb = 0, scale = 1; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom > 1.0) scale = rint(can_zoom); copy4(cxy, ctx->xy); w3 = (cxy[2] - cxy[0]) * 3; for (i = ofs; line[2] >= 0; line_step(line) , i++) { x = (tx = line[0]) * scale + margin_main_x; y = (ty = line[1]) * scale + margin_main_y; if (mode == 1) /* Drawing */ { j = ((ty & 7) * 8 + (tx & 7)) * 3; rgb = MEM_2_INT(mem_col_pat24, j); } else if (mode == 2) /* Tracking */ { rgb = ((i >> 2) & 1) * 0xFFFFFF; } else if (mode == 3) /* Gradient */ { rgb = ((i >> 2) & 1) * 0xFFFFFF ^ ((i >> 1) & 1) * 0x00FF00; } if (clip(rxy, x, y, x + scale, y + scale, cxy)) { unsigned char *dest, *tmp; int i, h, l; tmp = dest = ctx->rgb + (rxy[1] - cxy[1]) * w3 + (rxy[0] - cxy[0]) * 3; *tmp++ = INT_2_R(rgb); *tmp++ = INT_2_G(rgb); *tmp++ = INT_2_B(rgb); l = (rxy[2] - rxy[0]) * 3; for (i = l - 3; i; i-- , tmp++) *tmp = *(tmp - 3); tmp = dest; for (h = rxy[3] - rxy[1] - 1; h; h--) { tmp += w3; memcpy(tmp, dest, l); } } } } void repaint_grad(const int *old) { refresh_lines(gradient[mem_channel].xy, old); } void repaint_line(const int *old) { refresh_lines(line_xy, old); } /* lxy is ctx's bounds scaled to "line space" (unchanged for zoom < 0, image * coordinates otherwise) */ void refresh_line(int mode, const int *lxy, rgbcontext *ctx) { linedata line; int j, zoom = 1, *xy; /* !!! This uses the fact that zoom factor is either N or 1/N !!! */ if (can_zoom < 1.0) zoom = rint(1.0 / can_zoom); xy = mode == 3 ? gradient[mem_channel].xy : line_xy; line_init(line, floor_div(xy[0], zoom), floor_div(xy[1], zoom), floor_div(xy[2], zoom), floor_div(xy[3], zoom)); if (line_clip(line, lxy, &j) >= 0) render_line(mode, line, j, ctx); } void update_recent_files() // Update the menu items { char txt[64], *t, txt2[PATHTXT]; int i, count = 0; for (i = 0; i < recent_files; i++) // Display recent filenames { sprintf(txt, "file%i", i + 1); t = inifile_get(txt, "."); if (strlen(t) < 2) // Hide if empty { gtk_widget_hide(menu_widgets[MENU_RECENT1 + i]); continue; } gtkuncpy(txt2, t, PATHTXT); gtk_label_set_text(GTK_LABEL(GTK_MENU_ITEM( menu_widgets[MENU_RECENT1 + i])->item.bin.child), txt2); gtk_widget_show(menu_widgets[MENU_RECENT1 + i]); count++; } for (; i < MAX_RECENT; i++) // Hide extra items gtk_widget_hide(menu_widgets[MENU_RECENT1 + i]); // Hide separator if not needed (count ? gtk_widget_show : gtk_widget_hide)(menu_widgets[MENU_RECENT_S]); } void register_file( char *filename ) // Called after successful load/save { char txt[64], txt1[64], *c; int i, f; c = strrchr( filename, DIR_SEP ); if (c) { i = *c; *c = '\0'; // Strip off filename inifile_set("last_dir", filename); *c = i; } // Is it already in used file list? If so shift relevant filenames down and put at top. i = 1; f = 0; while ( i1 ) // If file is already most recent, do nothing { while ( i>1 ) { sprintf( txt, "file%i", i-1 ); sprintf( txt1, "file%i", i ); inifile_set(txt1, inifile_get(txt, "")); i--; } inifile_set("file1", filename); // Strip off filename } update_recent_files(); } void create_default_image() // Create default new image { int nw = inifile_get_gint32("lastnewWidth", DEFAULT_WIDTH ), nh = inifile_get_gint32("lastnewHeight", DEFAULT_HEIGHT ), nc = inifile_get_gint32("lastnewCols", 256 ), nt = inifile_get_gint32("lastnewType", 2 ); do_new_one(nw, nh, nc, nt == 1 ? NULL : mem_pal_def, (nt == 0) || (nt > 2) ? 3 : 1, FALSE); } mtpaint-3.40/src/polygon.h0000644000175000000620000000252311152054035015060 0ustar muammarstaff/* polygon.h Copyright (C) 2005-2009 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ /// STRUCTURES / GLOBALS #define MAX_POLY 1000 // Maximum points on any polygon int poly_points; int poly_mem[MAX_POLY][2]; // Coords in poly_mem are raw coords as plotted over image int poly_xy[4]; #define poly_min_x poly_xy[0] #define poly_min_y poly_xy[1] #define poly_max_x poly_xy[2] #define poly_max_y poly_xy[3] /// PROCEDURES void poly_add(int x, int y); // Add point to polygon void poly_draw(int filled, unsigned char *buf, int wbuf); void poly_mask(); // Paint polygon onto clipboard mask void poly_paint(); // Paint polygon onto image void poly_outline(); // Paint polygon outline onto image void poly_lasso(); // Lasso around current clipboard mtpaint-3.40/src/memory.h0000644000175000000620000007713611570005345014721 0ustar muammarstaff/* memory.h Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include #include /// Definitions, structures & variables #define MAX_WIDTH 16384 #define MAX_HEIGHT 16384 #define MIN_WIDTH 1 #define MIN_HEIGHT 1 /* !!! If MAX_WIDTH * MAX_HEIGHT * max bpp won't fit into int, lots of code * !!! will have to be modified to use size_t instead */ #define MAX_DIM (MAX_WIDTH > MAX_HEIGHT ? MAX_WIDTH : MAX_HEIGHT) #define DEFAULT_WIDTH 640 #define DEFAULT_HEIGHT 480 /* Palette area layout */ #define PALETTE_SWATCH_X 25 #define PALETTE_SWATCH_Y 1 #define PALETTE_SWATCH_W 26 #define PALETTE_SWATCH_H 16 #define PALETTE_INDEX_X 0 #define PALETTE_INDEX_DY 5 #define PALETTE_DIGIT_W 7 #define PALETTE_DIGIT_H 7 #define PALETTE_CROSS_X 53 #define PALETTE_CROSS_DX 4 #define PALETTE_CROSS_DY 4 #define PALETTE_CROSS_W 8 #define PALETTE_CROSS_H 8 #define PALETTE_WIDTH 70 #define PALETTE_W3 (PALETTE_WIDTH * 3) #define PALETTE_HEIGHT (PALETTE_SWATCH_H * 256 + PALETTE_SWATCH_Y * 2) #define PATCH_WIDTH 324 #define PATCH_HEIGHT 324 #define TOOL_SQUARE 0 #define TOOL_CIRCLE 1 #define TOOL_HORIZONTAL 2 #define TOOL_VERTICAL 3 #define TOOL_SLASH 4 #define TOOL_BACKSLASH 5 #define TOOL_SPRAY 6 #define TOOL_SHUFFLE 7 #define TOOL_FLOOD 8 #define TOOL_SELECT 9 #define TOOL_LINE 10 #define TOOL_SMUDGE 11 #define TOOL_POLYGON 12 #define TOOL_CLONE 13 #define TOOL_GRADIENT 14 #define TOTAL_CURSORS 15 #define NO_PERIM(T) (((T) == TOOL_FLOOD) || ((T) == TOOL_SELECT) || \ ((T) == TOOL_POLYGON) || ((T) == TOOL_GRADIENT)) #define PROGRESS_LIM 262144 #define CHN_IMAGE 0 #define CHN_ALPHA 1 #define CHN_SEL 2 #define CHN_MASK 3 #define NUM_CHANNELS 4 #define CMASK_NONE 0 #define CMASK_IMAGE (1 << CHN_IMAGE) #define CMASK_RGBA ((1 << CHN_IMAGE) | (1 << CHN_ALPHA)) #define CMASK_ALL ((1 << NUM_CHANNELS) - 1) #define CMASK_CURR (1 << mem_channel) #define CMASK_FOR(A) (1 << (A)) #define CMASK_CLIP ((1 << CHN_IMAGE) | (1 << CHN_ALPHA) | (1 << CHN_SEL)) #define SIZEOF_PALETTE (256 * sizeof(png_color)) // Both limits should be powers of two #define FRAMES_MIN 16 #define FRAMES_MAX (1024 * 1024) /* A million frames should be QUITE enough */ /* Frame flags */ #define FM_DISPOSAL 3 /* Disposal mask */ #define FM_DISP_REMOVE 0 /* Remove (make transparent) (default) */ #define FM_DISP_LEAVE 1 /* Leave in place */ #define FM_DISP_RESTORE 2 /* Restore to previous state */ #define FM_NUKE 4 /* Delete this frame at earliest opportunity */ /* Undo data types */ #define UD_FILENAME 0 /* Filename */ #define UD_TEMPFILES 1 /* Temp files list */ #define NUM_UTYPES 2 /* Should be no larger than 32 */ // List in here all types which need freeing #define UD_FREE_MASK (1 << UD_FILENAME) typedef unsigned char *chanlist[NUM_CHANNELS]; typedef struct { chanlist img; png_color *pal; int width, height; int x, y, delay; short cols, bpp, trans; unsigned short flags; } image_frame; typedef struct { image_frame *frames; // Pointer to frames array png_color *pal; // Default palette int cur; // Index of current frame int cnt; // Number of frames in use int max; // Total number of frame slots size_t size; // Total used memory (0 means count it anew) } frameset; typedef struct { unsigned int map; void *store[NUM_UTYPES]; } undo_data; typedef struct { chanlist img; png_color *pal_; unsigned char *tileptr; undo_data *dataptr; size_t size; int width, height, flags; short cols, bpp, trans; } undo_item; typedef struct { undo_item *items; // Pointer to undo images + current image being edited int pointer; // Index of currently used image on canvas/screen int done; // Undo images that we have behind current image (i.e. possible UNDO) int redo; // Undo images that we have ahead of current image (i.e. possible REDO) int max; // Total number of undo slots size_t size; // Total used memory (0 means count it anew) } undo_stack; typedef struct { chanlist img; // Array of pointers to image channels png_color pal[256]; // RGB entries for all 256 palette colours int cols; // Number of colours in the palette: 1..256 or 0 for no image int bpp; // Bytes per pixel = 1 or 3 int trans; // Transparent colour index (-1 if none) int width, height; // Image geometry undo_stack undo_; // Image's undo stack char *filename; // File name of file loaded/saved void *tempfiles; // List of up-to-date temp files int changed; // Changed since last load/save flag } image_info; typedef struct { int channel; // Current active channel int ics; // Has the centre been set by the user? float ic[2]; // Current centre x,y int tool_pat; // Tool pattern number int xbm_hot_x, xbm_hot_y; // Current XBM hot spot char prot_mask[256]; // 256 bytes used for indexed images int prot; // Number of protected colours in prot_RGB int prot_RGB[256]; // Up to 256 RGB colours protected int col_[2]; // Index for colour A & B png_color col_24[2]; // RGB for colour A & B } image_state; /// GRADIENTS #define MAX_GRAD 65536 #define GRAD_POINTS 256 typedef struct { /* Base values */ int status, xy[4]; // Gradient placement tool int len, rep, ofs; // Gradient length, repeat, and offset int gmode, rmode; // Gradient mode and repeat mode /* Derived values */ double wrep, wil1, wil2, xv, yv, wa; int wmode, wrmode; } grad_info; typedef struct { char gtype, otype; // Main and opacity gradient types char grev, orev; // Main and opacity reversal flags int vslen, oplen; // Current gradient lengths int cvslen, coplen; // Custom gradient lengths unsigned char *vs, *vsmap; // Current gradient data unsigned char *op, *opmap; // Current gradient opacities } grad_map; typedef unsigned char grad_store[(6 + NUM_CHANNELS * 4) * GRAD_POINTS]; grad_info gradient[NUM_CHANNELS]; // Per-channel gradient placement double grad_path, grad_x0, grad_y0; // Stroke gradient temporaries grad_map graddata[NUM_CHANNELS + 1]; // RGB + per-channel gradient data grad_store gradbytes; // Storage space for custom gradients int grad_opacity; // Preview opacity /* Gradient modes */ #define GRAD_MODE_NONE 0 #define GRAD_MODE_BURST 1 #define GRAD_MODE_LINEAR 2 #define GRAD_MODE_BILINEAR 3 #define GRAD_MODE_RADIAL 4 #define GRAD_MODE_SQUARE 5 #define GRAD_MODE_ANGULAR 6 #define GRAD_MODE_CONICAL 7 /* Boundary conditions */ #define GRAD_BOUND_STOP 0 #define GRAD_BOUND_LEVEL 1 #define GRAD_BOUND_REPEAT 2 #define GRAD_BOUND_MIRROR 3 #define GRAD_BOUND_STOP_A 4 /* Stop mode for angular gradient */ #define GRAD_BOUND_REP_A 5 /* Repeat mode for same */ /* Gradient types */ #define GRAD_TYPE_RGB 0 #define GRAD_TYPE_SRGB 1 #define GRAD_TYPE_HSV 2 #define GRAD_TYPE_BK_HSV 3 #define GRAD_TYPE_CONST 4 #define GRAD_TYPE_CUSTOM 5 #define STROKE_GRADIENT (mem_gradient && (gradient[mem_channel].status == GRAD_NONE)) /// Bayer ordered dithering const unsigned char bayer[16]; #define BAYER_MASK 15 /* Use 16x16 matrix */ #define BAYER(x,y) (bayer[((x) ^ (y)) & BAYER_MASK] * 2 + bayer[(y) & BAYER_MASK]) /// Tint tool - contributed by Dmitry Groshev, January 2006 int tint_mode[3]; // [0] = off/on, [1] = add/subtract, [2] = button (none, left, middle, right : 0-3) int mem_cselect; int mem_blend; int mem_unmask; int mem_gradient; /// BLEND MODE int blend_mode; /* Blend modes */ enum { /* RGB-only modes */ BLEND_NORMAL = 0, BLEND_HUE, BLEND_SAT, BLEND_VALUE, BLEND_COLOR, BLEND_SATPP, /* Per-channel modes */ BLEND_MULT, BLEND_DIV, BLEND_SCREEN, // !!! No "Overlay" - it is a reverse "Hard Light" BLEND_DODGE, BLEND_BURN, BLEND_HLIGHT, BLEND_SLIGHT, BLEND_DIFF, BLEND_DARK, BLEND_LIGHT, BLEND_GRAINX, BLEND_GRAINM, BLEND_NMODES }; #define BLEND_1BPP BLEND_MULT /* First one-byte mode */ #define BLEND_MMASK 0x7F #define BLEND_REVERSE 0x80 #define BLEND_RGBSHIFT 8 /// FLOOD FILL SETTINGS double flood_step; int flood_cube, flood_img, flood_slide; int smudge_mode; int posterize_mode; // bitwise/truncated/rounded /// QUANTIZATION SETTINGS int quan_sqrt; // "Diameter based weighting" - use sqrt of pixel count /// IMAGE #define MIN_UNDO 11 // Number of undo levels + 1 #define DEF_UNDO 101 #define MAX_UNDO 1001 int mem_undo_depth; // Current undo depth image_info mem_image; // Current image #define mem_img mem_image.img #define mem_pal mem_image.pal #define mem_cols mem_image.cols #define mem_img_bpp mem_image.bpp #define mem_xpm_trans mem_image.trans #define mem_width mem_image.width #define mem_height mem_image.height #define mem_undo_im_ mem_image.undo_.items #define mem_undo_pointer mem_image.undo_.pointer #define mem_undo_done mem_image.undo_.done #define mem_undo_redo mem_image.undo_.redo #define mem_undo_max mem_image.undo_.max #define mem_filename mem_image.filename #define mem_tempfiles mem_image.tempfiles #define mem_changed mem_image.changed image_info mem_clip; // Current clipboard #define mem_clipboard mem_clip.img[CHN_IMAGE] #define mem_clip_alpha mem_clip.img[CHN_ALPHA] #define mem_clip_mask mem_clip.img[CHN_SEL] #define mem_clip_bpp mem_clip.bpp #define mem_clip_w mem_clip.width #define mem_clip_h mem_clip.height // Always use undo slot #1 for clipboard backup #define OLD_CLIP 1 // mem_clip.undo_.done == 0 means no backup clipboard #define HAVE_OLD_CLIP (mem_clip.undo_.done) #define mem_clip_real_img mem_clip.undo_.items[OLD_CLIP].img #define mem_clip_real_w mem_clip.undo_.items[OLD_CLIP].width #define mem_clip_real_h mem_clip.undo_.items[OLD_CLIP].height #define mem_clip_real_clear() mem_free_image(&mem_clip, FREE_UNDO) // Repurpose the field #define mem_clip_paletted mem_clip.changed #define mem_clip_pal mem_clip.pal image_state mem_state; // Current edit settings #define mem_channel mem_state.channel #define mem_ic mem_state.ic #define mem_icx mem_state.ic[0] #define mem_icy mem_state.ic[1] #define mem_ics mem_state.ics #define mem_tool_pat mem_state.tool_pat #define mem_xbm_hot_x mem_state.xbm_hot_x #define mem_xbm_hot_y mem_state.xbm_hot_y #define mem_prot_mask mem_state.prot_mask #define mem_prot_RGB mem_state.prot_RGB #define mem_prot mem_state.prot #define mem_col_ mem_state.col_ #define mem_col_A mem_state.col_[0] #define mem_col_B mem_state.col_[1] #define mem_col_24 mem_state.col_24 #define mem_col_A24 mem_state.col_24[0] #define mem_col_B24 mem_state.col_24[1] int mem_clip_x, mem_clip_y; // Clipboard location on canvas extern unsigned char mem_brushes[]; // Preset brushes image int mem_brush_list[81][3]; // Preset brushes parameters int mem_nudge; // Nudge pixels per SHIFT+Arrow key during selection/paste int mem_prev_bcsp[6]; // BR, CO, SA, POSTERIZE, GAMMA, Hue int mem_undo_limit; // Max MB memory allocation limit int mem_undo_common; // Percent of undo space in common arena int mem_undo_opacity; // Use previous image for opacity calculations? /// PATTERNS unsigned char mem_pattern[8 * 8]; // Current pattern unsigned char mem_col_pat[8 * 8]; // Indexed 8x8 colourised pattern using colours A & B unsigned char mem_col_pat24[8 * 8 * 3]; // RGB 8x8 colourised pattern using colours A & B /// TOOLS typedef struct { int type, brush; int var[3]; // Size, flow, opacity } tool_info; tool_info tool_state; #define tool_type tool_state.type /* Currently selected tool */ #define brush_type tool_state.brush /* Last brush tool type */ #define tool_size tool_state.var[0] #define tool_flow tool_state.var[1] #define tool_opacity tool_state.var[2] /* Opacity - 255 = solid */ int pen_down; // Are we drawing? - Used to see if we need to do an UNDO int tool_ox, tool_oy; // Previous tool coords - used by continuous mode int mem_continuous; // Area we painting the static shapes continuously? /// PREVIEW int mem_brcosa_allow[3]; // BRCOSA RGB /// PALETTE png_color mem_pal_def[256]; // Default palette entries for new image int mem_pal_def_i; // Items in default palette extern unsigned char mem_pals[]; // RGB screen memory holding current palette int mem_background; // Non paintable area int mem_histogram[256]; /// Next power of two static inline unsigned int nextpow2(unsigned int n) { n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; #if UINT_MAX > 0xFFFFFFFFUL n |= n >> 32; #endif return (n + 1); } // Number of set bits static inline unsigned int bitcount(unsigned int n) { unsigned int m; #if UINT_MAX > 0xFFFFFFFFUL n -= (n >> 1) & 0x5555555555555555ULL; m = n & 0xCCCCCCCCCCCCCCCCULL; n = (n ^ m) + (m >> 2); n = (n + (n >> 4)) & 0x0F0F0F0F0F0F0F0FULL; n = (n + (n >> 8)) & 0x00FF00FF00FF00FFULL; n = (n + (n >> 16)) & 0x0000FFFF0000FFFFULL; n = (n + (n >> 32)) & 0x00000000FFFFFFFFULL; #else n -= (n >> 1) & 0x55555555; m = n & 0x33333333; n = m + ((n ^ m) >> 2); n = (n + (n >> 4)) & 0x0F0F0F0F; n = (n + (n >> 8)) & 0x00FF00FF; n = (n + (n >> 16)) & 0x0000FFFF; #endif return (n); } /// Floored integer division static inline int floor_div(int dd, int dr) { return (dd / dr - (dd % dr < 0)); // optimizes to perfection on x86 } /// Table-based translation static inline void do_xlate(unsigned char *xlat, unsigned char *data, int len) { int i; for (i = 0; i < len; i++) data[i] = xlat[data[i]]; } /// Copying "x0y0x1y1" quad #define copy4(D,S) memcpy(D, S, 4 * sizeof(int)) /// Block allocator typedef struct { char *block; unsigned int here, size; unsigned int minsize, incr; } wjmem; wjmem *wjmemnew(int size, int incr); void wjmemfree(wjmem *mem); void *wjmalloc(wjmem *mem, int size, int align); /// Multiblock allocator #define MA_ALIGN_MASK 0x03 /* For alignment constraints */ #define MA_ALIGN_DEFAULT 0x00 #define MA_ALIGN_DOUBLE 0x01 #define MA_SKIP_ZEROSIZE 0x04 /* Leave pointers to zero-size areas unchanged */ void *multialloc(int flags, void *ptr, int size, ...); /// Vectorized low-level drawing functions void (*put_pixel)(int x, int y); void (*put_pixel_row)(int x, int y, int len, unsigned char *xsel); // Intersect two rectangles int clip(int *rxy, int x0, int y0, int x1, int y1, const int *vxy); // Intersect outer & inner rectangle, write out what it separates into int clip4(int *rect04, int xo, int yo, int wo, int ho, int xi, int yi, int wi, int hi); /// Line iterator /* Indices 0 and 1 are current X and Y, 2 is number of pixels remaining */ typedef int linedata[10]; void line_init(linedata line, int x0, int y0, int x1, int y1); int line_step(linedata line); void line_nudge(linedata line, int x, int y); int line_clip(linedata line, const int *vxy, int *step); void line_flip(linedata line); /// Procedures // Add one more frame to a frameset int mem_add_frame(frameset *fset, int w, int h, int bpp, int cmask, png_color *pal); // Remove specified frame from a frameset void mem_remove_frame(frameset *fset, int frame); // Empty a frameset void mem_free_frames(frameset *fset); void init_istate(image_state *state, image_info *image); // Set initial state of image variables void mem_replace_filename(int layer, char *fname); // Change layer's filename void mem_file_modified(char *fname); // Label file's frames in current layer as changed int init_undo(undo_stack *ustack, int depth); // Create new undo stack of a given depth void update_undo_depth(); // Resize all undo stacks void mem_free_chanlist(chanlist img); int cmask_from(chanlist img); // Chanlist to cmask int mem_count_all_cols(); // Count all colours - Using main image int mem_count_all_cols_real(unsigned char *im, int w, int h); // Count all colours - very memory greedy int mem_cols_used(int max_count); // Count colours used in main RGB image int mem_cols_used_real(unsigned char *im, int w, int h, int max_count, int prog); // Count colours used in RGB chunk and dump to found table void mem_cols_found(png_color *userpal); // Convert colours list into palette #define FREE_IMAGE 1 #define FREE_UNDO 2 #define FREE_ALL 3 // Clear/remove image data void mem_free_image(image_info *image, int mode); #define AI_COPY 1 /* Duplicate source channels, not insert them */ #define AI_NOINIT 2 /* Do not initialize source-less channels */ #define AI_CLEAR 4 /* Initialize image structure first */ // Allocate new image data int mem_alloc_image(int mode, image_info *image, int w, int h, int bpp, int cmask, image_info *src); // Allocate space for new image, removing old if needed int mem_new( int width, int height, int bpp, int cmask ); // Allocate new clipboard, removing or preserving old as needed int mem_clip_new(int width, int height, int bpp, int cmask, int backup); int load_def_palette(char *name); int load_def_patterns(char *name); void mem_init(); // Initialise memory // Return the number of bytes used in image + undo stuff size_t mem_used(); // Return the number of bytes used in image + undo in all layers size_t mem_used_layers(); #define FX_EDGE 0 #define FX_EMBOSS 2 #define FX_SHARPEN 3 #define FX_SOFTEN 4 #define FX_SOBEL 5 #define FX_PREWITT 6 #define FX_GRADIENT 7 #define FX_ROBERTS 8 #define FX_LAPLACE 9 #define FX_KIRSCH 10 #define FX_ERODE 11 #define FX_DILATE 12 #define FX_MORPHEDGE 13 void do_effect( int type, int param ); // 0=edge detect 1=UNUSED 2=emboss void mem_bacteria( int val ); // Apply bacteria effect val times the canvas area void mem_gauss(double radiusX, double radiusY, int gcor); void mem_unsharp(double radius, double amount, int threshold, int gcor); void mem_dog(double radiusW, double radiusN, int norm, int gcor); void mem_kuwahara(int r, int gcor, int detail); /* Colorspaces */ #define CSPACE_RGB 0 #define CSPACE_SRGB 1 #define CSPACE_LXN 2 #define NUM_CSPACES 3 /* Distance measures */ #define DIST_LINF 0 /* Largest absolute difference (Linf measure) */ #define DIST_L1 1 /* Sum of absolute differences (L1 measure) */ #define DIST_L2 2 /* Euclidean distance (L2 measure) */ #define NUM_DISTANCES 3 /// PALETTE PROCS void mem_pal_load_def(); // Load default palette #define mem_pal_copy(A, B) memcpy((A), (B), SIZEOF_PALETTE) void mem_pal_init(); // Initialise whole of palette RGB void mem_greyscale(int gcor); // Convert image to greyscale void do_convert_rgb(int start, int step, int cnt, unsigned char *dest, unsigned char *src, png_color *pal); int mem_convert_rgb(); // Convert image to RGB int mem_convert_indexed(); // Convert image to Indexed Palette // Quantize image using Max-Min algorithm int maxminquan(unsigned char *inbuf, int width, int height, int quant_to, png_color *userpal); // Quantize image using PNN algorithm int pnnquan(unsigned char *inbuf, int width, int height, int quant_to, png_color *userpal); // Convert RGB->indexed using error diffusion with variety of options int mem_dither(unsigned char *old, int ncols, short *dither, int cspace, int dist, int limit, int selc, int serpent, int rgb8b, double emult); // Do the same in dumb but fast way int mem_dumb_dither(unsigned char *old, unsigned char *new, png_color *pal, int width, int height, int ncols, int dither); // Set up colors A, B, and pattern for dithering a given RGB color void mem_find_dither(int red, int green, int blue); // Convert image to Indexed Palette using quantize int mem_quantize( unsigned char *old_mem_image, int target_cols, int type ); void mem_invert(); // Invert the palette void mem_mask_setall(char val); // Clear/set all masks void mem_mask_init(); // Initialise RGB protection mask int mem_protected_RGB(int intcol); // Is this intcol in list? void mem_swap_cols(int redraw); // Swaps colours and update memory void mem_set_trans(int trans); // Set transparent colour and update void mem_get_histogram(int channel); // Calculate how many of each colour index is on the canvas int scan_duplicates(); // Find duplicate palette colours void remove_duplicates(); // Remove duplicate palette colours - call AFTER scan_duplicates int mem_remove_unused_check(); // Check to see if we can remove unused palette colours int mem_remove_unused(); // Remove unused palette colours void mem_bw_pal(png_color *pal, int i1, int i2); // Generate black-to-white palette // Create colour-transformed palette void transform_pal(png_color *pal1, png_color *pal2, int p1, int p2); void mem_pal_sort( int a, int i1, int i2, int rev ); // Sort colours in palette 0=luminance, 1=RGB void mem_pal_index_move( int c1, int c2 ); // Move index c1 to c2 and shuffle in between up/down void mem_canvas_index_move( int c1, int c2 ); // Similar to palette item move but reworks canvas pixels void set_zoom_centre( int x, int y ); // Nonclassical HSV: H is 0..6, S is 0..1, V is 0..255 void rgb2hsv(unsigned char *rgb, double *hsv); void hsv2rgb(unsigned char *rgb, double *hsv); //// UNDO enum { UNDO_PAL = 0, /* Palette changes */ UNDO_XPAL, /* Palette and indexed image changes */ UNDO_COL, /* Palette and/or RGB image changes */ UNDO_DRAW, /* Changes to current channel / RGBA */ UNDO_INV, /* "Invert" operation */ UNDO_XFORM, /* Changes to all channels */ UNDO_FILT, /* Changes to current channel */ UNDO_PASTE, /* Paste operation (current / RGBA) */ UNDO_TOOL, /* Same as UNDO_DRAW but respects pen_down */ UNDO_TRANS /* Transparent colour change (cumulative) */ }; void mem_undo_next(int mode); // Call this after a draw event but before any changes to image // Get address of previous channel data (or current if none) unsigned char *mem_undo_previous(int channel); void mem_undo_prepare(); // Call this after changes to image, to compress last frame void mem_undo_backward(); // UNDO requested by user void mem_undo_forward(); // REDO requested by user #define UC_CREATE 0x01 /* Force create */ #define UC_NOCOPY 0x02 /* Forbid copy */ #define UC_DELETE 0x04 /* Force delete */ #define UC_PENDOWN 0x08 /* Respect pen_down */ #define UC_GETMEM 0x10 /* Get memory and do nothing */ #define UC_ACCUM 0x20 /* Cumulative change */ int undo_next_core(int mode, int new_width, int new_height, int new_bpp, int cmask); void update_undo(image_info *image); // Copy image state into current undo frame // Try to allocate a memory block, releasing undo frames if needed void *mem_try_malloc(size_t size); //// Drawing Primitives int sb_rect[4]; // Backbuffer placement int init_sb(); // Create shapeburst backbuffer void render_sb(unsigned char *mask); // Render from shapeburst backbuffer int mem_clip_mask_init(unsigned char val); // Initialise the clipboard mask // Extract alpha info from RGB clipboard int mem_scale_alpha(unsigned char *img, unsigned char *alpha, int width, int height, int mode); void mem_mask_colors(unsigned char *mask, unsigned char *img, unsigned char v, int width, int height, int bpp, int col0, int col1); void mem_clip_mask_set(unsigned char val); // Mask colours A and B on the clipboard void mem_clip_mask_clear(); // Clear the clipboard mask void do_clone(int ox, int oy, int nx, int ny, int opacity, int mode); #define mem_smudge(A, B, C, D) do_clone((A), (B), (C), (D), tool_opacity / 2, \ smudge_mode && mem_undo_opacity) #define mem_clone(A, B, C, D) do_clone((A), (B), (C), (D), tool_opacity, \ mem_undo_opacity) // Apply colour transform void do_transform(int start, int step, int cnt, unsigned char *mask, unsigned char *imgr, unsigned char *img0); void mem_flip_v(char *mem, char *tmp, int w, int h, int bpp); // Flip image vertically void mem_flip_h( char *mem, int w, int h, int bpp ); // Flip image horizontally int mem_sel_rot( int dir ); // Rotate clipboard 90 degrees int mem_image_rot( int dir ); // Rotate canvas 90 degrees // Get new image geometry of rotation. angle = degrees void mem_rotate_geometry(int ow, int oh, double angle, int *nw, int *nh); // Rotate canvas or clipboard by any angle (degrees) int mem_rotate_free(double angle, int type, int gcor, int clipboard); void mem_rotate_free_real(chanlist old_img, chanlist new_img, int ow, int oh, int nw, int nh, int bpp, double angle, int mode, int gcor, int dis_a, int silent); #define BOUND_MIRROR 0 /* Mirror image beyond edges */ #define BOUND_TILE 1 /* Tiled image beyond edges */ #define BOUND_VOID 2 /* Transparency beyond edges */ // Scale image int mem_image_scale(int nw, int nh, int type, int gcor, int sharp, int bound); int mem_image_scale_real(chanlist old_img, int ow, int oh, int bpp, chanlist new_img, int nw, int nh, int type, int gcor, int sharp); int mem_image_resize(int nw, int nh, int ox, int oy, int mode); // Resize image int mem_isometrics(int type); void mem_threshold(unsigned char *img, int len, int level); // Threshold channel values void mem_demultiply(unsigned char *img, unsigned char *alpha, int len, int bpp); void set_xlate(unsigned char *xlat, int bpp); // Build bitdepth translation table int is_filled(unsigned char *data, unsigned char val, int len); // Check if byte array is all one value void flood_fill( int x, int y, unsigned int target ); void sline( int x1, int y1, int x2, int y2 ); // Draw single thickness straight line void tline( int x1, int y1, int x2, int y2, int size ); // Draw size thickness straight line void g_para( int x1, int y1, int x2, int y2, int xv, int yv ); // Draw general parallelogram void f_rectangle( int x, int y, int w, int h ); // Draw a filled rectangle void f_circle( int x, int y, int r ); // Draw a filled circle void mem_ellipse( int x1, int y1, int x2, int y2, int thick ); // Thickness 0 means filled // Draw whatever is bounded by two pairs of lines void draw_quad(linedata line1, linedata line2, linedata line3, linedata line4); // A couple of shorthands to get an int representation of an RGB colour #define PNG_2_INT(P) (((P).red << 16) + ((P).green << 8) + ((P).blue)) #define MEM_2_INT(M,I) (((M)[(I)] << 16) + ((M)[(I) + 1] << 8) + (M)[(I) + 2]) #define INT_2_R(A) ((A) >> 16) #define INT_2_G(A) (((A) >> 8) & 0xFF) #define INT_2_B(A) ((A) & 0xFF) #define RGB_2_INT(R,G,B) (((R) << 16) + ((G) << 8) + (B)) #define MEM_BPP (mem_channel == CHN_IMAGE ? mem_img_bpp : 1) #define BPP(x) ((x) == CHN_IMAGE ? mem_img_bpp : 1) #define IS_INDEXED ((mem_channel == CHN_IMAGE) && (mem_img_bpp == 1)) /* Whether process_img() needs extra buffer passed in */ #define NEED_XBUF_DRAW (mem_blend && (blend_mode & BLEND_MMASK)) #define NEED_XBUF_PASTE (NEED_XBUF_DRAW || \ ((mem_channel == CHN_IMAGE) && (mem_clip_bpp < mem_img_bpp))) void prep_mask(int start, int step, int cnt, unsigned char *mask, unsigned char *mask0, unsigned char *img0); void process_mask(int start, int step, int cnt, unsigned char *mask, unsigned char *alphar, unsigned char *alpha0, unsigned char *alpha, unsigned char *trans, int opacity, int noalpha); void process_img(int start, int step, int cnt, unsigned char *mask, unsigned char *imgr, unsigned char *img0, unsigned char *img, unsigned char *xbuf, int bpp, int opacity); // opacity value is ignored void copy_area(image_info *dest, image_info *src, int x, int y); // Retroactive masking - by blending with undo frame void mask_merge(unsigned char *old, int channel, unsigned char *mask); int pixel_protected(int x, int y); // generic void row_protected(int x, int y, int len, unsigned char *mask); void put_pixel_def( int x, int y ); // generic void put_pixel_row_def(int x, int y, int len, unsigned char *xsel); // generic int get_pixel( int x, int y ); // generic int get_pixel_RGB( int x, int y ); // converter int get_pixel_img( int x, int y ); // from image int grad_value(int *dest, int slot, double x); void grad_pixels(int start, int step, int cnt, int x, int y, unsigned char *mask, unsigned char *op0, unsigned char *img0, unsigned char *alpha0); void grad_update(grad_info *grad); void gmap_setup(grad_map *gmap, grad_store gstore, int slot); void grad_def_update(int slot); #define GRAD_CUSTOM_DATA(X) ((X) ? GRAD_POINTS * ((X) * 4 + 2) : 0) #define GRAD_CUSTOM_DMAP(X) (GRAD_POINTS * ((X) * 4 + 3)) #define GRAD_CUSTOM_OPAC(X) (GRAD_POINTS * ((X) * 4 + 4)) #define GRAD_CUSTOM_OMAP(X) (GRAD_POINTS * ((X) * 4 + 5)) void blend_indexed(int start, int step, int cnt, unsigned char *rgb, unsigned char *img0, unsigned char *img, unsigned char *alpha0, unsigned char *alpha, int opacity); // Select colors nearest to A->B gradient int mem_pick_gradient(unsigned char *buf, int cspace, int mode); int mem_skew(double xskew, double yskew, int type, int gcor); int average_pixels(unsigned char *rgb, int iw, int ih, int x, int y, int w, int h); //// SEGMENTATION #define SEG_PROGRESS 1 typedef struct { int which; // Pixel index * 2 + (0 if right / 1 if down) float diff; } seg_edge; typedef struct { unsigned int group, cnt; unsigned char rank; // Value is logarithmic, so this is more than enough // unsigned char reserved[3]; float threshold; } seg_pixel; typedef struct { /* Working set */ seg_edge *edges; seg_pixel *pix; int w, h, cnt; int phase; // Which phase is currently valid /* Parameters */ int minrank; int minsize; double threshold; } seg_state; seg_state *mem_seg_prepare(seg_state *s, unsigned char *img, int w, int h, int flags, int cspace, int dist); int mem_seg_process_chunk(int start, int cnt, seg_state *s); int mem_seg_process(seg_state *s); double mem_seg_threshold(seg_state *s); void mem_seg_scan(unsigned char *dest, int y, int x, int w, int zoom, const seg_state *s); void mem_seg_render(unsigned char *img, const seg_state *s); #define IF_IN_RANGE( x, y ) if ( x>=0 && y>=0 && xc ) a=b; else a=c; /* * Win32 libc (MSVCRT.DLL) violates the C standard as to malloc()'ed memory * alignment; this macro serves as part of a workaround for that problem */ #ifdef WIN32 /* In Win32, pointers fit into ints */ #define ALIGN(p) ((void *)(((int)(p) + sizeof(double) - 1) & (-sizeof(double)))) #else #define ALIGN(p) ((void *)(p)) #endif /* Reasonably portable pointer alignment macro */ #define ALIGNED(P, N) ((void *)((char *)(P) + \ ((~(unsigned)((char *)(P) - (char *)0) + 1) & ((N) - 1)))) /* Get preferred alignment of a type */ #ifdef __GNUC__ /* Have native implementation */ #define ALIGNOF(X) __alignof__(X) #else #define ALIGNOF(X) offsetof(struct {char c; X x;}, x) #endif /* x87 FPU uses long doubles internally, which may cause calculation results * to depend on emitted assembly code, and change in mysterious ways depending * on source structure and current optimizations. * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 * SSE math works with doubles and floats natively, so is free from this * instability, while a bit less precise. * We aren't requiring C99 yet, so use GCC's define instead of the C99-standard * "FLT_EVAL_METHOD" from float.h for deciding which mode is used. */ #undef NATIVE_DOUBLES #if defined(__FLT_EVAL_METHOD__) && ((__FLT_EVAL_METHOD__ == 0) || (__FLT_EVAL_METHOD__ == 1)) #define NATIVE_DOUBLES #endif /* * rint() function rounds halfway cases (0.5 etc.) to even, which may cause * weird results in geometry calculations. And straightforward (int)(X + 0.5) * may be affected by double-rounding issues on x87 FPU - and in case floor() * is implemented as compiler intrinsic, the same can happen with it too. * These macros are for when neither is acceptable. */ #ifndef NATIVE_DOUBLES /* Have extra precision */ #define WJ_ROUND(I,X) \ { \ const volatile double RounD___ = (X); \ (I) = (int)(RounD___ + 0.5); \ } #define WJ_FLOOR(I,X) \ { \ const volatile double RounD___ = (X); \ (I) = floor(RounD___); \ } #else /* Doubles are doubles */ #define WJ_ROUND(I,X) (I) = (int)((X) + 0.5) #define WJ_FLOOR(I,X) (I) = floor(X) #endif /* Tell GCC to remain silent about an uninitialized variable */ #define uninit_(X) X = X mtpaint-3.40/src/thread.c0000644000175000000620000002470111473226773014655 0ustar muammarstaff/* thread.c Copyright (C) 2009-2010 Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "thread.h" int maxthreads; #ifdef U_THREADS #include #if GTK_MAJOR_VERSION == 1 #ifdef G_THREADS_IMPL_POSIX #include #include #else #error "Non-POSIX threads not supported with GTK+1" #endif #endif /* Determine number of CPUs/cores */ static int ncores; #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include static int numcpus() { SYSTEM_INFO info; GetSystemInfo(&info); return (info.dwNumberOfProcessors); } #else static int numcpus() { #ifdef _SC_NPROCESSORS_ONLN return (sysconf(_SC_NPROCESSORS_ONLN)); #elif defined _SC_NPROC_ONLN return (sysconf(_SC_NPROC_ONLN)); #elif defined _SC_CRAY_NCPU return (sysconf(_SC_CRAY_NCPU)); #else return (1); #endif } #endif #define THREAD_ALIGN 128 #define THREAD_DEALIGN 4096 int image_threads(int w, int h) { int n = h / 3; // This can overflow, but mtPaint is unlikely to handle a 8+ Tb image anyway :-) int m = ((size_t)w * h) / (THREAD_DEALIGN + THREAD_ALIGN); return (n < m ? n : m); } /* This function takes *two* variable-length NULL-terminated sequences of * pointer/size pairs; the first sequence describes shared buffers, the * second, thread-local ones. * The memory block it allocates is set up the following way: * - threaddata structure with array of tcb pointers; * - shared buffers (aligned); * - tcb (thread-aligned) for main thread; * - data block (thread-aligned) for main thread; * - private buffers (aligned) for main thread; * - the same for each aux thread in order. */ threaddata *talloc(int flags, int tmax, void *data, int dsize, ...) { va_list args; threaddata *res; char *tmp, *tm2, *tcb0, *tdata; tcb *thread; size_t align = 0, talign = THREAD_ALIGN; size_t sz, tdsz, sharesz, threadsz; int i, nt; if (!tmax) /* Number of threads is whatever fits the current image */ tmax = image_threads(mem_width, mem_height); if (!(nt = maxthreads)) /* Use as many threads as there are cores */ { if (!ncores) /* Autodetect number of cores */ { ncores = numcpus(); if (ncores < 1) ncores = 1; } nt = ncores; } if (tmax > nt) tmax = nt; else if (tmax < 1) tmax = 1; if ((flags & MA_ALIGN_MASK) == MA_ALIGN_DOUBLE) align = sizeof(double) - 1; /* Uncomment if data alignment ever exceeds cache line size */ /* if (align >= talign) talign = align + 1; */ /* Calculate space */ va_start(args, dsize); sharesz = 0; while (va_arg(args, void *)) { sharesz = (sharesz + align) & ~align; sharesz += va_arg(args, int); } threadsz = (sizeof(tcb) + talign - 1) & ~(talign - 1); threadsz += dsize; while (va_arg(args, void *)) { threadsz = (threadsz + align) & ~align; threadsz += va_arg(args, int); } threadsz = (threadsz + talign - 1) & ~(talign - 1); if (!(threadsz & (THREAD_DEALIGN - 1))) threadsz += talign; va_end(args); /* Allocate space */ while (TRUE) { tdsz = sizeof(threaddata) + sizeof(tcb *) * (tmax - 1); sz = align ? align + 1 : 0; sz += tdsz + sharesz + talign * 2 + threadsz * tmax; tmp = calloc(1, sz); if (tmp) break; if (!(tmax >>= 1)) return (NULL); } /* Decide what goes where */ res = (void *)tmp; tmp += tdsz; tmp = ALIGNED(tmp, align + 1); // Now points to shared space tcb0 = tmp + sharesz; tcb0 = ALIGNED(tcb0, talign); tm2 = ALIGNED(tcb0, THREAD_DEALIGN); if (tcb0 == tm2) tcb0 += talign; // Now points to tcb0 /* Set up tcbs */ sz = (sizeof(tcb) + talign - 1) & ~(talign - 1); res->count = tmax; for (i = 0; i < tmax; i++) { res->threads[i] = thread = (void *)(tcb0 + threadsz * i); thread->index = i; thread->count = tmax; thread->threads = res->threads; thread->data = (void *)((char *)thread + sz); } /* Set up shared data pointers */ va_start(args, dsize); memcpy(tdata = res->threads[0]->data, data, dsize); sz = 0; while ((tm2 = va_arg(args, void *))) { tdsz = va_arg(args, int); if (!tdsz && (flags & MA_SKIP_ZEROSIZE)) continue; tm2 += tdata - (char *)data; *(void **)tm2 = (void *)(tmp + sz); sz = (sz + tdsz + align) & ~align; } for (i = 1; i < tmax; i++) memcpy(res->threads[i]->data, tdata, dsize); /* Set up private data pointers */ sz = dsize; while ((tmp = va_arg(args, void *))) { tdsz = va_arg(args, int); if (!tdsz && (flags & MA_SKIP_ZEROSIZE)) continue; sz = (sz + align) & ~align; for (i = 0; i < tmax; i++) { tdata = res->threads[i]->data; tm2 = tmp + (tdata - (char *)data); *(void **)tm2 = (void *)(tdata + sz); } sz += tdsz; } va_end(args); /* Copy the data block of thread 0 back, for convenience */ memcpy(data, res->threads[0]->data, dsize); /* Return the prepared block */ return (res); } int thread_progress(tcb *thread) { tcb **tp = thread->threads; int i, j, n = thread->count; for (i = j = 0; i < n; i++) j += tp[i]->progress; if (!progress_update((float)j / thread->tsteps)) return (FALSE); for (i = 0; i < n; i++) tp[i]->stop = TRUE; return (TRUE); } int threads_running; void launch_threads(thread_func thread, threaddata *tdata, char *title, int total) { tcb *tp; clock_t uninit_(before), now; int i, j, n0, n1 = total, flag = FALSE; #if GTK_MAJOR_VERSION == 1 pthread_t tid; pthread_attr_t attr; int attr_failed; attr_failed = pthread_attr_init(&attr) || #ifdef PTHREAD_SCOPE_SYSTEM pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) || #endif pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); #endif /* Launch aux threads */ threads_running = TRUE; for (i = tdata->count - 1; i > 0; i--) { tp = tdata->threads[i]; /* Reinit thread state */ tp->stop = FALSE; tp->stopped = FALSE; tp->progress = 0; /* Allocate work to thread */ tp->step0 = n0 = (n1 * i) / (i + 1); tp->nsteps = n1 - n0; #if GTK_MAJOR_VERSION == 1 if (attr_failed || pthread_create(&tid, &attr, (void *(*)(void *))thread, tp)) #else if (!g_thread_create((GThreadFunc)thread, tp, FALSE, NULL)) #endif tp->stop = TRUE , tp->stopped = TRUE; // Failed to launch else n1 = n0 , flag = TRUE; // Success - work is now being done } threads_running = flag; #if GTK_MAJOR_VERSION == 1 pthread_attr_destroy(&attr); #endif /* Put main thread to work */ tp = tdata->threads[0]; tp->stop = FALSE; tp->stopped = FALSE; tp->progress = 0; tp->step0 = 0; tp->nsteps = n1; tp->tsteps = total; if (title) progress_init(title, 1); /* Let init/end be done outside */ thread(tp); /* Wait for aux threads to finish, or user to cancel the job */ flag = 0; while (TRUE) { for (i = j = 1; i < tdata->count; i++) j += tdata->threads[i]->stopped; if (j >= tdata->count) break; // All threads finished if (tdata->threads[0]->stop) // Cancellation requested { if (!flag) before = clock(); else { now = clock(); if (now - before >= 5 * CLOCKS_PER_SEC) { /* Major catastrophe - hung thread(s) */ flag = 2; break; } } flag |= 1; } thread_progress(tdata->threads[0]); /* Let 'em run */ #if GTK_MAJOR_VERSION == 1 sched_yield(); #else g_thread_yield(); #endif } threads_running = FALSE; if (title) progress_end(); /* !!! Even with OS threading, killing a thread is not supported on some systems, * and if a thread needs killing, it likely has corrupted some data already - WJ */ if (flag > 1) alert_box(_("Error"), _("Helper thread is not responding. Save your work and exit the program."), NULL); } #else /* Multithreading disabled - functions manage one thread only */ threaddata *talloc(int flags, int tmax, void *data, int dsize, ...) { va_list args; threaddata *res; char *tmp, *tm2, *tcb0, *tdata; tcb *thread; size_t align = 0, talign = sizeof(double); size_t sz, tdsz, sharesz, threadsz; if ((flags & MA_ALIGN_MASK) == MA_ALIGN_DOUBLE) align = sizeof(double) - 1; /* Uncomment if data alignment here exceeds sizeof(double) */ /* if (align >= talign) talign = align + 1; */ /* Calculate space */ va_start(args, dsize); sharesz = 0; while (va_arg(args, void *)) { sharesz = (sharesz + align) & ~align; sharesz += va_arg(args, int); } threadsz = (sizeof(tcb) + talign - 1) & ~(talign - 1); threadsz += dsize; while (va_arg(args, void *)) { threadsz = (threadsz + align) & ~align; threadsz += va_arg(args, int); } threadsz = (threadsz + talign - 1) & ~(talign - 1); va_end(args); /* Allocate space */ sz = align ? align + 1 : 0; sz += sizeof(threaddata) + sharesz + talign + threadsz; tmp = calloc(1, sz); if (!tmp) return (NULL); /* Decide what goes where */ res = (void *)tmp; tmp += sizeof(threaddata); tmp = ALIGNED(tmp, align + 1); // Now points to shared space tcb0 = tmp + sharesz; tcb0 = ALIGNED(tcb0, talign); /* Set up one tcb */ sz = (sizeof(tcb) + talign - 1) & ~(talign - 1); res->count = 1; res->threads[0] = thread = (void *)tcb0; thread->index = 0; thread->count = 1; thread->threads = res->threads; thread->data = (void *)((char *)thread + sz); /* Set up shared data pointers */ va_start(args, dsize); memcpy(tdata = res->threads[0]->data, data, dsize); sz = 0; while ((tm2 = va_arg(args, void *))) { tdsz = va_arg(args, int); if (!tdsz && (flags & MA_SKIP_ZEROSIZE)) continue; tm2 += tdata - (char *)data; *(void **)tm2 = (void *)(tmp + sz); sz = (sz + tdsz + align) & ~align; } /* Set up private data pointers */ sz = dsize; while ((tm2 = va_arg(args, void *))) { tdsz = va_arg(args, int); if (!tdsz && (flags & MA_SKIP_ZEROSIZE)) continue; sz = (sz + align) & ~align; tm2 += tdata - (char *)data; *(void **)tm2 = (void *)(tdata + sz); sz += tdsz; } va_end(args); /* Copy the data block back, for convenience */ memcpy(data, res->threads[0]->data, dsize); /* Return the prepared block */ return (res); } void launch_threads(thread_func thread, threaddata *tdata, char *title, int total) { tcb *tp = tdata->threads[0]; tp->step0 = 0; tp->nsteps = total; if (title) progress_init(title, 1); /* Let init/end be done outside */ thread(tp); if (title) progress_end(); } #endif mtpaint-3.40/src/canvas.h0000644000175000000620000002407411560201031014642 0ustar muammarstaff/* canvas.h Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ float can_zoom; // Zoom factor 1..MAX_ZOOM int margin_main_xy[2]; // Top left of image from top left of canvas int margin_view_xy[2]; int zoom_flag; int marq_status, marq_xy[4]; // Selection marquee int marq_drag_x, marq_drag_y; // Marquee dragging offset int line_status, line_xy[4]; // Line tool int poly_status; // Polygon selection tool int clone_x, clone_y; // Clone offsets int recent_files; // Current recent files setting int brush_spacing; // Step in non-continuous mode #define margin_main_x margin_main_xy[0] #define margin_main_y margin_main_xy[1] #define margin_view_x margin_view_xy[0] #define margin_view_y margin_view_xy[1] #define marq_x1 marq_xy[0] #define marq_y1 marq_xy[1] #define marq_x2 marq_xy[2] #define marq_y2 marq_xy[3] #define line_x1 line_xy[0] #define line_y1 line_xy[1] #define line_x2 line_xy[2] #define line_y2 line_xy[3] int preserved_gif_delay, undo_load; #define STATUS_ITEMS 5 #define STATUS_GEOMETRY 0 #define STATUS_CURSORXY 1 #define STATUS_PIXELRGB 2 #define STATUS_SELEGEOM 3 #define STATUS_UNDOREDO 4 GtkWidget *label_bar[STATUS_ITEMS]; int col_reverse, // Painting with right button show_paste, // Show contents of clipboard while pasting status_on[STATUS_ITEMS], // Show status bar items? text_paste, // Are we pasting text? canvas_image_centre, // Are we centering the image? chequers_optimize // Are we optimizing the chequers for speed? ; #define LINE_NONE 0 #define LINE_START 1 #define LINE_LINE 2 #define MARQUEE_NONE 0 #define MARQUEE_SELECTING 1 #define MARQUEE_DONE 2 #define MARQUEE_PASTE 3 #define MARQUEE_PASTE_DRAG 4 #define POLY_NONE 0 #define POLY_SELECTING 1 #define POLY_DRAGGING 2 #define POLY_DONE 3 #define GRAD_NONE 0 #define GRAD_START 1 #define GRAD_END 2 #define GRAD_DONE 3 #define MIN_ZOOM 0.1 #define MAX_ZOOM 20 /* File selector codes */ enum { FS_PNG_LOAD = 1, FS_PNG_SAVE, FS_PALETTE_LOAD, FS_PALETTE_SAVE, FS_CLIP_FILE, FS_EXPORT_UNDO, FS_EXPORT_UNDO2, FS_EXPORT_ASCII, FS_LAYER_SAVE, FS_EXPLODE_FRAMES, FS_EXPORT_GIF, FS_CHANNEL_LOAD, FS_CHANNEL_SAVE, FS_COMPOSITE_SAVE, FS_SELECT_FILE, FS_SELECT_DIR, FS_LAYER_LOAD, FS_PATTERN_LOAD, FS_CLIPBOARD, FS_PALETTE_DEF }; #define FS_ENTRY_KEY "mtPaint.fs_entry" int do_a_load(char *fname, int undo); void canvas_center(float ic[2]); void align_size(float new_zoom); void realign_size(); void init_ls_settings(ls_settings *settings, GtkWidget *box); void fs_setup(GtkWidget *fs, int action_type); void file_selector( int action_type ); void set_new_filename(int layer, char *fname); void main_undo(); void main_redo(); void line_to_gradient(); // Setup gradient along line tool void tool_action(int event, int x, int y, int button, gdouble pressure); // Paint some pixels! void update_menus(); // Update undo/edit menu int close_to( int x1, int y1 ); #define MARQ_SHOW 0 #define MARQ_SNAP 1 /* show+snap */ #define MARQ_HIDE 2 #define MARQ_MOVE 3 /* +snap */ #define MARQ_SIZE 4 /* +snap */ void paint_marquee(int action, int new_x, int new_y, rgbcontext *ctx); // Draw/clear marquee void paint_poly_marquee(rgbcontext *ctx, int whole); // Paint polygon marquee void stretch_poly_line(int x, int y); // Clear old temp line, draw next temp line void update_sel_bar(); // Update selection stats on status bar void update_xy_bar(int x, int y); // Update cursor tracking on status bar void init_status_bar(); // Initialize status bar void pressed_lasso(int cut); void pressed_copy(int cut); void pressed_paste(int centre); void pressed_greyscale(int mode); void pressed_convert_rgb(); void pressed_invert(); void pressed_rectangle(int filled); void pressed_ellipse(int filled); void pressed_edge_detect(); void pressed_sharpen(); void pressed_soften(); void pressed_fx(int what); void pressed_gauss(); void pressed_unsharp(); void pressed_dog(); void pressed_kuwahara(); void pressed_clip_alpha_scale(); void pressed_clip_alphamask(); void pressed_clip_mask(int val); void pressed_clip_mask_all(); void pressed_clip_mask_clear(); void pressed_flip_image_v(); void pressed_flip_image_h(); void pressed_flip_sel_v(); void pressed_flip_sel_h(); void pressed_rotate_image(int dir); void pressed_rotate_sel(int dir); void pressed_rotate_free(); void iso_trans(int mode); void marquee_at(int *rect); // Read marquee location & size void check_marquee(); void commit_paste(int swap, int *update); void repaint_grad(const int *old); // Repaint gradient line and maybe clear old one void repaint_line(const int *old); // Repaint line on canvas and maybe clear old one void refresh_line(int mode, const int *lxy, rgbcontext *ctx); // Refresh a part of line/gradient if needed void register_file( char *filename ); // Called after successful load/save void update_recent_files(); // Update the menu items void update_all_views(); // Update whole canvas on all views void create_default_image(); // Create default new image /// UPDATE STUFF /* Atomic updates */ #define CF_NAME 0x00000001 /* Name in titlebar */ #define CF_GEOM 0x00000002 /* Image geometry */ #define CF_CGEOM 0x00000004 /* Clipboard geometry */ #define CF_PAL 0x00000008 /* Palette */ #define CF_CAB 0x00000010 /* Current channel's A & B (w/redraw) */ #define CF_AB 0x00000020 /* Colors A & B */ #define CF_GRAD 0x00000040 /* Gradients */ #define CF_MENU 0x00000080 /* Menus and controls */ #define CF_SET 0x00000100 /* Settings toolbar */ #define CF_IMGBAR 0x00000200 /* Image statusbar */ #define CF_SELBAR 0x00000400 /* Selection statusbar */ #define CF_PIXEL 0x00000800 /* Pixel statusbar */ #define CF_PREFS 0x00001000 /* Preferences */ #define CF_CURSOR 0x00002000 /* Cursor */ #define CF_PMODE 0x00004000 /* Paste preview */ #define CF_GMODE 0x00008000 /* Gradient preview */ #define CF_DRAW 0x00010000 /* Image window */ #define CF_VDRAW 0x00020000 /* View window */ #define CF_PDRAW 0x00040000 /* Palette window */ #define CF_TDRAW 0x00080000 /* Color/brush/pattern window */ #define CF_ALIGN 0x00100000 /* Realign image window */ #define CF_VALIGN 0x00200000 /* Realign view window */ #define CF_TRANS 0x00400000 /* Transparent color in layers window */ /* Compound updates */ // Changed image contents #define UPD_IMG (CF_DRAW | CF_VDRAW | CF_PIXEL) // Changed image geometry (+undo) #define UPD_GEOM (CF_GEOM | CF_MENU | CF_IMGBAR | UPD_IMG) // Added a new channel (+) #define UPD_ADDCH (CF_MENU | CF_IMGBAR | UPD_IMG) // Deleted an existing channel (+) #define UPD_DELCH UPD_ADDCH // Switched to new channel (+) #define UPD_NEWCH (UPD_ADDCH | UPD_CAB | CF_SELBAR) // Switched to existing channel #define UPD_CHAN UPD_NEWCH /* May avoid view window redraw, but won't bother */ // Changed color or value A or B #define UPD_CAB CF_CAB // Changed color A or B #define UPD_AB (CF_AB | CF_GRAD | CF_SET | CF_GMODE | CF_TDRAW) // Changed pattern #define UPD_PAT (CF_AB | CF_TDRAW) // Changed A, B, and pattern #define UPD_ABP UPD_AB // Changed palette #define UPD_PAL (CF_PAL | CF_IMGBAR | CF_PDRAW | UPD_AB | UPD_IMG) // Changed palette and transparent color #define UPD_TPAL (UPD_PAL | CF_TRANS) // Added colors to palette #define UPD_ADDPAL (CF_PAL | CF_IMGBAR | CF_PDRAW) // Changed drawing mode in some way #define UPD_MODE (CF_PMODE | CF_GMODE) // Toggled gradient mode #define UPD_GMODE CF_DRAW // Changed palette if indexed / image if RGB #define UPD_COL UPD_PAL /* May avoid palette update for RGB, but... */ // Changed image contents (+undo, -redraw) #define UPD_IMGP (CF_MENU | CF_PIXEL) // Copied selection to clipboard #define UPD_COPY CF_MENU // Imported clipboard #define UPD_XCOPY CF_MENU // Converted indexed image to RGB #define UPD_2RGB (CF_MENU | CF_IMGBAR | UPD_IMG | UPD_AB) // Converted RGB image to indexed #define UPD_2IDX (UPD_2RGB | UPD_PAL) // Created or loaded a new image (+) #define UPD_ALL (UPD_GEOM | UPD_PAL | UPD_CAB | CF_TRANS) // Changed clipboard contents #define UPD_CLIP CF_PMODE // Changed rendering options #define UPD_RENDER CF_DRAW // Changed clipboard geometry #define UPD_CGEOM (CF_CGEOM | CF_SELBAR) // Changed polygonal selection (-redraw) #define UPD_PSEL (CF_MENU | CF_SELBAR) // Changed selection (-) #define UPD_SEL (UPD_PSEL | CF_CURSOR) // Changed selection geometry (-) #define UPD_SGEOM UPD_PSEL // Initiated pasting something #define UPD_PASTE (UPD_SEL | CF_DRAW | CF_CGEOM) // Changed filename #define UPD_NAME CF_NAME // Changed transparent color (+undo) #define UPD_TRANS (UPD_IMG | CF_IMGBAR | CF_MENU | CF_TRANS) // Changed image contents (+) #define UPD_UIMG (UPD_IMG | CF_MENU) // Cut selection #define UPD_CUT UPD_UIMG // Switched layers #define UPD_LAYER (UPD_ALL | CF_NAME | CF_VALIGN) // Changed color masking #define UPD_CMASK (CF_PDRAW | UPD_MODE) // Changed tool opacity #define UPD_OPAC (CF_GRAD | CF_SET | UPD_MODE) // Done "reset tools" (in addition to UPD_ALL) #define UPD_RESET (CF_NAME | CF_ALIGN | UPD_PAL | UPD_OPAC) // Changed brush #define UPD_BRUSH (CF_SET | CF_CURSOR | CF_TDRAW) // Changed gradient #define UPD_GRAD (CF_GRAD | CF_SET | CF_GMODE) // Changed preferences #define UPD_PREFS (CF_PREFS | CF_MENU | CF_CURSOR | CF_DRAW | CF_VDRAW) // Moved color in palette (no image redraw desired) #define UPD_MVPAL (UPD_PAL & ~UPD_IMG) // Mask covering all kinds of image redraw - for disabling them #define UPD_IMGMASK (UPD_MODE | CF_DRAW | CF_VDRAW) // Changed palette (+undo) #define UPD_UPAL (UPD_PAL | CF_MENU) // !!! Do not forget: CF_MENU also tracks undo stack changes void update_stuff(int flags); mtpaint-3.40/src/memory.c0000644000175000000620000076545011656461163014730 0ustar muammarstaff/* memory.c Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "otherwindow.h" #include "layer.h" #include "inifile.h" #include "canvas.h" #include "prefs.h" #include "channels.h" #include "toolbar.h" #include "viewer.h" #include "csel.h" #include "thread.h" grad_info gradient[NUM_CHANNELS]; // Per-channel gradients double grad_path, grad_x0, grad_y0; // Stroke gradient temporaries grad_map graddata[NUM_CHANNELS + 1]; // RGB + per-channel gradient data grad_store gradbytes; // Storage space for custom gradients int grad_opacity; // Preview opacity /// Vectorized low-level drawing functions void (*put_pixel)(int x, int y) = put_pixel_def; void (*put_pixel_row)(int x, int y, int len, unsigned char *xsel) = put_pixel_row_def; #define ROW_BUFLEN 2048 /* Preferred length of internal row buffer */ /// Bayer ordered dithering const unsigned char bayer[16] = { 0x00, 0x40, 0x10, 0x50, 0x04, 0x44, 0x14, 0x54, 0x01, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55 }; /// Tint tool - contributed by Dmitry Groshev, January 2006 int tint_mode[3]; // [0] = off/on, [1] = add/subtract, [2] = button (none, left, middle, right : 0-3) int mem_cselect; int mem_blend; int mem_unmask; int mem_gradient; /// BLEND MODE SETTINGS int blend_mode = BLEND_HUE; /// FLOOD FILL SETTINGS double flood_step; int flood_cube, flood_img, flood_slide; int smudge_mode; int posterize_mode; // bitwise/truncated/rounded /// QUANTIZATION SETTINGS int quan_sqrt; // "Diameter based weighting" - use sqrt of pixel count /// IMAGE int mem_undo_depth = DEF_UNDO; // Current undo depth image_info mem_image; // Current image image_info mem_clip; // Current clipboard image_state mem_state; // Current edit settings int mem_background = 180; // Non paintable area unsigned char mem_brushes[PATCH_WIDTH * PATCH_HEIGHT * 3]; // Preset brushes screen memory int mem_clip_x = -1, mem_clip_y = -1; // Clipboard location on canvas int mem_nudge = -1; // Nudge pixels per SHIFT+Arrow key during selection/paste int mem_prev_bcsp[6]; // BR, CO, SA, POSTERIZE, Hue /// UNDO ENGINE #define TILE_SIZE 64 #define TILE_SHIFT 6 #define MAX_TILEMAP ((((MAX_WIDTH + TILE_SIZE - 1) / TILE_SIZE + 7) / 8) * \ ((MAX_HEIGHT + TILE_SIZE - 1) / TILE_SIZE)) #define UF_TILED 0x01 #define UF_FLAT 0x02 #define UF_SIZED 0x04 #define UF_ORIG 0x08 /* Unmodified state */ #define UF_ACCUM 0x10 /* Cumulative */ int mem_undo_limit; // Max MB memory allocation limit int mem_undo_common; // Percent of undo space in common arena int mem_undo_opacity; // Use previous image for opacity calculations? #define UNDO_STORESIZE 1023 /* Leave space for memory block header */ static undo_data *undo_datastore, *undo_freelist; static int undo_freecnt; /// PATTERNS unsigned char mem_pattern[8 * 8]; // Original 0-1 pattern unsigned char mem_col_pat[8 * 8]; // Indexed 8x8 colourised pattern using colours A & B unsigned char mem_col_pat24[8 * 8 * 3]; // RGB 8x8 colourised pattern using colours A & B /// TOOLS tool_info tool_state = { TOOL_SQUARE, TOOL_SQUARE, { 1, 1, 255 } }; // Type, brush, size/flow/opacity int pen_down; // Are we drawing? - Used to see if we need to do an UNDO int tool_ox, tool_oy; // Previous tool coords - used by continuous mode int mem_continuous; // Area we painting the static shapes continuously? /// PREVIEW int mem_brcosa_allow[3]; // BRCOSA RGB /// PALETTE unsigned char mem_pals[PALETTE_WIDTH * PALETTE_HEIGHT * 3]; // RGB screen memory holding current palette static int found[1024]; // Used by mem_cols_used() & mem_convert_indexed int mem_brush_list[81][3] = { // Preset brushes parameters { TOOL_SPRAY, 5, 1 }, { TOOL_SPRAY, 7, 1 }, { TOOL_SPRAY, 9, 2 }, { TOOL_SPRAY, 13, 2 }, { TOOL_SPRAY, 15, 3 }, { TOOL_SPRAY, 19, 3 }, { TOOL_SPRAY, 23, 4 }, { TOOL_SPRAY, 27, 5 }, { TOOL_SPRAY, 31, 6 }, { TOOL_SPRAY, 5, 5 }, { TOOL_SPRAY, 7, 7 }, { TOOL_SPRAY, 9, 9 }, { TOOL_SPRAY, 13, 13 }, { TOOL_SPRAY, 15, 15 }, { TOOL_SPRAY, 19, 19 }, { TOOL_SPRAY, 23, 23 }, { TOOL_SPRAY, 27, 27 }, { TOOL_SPRAY, 31, 31 }, { TOOL_SPRAY, 5, 15 }, { TOOL_SPRAY, 7, 21 }, { TOOL_SPRAY, 9, 27 }, { TOOL_SPRAY, 13, 39 }, { TOOL_SPRAY, 15, 45 }, { TOOL_SPRAY, 19, 57 }, { TOOL_SPRAY, 23, 69 }, { TOOL_SPRAY, 27, 81 }, { TOOL_SPRAY, 31, 93 }, { TOOL_CIRCLE, 3, -1 }, { TOOL_CIRCLE, 5, -1 }, { TOOL_CIRCLE, 7, -1 }, { TOOL_CIRCLE, 9, -1 }, { TOOL_CIRCLE, 13, -1 }, { TOOL_CIRCLE, 17, -1 }, { TOOL_CIRCLE, 21, -1 }, { TOOL_CIRCLE, 25, -1 }, { TOOL_CIRCLE, 31, -1 }, { TOOL_SQUARE, 1, -1 }, { TOOL_SQUARE, 2, -1 }, { TOOL_SQUARE, 3, -1 }, { TOOL_SQUARE, 4, -1 }, { TOOL_SQUARE, 8, -1 }, { TOOL_SQUARE, 12, -1 }, { TOOL_SQUARE, 16, -1 }, { TOOL_SQUARE, 24, -1 }, { TOOL_SQUARE, 32, -1 }, { TOOL_SLASH, 3, -1 }, { TOOL_SLASH, 5, -1 }, { TOOL_SLASH, 7, -1 }, { TOOL_SLASH, 9, -1 }, { TOOL_SLASH, 13, -1 }, { TOOL_SLASH, 17, -1 }, { TOOL_SLASH, 21, -1 }, { TOOL_SLASH, 25, -1 }, { TOOL_SLASH, 31, -1 }, { TOOL_BACKSLASH, 3, -1 }, { TOOL_BACKSLASH, 5, -1 }, { TOOL_BACKSLASH, 7, -1 }, { TOOL_BACKSLASH, 9, -1 }, { TOOL_BACKSLASH, 13, -1 }, { TOOL_BACKSLASH, 17, -1 }, { TOOL_BACKSLASH, 21, -1 }, { TOOL_BACKSLASH, 25, -1 }, { TOOL_BACKSLASH, 31, -1 }, { TOOL_VERTICAL, 3, -1 }, { TOOL_VERTICAL, 5, -1 }, { TOOL_VERTICAL, 7, -1 }, { TOOL_VERTICAL, 9, -1 }, { TOOL_VERTICAL, 13, -1 }, { TOOL_VERTICAL, 17, -1 }, { TOOL_VERTICAL, 21, -1 }, { TOOL_VERTICAL, 25, -1 }, { TOOL_VERTICAL, 31, -1 }, { TOOL_HORIZONTAL, 3, -1 }, { TOOL_HORIZONTAL, 5, -1 }, { TOOL_HORIZONTAL, 7, -1 }, { TOOL_HORIZONTAL, 9, -1 }, { TOOL_HORIZONTAL, 13, -1 }, { TOOL_HORIZONTAL, 17, -1 }, { TOOL_HORIZONTAL, 21, -1 }, { TOOL_HORIZONTAL, 25, -1 }, { TOOL_HORIZONTAL, 31, -1 }, }; int mem_pal_def_i = 256; // Items in default palette png_color mem_pal_def[256]={ // Default palette entries for new image /// All RGB in 3 bits per channel. i.e. 0..7 - multiply by 255/7 for full RGB .. /// .. or: int lookup[8] = {0, 36, 73, 109, 146, 182, 219, 255}; /// Primary colours = 8 {0,0,0}, {7,0,0}, {0,7,0}, {7,7,0}, {0,0,7}, {7,0,7}, {0,7,7}, {7,7,7}, /// Primary fades to black: 7 x 6 = 42 {6,6,6}, {5,5,5}, {4,4,4}, {3,3,3}, {2,2,2}, {1,1,1}, {6,0,0}, {5,0,0}, {4,0,0}, {3,0,0}, {2,0,0}, {1,0,0}, {0,6,0}, {0,5,0}, {0,4,0}, {0,3,0}, {0,2,0}, {0,1,0}, {6,6,0}, {5,5,0}, {4,4,0}, {3,3,0}, {2,2,0}, {1,1,0}, {0,0,6}, {0,0,5}, {0,0,4}, {0,0,3}, {0,0,2}, {0,0,1}, {6,0,6}, {5,0,5}, {4,0,4}, {3,0,3}, {2,0,2}, {1,0,1}, {0,6,6}, {0,5,5}, {0,4,4}, {0,3,3}, {0,2,2}, {0,1,1}, /// Shading triangles: 6 x 21 = 126 /// RED {7,6,6}, {6,5,5}, {5,4,4}, {4,3,3}, {3,2,2}, {2,1,1}, {7,5,5}, {6,4,4}, {5,3,3}, {4,2,2}, {3,1,1}, {7,4,4}, {6,3,3}, {5,2,2}, {4,1,1}, {7,3,3}, {6,2,2}, {5,1,1}, {7,2,2}, {6,1,1}, {7,1,1}, /// GREEN {6,7,6}, {5,6,5}, {4,5,4}, {3,4,3}, {2,3,2}, {1,2,1}, {5,7,5}, {4,6,4}, {3,5,3}, {2,4,2}, {1,3,1}, {4,7,4}, {3,6,3}, {2,5,2}, {1,4,1}, {3,7,3}, {2,6,2}, {1,5,1}, {2,7,2}, {1,6,1}, {1,7,1}, /// BLUE {6,6,7}, {5,5,6}, {4,4,5}, {3,3,4}, {2,2,3}, {1,1,2}, {5,5,7}, {4,4,6}, {3,3,5}, {2,2,4}, {1,1,3}, {4,4,7}, {3,3,6}, {2,2,5}, {1,1,4}, {3,3,7}, {2,2,6}, {1,1,5}, {2,2,7}, {1,1,6}, {1,1,7}, /// YELLOW (red + green) {7,7,6}, {6,6,5}, {5,5,4}, {4,4,3}, {3,3,2}, {2,2,1}, {7,7,5}, {6,6,4}, {5,5,3}, {4,4,2}, {3,3,1}, {7,7,4}, {6,6,3}, {5,5,2}, {4,4,1}, {7,7,3}, {6,6,2}, {5,5,1}, {7,7,2}, {6,6,1}, {7,7,1}, /// MAGENTA (red + blue) {7,6,7}, {6,5,6}, {5,4,5}, {4,3,4}, {3,2,3}, {2,1,2}, {7,5,7}, {6,4,6}, {5,3,5}, {4,2,4}, {3,1,3}, {7,4,7}, {6,3,6}, {5,2,5}, {4,1,4}, {7,3,7}, {6,2,6}, {5,1,5}, {7,2,7}, {6,1,6}, {7,1,7}, /// CYAN (blue + green) {6,7,7}, {5,6,6}, {4,5,5}, {3,4,4}, {2,3,3}, {1,2,2}, {5,7,7}, {4,6,6}, {3,5,5}, {2,4,4}, {1,3,3}, {4,7,7}, {3,6,6}, {2,5,5}, {1,4,4}, {3,7,7}, {2,6,6}, {1,5,5}, {2,7,7}, {1,6,6}, {1,7,7}, /// Scales: 11 x 6 = 66 /// RGB {7,6,5}, {6,5,4}, {5,4,3}, {4,3,2}, {3,2,1}, {2,1,0}, {7,5,4}, {6,4,3}, {5,3,2}, {4,2,1}, {3,1,0}, /// RBG {7,5,6}, {6,4,5}, {5,3,4}, {4,2,3}, {3,1,2}, {2,0,1}, {7,4,5}, {6,3,4}, {5,2,3}, {4,1,2}, {3,0,1}, /// BRG {6,5,7}, {5,4,6}, {4,3,5}, {3,2,4}, {2,1,3}, {1,0,2}, {5,4,7}, {4,3,6}, {3,2,5}, {2,1,4}, {1,0,3}, /// BGR {5,6,7}, {4,5,6}, {3,4,5}, {2,3,4}, {1,2,3}, {0,1,2}, {4,5,7}, {3,4,6}, {2,3,5}, {1,2,4}, {0,1,3}, /// GBR {5,7,6}, {4,6,5}, {3,5,4}, {2,4,3}, {1,3,2}, {0,2,1}, {4,7,5}, {3,6,4}, {2,5,3}, {1,4,2}, {0,3,1}, /// GRB {6,7,5}, {5,6,4}, {4,5,3}, {3,4,2}, {2,3,1}, {1,2,0}, {5,7,4}, {4,6,3}, {3,5,2}, {2,4,1}, {1,3,0}, /// Misc {7,5,0}, {6,4,0}, {5,3,0}, {4,2,0}, // Oranges {7,0,5}, {6,0,4}, {5,0,3}, {4,0,2}, // Red Pink {0,5,7}, {0,4,6}, {0,3,5}, {0,2,4}, // Blues {0,0,0}, {0,0,0} /// End: Primary (8) + Fades (42) + Shades (126) + Scales (66) + Misc (14) = 256 }; /// FONT FOR PALETTE WINDOW #define B8(A,B,C,D,E,F,G,H) (A|B<<1|C<<2|D<<3|E<<4|F<<5|G<<6|H<<7) static unsigned char mem_cross[PALETTE_CROSS_H] = { B8( 1,1,0,0,0,0,1,1 ), B8( 1,1,1,0,0,1,1,1 ), B8( 0,1,1,1,1,1,1,0 ), B8( 0,0,1,1,1,1,0,0 ), B8( 0,0,1,1,1,1,0,0 ), B8( 0,1,1,1,1,1,1,0 ), B8( 1,1,1,0,0,1,1,1 ), B8( 1,1,0,0,0,0,1,1 ) }; #include "graphics/xbm_n7x7.xbm" #if (PALETTE_DIGIT_W != xbm_n7x7_width) || (PALETTE_DIGIT_H * 10 != xbm_n7x7_height) #error "Mismatched palette-window font" #endif /* While a number of unwieldy allocation APIs is provided by GLib, it's better * to do it the right way once, than constantly invent workarounds - WJ */ #define WJMEM_DEFINCR 16384 #define WJMEM_RESERVED 64 #define WJMEM_DEFSIZE (WJMEM_DEFINCR - WJMEM_RESERVED) wjmem *wjmemnew(int minsize, int incr) { wjmem *mem; if (incr <= 0) incr = WJMEM_DEFINCR; if (minsize <= sizeof(wjmem)) minsize = WJMEM_DEFSIZE; mem = calloc(1, minsize); if (mem) { mem->block = (char *)mem; mem->here = sizeof(wjmem); mem->size = mem->minsize = minsize; mem->incr = incr; } return (mem); } void wjmemfree(wjmem *mem) { char *this, *next; if (!mem) return; for (this = mem->block; this != (char *)mem; this = next) { next = *(char **)this; free(this); } free(mem); } void *wjmalloc(wjmem *mem, int size, int align) { char *dest; unsigned int sz, ds; align += !align; // 0 -> 1 dest = mem->block + mem->here; dest = ALIGNED(dest, align); ds = dest - mem->block + size; if (ds > mem->size) { sz = mem->minsize; ds = sizeof(char *) + align + size; if (sz < ds) { ds += WJMEM_RESERVED + mem->incr - 1; sz = ds - ds % mem->incr - WJMEM_RESERVED; } dest = calloc(1, sz); if (!dest) return (NULL); *(char **)dest = mem->block; mem->block = dest; mem->size = sz; dest += sizeof(char *); dest = ALIGNED(dest, align); ds = dest - mem->block + size; } mem->here = ds; return ((void *)dest); } /* This allocates several memory chunks in one block - making it one single * point of allocation failure, and needing just a single free() later on. * On Windows, allocations aren't guaranteed to be double-aligned, so * MA_ALIGN_DOUBLE flag is necessary there unless no chunks contain doubles. */ void *multialloc(int flags, void *ptr, int size, ...) { va_list args; void *res; char *tmp; size_t tsz, sz = size, align = 0; if ((flags & MA_ALIGN_MASK) == MA_ALIGN_DOUBLE) align = sizeof(double) - 1; va_start(args, size); while (va_arg(args, void *)) { sz = (sz + align) & ~align; sz += va_arg(args, int); } va_end(args); if (align) sz += align + 1; tmp = res = calloc(1, sz); if (res) { tmp = ALIGNED(tmp, align + 1); sz = 0; tsz = size; va_start(args, size); while (TRUE) { if (tsz || !(flags & MA_SKIP_ZEROSIZE)) *(void **)ptr = (void *)(tmp + sz); if (!(ptr = va_arg(args, void *))) break; sz = (sz + tsz + align) & ~align; tsz = va_arg(args, int); } va_end(args); } return (res); } static int frameset_realloc(frameset *fset) { image_frame *tmp; int n; /* Next power of 2 */ n = nextpow2(fset->cnt); if (n < FRAMES_MIN) n = FRAMES_MIN; if (n == fset->max) return (TRUE); tmp = realloc(fset->frames, n * sizeof(image_frame)); if (!tmp) return (FALSE); fset->frames = tmp; fset->max = n; fset->size = 0; // Recalculate it later return (TRUE); } /* Add one more frame to a frameset */ int mem_add_frame(frameset *fset, int w, int h, int bpp, int cmask, png_color *pal) { image_frame *frm; unsigned char *res; size_t l, sz = (size_t)w * h; int i; /* Extend frames array if necessary */ if (fset->cnt >= fset->max) { if ((fset->cnt >= FRAMES_MAX) || !frameset_realloc(fset)) return (FALSE); } /* Initialize the frame */ frm = fset->frames + fset->cnt; memset(frm, 0, sizeof(image_frame)); frm->width = w; frm->height = h; frm->bpp = bpp; /* Allocate channels */ l = sz * bpp; res = (void *)(-1); for (i = CHN_IMAGE; res && (i < NUM_CHANNELS); i++) { if (cmask & CMASK_FOR(i)) res = frm->img[i] = malloc(l); l = sz; } /* Allocate palette if it differs from default */ if (res && pal && (!fset->pal || memcmp(fset->pal, pal, SIZEOF_PALETTE))) { res = malloc(SIZEOF_PALETTE); if (res) { /* Set as default if first frame and no default yet */ if (!fset->cnt && !fset->pal) fset->pal = (void *)res; else frm->pal = (void *)res; mem_pal_copy(res, pal); } } if (!res) /* Not enough memory */ { while (--i >= 0) free(frm->img[i]); return (FALSE); } fset->cnt++; fset->size = 0; // Recalculate it later return (TRUE); } /* Remove specified frame from a frameset */ void mem_remove_frame(frameset *fset, int frame) { image_frame *tmp; int l = fset->cnt; if (frame >= l) return; tmp = fset->frames + frame; mem_free_chanlist(tmp->img); free(tmp->pal); memmove(tmp, tmp + 1, (--l - frame) * sizeof(image_frame)); fset->cnt = l; // !!! Like with layers, you switch to another frame before deleting current one if (fset->cur > frame) fset->cur--; /* Reduce array size if 2/3+ empty */ if ((l * 3 <= fset->max) && (fset->max > FRAMES_MIN)) frameset_realloc(fset); fset->size = 0; // Recalculate it later } /* Empty a frameset */ void mem_free_frames(frameset *fset) { image_frame *frm; int i; if (fset->frames) { for (i = 0 , frm = fset->frames; i < fset->cnt; i++ , frm++) { mem_free_chanlist(frm->img); free(frm->pal); } free(fset->frames); } free(fset->pal); memset(fset, 0, sizeof(frameset)); } /* Set initial state of image variables */ void init_istate(image_state *state, image_info *image) { memset(state->prot_mask, 0, 256); /* Clear all mask info */ state->prot = 0; state->col_[0] = 1; state->col_[1] = 0; state->col_24[0] = image->pal[1]; state->col_24[1] = image->pal[0]; state->tool_pat = 0; } /* Add a new undo data node */ int undo_add_data(undo_item *undo, int type, void *ptr) { undo_data *node; unsigned int tmap = 1 << type; /* Reuse existing node */ if ((node = undo->dataptr)) { if (node->map & tmap) goto fail; // Prevent duplication tmap |= node->map; } /* Allocate a new node */ else if ((node = undo_freelist)) undo_freelist = node->store[0]; else { if (!undo_freecnt) { node = calloc(UNDO_STORESIZE, sizeof(undo_data)); if (!node) goto fail; /* Datastores are never freed, so lose the previous ptr */ undo_datastore = node; undo_freecnt = UNDO_STORESIZE - 1; } else node = undo_datastore + UNDO_STORESIZE - undo_freecnt--; } node->map = tmap; node->store[type] = ptr; undo->dataptr = node; return (TRUE); fail: /* Cannot store - delete the data right now */ if (tmap & UD_FREE_MASK) free(ptr); return (FALSE); } /* Free an undo data block, and delete its data */ void undo_free_data(undo_item *undo) { undo_data *tmp; unsigned int tmap; int i; if (!(tmp = undo->dataptr)) return; for (tmap = tmp->map & UD_FREE_MASK, i = 0; tmap; tmap >>= 1 , i++) if (tmap & 1) free(tmp->store[i]); tmp->store[0] = undo_freelist; undo_freelist = tmp; undo->dataptr = NULL; } /* Swap undo data - move current set out, and replace by incoming set */ void undo_swap_data(undo_item *outp, undo_item *inp) { undo_data *tmp; unsigned int tmap; if (mem_tempfiles) undo_add_data(outp, UD_TEMPFILES, mem_tempfiles); mem_tempfiles = NULL; // !!! Other unconditionally outgoing stuff goes here if (!(tmp = inp->dataptr)) return; tmap = tmp->map; if (tmap & (1 << UD_FILENAME)) { undo_add_data(outp, UD_FILENAME, mem_filename); mem_filename = tmp->store[UD_FILENAME]; } if (tmap & (1 << UD_TEMPFILES)) mem_tempfiles = tmp->store[UD_TEMPFILES]; // !!! All stuff (swappable or incoming) goes here /* Release the incoming node */ tmp->store[0] = undo_freelist; undo_freelist = tmp; inp->dataptr = NULL; } /* Change layer's filename * Note: calling this with non-empty redo, for example when saving to a new * name, will "reparent" its frames from the old filename to the new one - WJ */ void mem_replace_filename(int layer, char *fname) { image_info *image = &mem_image; undo_stack *undo; char *name; if (layer != layer_selected) image = &layer_table[layer].image->image_; name = image->filename; if (fname && !fname[0]) fname = NULL; // Empty name is no name /* Do nothing if "replacing" name by itself */ if (fname && name ? !strcmp(fname, name) : fname == name) return; /* !!! Make a copy of new filename while the old filename still exists, * because the new pointer must differ from the old one - WJ */ if (fname) fname = strdup(fname); /* Store the old filename in _previous_ undo frame if possible */ undo = &image->undo_; if (undo->done) undo_add_data(undo->items + (undo->pointer ? undo->pointer : undo->max) - 1, UD_FILENAME, name); else free(name); /* Replace filename, and clear tempfiles too while we're at it */ image->filename = fname; image->tempfiles = NULL; } /* Label file's frames in current layer as changed */ void mem_file_modified(char *fname) { char *name; undo_item *undo; int i, j, k, l, changed; l = mem_undo_done; for (k = -1; k <= 1; k += 2) { name = mem_filename; changed = name && !strcmp(name, fname) ? ~UF_ORIG : ~0; for (i = 1; i <= l; i++) { j = (mem_undo_max + mem_undo_pointer + i * k) % mem_undo_max; undo = mem_undo_im_ + j; if (undo->dataptr && (undo->dataptr->map & (1 << UD_FILENAME))) { name = undo->dataptr->store[UD_FILENAME]; changed = name && !strcmp(name, fname) ? ~UF_ORIG : ~0; } undo->flags &= changed; } l = mem_undo_redo; } } /* Create new undo stack of a given depth */ int init_undo(undo_stack *ustack, int depth) { if (!(ustack->items = calloc(depth, sizeof(undo_item)))) return (FALSE); ustack->max = depth; ustack->pointer = ustack->done = ustack->redo = 0; ustack->size = 0; return (TRUE); } /* Copy image state into current undo frame */ void update_undo(image_info *image) { undo_item *undo = image->undo_.items + image->undo_.pointer; /* !!! If system is unable to allocate 768 bytes, may as well die by SIGSEGV * !!! right here, and not hobble along till GUI does the dying - WJ */ if (!undo->pal_) undo->pal_ = malloc(SIZEOF_PALETTE); mem_pal_copy(undo->pal_, image->pal); memcpy(undo->img, image->img, sizeof(chanlist)); undo->dataptr = NULL; undo->cols = image->cols; undo->trans = image->trans; undo->bpp = image->bpp; undo->width = image->width; undo->height = image->height; undo->flags = image->changed ? 0 : UF_ORIG; } void mem_free_chanlist(chanlist img) { int i; for (i = 0; i < NUM_CHANNELS; i++) { if (!img[i]) continue; if (img[i] != (void *)(-1)) free(img[i]); } } static size_t undo_free_x(undo_item *undo) { int j = undo->size; undo_free_data(undo); free(undo->pal_); mem_free_chanlist(undo->img); memset(undo, 0, sizeof(undo_item)); return (j); } /* This resizes an in-use undo stack * !!! Both old and new depths must be nonzero */ static int resize_undo(undo_stack *ustack, int depth) { undo_stack nstack; int i, j, k, undo, redo, ptr, uptr, udepth, trim; if (!init_undo(&nstack, depth)) return (FALSE); undo = ustack->done; redo = ustack->redo; if ((trim = undo + redo + 1 > depth)) { i = (depth - 1) / 2; if (undo < i) redo = depth - undo - 1; else { if (redo > i) redo = i; undo = depth - redo - 1; } } uptr = ptr = ustack->pointer; if (ptr >= depth) ptr = 0; udepth = ustack->max; for (i = -undo; i <= redo; i++) { j = (uptr + i + udepth) % udepth; k = (ptr + i + depth) % depth; nstack.items[k] = ustack->items[j]; memset(ustack->items + j, 0, sizeof(undo_item)); } nstack.pointer = ptr; nstack.done = undo; nstack.redo = redo; if (trim) { for (i = 0; i < udepth; i++) undo_free_x(ustack->items + i); } free(ustack->items); *ustack = nstack; return (TRUE); } /* Resize all undo stacks */ void update_undo_depth() { image_info *image; int l; mem_undo_depth = mem_undo_depth <= MIN_UNDO ? MIN_UNDO : mem_undo_depth >= MAX_UNDO ? MAX_UNDO : mem_undo_depth | 1; for (l = 0; l <= layers_total; l++) { image = l == layer_selected ? &mem_image : &layer_table[l].image->image_; if (image->undo_.max == mem_undo_depth) continue; resize_undo(&image->undo_, mem_undo_depth); } } /* Clear/remove image data */ void mem_free_image(image_info *image, int mode) { int i, j = image->undo_.max, p = image->undo_.pointer; /* Delete current image (don't rely on undo frame being up to date) */ if (mode & FREE_IMAGE) { mem_free_chanlist(image->img); memset(image->img, 0, sizeof(chanlist)); image->width = image->height = 0; free(image->filename); image->filename = image->tempfiles = NULL; } /* Delete undo frames if any */ image->undo_.pointer = image->undo_.done = image->undo_.redo = 0; if (!image->undo_.items) return; memset(image->undo_.items[p].img, 0, sizeof(chanlist)); // Already freed for (i = 0; i < j; i++) undo_free_x(image->undo_.items + i); /* Delete undo stack if finalizing */ if (mode & FREE_UNDO) { free(image->undo_.items); image->undo_.items = NULL; image->undo_.max = 0; } } /* Allocate new image data */ // !!! Does NOT copy palette in copy mode, as it may be invalid int mem_alloc_image(int mode, image_info *image, int w, int h, int bpp, int cmask, image_info *src) { unsigned char *res; size_t l, sz; int i; if (mode & AI_CLEAR) memset(image, 0, sizeof(image_info)); else { memset(image->img, 0, sizeof(chanlist)); image->filename = image->tempfiles = NULL; /* Paranoia */ image->changed = 0; } if (mode & AI_COPY) { if (src->filename && !(image->filename = strdup(src->filename))) return (FALSE); image->tempfiles = src->tempfiles; image->changed = src->changed; w = src->width; h = src->height; bpp = src->bpp; cmask = cmask_from(src->img); } image->width = w; image->height = h; image->bpp = bpp; if (!cmask) return (TRUE); /* Empty block requested */ sz = (size_t)w * h; l = sz * bpp; res = (void *)(-1); for (i = CHN_IMAGE; res && (i < NUM_CHANNELS); i++) { if (cmask & CMASK_FOR(i)) res = image->img[i] = malloc(l); l = sz; } if (res && image->undo_.items) { int k = image->undo_.pointer; if (!image->undo_.items[k].pal_) res = (void *)(image->undo_.items[k].pal_ = malloc(SIZEOF_PALETTE)); } if (!res) /* Not enough memory */ { free(image->filename); image->filename = NULL; while (--i >= 0) free(image->img[i]); memset(image->img, 0, sizeof(chanlist)); return (FALSE); } l = sz * bpp; if (mode & AI_COPY) /* Clone */ { for (i = CHN_IMAGE; i < NUM_CHANNELS; i++) { if (image->img[i]) memcpy(image->img[i], src->img[i], l); l = sz; } } else if (!(mode & AI_NOINIT)) /* Init */ { for (i = CHN_IMAGE; i < NUM_CHANNELS; i++) { if (image->img[i]) memset(image->img[i], channel_fill[i], l); l = sz; } } return (TRUE); } /* Allocate space for new image, removing old if needed */ int mem_new( int width, int height, int bpp, int cmask ) { int res; mem_free_image(&mem_image, FREE_IMAGE); res = mem_alloc_image(0, &mem_image, width, height, bpp, cmask, NULL); if (!res) /* Not enough memory */ { // 8x8 is bound to work! mem_alloc_image(0, &mem_image, 8, 8, bpp, CMASK_IMAGE, NULL); } mem_image.trans = -1; // !!! If palette isn't set up before mem_new(), undo frame will get wrong one // !!! (not that it affects anything at this time) update_undo(&mem_image); mem_channel = CHN_IMAGE; mem_xbm_hot_x = mem_xbm_hot_y = -1; return (!res); } int cmask_from(chanlist img) { int i, j, k = 1; for (i = j = 0; i < NUM_CHANNELS; i++ , k += k) if (img[i]) j |= k; return (j); } /* Allocate new clipboard, removing or preserving old as needed */ int mem_clip_new(int width, int height, int bpp, int cmask, int backup) { int res; /* Text flag defaults to cleared */ text_paste = 0; /* Clear everything if no backup needed */ if (!backup) { mem_free_image(&mem_clip, FREE_ALL); mem_clip_paletted = 0; } /* Backup current contents if no backup yet */ else if (!HAVE_OLD_CLIP) { /* Ensure a minimal undo stack */ if (!mem_clip.undo_.items) init_undo(&mem_clip.undo_, 2); /* No point in firing up undo engine for this */ mem_clip.undo_.pointer = OLD_CLIP; update_undo(&mem_clip); mem_clip.undo_.done = 1; mem_clip.undo_.pointer = 0; } /* Clear current contents if backup exists */ else mem_free_chanlist(mem_clip.img); /* Add old clipboard's channels to cmask */ if (backup) cmask |= cmask_from(mem_clip_real_img); /* Allocate new frame */ res = mem_alloc_image(AI_NOINIT, &mem_clip, width, height, bpp, cmask, NULL); /* Remove backup if allocation failed */ if (!res && HAVE_OLD_CLIP) { mem_free_image(&mem_clip, FREE_ALL); mem_clip_paletted = 0; } /* Fill current undo frame if any */ else if (mem_clip.undo_.items) update_undo(&mem_clip); return (!res); } /* Get address of previous channel data (or current if none) */ unsigned char *mem_undo_previous(int channel) { unsigned char *res; int i; i = (mem_undo_pointer ? mem_undo_pointer : mem_undo_max) - 1; res = mem_undo_im_[i].img[channel]; if (!res || (res == (void *)(-1)) || (mem_undo_im_[i].flags & UF_TILED)) res = mem_img[channel]; // No usable undo so use current return (res); } static size_t lose_oldest(undo_stack *ustack) // Lose the oldest undo image { int idx; if (ustack->redo > ustack->done) idx = ustack->redo--; else if (ustack->done) idx = ustack->max - ustack->done--; else return (0); /* !!! mem_try_malloc() may call this on an unsized undo stack - but it * !!! doesn't need valid sizes anyway - WJ */ return (undo_free_x(ustack->items + (ustack->pointer + idx) % ustack->max)); } /* Convert tile bitmap row into a set of spans (skip/copy), terminated by * a zero-length copy span; return copied length */ static int mem_undo_spans(int *spans, unsigned char *tmap, int width, int bpp) { int bt = 0, bw = 0, tl = 0, l = 0, ll = bpp * TILE_SIZE; while (width > 0) { if ((bw >>= 1) < 2) bw = 0x100 + *tmap++; if (bt ^ (bw & 1)) { *spans++ = tl * ll; tl = 0; } tl++; l += (bt = bw & 1) * ll; width -= TILE_SIZE; } width *= bpp; *spans++ = tl * ll + width; l += bt * width; spans[0] = spans[bt] = 0; return (l); } /* Endianness-aware byte shifts */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN #define SHIFTUP(X,N) (X) <<= ((N) << 3) #define SHIFTDN(X,N) (X) >>= ((N) << 3) #else /* G_BYTE_ORDER == G_BIG_ENDIAN */ #define SHIFTUP(X,N) (X) >>= ((N) << 3) #define SHIFTDN(X,N) (X) <<= ((N) << 3) #endif /* Register-sized unsigned integer - redefine if this isn't it */ #include #define R_INT uintptr_t /* Integer-at-a-time byte array comparison function; its efficiency depends on * both arrays aligned, or misaligned, the same - which is natural for channel * strips when geometry and position match - WJ */ static int tile_row_compare(unsigned char *src, unsigned char *dest, int w, int h, unsigned char *buf) { const int amask = sizeof(R_INT) - 1; int l = w * h, mc = (w + TILE_SIZE - 1) >> TILE_SHIFT, nc = 0; /* Long enough & identically aligned - use fast path */ if ((w > sizeof(R_INT)) && (l > sizeof(R_INT) * 4) && (((int)src & amask) == ((int)dest & amask))) { R_INT v, vm, vt1, vt2, *isrc, *idest; int i, k, t, x, d0, d1, il; /* Given that loose ends, if any, belong to tiles too, we * simply leave them for later - maybe there won't be need */ d0 = (((int)src ^ amask) + 1) & amask; d1 = (int)(src + l) & amask; isrc = (R_INT *)(src + d0); idest = (R_INT *)(dest + d0); il = (l - d0 - d1) / sizeof(v); i = 0; while (TRUE) { /* Fast comparison loop - damn GCC's guts for not * allocating it on registers without heavy wizardry */ { int wi = il - i; R_INT *wsrc = isrc + i, *wdest = idest + i; while (TRUE) { if (wi-- <= 0) goto done; if (*wsrc != *wdest) break; ++wsrc; ++wdest; } t = (unsigned char *)wsrc - src; } k = (unsigned int)t % w; x = TILE_SIZE - (k & (TILE_SIZE - 1)); if (k + x > w) x = w - k; k >>= TILE_SHIFT; /* Value overlaps two or three tiles */ while (x < sizeof(v)) { v = isrc[i] ^ idest[i]; tile2: vm = ~0UL; SHIFTUP(vm, x); x += sizeof(v); if (!(vm &= v)) break; x -= sizeof(v); /* Farther tile(s) differ */ if ((v != vm) && !buf[k]) /* First one differs too */ { buf[k] = 1; if (++nc >= mc) x = l; /* Done is done */ } if (++k + 1 == mc) /* May be 3 tiles */ { x += w & (TILE_SIZE - 1); if (x >= sizeof(v)) break; v = vm; goto tile2; } x += TILE_SIZE; if (k == mc) k = 0; /* Row wrap */ break; } i = (t + x - d0) / sizeof(v); if (buf[k]) continue; buf[k] = 1; if (++nc >= mc) break; } done: /* Compare the ends - using the fact that memory blocks * *must* be aligned at least that much */ if (d1 && !buf[mc - 1]) { vt2 = isrc[il] ^ idest[il]; SHIFTUP(vt2, sizeof(vt2) - d1); if (vt2) ++nc , buf[mc - 1] = 1; } if (d0 && !buf[0]) { vt1 = *(isrc - 1) ^ *(idest - 1); SHIFTDN(vt1, d0); if (vt1) ++nc , buf[0] = 1; } } /* Misaligned - use slow path */ else { int i, k, x; for (i = 0; i < l; i++) { if (src[i] != dest[i]) { k = (unsigned int)i % w; x = TILE_SIZE - (k & (TILE_SIZE - 1)); if (k + x > w) x = w - k; i += x; k >>= TILE_SHIFT; if (buf[k]) continue; buf[k] = 1; if (++nc >= mc) break; } } } return (nc); } /* Convert undo frame to tiled representation */ static void mem_undo_tile(undo_item *undo) { unsigned char buf[((MAX_WIDTH + TILE_SIZE - 1) / TILE_SIZE) * 3]; unsigned char *tstrip, tmap[MAX_TILEMAP], *tmp = NULL; int spans[(MAX_WIDTH + TILE_SIZE - 1) / TILE_SIZE + 3]; size_t sz, area = 0, msize = 0; int i, j, k, nt, dw, cc, bpp; int h, nc, bw, tw, tsz, nstrips, ntiles = 0; undo->flags |= UF_FLAT; /* Not tiled by default */ /* Not tileable if too small */ if (mem_width + mem_height < TILE_SIZE * 3) return; /* Not tileable if different geometry */ if ((undo->width != mem_width) || (undo->height != mem_height) || (undo->bpp != mem_img_bpp)) return; for (i = nc = 0; i < NUM_CHANNELS; i++) { /* Not tileable if different set of channels */ if (!!undo->img[i] ^ !!mem_img[i]) return; if (undo->img[i] && mem_img[i] && (undo->img[i] != (void *)(-1))) nc |= 1 << i; } /* Not tileable if no matching channels */ if (!nc) return; /* Build tilemap */ nstrips = (mem_height + TILE_SIZE - 1) / TILE_SIZE; dw = (TILE_SIZE - 1) & ~(mem_width - 1); bw = (mem_width + TILE_SIZE - 1) / TILE_SIZE; tw = (bw + 7) >> 3; tsz = tw * nstrips; memset(tmap, 0, tsz); for (i = 0 , tstrip = tmap; i < mem_height; i += TILE_SIZE , tstrip += tw) { h = mem_height - i; if (h > TILE_SIZE) h = TILE_SIZE; /* Compare strip of image */ memset(buf, 0, bw * 3); for (cc = 0; nc >= 1 << cc; cc++) { unsigned char *src, *dest; int j, k, j2, w; if (!(nc & 1 << cc)) continue; bpp = BPP(cc); w = mem_width * bpp; k = i * w; src = undo->img[cc] + k; dest = mem_img[cc] + k; if (!tile_row_compare(src, dest, w, h, buf)) continue; if (bpp == 1) continue; /* 3 bpp happen only in image channel, which goes first; * so we can postprocess the results to match 1 bpp */ for (j = j2 = 0; j < bw; j++ , j2 += 3) buf[j] = buf[j2] | buf[j2 + 1] | buf[j2 + 2]; } /* Fill tilemap row */ for (j = nt = 0; j < bw; j++) { nt += (k = buf[j]); tstrip[j >> 3] |= k << (j & 7); } ntiles += nt; area += (nt * TILE_SIZE - buf[bw - 1] * dw) * h; } /* Not tileable if tilemap cannot fit in space gained */ sz = (size_t)mem_width * mem_height; bpp = (nc & CMASK_IMAGE ? mem_img_bpp : 1); if ((sz - area) * bpp <= tsz) return; /* Implement tiling */ sz = (size_t)mem_width * mem_height; for (cc = 0; nc >= 1 << cc; cc++) { unsigned char *src, *dest, *blk; size_t l; int i; if (!(nc & 1 << cc)) continue; if (!ntiles) /* Channels unchanged - free the memory */ { free(undo->img[cc]); undo->img[cc] = (void *)(-1); continue; } /* Try to reduce memory fragmentation - allocate small blocks * anew when possible, instead of carving up huge ones */ src = blk = undo->img[cc]; bpp = BPP(cc); l = area * bpp + (tmp ? 0 : tsz); if (l * 3 <= sz * bpp) /* Small enough */ { blk = malloc(l); /* Use original chunk if cannot get new one */ if (!blk) blk = src; } dest = blk; /* Compress channel */ for (i = 0; i < nstrips; i++) { int j, k, *span; mem_undo_spans(spans, tmap + tw * i, mem_width, bpp); k = mem_height - i * TILE_SIZE; if (k > TILE_SIZE) k = TILE_SIZE; for (j = 0; j < k; j++) { span = spans; while (TRUE) { src += *span++; if (!*span) break; if (dest != src) memmove(dest, src, *span); src += *span; dest += *span++; } } } /* Resize or free memory block */ if (blk == undo->img[cc]) /* Resize old */ { dest = realloc(undo->img[cc], l); /* Leave chunk alone if resizing failed */ if (!dest) l = sz * bpp; else undo->img[cc] = dest; } else /* Replace with new */ { free(undo->img[cc]); undo->img[cc] = blk; } msize += l + 32; /* Place tilemap in first chunk */ if (!tmp) tmp = undo->img[cc] + area * bpp; } /* Re-label as tiled and store tilemap, if there *are* tiles */ if (msize) { undo->flags ^= UF_FLAT | UF_TILED; undo->tileptr = tmp; memcpy(tmp, tmap, tsz); } if (undo->pal_) msize += SIZEOF_PALETTE + 32; undo->size = msize; undo->flags |= UF_SIZED; } /* Compress last undo frame */ void mem_undo_prepare() { undo_item *undo; int k; if (!mem_undo_done) return; k = (mem_undo_pointer ? mem_undo_pointer : mem_undo_max) - 1; undo = mem_undo_im_ + k; /* Already processed? */ if (undo->flags & (UF_TILED | UF_FLAT)) return; /* Cull palette if unchanged */ if (undo->pal_ && !memcmp(undo->pal_, mem_pal, SIZEOF_PALETTE)) { /* Free new block, reuse old */ free(mem_undo_im_[mem_undo_pointer].pal_); mem_undo_im_[mem_undo_pointer].pal_ = undo->pal_; undo->pal_ = NULL; } /* Tile image */ mem_undo_tile(undo); } static size_t mem_undo_size(undo_stack *ustack) { undo_item *undo = ustack->items; size_t k, l, total = 0; int i, j, umax = ustack->max; for (i = 0; i < umax; i++ , total += (undo++)->size) { /* Empty or already scanned? */ if (!undo->width || (undo->flags & UF_SIZED)) continue; k = (size_t)undo->width * undo->height; for (j = l = 0; j < NUM_CHANNELS; j++) { if (!undo->img[j] || (undo->img[j] == (void *)(-1))) continue; l += (j == CHN_IMAGE ? k * undo->bpp : k) + 32; } if (undo->pal_) l += SIZEOF_PALETTE + 32; undo->size = l; undo->flags |= UF_SIZED; } return (total); } /* Add up sizes of all layers other than current */ static size_t mem_undo_lsize() { undo_stack *ustack; size_t total = 0; int l; for (l = 0; l <= layers_total; l++) { if (l == layer_selected) continue; ustack = &layer_table[l].image->image_.undo_; // !!! This relies on layer_table items already processed by update_undo() if (!ustack->size) ustack->size = mem_undo_size(ustack); total += ustack->size; } return (total); } /* Free requested amount of undo space */ static int mem_undo_space(size_t mem_req) { undo_stack *heap[MAX_LAYERS + 2], *wp, *hp; size_t mem_r, mem_lim, mem_max = (size_t)mem_undo_limit * (1024 * 1024); int i, l, l2, h, csz = mem_undo_common * layers_total; /* Layer mem limit including common area */ mem_lim = mem_max * (csz * 0.01 + 1) / (layers_total + 1); /* Fail if hopeless */ if (mem_req > mem_lim) return (2); /* Layer mem limit exceeded - drop oldest */ mem_r = mem_req + mem_undo_size(&mem_image.undo_); while (mem_r > mem_lim) { if (!mem_undo_done) return (1); mem_r -= lose_oldest(&mem_image.undo_); } /* All done if no common area */ if (!csz) return (0); mem_r += mem_undo_lsize(); if (mem_r <= mem_max) return (0); // No need to trim other layers yet mem_lim -= mem_max * (mem_undo_common * 0.01); // Reserved space per layer /* Build heap of undo stacks */ for (i = h = 0; i <= layers_total; i++) { // Skip current layer if (i == layer_selected) continue; wp = &layer_table[i].image->image_.undo_; // Skip layers without extra frames if (!(wp->done + wp->redo)) continue; // Skip layers under the memory limit if (wp->size <= mem_lim) continue; // Put undo stack onto heap for (l = ++h; l > 1; l = l2) { l2 = l >> 1; if ((hp = heap[l2])->size >= wp->size) break; heap[l] = hp; } heap[l] = wp; } /* Drop frames of greediest layers */ while (h > 0) { size_t mem_nx = h > 1 ? heap[2]->size : 0; if ((h > 2) && (heap[3]->size > mem_nx)) mem_nx = heap[3]->size; /* Drop frames */ wp = heap[1]; while (TRUE) { size_t res = lose_oldest(wp); wp->size -= res; // Maintain undo stack size mem_r -= res; if (mem_r <= mem_max) return (0); if (!(wp->done + wp->redo) || (wp->size <= mem_lim)) wp = heap[h--]; else if (wp->size >= mem_nx) continue; break; } /* Reheap layer */ mem_nx = wp->size; for (l = 1; (l2 = l + l) <= h; l = l2) { if ((l2 < h) && (heap[l2]->size < heap[l2 + 1]->size)) l2++; if (mem_nx >= (hp = heap[l2])->size) break; heap[l] = hp; } heap[l] = wp; } return (0); } /* Try to allocate a memory block, releasing undo frames if needed */ void *mem_try_malloc(size_t size) { void *ptr; while (!((ptr = malloc(size)))) { // !!! Hardcoded to work with mem_image for now if (!mem_undo_done) return (NULL); lose_oldest(&mem_image.undo_); } return (ptr); } int undo_next_core(int mode, int new_width, int new_height, int new_bpp, int cmask) { png_color *newpal; undo_item *undo; unsigned char *img; void *tempfiles = mem_tempfiles; chanlist holder, frame; size_t mem_req, mem_lim, wh; int i, j, k, need_frame; if (pen_down && (mode & UC_PENDOWN)) return (0); pen_down = mode & UC_PENDOWN ? 1 : 0; /* Fill undo frame */ update_undo(&mem_image); /* Postpone change notify if nothing will be done without new frame */ need_frame = mode & (UC_CREATE | UC_NOCOPY | UC_GETMEM); if (!need_frame) notify_changed(); /* Release redo data */ if (mem_undo_redo) { k = mem_undo_pointer; for (i = 0; i < mem_undo_redo; i++) { k = (k + 1) % mem_undo_max; undo_free_x(mem_undo_im_ + k); } mem_undo_redo = 0; } /* Let cumulative updates stack */ if (mode & UC_ACCUM) { int i = (mem_undo_pointer ? mem_undo_pointer : mem_undo_max) - 1; if (mem_undo_done && (mem_undo_im_[i].flags & UF_ACCUM)) return (0); mem_undo_im_[mem_undo_pointer].flags |= UF_ACCUM; } /* Compress last undo frame */ mem_undo_prepare(); /* Calculate memory requirements */ mem_req = SIZEOF_PALETTE + 32; wh = (size_t)new_width * new_height; if (!(mode & UC_DELETE)) { for (i = j = 0; i < NUM_CHANNELS; i++) { if ((cmask & (1 << i)) && (mem_img[i] || (mode & UC_CREATE))) j++; } if (cmask & CMASK_IMAGE) j += new_bpp - 1; mem_req += (wh + 32) * j; // !!! Must be after update_undo() to get used memory right if (mem_undo_space(mem_req)) return (2); } if (mode & UC_GETMEM) return (0); // Enough memory was freed /* Prepare outgoing frame */ undo = mem_undo_im_ + mem_undo_pointer; for (i = 0; i < NUM_CHANNELS; i++) { img = undo->img[i]; frame[i] = img && !(cmask & (1 << i)) ? (void *)(-1) : img; } /* Allocate new palette */ newpal = mem_try_malloc(SIZEOF_PALETTE); if (!newpal) return (1); /* Duplicate affected channels */ for (i = 0; i < NUM_CHANNELS; i++) { holder[i] = img = mem_img[i]; if (!(cmask & (1 << i))) continue; if (mode & UC_DELETE) { holder[i] = NULL; continue; } if (!img && !(mode & UC_CREATE)) continue; mem_lim = i == CHN_IMAGE ? wh * new_bpp : wh; img = mem_try_malloc(mem_lim); if (!img) /* Release memory and fail */ { free(newpal); for (j = 0; j < i; j++) if (holder[j] != mem_img[j]) free(holder[j]); return (1); } holder[i] = img; /* Copy */ if (!frame[i] || (mode & UC_NOCOPY)) continue; memcpy(img, frame[i], mem_lim); } /* Next undo step */ mem_undo_pointer = (mem_undo_pointer + 1) % mem_undo_max; if (mem_undo_done >= mem_undo_max - 1) undo_free_x(mem_undo_im_ + mem_undo_pointer); else mem_undo_done++; /* Commit */ if (tempfiles) undo_add_data(undo, UD_TEMPFILES, tempfiles); memcpy(undo->img, frame, sizeof(chanlist)); mem_undo_im_[mem_undo_pointer].pal_ = newpal; memcpy(mem_img, holder, sizeof(chanlist)); mem_width = new_width; mem_height = new_height; mem_img_bpp = new_bpp; /* Do postponed change notify, now that new frame is created */ if (need_frame) notify_changed(); update_undo(&mem_image); return (0); } // Call this after a draw event but before any changes to image void mem_undo_next(int mode) { int cmask = CMASK_ALL, wmode = 0; switch (mode) { case UNDO_TRANS: /* Transparent colour change (cumulative) */ wmode = UC_ACCUM; /* Fallthrough */ case UNDO_PAL: /* Palette changes */ cmask = CMASK_NONE; break; case UNDO_XPAL: /* Palette and indexed image changes */ cmask = mem_img_bpp == 1 ? CMASK_IMAGE : CMASK_NONE; break; case UNDO_COL: /* Palette and/or RGB image changes */ cmask = mem_img_bpp == 3 ? CMASK_IMAGE : CMASK_NONE; break; case UNDO_TOOL: /* Continuous drawing */ wmode = UC_PENDOWN; case UNDO_DRAW: /* Changes to current channel / RGBA */ cmask = (mem_channel == CHN_IMAGE) && RGBA_mode ? CMASK_RGBA : CMASK_CURR; break; case UNDO_INV: /* "Invert" operation */ if ((mem_channel == CHN_IMAGE) && (mem_img_bpp == 1)) cmask = CMASK_NONE; else cmask = CMASK_CURR; break; case UNDO_XFORM: /* Changes to all channels */ cmask = CMASK_ALL; break; case UNDO_FILT: /* Changes to current channel */ cmask = CMASK_CURR; break; case UNDO_PASTE: /* Paste to current channel / RGBA */ wmode = UC_PENDOWN; /* !!! Workaround for move-with-RMB-pressed */ cmask = (mem_channel == CHN_IMAGE) && !channel_dis[CHN_ALPHA] && (mem_clip_alpha || RGBA_mode) ? CMASK_RGBA : CMASK_CURR; break; } undo_next_core(wmode, mem_width, mem_height, mem_img_bpp, cmask); } /* Swap image & undo tiles; in process, normal order translates to reverse and * vice versa - in order to do it in same memory with minimum extra copies */ static void mem_undo_tile_swap(undo_item *undo, int redo) { unsigned char buf[MAX_WIDTH * 3], *tmap, *src, *dest; int spans[(MAX_WIDTH + TILE_SIZE - 1) / TILE_SIZE + 3]; int i, l, h, cc, nw, bpp, w; nw = ((mem_width + TILE_SIZE - 1) / TILE_SIZE + 7) >> 3; for (cc = 0; cc < NUM_CHANNELS; cc++) { if (!undo->img[cc] || (undo->img[cc] == (void *)(-1))) continue; tmap = undo->tileptr; bpp = BPP(cc); w = mem_width * bpp; src = undo->img[cc]; for (i = 0; i < mem_height; i += TILE_SIZE , tmap += nw) { int j, j1, dj; if (!(l = mem_undo_spans(spans, tmap, mem_width, bpp))) continue; dest = mem_img[cc] + w * i; h = mem_height - i; if (h > TILE_SIZE) h = TILE_SIZE; /* First row stored after last in redo frames */ if (!redo) j = 0 , j1 = h , dj = 1; else { j = h - 1; j1 = dj = -1; memcpy(buf, src + j * l, l); } /* Process undo normally, and redo backwards */ for (; j != j1; j += dj) { unsigned char *ts, *td, *tm; int *span = spans; td = dest + j * w; tm = ts = src + j * l; *(redo ? &ts : &tm) = j ? tm - l : buf; while (TRUE) { td += *span++; if (!*span) break; memcpy(tm, td, *span); memcpy(td, ts, *span); tm += *span; ts += *span; td += *span++; } } src += h * l; if (!redo) memcpy(src - l, buf, l); } } } static void mem_undo_swap(int old, int new, int redo) { undo_item *curr, *prev; int i; curr = &mem_undo_im_[old]; prev = &mem_undo_im_[new]; if (prev->flags & UF_TILED) { mem_undo_tile_swap(prev, redo); for (i = 0; i < NUM_CHANNELS; i++) { curr->img[i] = prev->img[i]; prev->img[i] = mem_img[i]; } curr->tileptr = prev->tileptr; prev->tileptr = NULL; curr->size = prev->size; curr->flags = prev->flags & ~UF_ORIG; } else { for (i = 0; i < NUM_CHANNELS; i++) { if (prev->img[i] == (void *)(-1)) { curr->img[i] = (void *)(-1); prev->img[i] = mem_img[i]; } else { curr->img[i] = mem_img[i]; mem_img[i] = prev->img[i]; } } /* !!! If more flags need preserving, add them to mask */ curr->flags = (prev->flags & UF_ACCUM) | UF_FLAT; } prev->flags &= UF_ORIG; mem_pal_copy(curr->pal_, mem_pal); if (!prev->pal_) { prev->pal_ = curr->pal_; curr->pal_ = NULL; } else mem_pal_copy(mem_pal, prev->pal_); undo_swap_data(curr, prev); curr->width = mem_width; curr->height = mem_height; curr->bpp = mem_img_bpp; curr->cols = mem_cols; curr->trans = mem_xpm_trans; if (!mem_changed) curr->flags |= UF_ORIG; mem_width = prev->width; mem_height = prev->height; mem_img_bpp = prev->bpp; mem_cols = prev->cols; mem_xpm_trans = prev->trans; mem_changed = !(prev->flags & UF_ORIG); } void mem_undo_backward() // UNDO requested by user { int i; /* Compress last undo frame */ mem_undo_prepare(); if ( mem_undo_done > 0 ) { i = (mem_undo_pointer - 1 + mem_undo_max) % mem_undo_max; mem_undo_swap(mem_undo_pointer, i, 0); mem_undo_pointer = i; mem_undo_done--; mem_undo_redo++; } pen_down = 0; } void mem_undo_forward() // REDO requested by user { int i; /* Compress last undo frame */ mem_undo_prepare(); if ( mem_undo_redo > 0 ) { i = (mem_undo_pointer + 1) % mem_undo_max; // New pointer mem_undo_swap(mem_undo_pointer, i, 1); mem_undo_pointer = i; mem_undo_done++; mem_undo_redo--; } pen_down = 0; } /* Return the number of bytes used in image + undo */ size_t mem_used() { update_undo(&mem_image); return mem_undo_size(&mem_image.undo_); } /* Return the number of bytes used in image + undo in all layers */ size_t mem_used_layers() { return (mem_used() + mem_undo_lsize()); } /* Fast approximate atan2() function, returning result in degrees. This code is * approximately 2x faster than using libm on P4/Linux, and 6x on Windows. * Absolute error is below 0.0003 degrees, which means 1/10 of a pixel in worst * possible case. - WJ */ #define ATANNUM 128 static float ATAN[2 * ATANNUM + 2]; double atan360(int x, int y) { double d; int xa, ya, n; if (!(x | y)) return (0.0); xa = abs(x); ya = abs(y); d = ya < xa ? (double)ya / (double)xa : 2.0 - (double)xa / (double)ya; d *= ATANNUM; n = d; d = ATAN[n] + (ATAN[n + 1] - ATAN[n]) * (d - n); if (x < 0) d = 180.0 - d; return (y >= 0 ? d : 360.0 - d); } static void make_ATAN() { int i; for (i = 0; i <= ATANNUM; i++) ATAN[2 * ATANNUM - i] = 90.0 - (ATAN[i] = atan(i * (1.0 / ATANNUM)) * (180.0 / M_PI)); ATAN[2 * ATANNUM + 1] = 90.0; } int load_def_palette(char *name) { int i; if (!name[0]) return (FALSE); // Useless i = detect_palette_format(name); if (i > FT_NONE) return (load_image(name, FS_PALETTE_DEF, i) == 1); return (FALSE); } int load_def_patterns(char *name) { int i; if (!name[0]) return (FALSE); // Useless i = detect_image_format(name); if ((i > FT_NONE) && (file_formats[i].flags & FF_IDX)) return (load_image(name, FS_PATTERN_LOAD, i) == 1); return (FALSE); } void mem_init() // Initialise memory { static const unsigned char lookup[8] = { 0, 36, 73, 109, 146, 182, 219, 255 }; unsigned char *dest; char txt[64]; int i, j, ix, iy, bs, bf, bt; make_ATAN(); for (i = 0; i < 256; i++) // Load up normal palette defaults { mem_pal_def[i].red = lookup[mem_pal_def[i].red]; mem_pal_def[i].green = lookup[mem_pal_def[i].green]; mem_pal_def[i].blue = lookup[mem_pal_def[i].blue]; } load_def_palette(inifile_get(DEFAULT_PAL_INI, "")); load_def_patterns(inifile_get(DEFAULT_PAT_INI, "")); /* Init editor settings */ mem_channel = CHN_IMAGE; mem_icx = mem_icy = 0.5; mem_xbm_hot_x = mem_xbm_hot_y = -1; mem_col_A = 1; mem_col_B = 0; /* Set up default undo stack */ mem_undo_depth = mem_undo_depth <= MIN_UNDO ? MIN_UNDO : mem_undo_depth >= MAX_UNDO ? MAX_UNDO : mem_undo_depth | 1; if (!init_undo(&mem_image.undo_, mem_undo_depth)) { memory_errors(1); exit(0); } // Create brush presets mem_cols = mem_pal_def_i; mem_pal_copy( mem_pal, mem_pal_def ); if (mem_new(PATCH_WIDTH, PATCH_HEIGHT, 3, CMASK_IMAGE)) // Not enough memory! { memory_errors(1); exit(0); } mem_mask_setall(0); mem_col_A24.red = 255; mem_col_A24.green = 255; mem_col_A24.blue = 255; mem_col_B24.red = 0; mem_col_B24.green = 0; mem_col_B24.blue = 0; j = mem_width * mem_height; dest = mem_img[CHN_IMAGE]; for (i = 0; i < j; i++) { *dest++ = mem_col_B24.red; *dest++ = mem_col_B24.green; *dest++ = mem_col_B24.blue; } mem_pat_update(); for ( i=0; i<81; i++ ) // Draw each brush { ix = 18 + 36 * (i % 9); iy = 18 + 36 * (i / 9); bt = mem_brush_list[i][0]; bs = mem_brush_list[i][1]; bf = mem_brush_list[i][2]; if ( bt == TOOL_SQUARE ) f_rectangle( ix - bs/2, iy - bs/2, bs, bs ); if ( bt == TOOL_CIRCLE ) f_circle( ix, iy, bs ); if ( bt == TOOL_VERTICAL ) f_rectangle( ix, iy - bs/2, 1, bs ); if ( bt == TOOL_HORIZONTAL ) f_rectangle( ix - bs/2, iy, bs, 1 ); if ( bt == TOOL_SLASH ) for ( j=0; jgmode = GRAD_MODE_LINEAR; grad->rmode = GRAD_BOUND_STOP; grad_update(grad); } for (i = 0; i <= NUM_CHANNELS; i++) { graddata[i].gtype = GRAD_TYPE_RGB; graddata[i].otype = GRAD_TYPE_CONST; } grad_def_update(-1); for (i = 0; i <= NUM_CHANNELS; i++) gmap_setup(graddata + i, gradbytes, i); } void mem_swap_cols(int redraw) { int oc, flags; png_color o24; if (mem_channel != CHN_IMAGE) { oc = channel_col_A[mem_channel]; channel_col_A[mem_channel] = channel_col_B[mem_channel]; channel_col_B[mem_channel] = oc; flags = redraw ? UPD_GRAD : CF_GRAD; } else { oc = mem_col_A; mem_col_A = mem_col_B; mem_col_B = oc; o24 = mem_col_A24; mem_col_A24 = mem_col_B24; mem_col_B24 = o24; if (RGBA_mode) { oc = channel_col_A[CHN_ALPHA]; channel_col_A[CHN_ALPHA] = channel_col_B[CHN_ALPHA]; channel_col_B[CHN_ALPHA] = oc; } flags = redraw ? UPD_AB : CF_AB | CF_GRAD; } update_stuff(flags); } void mem_set_trans(int trans) { if (trans == mem_xpm_trans) return; mem_undo_next(UNDO_TRANS); mem_xpm_trans = trans; update_stuff(UPD_TRANS); } #define PALETTE_TEXT_GREY 200 static void repaint_swatch(int index) // Update a palette colour swatch { unsigned char *tmp, pcol[2] = { 0, 0 }; int i, j; tmp = mem_pals + index * PALETTE_SWATCH_H * PALETTE_W3 + PALETTE_SWATCH_Y * PALETTE_W3 + PALETTE_SWATCH_X * 3; tmp[0] = mem_pal[index].red; tmp[1] = mem_pal[index].green; tmp[2] = mem_pal[index].blue; for (i = 3; i < PALETTE_SWATCH_W * 3; i++) tmp[i] = tmp[i - 3]; for (i = 1; i < PALETTE_SWATCH_H; i++) memcpy(tmp + i * PALETTE_W3, tmp, PALETTE_SWATCH_W * 3); if (mem_prot_mask[index]) pcol[1] = PALETTE_TEXT_GREY; // Protection mask cross tmp += PALETTE_CROSS_DY * PALETTE_W3 + (PALETTE_CROSS_X + PALETTE_CROSS_DX - PALETTE_SWATCH_X) * 3; for (i = 0; i < PALETTE_CROSS_H; i++) { for (j = 0; j < PALETTE_CROSS_W; j++) { tmp[0] = tmp[1] = tmp[2] = pcol[(mem_cross[i] >> j) & 1]; tmp += 3; } tmp += PALETTE_W3 - PALETTE_CROSS_W * 3; } } static void copy_num(int index, int tx, int ty) { static const unsigned char pcol[2] = { 0, PALETTE_TEXT_GREY }; unsigned char *tmp = mem_pals + ty * PALETTE_W3 + tx * 3; int i, j, n, d, v = index; for (d = 100; d; d /= 10 , tmp += (PALETTE_DIGIT_W + 1) * 3) { if ((index < d) && (d > 1)) continue; v -= (n = v / d) * d; n *= PALETTE_DIGIT_H; for (i = 0; i < PALETTE_DIGIT_H; i++) { for (j = 0; j < PALETTE_DIGIT_W; j++) { tmp[0] = tmp[1] = tmp[2] = pcol[(xbm_n7x7_bits[n + i] >> j) & 1]; tmp += 3; } tmp += PALETTE_W3 - PALETTE_DIGIT_W * 3; } tmp -= PALETTE_DIGIT_H * PALETTE_W3; } } void mem_pal_init() // Redraw whole palette { int i; memset(mem_pals, 0, PALETTE_WIDTH * PALETTE_HEIGHT * 3); for (i = 0; i < mem_cols; i++) { repaint_swatch(i); copy_num(i, PALETTE_INDEX_X, i * PALETTE_SWATCH_H + PALETTE_SWATCH_Y + PALETTE_INDEX_DY); // Index number } } void mem_pal_load_def() // Load default palette { mem_pal_copy( mem_pal, mem_pal_def ); mem_cols = mem_pal_def_i; } void mem_mask_init() // Initialise RGB protection mask array { int i; mem_prot = 0; for (i=0; i 0) co *= 3; co += 100; co = (255 * co) / 100; sa = (255 * mem_prev_bcsp[2]) / 100; dH = sH = mem_prev_bcsp[5]; // Map bitwise to truncated do_ps = posterize_mode ? mem_prev_bcsp[3] : 1 << mem_prev_bcsp[3]; // Disable if 1:1, else separate truncated from rounded if (do_ps &= 255) do_ps += (posterize_mode > 1) << 8; do_gamma = mem_prev_bcsp[4] - 100; do_bc = br | (co - 255); // do_sa = sa - 255; /* Prepare posterize table */ if (do_ps && (do_ps != last_ps)) { int mul = do_ps & 255, div = 256, add = 0, div2 = mul - 1; int i, j; last_ps = do_ps; if (do_ps > 255) // Rounded { mul += mul - 2; div = 255 * 2; add = 255; } for (i = 0; i < 256; i++) { j = (i * mul + add) / div; ps_table[i] = (j * 255 * 2 + div2) / (div2 + div2); } } /* Prepare gamma table */ if (do_gamma && (do_gamma != last_gamma)) { double w; int i; last_gamma = do_gamma; w = 100.0 / (double)mem_prev_bcsp[4]; for (i = 0; i < 256; i++) { gamma_table[i] = rint(255.0 * pow((double)i / 255.0, w)); } } /* Prepare brightness-contrast table */ if (do_bc && ((br != last_br) || (co != last_co))) { int i, j; last_br = br; last_co = co; for (i = 0; i < 256; i++) { j = ((i + i - 255) * co + (255 * 255)) / 2 + br; j = j < 0 ? 0 : j > (255 * 255) ? (255 * 255) : j; bc_table[i] = (j + (j >> 8) + 1) >> 8; } } if (dH) { if (dH < 0) dH += 1530; dc = (dH / 510) * 2; dH -= dc * 255; if ((sH = dH > 255)) { dH = 510 - dH; dc = dc < 4 ? dc + 2 : 0; } } ix0 = ixx[dc]; ix1 = ixx[dc + 1]; ix2 = ixx[dc + 2]; /* Use fake mask if no real one provided */ if (!mask) mask = &fmask , mstep = 0 , fmask = 0; else mask += start , mstep = step; start *= 3; step *= 3; cnt *= 3; // Step by triples for (ofs3 = start; ofs3 < cnt; ofs3 += step , mask += mstep) { rgb[0] = img0[ofs3 + 0]; rgb[1] = img0[ofs3 + 1]; rgb[2] = img0[ofs3 + 2]; opacity = *mask; if (opacity == 255) { imgr[ofs3 + 0] = rgb[0]; imgr[ofs3 + 1] = rgb[1]; imgr[ofs3 + 2] = rgb[2]; continue; } /* If we do gamma transform */ if (do_gamma) { rgb[0] = gamma_table[rgb[0]]; rgb[1] = gamma_table[rgb[1]]; rgb[2] = gamma_table[rgb[2]]; } /* If we do hue transform & colour has a hue */ if (dH && ((rgb[0] ^ rgb[1]) | (rgb[0] ^ rgb[2]))) { /* Min. component */ c2 = dc; if (rgb[ix2] < rgb[ix0]) c2++; if (rgb[ixx[c2]] >= rgb[ixx[c2 + 1]]) c2++; /* Actual indices */ c2 = ixx[c2]; c0 = ixx[c2 + 1]; c1 = ixx[c2 + 2]; /* Max. component & edge dir */ if ((tH = rgb[c0] <= rgb[c1])) { c0 = ixx[c2 + 2]; c1 = ixx[c2 + 1]; } /* Do adjustment */ j = dH * (rgb[c0] - rgb[c2]) + 127; /* Round up (?) */ j = (j + (j >> 8) + 1) >> 8; r = rgb[c0]; g = rgb[c1]; b = rgb[c2]; if (tH ^ sH) /* Falling edge */ { rgb[c1] = r = g > j + b ? g - j : b; rgb[c2] += j + r - g; } else /* Rising edge */ { rgb[c1] = b = g < r - j ? g + j : r; rgb[c0] -= j + g - b; } } r = rgb[ix0]; g = rgb[ix1]; b = rgb[ix2]; /* If we do brightness/contrast transform */ if (do_bc) { r = bc_table[r]; g = bc_table[g]; b = bc_table[b]; } /* If we do saturation transform */ if (sa) { j = 0.299 * r + 0.587 * g + 0.114 * b; r = r * 255 + (r - j) * sa; r = r < 0 ? 0 : r > (255 * 255) ? (255 * 255) : r; r = (r + (r >> 8) + 1) >> 8; g = g * 255 + (g - j) * sa; g = g < 0 ? 0 : g > (255 * 255) ? (255 * 255) : g; g = (g + (g >> 8) + 1) >> 8; b = b * 255 + (b - j) * sa; b = b < 0 ? 0 : b > (255 * 255) ? (255 * 255) : b; b = (b + (b >> 8) + 1) >> 8; } /* If we do posterize transform */ if (do_ps) { r = ps_table[r]; g = ps_table[g]; b = ps_table[b]; } /* If we do partial masking */ if (ops || opacity) { r = r * 255 + (img0[ofs3 + 0] - r) * (opacity | op0); r = (r + (r >> 8) + 1) >> 8; g = g * 255 + (img0[ofs3 + 1] - g) * (opacity | op1); g = (g + (g >> 8) + 1) >> 8; b = b * 255 + (img0[ofs3 + 2] - b) * (opacity | op2); b = (b + (b >> 8) + 1) >> 8; } imgr[ofs3 + 0] = r; imgr[ofs3 + 1] = g; imgr[ofs3 + 2] = b; } } static unsigned char pal_dupes[256]; int scan_duplicates() // Find duplicate palette colours, return number found { int i, j, c, found, pmap[256]; for (i = 0; i < mem_cols; i++) pmap[i] = PNG_2_INT(mem_pal[i]); /* Transparent color is different from any normal one */ if (mem_xpm_trans >= 0) pmap[mem_xpm_trans] = -1; for (found = 0 , i = mem_cols - 1; i >= 0; i--) { c = pmap[i]; for (j = 0; pmap[j] != c; j++); pal_dupes[i] = j; found += i != j; } return (found); } void remove_duplicates() // Remove duplicate palette colours - call AFTER scan_duplicates { do_xlate(pal_dupes, mem_img[CHN_IMAGE], mem_width * mem_height); } int mem_remove_unused_check() { int i, found = 0; mem_get_histogram(CHN_IMAGE); for (i = 0; i < mem_cols; i++) if (!mem_histogram[i]) found++; if (!found) return 0; // All palette colours are used on the canvas // Leave at least one colour even if canvas is 0x0 return (mem_cols > found ? found : mem_cols - 1); } int mem_remove_unused() { unsigned char conv[256]; int i, j, found = mem_remove_unused_check(); if (found <= 0) return (0); conv[0] = 0; // Ensure this works even with empty histogram for (i = j = 0; i < 256; i++) // Create conversion table { if (mem_histogram[i]) { mem_pal[j] = mem_pal[i]; conv[i] = j++; } } // Re-adjust transparent colour index if it exists mem_xpm_trans = (mem_xpm_trans < 0) || !mem_histogram[mem_xpm_trans] ? -1 : conv[mem_xpm_trans]; do_xlate(conv, mem_img[CHN_IMAGE], mem_width * mem_height); mem_cols -= found; return found; } // Generate black-to-white palette void mem_bw_pal(png_color *pal, int i1, int i2) { int i, j, step = i2 > i1 ? 1 : -1, d = abs(i2 - i1); if (!d) return; for (i = i1 , j = d , d += d; i != i2 + step; i += step , j += 255 * 2) { pal[i].red = pal[i].green = pal[i].blue = j / d; } } void transform_pal(png_color *pal1, png_color *pal2, int p1, int p2) { int i, l = p2 - p1 + 1; unsigned char tmp[256 * 3], *wrk; wrk = tmp; pal2 += p1; for (i = 0; i < l; i++ , wrk += 3 , pal2++) { wrk[0] = pal2->red; wrk[1] = pal2->green; wrk[2] = pal2->blue; } do_transform(0, 1, l, NULL, tmp, tmp); wrk = tmp; pal1 += p1; for (i = 0; i < l; i++ , wrk += 3 , pal1++) { pal1->red = wrk[0]; pal1->green = wrk[1]; pal1->blue = wrk[2]; } } void set_zoom_centre( int x, int y ) { IF_IN_RANGE( x, y ) { mem_icx = ((float) x ) / mem_width; mem_icy = ((float) y ) / mem_height; mem_ics = 1; } } void do_convert_rgb(int start, int step, int cnt, unsigned char *dest, unsigned char *src, png_color *pal) { int i, s3 = step * 3; dest += start * 3; cnt = start + step * cnt; for (i = start; i < cnt; i += step) { png_color *col = pal + src[i]; dest[0] = col->red; dest[1] = col->green; dest[2] = col->blue; dest += s3; } } int mem_convert_rgb() // Convert image to RGB { char *old_image = mem_img[CHN_IMAGE]; int res; res = undo_next_core(UC_NOCOPY, mem_width, mem_height, 3, CMASK_IMAGE); if (res) return (res); // Not enough memory do_convert_rgb(0, 1, mem_width * mem_height, mem_img[CHN_IMAGE], old_image, mem_pal); return (0); } // Convert colours list into palette void mem_cols_found(png_color *userpal) { int i, j; for (i = 0; i < 256; i++) { j = found[i]; userpal[i].red = INT_2_R(j); userpal[i].green = INT_2_G(j); userpal[i].blue = INT_2_B(j); } } // Convert RGB image to Indexed Palette - call after mem_cols_used int mem_convert_indexed() { unsigned char *old_image, *new_image; int i, j, k, pix; old_image = mem_undo_previous(CHN_IMAGE); new_image = mem_img[CHN_IMAGE]; j = mem_width * mem_height; for (i = 0; i < j; i++) { pix = MEM_2_INT(old_image, 0); for (k = 0; k < 256; k++) // Find index of this RGB { if (found[k] == pix) break; } if (k > 255) return (1); // No index found - BAD ERROR!! *new_image++ = k; old_image += 3; } return (0); } /* Max-Min quantization algorithm - good for preserving saturated colors, * and because of that, bad when used without dithering - WJ */ #define HISTSIZE (64 * 64 * 64) int maxminquan(unsigned char *inbuf, int width, int height, int quant_to, png_color *userpal) { int i, j, k, ii, r, g, b, dr, dg, db, l = width * height, *hist; /* Allocate histogram */ hist = calloc(1, HISTSIZE * sizeof(int)); if (!hist) return (-1); /* Fill histogram */ for (i = 0; i < l; i++) { ++hist[((inbuf[0] & 0xFC) << 10) + ((inbuf[1] & 0xFC) << 4) + (inbuf[2] >> 2)]; inbuf += 3; } /* Find the most frequent color */ j = k = -1; for (i = 0; i < HISTSIZE; i++) { if (hist[i] <= k) continue; j = i; k = hist[i]; } /* Make it first */ userpal[0].red = r = j >> 12; userpal[0].green = g = (j >> 6) & 0x3F; userpal[0].blue = b = j & 0x3F; /* Find distances from all others to it */ if (quant_to > 1) { for (i = 0; i < HISTSIZE; i++) { if (!hist[i]) continue; dr = (i >> 12) - r; dg = ((i >> 6) & 0x3F) - g; db = (i & 0x3F) - b; hist[i] = dr * dr + dg * dg + db * db; } } /* Add more colors */ for (ii = 1; ii < quant_to; ii++) { /* Find farthest color */ j = -1; for (i = k = 0; i < HISTSIZE; i++) { if (hist[i] <= k) continue; j = i; k = hist[i]; } /* No more colors? */ if (j < 0) break; /* Store into palette */ userpal[ii].red = r = j >> 12; userpal[ii].green = g = (j >> 6) & 0x3F; userpal[ii].blue = b = j & 0x3F; /* Update distances */ for (i = 0; i < HISTSIZE; i++) { if (!hist[i]) continue; dr = (i >> 12) - r; dg = ((i >> 6) & 0x3F) - g; db = (i & 0x3F) - b; k = dr * dr + dg * dg + db * db; if (k < hist[i]) hist[i] = k; } } /* Upconvert colors */ for (i = 0; i < ii; i++) { userpal[i].red = (userpal[i].red << 2) + (userpal[i].red >> 4); userpal[i].green = (userpal[i].green << 2) + (userpal[i].green >> 4); userpal[i].blue = (userpal[i].blue << 2) + (userpal[i].blue >> 4); } /* Clear empty slots */ for (i = ii; i < quant_to; i++) userpal[i].red = userpal[i].green = userpal[i].blue = 0; free(hist); return (0); } /* Pairwise Nearest Neighbor quantization algorithm - minimizes mean square * error measure; time used is proportional to number of bins squared - WJ */ typedef struct { double rc, gc, bc, err; int cnt; unsigned short nn, fw, bk, tm, mtm; } pnnbin; static void find_nn(pnnbin *bins, int idx) { pnnbin *bin1, *bin2; int i, nn = 0; double n1, wr, wg, wb, err = 1e100; bin1 = bins + idx; n1 = bin1->cnt; wr = bin1->rc; wg = bin1->gc; wb = bin1->bc; for (i = bin1->fw; i; i = bin2->fw) { double nerr, n2; bin2 = bins + i; nerr = (bin2->rc - wr) * (bin2->rc - wr) + (bin2->gc - wg) * (bin2->gc - wg) + (bin2->bc - wb) * (bin2->bc - wb); n2 = bin2->cnt; nerr *= (n1 * n2) / (n1 + n2); if (nerr >= err) continue; err = nerr; nn = i; } bin1->err = err; bin1->nn = nn; } int pnnquan(unsigned char *inbuf, int width, int height, int quant_to, png_color *userpal) { unsigned short heap[32769]; pnnbin *bins, *tb, *nb; double d, err, n1, n2; int i, j, k, l, l2, h, b1, maxbins, extbins, res = 1; heap[0] = 0; // Empty bins = calloc(32768, sizeof(pnnbin)); if (!bins) return (-1); progress_init(_("Quantize Pass 1"), 1); /* Build histogram */ k = width * height; for (i = 0; i < k; i++ , inbuf += 3) { // !!! Can throw gamma correction in here, but what to do about perceptual // !!! nonuniformity then? j = ((inbuf[0] & 0xF8) << 7) + ((inbuf[1] & 0xF8) << 2) + (inbuf[2] >> 3); tb = bins + j; tb->rc += inbuf[0]; tb->gc += inbuf[1]; tb->bc += inbuf[2]; tb->cnt++; } /* Cluster nonempty bins at one end of array */ tb = bins; for (i = 0; i < 32768; i++) { if (!bins[i].cnt) continue; *tb = bins[i]; d = 1.0 / (double)tb->cnt; tb->rc *= d; tb->gc *= d; tb->bc *= d; if (quan_sqrt) tb->cnt = sqrt(tb->cnt); tb++; } maxbins = tb - bins; for (i = 0; i < maxbins - 1; i++) { bins[i].fw = i + 1; bins[i + 1].bk = i; } // !!! Already zeroed out by calloc() // bins[0].bk = bins[i].fw = 0; /* Initialize nearest neighbors and build heap of them */ for (i = 0; i < maxbins; i++) { if (((i * 50) % maxbins >= maxbins - 50)) if (progress_update((float)i / maxbins)) goto quit; find_nn(bins, i); /* Push slot on heap */ err = bins[i].err; for (l = ++heap[0]; l > 1; l = l2) { l2 = l >> 1; if (bins[h = heap[l2]].err <= err) break; heap[l] = h; } heap[l] = i; } progress_end(); progress_init(_("Quantize Pass 2"), 1); /* Merge bins which increase error the least */ extbins = maxbins - quant_to; for (i = 0; i < extbins; ) { if (((i * 50) % extbins >= extbins - 50)) if (progress_update((float)i / extbins)) goto quit; /* Use heap to find which bins to merge */ while (TRUE) { tb = bins + (b1 = heap[1]); /* One with least error */ /* Is stored error up to date? */ if ((tb->tm >= tb->mtm) && (bins[tb->nn].mtm <= tb->tm)) break; if (tb->mtm == 0xFFFF) /* Deleted node */ b1 = heap[1] = heap[heap[0]--]; else /* Too old error value */ { find_nn(bins, b1); tb->tm = i; } /* Push slot down */ err = bins[b1].err; for (l = 1; (l2 = l + l) <= heap[0]; l = l2) { if ((l2 < heap[0]) && (bins[heap[l2]].err > bins[heap[l2 + 1]].err)) l2++; if (err <= bins[h = heap[l2]].err) break; heap[l] = h; } heap[l] = b1; } /* Do a merge */ nb = bins + tb->nn; n1 = tb->cnt; n2 = nb->cnt; d = 1.0 / (n1 + n2); tb->rc = d * rint(n1 * tb->rc + n2 * nb->rc); tb->gc = d * rint(n1 * tb->gc + n2 * nb->gc); tb->bc = d * rint(n1 * tb->bc + n2 * nb->bc); tb->cnt += nb->cnt; tb->mtm = ++i; /* Unchain deleted bin */ bins[nb->bk].fw = nb->fw; bins[nb->fw].bk = nb->bk; nb->mtm = 0xFFFF; } /* Fill palette */ i = j = 0; while (TRUE) { userpal[j].red = rint(bins[i].rc); userpal[j].green = rint(bins[i].gc); userpal[j++].blue = rint(bins[i].bc); if (!(i = bins[i].fw)) break; } /* Clear empty slots */ for (; j < quant_to; j++) userpal[j].red = userpal[j].green = userpal[j].blue = 0; res = 0; quit: progress_end(); free(bins); return (res); } /* Distance functions for 3 distance measures */ #if defined(__GNUC__) && defined(__i386__) #define REGPARM2 __attribute__ ((regparm (2))) #else #define REGPARM2 #endif typedef double REGPARM2 (*distance_func)(const double *v0, const double *v1); static double REGPARM2 distance_linf(const double *v0, const double *v1) { double td, td2; td = fabs(v0[0] - v1[0]); td2 = fabs(v0[1] - v1[1]); if (td < td2) td = td2; td2 = fabs(v0[2] - v1[2]); if (td < td2) td = td2; return (td); } static double REGPARM2 distance_l1(const double *v0, const double *v1) { return (fabs(v0[0] - v1[0]) + fabs(v0[1] - v1[1]) + fabs(v0[2] - v1[2])); } static double REGPARM2 distance_l2(const double *v0, const double *v1) { return (sqrt((v0[0] - v1[0]) * (v0[0] - v1[0]) + (v0[1] - v1[1]) * (v0[1] - v1[1]) + (v0[2] - v1[2]) * (v0[2] - v1[2]))); } static const distance_func distance_3d[NUM_DISTANCES] = { distance_linf, distance_l1, distance_l2 }; /* Dithering works with 6-bit colours, because hardware VGA palette is 6-bit, * and any kind of dithering is imprecise by definition anyway - WJ */ typedef struct { double xyz256[768], gamma[256 * 2], lin[256 * 2]; int cspace, cdist, ncols; guint32 xcmap[64 * 64 * 2 + 128 * 2]; /* Cache bitmap */ guint32 lcmap[64 * 64 * 2]; /* Extension bitmap */ unsigned char cmap[64 * 64 * 64 + 128 * 64]; /* Index cache */ } ctable; static ctable *ctp; /* !!! Beware of GCC misoptimizing this! The two functions below is the result * of much trial and error, and hopefully not VERY brittle; but still, after any * modification to them, compare the performance to what it was before - WJ */ static int find_nearest(int col[3], int n) { /* !!! Stack misalignment is a very real issue here */ unsigned char tmp_[4 * sizeof(double)]; double *tmp = ALIGNED(tmp_, sizeof(double)); /* Prepare colour coords */ switch (ctp->cspace) { default: case CSPACE_RGB: tmp[0] = ctp->lin[n + col[0]]; tmp[1] = ctp->lin[n + col[1]]; tmp[2] = ctp->lin[n + col[2]]; break; case CSPACE_SRGB: tmp[0] = ctp->gamma[n + col[0]]; tmp[1] = ctp->gamma[n + col[1]]; tmp[2] = ctp->gamma[n + col[2]]; break; case CSPACE_LXN: rgb2LXN(tmp, ctp->gamma[n + col[0]], ctp->gamma[n + col[1]], ctp->gamma[n + col[2]]); break; } /* Find nearest colour */ { const distance_func dist = distance_3d[ctp->cdist]; double d = 1000000000.0, td, *xyz = ctp->xyz256; int i, j, l = ctp->ncols; for (i = j = 0; i < l; i++) { td = dist(tmp, xyz + i * 3); if (td < d) j = i , d = td; } return (j); } } static int lookup_srgb(double *srgb) { int k, n = 0, col[3]; /* Convert to 8-bit RGB coords */ col[0] = UNGAMMA256(srgb[0]); col[1] = UNGAMMA256(srgb[1]); col[2] = UNGAMMA256(srgb[2]); /* Check if there is extended precision */ k = ((col[0] & 0xFC) << 10) + ((col[1] & 0xFC) << 4) + (col[2] >> 2); if (ctp->lcmap[k >> 5] & (1 << (k & 31))) k = 64 * 64 * 64 + ctp->cmap[k] * 64 + ((col[0] & 3) << 4) + ((col[1] & 3) << 2) + (col[2] & 3); else n = 256; /* Use posterized values for 6-bit part */ /* Use colour cache if possible */ if (!(ctp->xcmap[k >> 5] & (1 << (k & 31)))) { ctp->xcmap[k >> 5] |= 1 << (k & 31); ctp->cmap[k] = find_nearest(col, n); } return (ctp->cmap[k]); } // !!! No support for transparency yet !!! /* Damping functions roughly resemble old GIMP's behaviour, but may need some * tuning because linear sRGB is just too different from normal RGB */ int mem_dither(unsigned char *old, int ncols, short *dither, int cspace, int dist, int limit, int selc, int serpent, int rgb8b, double emult) { int i, j, k, l, kk, j0, j1, dj, rlen, col0, col1, progress; unsigned char *ddata, *src, *dest; double *row0, *row1, *row2, *tmp; double err, intd, extd, *gamma6, *lin6; double tc0[3], tc1[3], color0[3], color1[3]; double fdiv = 0, gamut[6] = {1, 1, 1, 0, 0, 0}; /* Allocate working space */ rlen = (mem_width + 4) * 3 * sizeof(double); ddata = multialloc(MA_ALIGN_DOUBLE, &row0, rlen, &row1, rlen, &row2, rlen, &ctp, sizeof(ctable), NULL); if (!ddata) return (1); if ((progress = mem_width * mem_height > 1000000)) progress_init(_("Converting to Indexed Palette"), 0); /* Preprocess palette to find whether to extend precision and where */ for (i = 0; i < ncols; i++) { j = ((mem_pal[i].red & 0xFC) << 10) + ((mem_pal[i].green & 0xFC) << 4) + (mem_pal[i].blue >> 2); if (!(l = ctp->cmap[j])) { ctp->cmap[j] = l = i + 1; ctp->xcmap[l * 4 + 2] = j; } k = ((mem_pal[i].red & 3) << 4) + ((mem_pal[i].green & 3) << 2) + (mem_pal[i].blue & 3); ctp->xcmap[l * 4 + (k & 1)] |= 1 << (k >> 1); } memset(ctp->cmap, 0, 64 * 64 * 64); for (k = 0 , i = 4; i < 256 * 4; i += 4) { guint32 v = ctp->xcmap[i] | ctp->xcmap[i + 1]; /* Are 2+ colors there somewhere? */ if (!((v & (v - 1)) | (ctp->xcmap[i] & ctp->xcmap[i + 1]))) continue; rgb8b = TRUE; /* Force 8-bit precision */ j = ctp->xcmap[i + 2]; ctp->lcmap[j >> 5] |= 1 << (j & 31); ctp->cmap[j] = k++; } memset(ctp->xcmap, 0, 257 * 4 * sizeof(guint32)); /* Prepare tables */ for (i = 0; i < 256; i++) { j = (i & 0xFC) + (i >> 6); ctp->gamma[i] = gamma256[i]; ctp->gamma[i + 256] = gamma256[j]; ctp->lin[i] = i * (1.0 / 255.0); ctp->lin[i + 256] = j * (1.0 / 255.0); } /* Keep all 8 bits of input or posterize to 6 bits? */ i = rgb8b ? 0 : 256; gamma6 = ctp->gamma + i; lin6 = ctp->lin + i; tmp = ctp->xyz256; for (i = 0; i < ncols; i++ , tmp += 3) { /* Update gamut limits */ tmp[0] = gamma6[mem_pal[i].red]; tmp[1] = gamma6[mem_pal[i].green]; tmp[2] = gamma6[mem_pal[i].blue]; for (j = 0; j < 3; j++) { if (tmp[j] < gamut[j]) gamut[j] = tmp[j]; if (tmp[j] > gamut[j + 3]) gamut[j + 3] = tmp[j]; } /* Store colour coords */ switch (cspace) { default: case CSPACE_RGB: tmp[0] = lin6[mem_pal[i].red]; tmp[1] = lin6[mem_pal[i].green]; tmp[2] = lin6[mem_pal[i].blue]; break; case CSPACE_SRGB: break; /* Done already */ case CSPACE_LXN: rgb2LXN(tmp, tmp[0], tmp[1], tmp[2]); break; } } ctp->cspace = cspace; ctp->cdist = dist; ctp->ncols = ncols; serpent = serpent ? 0 : 2; if (dither) fdiv = 1.0 / *dither++; /* Process image */ for (i = 0; i < mem_height; i++) { src = old + i * mem_width * 3; dest = mem_img[CHN_IMAGE] + i * mem_width; memset(row2, 0, rlen); if (serpent ^= 1) { j0 = 0; j1 = mem_width * 3; dj = 1; } else { j0 = (mem_width - 1) * 3; j1 = -3; dj = -1; dest += mem_width - 1; } for (j = j0; j != j1; j += dj * 3) { for (k = 0; k < 3; k++) { /* Posterize to 6 bits as natural for palette */ color0[k] = gamma6[src[j + k]]; /* Add in error, maybe limiting it */ err = row0[j + k + 6]; if (limit == 1) /* To half of SRGB range */ { err = err < -0.5 ? -0.5 : err > 0.5 ? 0.5 : err; } else if (limit == 2) /* To 1/4, with damping */ { err = err < -0.1 ? (err < -0.4 ? -0.25 : 0.5 * err - 0.05) : err > 0.1 ? (err > 0.4 ? 0.25 : 0.5 * err + 0.05) : err; } color1[k] = color0[k] + err; /* Limit result to palette gamut */ if (color1[k] < gamut[k]) color1[k] = gamut[k]; if (color1[k] > gamut[k + 3]) color1[k] = gamut[k + 3]; } /* Output best colour */ col1 = lookup_srgb(color1); *dest = col1; dest += dj; if (!dither) continue; /* Evaluate new error */ tc1[0] = gamma6[mem_pal[col1].red]; tc1[1] = gamma6[mem_pal[col1].green]; tc1[2] = gamma6[mem_pal[col1].blue]; if (selc) /* Selective error damping */ { col0 = lookup_srgb(color0); tc0[0] = gamma6[mem_pal[col0].red]; tc0[1] = gamma6[mem_pal[col0].green]; tc0[2] = gamma6[mem_pal[col0].blue]; /* Split error the obvious way */ if (!(selc & 1) && (col0 == col1)) { color1[0] = (color1[0] - color0[0]) * emult + color0[0] - tc0[0]; color1[1] = (color1[1] - color0[1]) * emult + color0[1] - tc0[1]; color1[2] = (color1[2] - color0[2]) * emult + color0[2] - tc0[2]; } /* Weigh component errors separately */ else if (selc < 3) { for (k = 0; k < 3; k++) { intd = fabs(color0[k] - tc0[k]); extd = fabs(color0[k] - color1[k]); if (intd + extd == 0.0) err = 1.0; else err = (intd + emult * extd) / (intd + extd); color1[k] = err * (color1[k] - tc1[k]); } } /* Weigh errors by vector length */ else { intd = sqrt((color0[0] - tc0[0]) * (color0[0] - tc0[0]) + (color0[1] - tc0[1]) * (color0[1] - tc0[1]) + (color0[2] - tc0[2]) * (color0[2] - tc0[2])); extd = sqrt((color0[0] - color1[0]) * (color0[0] - color1[0]) + (color0[1] - color1[1]) * (color0[1] - color1[1]) + (color0[2] - color1[2]) * (color0[2] - color1[2])); if (intd + extd == 0.0) err = 1.0; else err = (intd + emult * extd) / (intd + extd); color1[0] = err * (color1[0] - tc1[0]); color1[1] = err * (color1[1] - tc1[1]); color1[2] = err * (color1[2] - tc1[2]); } } else /* Indiscriminate error damping */ { color1[0] = (color1[0] - tc1[0]) * emult; color1[1] = (color1[1] - tc1[1]) * emult; color1[2] = (color1[2] - tc1[2]) * emult; } /* Distribute the error */ color1[0] *= fdiv; color1[1] *= fdiv; color1[2] *= fdiv; for (k = 0; k < 5; k++) { kk = j + (k - 2) * dj * 3 + 6; for (l = 0; l < 3; l++ , kk++) { row0[kk] += color1[l] * dither[k]; row1[kk] += color1[l] * dither[k + 5]; row2[kk] += color1[l] * dither[k + 10]; } } } tmp = row0; row0 = row1; row1 = row2; row2 = tmp; if (progress && (i * 10) % mem_height >= mem_height - 10) progress_update((float)(i + 1) / mem_height); } if (progress) progress_end(); free(ddata); return (0); } /* Dumb (but fast) Floyd-Steinberg dithering in RGB space, loosely based on * Dennis Lee's dithering implementation from dl3quant.c, in turn based on * dithering code from the IJG's jpeg library - WJ */ int mem_dumb_dither(unsigned char *old, unsigned char *new, png_color *pal, int width, int height, int ncols, int dither) { unsigned short cols[32768], sqrtb[512], *sqr; short limtb[512], *lim, fr[3] = {0, 0, 0}; short *rows = NULL, *row0 = fr, *row1 = fr; unsigned char clamp[768], *src, *dest; int i, j, k, j0, dj, dj3, r, g, b, rlen, serpent = 2; /* Allocate working space */ rlen = (width + 2) * 3; if (dither) { rows = calloc(rlen * 2, sizeof(short)); if (!rows) return (1); serpent = 0; } /* Color cache, squares table, clamp table */ memset(cols, 0, sizeof(cols)); sqr = sqrtb + 256; for (i = -255; i < 256; i++) sqr[i] = i * i; memset(clamp, 0, 256); memset(clamp + 512, 255, 256); for (i = 0; i < 256; i++) clamp[i + 256] = i; /* Error limiter table, Dennis Lee's way */ #define ERR_LIM 20 lim = limtb + 256; for (i = 0; i < ERR_LIM; i++) lim[i] = i , lim[-i] = -i; for (; i < 256; i++) lim[i] = ERR_LIM , lim[-i] = -ERR_LIM; #undef ERR_LIM /* Process image */ for (i = 0; i < height; i++) { src = old + i * width * 3; dest = new + i * width; if (serpent ^= 1) { j0 = 0; dj = 1; } else { j0 = (width - 1) * 3; dj = -1; dest += width - 1; } if (dither) { row0 = row1 = rows + 3; *(serpent ? &row1 : &row0) += rlen; memset(row1 - 3, 0, rlen * sizeof(short)); src += j0; row0 += j0; row1 += j0; } dj3 = dj * 3; for (j = 0; j < width; j++ , src += dj3 , dest += dj) { r = clamp[src[0] + ((row0[0] + 0x1008) >> 4)]; g = clamp[src[1] + ((row0[1] + 0x1008) >> 4)]; b = clamp[src[2] + ((row0[2] + 0x1008) >> 4)]; k = ((r & 0xF8) << 7) + ((g & 0xF8) << 2) + (b >> 3); if (!cols[k]) /* Find nearest color in RGB */ { int i, j, n = 0, l = 1000000; /* Searching for color nearest to first color in cell, instead of to cell * itself, looks like a bug, but works like a feature - makes FS dither less * prone to patterning. This trick I learned from Dennis Lee's code - WJ */ for (i = 0; i < ncols; i++) { j = sqr[r - pal[i].red] + sqr[g - pal[i].green] + sqr[b - pal[i].blue]; if (j >= l) continue; l = j; n = i; } cols[k] = n + 1; } *dest = k = cols[k] - 1; if (!dither) continue; r = lim[r - pal[k].red]; g = lim[g - pal[k].green]; b = lim[b - pal[k].blue]; k = r + r; row1[0 + dj3] += r; row1[0 - dj3] += (r += k); row1[0 + 0 ] += (r += k); row0[0 + dj3] += r + k; k = g + g; row1[1 + dj3] += g; row1[1 - dj3] += (g += k); row1[1 + 0 ] += (g += k); row0[1 + dj3] += g + k; k = b + b; row1[2 + dj3] += b; row1[2 - dj3] += (b += k); row1[2 + 0 ] += (b += k); row0[2 + dj3] += b + k; row0 += dj3; row1 += dj3; } } free(rows); return (0); } void mem_find_dither(int red, int green, int blue) { int pat = 4, dp = 3; int i, ix1, ix2, pn, tpn, pp2 = pat * pat * 2; double r, g, b, r1, g1, b1, dr0, dg0, db0, dr, dg, db; double l, l2, tl, t; r = gamma256[red]; g = gamma256[green]; b = gamma256[blue]; l = 16.0; ix1 = -1; for (i = 0; i < mem_cols; i++) { dr = r - gamma256[mem_pal[i].red]; dg = g - gamma256[mem_pal[i].green]; db = b - gamma256[mem_pal[i].blue]; tl = dr * dr + dg * dg + db * db; if (tl >= l) continue; l = tl; ix1 = i; } r1 = gamma256[mem_pal[ix1].red]; g1 = gamma256[mem_pal[ix1].green]; b1 = gamma256[mem_pal[ix1].blue]; dr0 = r - r1; dg0 = g - g1; db0 = b - b1; l2 = l; ix2 = ix1; pn = 0; for (i = 0; i < mem_cols; i++) { if (i == ix1) continue; dr = gamma256[mem_pal[i].red] - r1; dg = gamma256[mem_pal[i].green] - g1; db = gamma256[mem_pal[i].blue] - b1; t = pp2 * (dr0 * dr + dg0 * dg + db0 * db) / (dr * dr + dg * dg + db * db); if ((t <= dp) || (t >= pp2 - dp)) continue; t = (tpn = rint(0.5 * t)) / (double)(pp2 >> 1); dr = dr * t - dr0; dg = dg * t - dg0; db = db * t - db0; tl = dr * dr + dg * dg + db * db; if (tl >= l2) continue; l2 = tl; ix2 = i; pn = tpn; } mem_col_A = ix1; mem_col_B = ix2; /* !!! A mix with less than half of nearest color cannot be better than it, so * !!! patterns less dense than 50:50 won't be needed */ mem_tool_pat = pat == 4 ? pn : pn * 4; mem_col_A24 = mem_pal[mem_col_A]; mem_col_B24 = mem_pal[mem_col_B]; } int mem_quantize( unsigned char *old_mem_image, int target_cols, int type ) // type = 1:flat, 2:dither, 3:scatter { unsigned char *new_img = mem_img[CHN_IMAGE]; int i, j, k;//, res=0; int closest[3][2]; png_color pcol; j = mem_width * mem_height; progress_init(_("Converting to Indexed Palette"),1); for ( j=0; j= closest[1][0] ) if ( closest[1][1]*.67 < (closest[1][1] - closest[1][0]) ) k = closest[0][0]; else { if ( closest[0][0] > closest[0][1] ) k = closest[0][ (i+j) % 2 ]; else k = closest[0][ (i+j+1) % 2 ]; } } if ( type == 3 ) // Scattered { if ( (rand() % (closest[1][1] + closest[1][0])) <= closest[1][1] ) k = closest[0][0]; else k = closest[0][1]; } } } *new_img++ = k; } } progress_end(); return 0; } /* Convert image to greyscale */ void mem_greyscale(int gcor) { unsigned char *mask, *img = mem_img[CHN_IMAGE]; int i, j, k, v, ch; double value; if ( mem_img_bpp == 1) { for (i = 0; i < 256; i++) { if (gcor) /* Gamma correction + Helmholtz-Kohlrausch effect */ { value = rgb2B(gamma256[mem_pal[i].red], gamma256[mem_pal[i].green], gamma256[mem_pal[i].blue]); v = UNGAMMA256(value); } else /* Usual braindead formula */ { value = 0.299 * mem_pal[i].red + 0.587 * mem_pal[i].green + 0.114 * mem_pal[i].blue; v = (int)rint(value); } mem_pal[i].red = v; mem_pal[i].green = v; mem_pal[i].blue = v; } } else { mask = malloc(mem_width); if (!mask) return; ch = mem_channel; mem_channel = CHN_IMAGE; for (i = 0; i < mem_height; i++) { row_protected(0, i, mem_width, mask); for (j = 0; j < mem_width; j++) { if (gcor) /* Gamma + H-K effect */ { value = rgb2B(gamma256[img[0]], gamma256[img[1]], gamma256[img[2]]); v = UNGAMMA256(value); } else /* Usual */ { value = 0.299 * img[0] + 0.587 * img[1] + 0.114 * img[2]; v = (int)rint(value); } v *= 255 - mask[j]; k = *img * mask[j] + v; *img++ = (k + (k >> 8) + 1) >> 8; k = *img * mask[j] + v; *img++ = (k + (k >> 8) + 1) >> 8; k = *img * mask[j] + v; *img++ = (k + (k >> 8) + 1) >> 8; } } mem_channel = ch; free(mask); } } /* Valid for x=0..5, which is enough here */ #define MOD3(x) ((((x) * 5 + 1) >> 2) & 3) /* Nonclassical HSV: H is 0..6, S is 0..1, V is 0..255 */ void rgb2hsv(unsigned char *rgb, double *hsv) { int c0, c1, c2; if (!((rgb[0] ^ rgb[1]) | (rgb[0] ^ rgb[2]))) { hsv[0] = hsv[1] = 0.0; hsv[2] = rgb[0]; return; } c2 = rgb[2] < rgb[0] ? 1 : 0; if (rgb[c2] >= rgb[c2 + 1]) c2++; c0 = MOD3(c2 + 1); c1 = (c2 + c0) ^ 3; hsv[2] = rgb[c0] > rgb[c1] ? rgb[c0] : rgb[c1]; hsv[1] = hsv[2] - rgb[c2]; hsv[0] = c0 * 2 + 1 + (rgb[c1] - rgb[c0]) / hsv[1]; hsv[1] /= hsv[2]; } void hsv2rgb(unsigned char *rgb, double *hsv) { double h0, h1, h2; int i; h2 = hsv[2] * 2; h1 = h2 * (1.0 - hsv[1]); i = hsv[0]; h0 = (hsv[0] - i) * (h2 - h1); if (i & 1) h2 -= h0 , h0 += h2; else h0 += h1; i >>= 1; rgb[i] = ((int)h2 + 1) >> 1; rgb[MOD3(i + 1)] = ((int)h0 + 1) >> 1; rgb[MOD3(i + 2)] = ((int)h1 + 1) >> 1; } static double rgb_hsl(int t, png_color col) { double hsv[3]; unsigned char rgb[3] = {col.red, col.green, col.blue}; if (t == 2) return (0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]); rgb2hsv(rgb, hsv); return (hsv[t]); } void mem_pal_index_move( int c1, int c2 ) // Move index c1 to c2 and shuffle in between up/down { png_color temp; int i, j; if (c1 == c2) return; j = c1 < c2 ? 1 : -1; temp = mem_pal[c1]; for (i = c1; i != c2; i += j) mem_pal[i] = mem_pal[i + j]; mem_pal[c2] = temp; } void mem_canvas_index_move( int c1, int c2 ) // Similar to palette item move but reworks canvas pixels { unsigned char table[256]; int i; if (c1 == c2) return; for (i = 0; i < 256; i++) { table[i] = i + (i > c2) - (i > c1); } table[c1] = c2; table[c2] += (c1 > c2); // Remap transparent color if (mem_xpm_trans >= 0) mem_xpm_trans = table[mem_xpm_trans]; // Change pixel index to new palette if (mem_img_bpp == 1) do_xlate(table, mem_img[CHN_IMAGE], mem_width * mem_height); } void mem_pal_sort( int a, int i1, int i2, int rev ) // Sort colours in palette { int tab0[256], tab1[256], tmp, i, j; png_color old_pal[256]; unsigned char map[256]; double lxnA[3], lxn[3]; if ( i2 == i1 || i1>mem_cols || i2>mem_cols ) return; if ( i2 < i1 ) { i = i1; i1 = i2; i2 = i; } if (a == 4) get_lxn(lxnA, PNG_2_INT(mem_col_A24)); if (a == 9) mem_get_histogram(CHN_IMAGE); for (i = 0; i < 256; i++) tab0[i] = i; for (i = i1; i <= i2; i++) { switch (a) { /* Hue */ case 0: tab1[i] = rint(1024 * rgb_hsl(0, mem_pal[i])); break; /* Saturation */ case 1: tab1[i] = rint(1024 * rgb_hsl(1, mem_pal[i])); break; /* Luminance */ case 2: tab1[i] = rint(1024 * rgb_hsl(2, mem_pal[i])); break; /* Brightness */ case 3: tab1[i] = rint(1024 * rgb2B(gamma256[mem_pal[i].red], gamma256[mem_pal[i].green], gamma256[mem_pal[i].blue])); break; /* Distance to A */ case 4: get_lxn(lxn, PNG_2_INT(mem_pal[i])); tab1[i] = rint(1024 * ((lxn[0] - lxnA[0]) * (lxn[0] - lxnA[0]) + (lxn[1] - lxnA[1]) * (lxn[1] - lxnA[1]) + (lxn[2] - lxnA[2]) * (lxn[2] - lxnA[2]))); break; /* Red */ case 5: tab1[i] = mem_pal[i].red; break; /* Green */ case 6: tab1[i] = mem_pal[i].green; break; /* Blue */ case 7: tab1[i] = mem_pal[i].blue; break; /* Projection on A->B */ case 8: tab1[i] = mem_pal[i].red * (mem_col_B24.red - mem_col_A24.red) + mem_pal[i].green * (mem_col_B24.green - mem_col_A24.green) + mem_pal[i].blue * (mem_col_B24.blue - mem_col_A24.blue); break; /* Frequency */ case 9: tab1[i] = mem_histogram[i]; break; } } rev = rev ? 1 : 0; for ( j=i2; j>i1; j-- ) // The venerable bubble sort for ( i=i1; i= 0) mem_xpm_trans = map[mem_xpm_trans]; if (mem_img_bpp != 1) return; // Adjust canvas pixels if in indexed palette mode do_xlate(map, mem_img[CHN_IMAGE], mem_width * mem_height); /* Modify A & B */ mem_col_A = map[mem_col_A]; mem_col_B = map[mem_col_B]; } void mem_invert() // Invert the palette { int i, j; png_color *col = mem_pal; unsigned char *img; if ((mem_channel == CHN_IMAGE) && (mem_img_bpp == 1)) { for ( i=0; i<256; i++ ) { col->red = 255 - col->red; col->green = 255 - col->green; col->blue = 255 - col->blue; col++; } } else { unsigned char *mask = calloc(1, mem_width); j = mem_width * mem_height; if (mem_channel == CHN_IMAGE) j *= 3; img = mem_img[mem_channel]; for (i = 0; i < j; i++) { *img++ ^= 255; } if (mask) { mask_merge(mem_undo_previous(mem_channel), mem_channel, mask); free(mask); } } } /* !!! The rectangles here exclude bottom & right border */ int clip(int *rxy, int x0, int y0, int x1, int y1, const int *vxy) { rxy[0] = x0 < vxy[0] ? vxy[0] : x0; rxy[1] = y0 < vxy[1] ? vxy[1] : y0; rxy[2] = x1 > vxy[2] ? vxy[2] : x1; rxy[3] = y1 > vxy[3] ? vxy[3] : y1; return ((rxy[2] > rxy[0]) && (rxy[3] > rxy[1])); } /* Intersect outer & inner rectangle, write out 1 to 5 rectangles the outer one * separates into, return number of outer rectangles */ int clip4(int *rect04, int xo, int yo, int wo, int ho, int xi, int yi, int wi, int hi) { int *p = rect04 + 4; int xo1 = xo + wo, yo1 = yo + ho, xi1 = xi + wi, yi1 = yi + hi; // Whole outer rectangle p[0] = xo; p[1] = yo; p[2] = wo; p[3] = ho; // No intersection if ((xi >= xo1) || (yi >= yo1) || (xo >= xi1) || (yo >= yi1)) { rect04[0] = xi; rect04[1] = yi; rect04[2] = rect04[3] = 0; return (1); } if (yi > yo) // Top rectangle p[3] = yi - yo , p += 4; else yi = yo; if (yi1 < yo1) // Bottom rectangle *p++ = xo , *p++ = yi1 , *p++ = wo , *p++ = yo1 - yi1; else yi1 = yo1; hi = yi1 - yi; if (xi > xo) // Left rectangle *p++ = xo , *p++ = yi , *p++ = xi - xo , *p++ = hi; else xi = xo; if (xi1 < xo1) // Right rectangle *p++ = xi1 , *p++ = yi , *p++ = xo1 - xi1 , *p++ = hi; else xi1 = xo1; wi = xi1 - xi; // Clipped inner rectangle rect04[0] = xi; rect04[1] = yi; rect04[2] = wi; rect04[3] = hi; // Number of outer rectangles return ((p - rect04 - 4) >> 2); } void line_init(linedata line, int x0, int y0, int x1, int y1) { int i; line[0] = x0; line[1] = y0; line[4] = (x1 - x0) * (line[6] = line[8] = x1 - x0 < 0 ? -1 : 1); line[5] = (y1 - y0) * (line[7] = line[9] = y1 - y0 < 0 ? -1 : 1); i = line[4] >= line[5]; /* More horizontal? */ line[2] = line[3] = line[5 - i]; line[4] = 2 * line[4 + i]; line[5] = 2 * line[2]; line[6 + i] = 0; } int line_step(linedata line) { line[3] -= line[4]; if (line[3] <= 0) { line[3] += line[5]; line[0] += line[8]; line[1] += line[9]; } else { line[0] += line[6]; line[1] += line[7]; } return (--line[2]); } void line_nudge(linedata line, int x, int y) { while ((line[0] != x) && (line[1] != y) && (line[2] >= 0)) line_step(line); } /* !!! The clipping rectangle here includes both borders */ int line_clip(linedata line, const int *vxy, int *step) { int vh = !line[6], hv = vh ^ 1, hs = line[8 + vh], vs = line[8 + hv]; int dh = hs < 0, dv = vs < 0, l4 = line[4], steps[2]; int i, j, dx, dy; for (i = 1; 1;) { dx = (vxy[(dh ^ i) * 2 + vh] - line[vh]) * hs + i; if (dx < 0) dx = 0; if (l4) { dy = (vxy[(dv ^ i) * 2 + hv] - line[hv]) * vs + i; if (dy < 0) dy = 0; dy = (line[5] * (dy - 1) + line[3] + l4 - 1) / l4; if ((dy > dx) ^ i) dx = dy; } steps[i] = dx; if (!i--) break; } if (line[5]) // Makes no sense for a single point { /* Too short? */ if ((line[2] -= dx) < 0) return (line[2]); dy = (j = l4 * dx + line[5] - line[3]) / line[5]; line[vh] += hs * dx; line[hv] += vs * dy; line[3] = line[5] * (dy + 1) - j; } /* Misses the rectangle? */ if ((line[0] < vxy[0]) || (line[0] > vxy[2]) || (line[1] < vxy[1]) || (line[1] > vxy[3])) return (line[2] = -1); *step = dx; j = steps[1] - dx - 1; if (j < line[2]) line[2] = j; return (line[2]); } void line_flip(linedata line) { int l, d2; if (!line[2]) return; // Single point l = line[4] * line[2] + line[5] - line[3]; d2 = l / line[5]; line[3] = l - d2 * line[5] + 1; line[0] += line[2] * line[6] + d2 * (line[8] - line[6]); line[1] += line[2] * line[7] + d2 * (line[9] - line[7]); line[6] *= -1; line[7] *= -1; line[8] *= -1; line[9] *= -1; } /* Produce a horizontal segment from two connected lines */ static void twoline_segment(int *xx, linedata line1, linedata line2) { xx[0] = xx[1] = line1[0]; while (TRUE) { if (!line1[7]) /* Segments longer than 1 pixel */ { while ((line1[2] > 0) && (line1[3] > line1[4])) line_step(line1); } if (xx[0] > line1[0]) xx[0] = line1[0]; if (xx[1] < line1[0]) xx[1] = line1[0]; if ((line1[2] > 0) || (line2[2] < 0)) break; memcpy(line1, line2, sizeof(linedata)); line2[2] = -1; if (xx[0] > line1[0]) xx[0] = line1[0]; if (xx[1] < line1[0]) xx[1] = line1[0]; } } void sline( int x1, int y1, int x2, int y2 ) // Draw single thickness straight line { linedata line; line_init(line, x1, y1, x2, y2); for (; line[2] >= 0; line_step(line)) { IF_IN_RANGE(line[0], line[1]) put_pixel(line[0], line[1]); } } void circle_line(int x0, int y0, int dx, int dy, int thick); void tline( int x1, int y1, int x2, int y2, int size ) // Draw size thickness straight line { linedata line; int xdo, ydo, todo; xdo = abs(x2 - x1); ydo = abs(y2 - y1); todo = xdo > ydo ? xdo : ydo; if (todo < 2) return; // The 1st and last points are done by calling procedure if (size < 2) /* One pixel wide */ { sline(x1, y1, x2, y2); return; } /* Draw middle segment */ circle_line(x1, y1, x2 - x1, y2 - y1, size); /* Add four more circles to cover all odd points */ if (!xdo || !ydo || (xdo == ydo)) return; /* Not needed */ line_init(line, x1, y1, x2, y2); line_nudge(line, x1 + line[8] - 2 * line[6], y1 + line[9] - 2 * line[7]); /* Jump to first diagonal step */ f_circle(line[0], line[1], size); f_circle(line[0] - line[8], line[1] - line[9], size); line_nudge(line, x2, y2); /* Jump to last diagonal step */ f_circle(line[0], line[1], size); f_circle(line[0] - line[8], line[1] - line[9], size); } /* Draw whatever is bounded by two pairs of lines */ void draw_quad(linedata line1, linedata line2, linedata line3, linedata line4) { int x1, x2, y1, xx[4]; for (; line1[2] >= 0; line_step(line1) , line_step(line3)) { y1 = line1[1]; twoline_segment(xx + 0, line1, line2); twoline_segment(xx + 2, line3, line4); if ((y1 < 0) || (y1 >= mem_height)) continue; if (xx[0] > xx[2]) xx[0] = xx[2]; if (xx[1] < xx[3]) xx[1] = xx[3]; x1 = xx[0] < 0 ? 0 : xx[0]; x2 = xx[1] >= mem_width ? mem_width - 1 : xx[1]; put_pixel_row(x1, y1, x2 - x1 + 1, NULL); } } /* Draw general parallelogram */ void g_para( int x1, int y1, int x2, int y2, int xv, int yv ) { linedata line1, line2, line3, line4; int i, j, x[2] = {x1, x2}, y[2] = {y1, y2}; j = (y1 < y2) ^ (yv < 0); i = j ^ 1; line_init(line1, x[i], y[i], x[i] + xv, y[i] + yv); line_init(line2, x[i] + xv, y[i] + yv, x[j] + xv, y[j] + yv); line_init(line3, x[i], y[i], x[j], y[j]); line_init(line4, x[j], y[j], x[j] + xv, y[j] + yv); draw_quad(line1, line2, line3, line4); } /* Shapeburst engine */ int sb_rect[4]; static unsigned short *sb_buf; static void put_pixel_sb(int x, int y) { int j, x1, y1; x1 = x - sb_rect[0]; y1 = y - sb_rect[1]; if ((x1 < 0) || (x1 >= sb_rect[2]) || (y1 < 0) || (y1 >= sb_rect[3])) return; j = pixel_protected(x, y); if (IS_INDEXED ? j : j == 255) return; sb_buf[y1 * sb_rect[2] + x1] = 0xFFFF; } static void mask_select(unsigned char *mask, unsigned char *xsel, int l); static void put_pixel_row_sb(int x, int y, int len, unsigned char *xsel) { unsigned char mask[ROW_BUFLEN]; int x1, y1, sb_ofs, offset, use_mask, masked; if (len <= 0) return; x1 = x - sb_rect[0]; y1 = y - sb_rect[1]; if ((x1 < 0) || (x1 >= sb_rect[2]) || (y1 < 0) || (y1 >= sb_rect[3])) return; if (x1 + len > sb_rect[2]) len = sb_rect[2] - x1; sb_ofs = y1 * sb_rect[2] + x1; offset = x + mem_width * y; masked = IS_INDEXED ? 1 : 255; use_mask = (mem_channel <= CHN_ALPHA) && mem_img[CHN_MASK] && !channel_dis[CHN_MASK]; while (TRUE) { int i, l = len <= ROW_BUFLEN ? len : ROW_BUFLEN; prep_mask(0, 1, l, mask, use_mask ? mem_img[CHN_MASK] + offset : NULL, mem_img[CHN_IMAGE] + offset * mem_img_bpp); if (xsel) { mask_select(mask, xsel, l); xsel += l; } for (i = 0; i < l; i++) if (mask[i] < masked) sb_buf[sb_ofs + i] = 0xFFFF; if (!(len -= l)) return; sb_ofs += l; offset += l; } } /* Distance transform of binary image map; * for now, uses hardcoded L1 distance metric */ static int shapeburst(int w, int h, unsigned short *dmap) { unsigned short *r0; int i, j, k, l, dx, dy, maxd; /* Calculate distance */ r0 = dmap; dx = 1; dy = w; /* Forward pass */ while (TRUE) { /* First row */ for (i = 0; i < w; i++ , r0 += dx) if (*r0) *r0 = 1; /* Other rows */ for (j = 1; j < h; j++) { /* 1st pixel */ if (*r0) *r0 = 1; r0 += dx; /* Other pixels */ for (i = w - 1; i > 0; i-- , r0 += dx) { k = *(r0 - dx); l = *(r0 - dy); if (k > l) k = l; if (*r0 > k) *r0 = k + 1; } } if (dx < 0) break; /* Both passes done */ r0 = dmap + w * h - 1; dx = -1; dy = -w; /* Backward pass */ } /* Find largest */ maxd = 0; r0 = dmap; for (k = w * h; k; k-- , r0++) if (maxd < *r0) maxd = *r0; return (maxd); } int init_sb() { sb_buf = calloc(sb_rect[2] * sb_rect[3], sizeof(unsigned short)); if (!sb_buf) { memory_errors(1); return (FALSE); } put_pixel = put_pixel_sb; put_pixel_row = put_pixel_row_sb; return (TRUE); } /* Mask, if present, must be sb_rect[] sized */ void render_sb(unsigned char *mask) { grad_info svgrad, *grad = gradient + mem_channel; int i, maxd; if (!sb_buf) return; /* Uninitialized */ put_pixel = put_pixel_def; put_pixel_row = put_pixel_row_def; maxd = shapeburst(sb_rect[2], sb_rect[3], sb_buf); if (maxd) /* Have something to draw */ { svgrad = *grad; grad->gmode = GRAD_MODE_BURST; if (!grad->len) grad->len = maxd - (maxd > 1); grad_update(grad); for (i = 0; i < sb_rect[3]; i++) put_pixel_row(sb_rect[0], sb_rect[1] + i, sb_rect[2], mask ? mask + sb_rect[2] * i : NULL); *grad = svgrad; } free(sb_buf); sb_buf = NULL; } /* * This flood fill algorithm processes image in quadtree order, and thus has * guaranteed upper bound on memory consumption, of order O(width + height). * This implementation takes O(max(width, height)) for simplicity - X and Y * bitmaps are interleaved. * (C) Dmitry Groshev */ #define QLEVELS 11 #define QMINSIZE 32 #define QMINLEVEL 5 /* * Level bitmaps are ordered from nearest to farthest, with cells interleaved * in the following order: Left-Y Right-Y Top-X Bottom-X. */ static int wjfloodfill(int x, int y, int col, unsigned char *bmap, int lw) { short nearq[QMINSIZE * QMINSIZE * 2]; /* QMINSIZE bits per cell */ guint32 tmap, lmap[(MAX_DIM >> QMINLEVEL) * 12 + QLEVELS * 4], maps[4]; int borders[4] = {0, mem_width, 0, mem_height}; int corners[4], coords[4], slots[4]; int i, j, k, tx, ty, fmode = 0, imgc = 0, lastr[3], thisr[3]; int lmax, ntail, bidx = 0, bbit = 0; double lastc[3], thisc[3], dist2, mdist2 = flood_step * flood_step; csel_info *flood_data = NULL; char *tmp = NULL; /* Init */ if ((x < 0) || (x >= mem_width) || (y < 0) || (y >= mem_height) || (get_pixel(x, y) != col) || (pixel_protected(x, y) == 255)) return (FALSE); /* Exact limits are less, but it's too complicated */ lmax = mem_width > mem_height ? mem_width : mem_height; lmax = (lmax >> QMINLEVEL) * 12 + QLEVELS * 4; memset(lmap, 0, lmax * sizeof(*lmap)); /* Start drawing */ if (bmap) bmap[y * lw + (x >> 3)] |= 1 << (x & 7); else { put_pixel(x, y); if (get_pixel(x, y) == col) return (FALSE); /* Can't draw */ } /* Configure fuzzy flood fill */ if (flood_step && ((mem_channel == CHN_IMAGE) || flood_img)) { if (flood_slide) fmode = flood_cube ? 2 : 3; else flood_data = ALIGN(tmp = calloc(1, sizeof(csel_info) + sizeof(double))); if (flood_data) { flood_data->center = get_pixel_RGB(x, y); flood_data->range = flood_step; flood_data->mode = flood_cube ? 2 : 0; /* !!! Alpha isn't tested yet !!! */ csel_reset(flood_data); fmode = 1; } } /* Configure by-image flood fill */ else if (!flood_step && flood_img && (mem_channel != CHN_IMAGE)) { imgc = get_pixel_img(x, y); fmode = -1; } /* Set up initial area */ corners[0] = x & ~(QMINSIZE - 1); corners[2] = y & ~(QMINSIZE - 1); nearq[0] = x; nearq[1] = y; ntail = 2; while (1) { corners[1] = corners[0] + QMINSIZE; corners[3] = corners[2] + QMINSIZE; for (i = 0; i < 4; i++) { int j, k, i2 = (i >> 1) ^ 1; int wx = corners[i2 + i2], wy = corners[i]; /* Locate map slots */ j = ((unsigned)(wy & ~(wy - 1)) - 1) >> QMINLEVEL; // Level mask j += j; k = (wx >> QMINLEVEL) & (j + 1); slots[i] = k = (j + k) * 4 + i; /* Prefill near queue */ if (k >= lmax) continue; // Outside image k ^= 1; tmap = lmap[k]; lmap[k] = 0; for (wy -= i & 1; tmap; wx++ , tmap >>= 1) { if (!(tmap & 1)) continue; nearq[ntail++ + i2] = wx; nearq[ntail++ - i2] = wy; } } /* Clear the side bitmaps */ maps[0] = maps[1] = maps[2] = maps[3] = 0; // memset(maps, 0, sizeof(maps)); /* Process near points */ while (ntail) { /* Unqueue last x & y */ coords[2] = y = nearq[--ntail]; coords[0] = x = nearq[--ntail]; if (fmode > 1) { k = get_pixel_RGB(x, y); if (fmode == 3) get_lxn(lastc, k); else { lastr[0] = INT_2_R(k); lastr[1] = INT_2_G(k); lastr[2] = INT_2_B(k); } } for (i = 0; i < 4; i++) { coords[1] = x; coords[3] = y; coords[(i & 2) + 1] += ((i + i) & 2) - 1; /* Is pixel valid? */ if (coords[i] == borders[i]) continue; tx = coords[1]; ty = coords[3]; if (bmap) { bidx = ty * lw + (tx >> 3); bbit = 1 << (tx & 7); if (bmap[bidx] & bbit) continue; } /* Sliding mode */ switch (fmode) { case 3: /* Sliding L*X*N* */ get_lxn(thisc, get_pixel_RGB(tx, ty)); dist2 = (thisc[0] - lastc[0]) * (thisc[0] - lastc[0]) + (thisc[1] - lastc[1]) * (thisc[1] - lastc[1]) + (thisc[2] - lastc[2]) * (thisc[2] - lastc[2]); if (dist2 > mdist2) continue; break; case 2: /* Sliding RGB */ k = get_pixel_RGB(tx, ty); thisr[0] = INT_2_R(k); thisr[1] = INT_2_G(k); thisr[2] = INT_2_B(k); if ((abs(thisr[0] - lastr[0]) > flood_step) || (abs(thisr[1] - lastr[1]) > flood_step) || (abs(thisr[2] - lastr[2]) > flood_step)) continue; break; case 1: /* Centered mode */ if (!csel_scan(ty * mem_width + tx, 1, 1, NULL, mem_img[CHN_IMAGE], flood_data)) continue; break; case 0: /* Normal mode */ if (get_pixel(tx, ty) != col) continue; break; default: /* (-1) - By-image mode */ if (get_pixel_img(tx, ty) != imgc) continue; break; } /* Is pixel writable? */ if (bmap) { if (pixel_protected(tx, ty) == 255) continue; bmap[bidx] |= bbit; } else { put_pixel(tx, ty); if (get_pixel(tx, ty) == col) continue; } /* Near queue */ // if (coords[i] != corners[i]) if (coords[i] & (QMINSIZE - 1)) { nearq[ntail++] = tx; nearq[ntail++] = ty; continue; } /* Far map */ j = coords[(i & 2) ^ 3] & (QMINSIZE - 1); maps[i] |= 1 << j; } } /* Store maps */ for (i = 0; i < 4; i++) { /* !!! Condition prevents out-of-bounds access */ if (maps[i]) lmap[slots[i]] |= maps[i]; } /* Find what else remains */ for (i = 0; (i < lmax) && !lmap[i]; i++); if (i >= lmax) break; // All done /* Determine where that happens to be */ j = ((i >> 2) + 2) << QMINLEVEL; k = nextpow2(j) >> 1; // MSB x = (k >> 1) + ((i & 1) << QMINLEVEL) - QMINSIZE; y = j - k; i &= 2; corners[i] = (corners[i] & ~(k - 1)) + x; i ^= 2; corners[i] = (corners[i] & ~(k - 1)) + y; } free(tmp); return (TRUE); } /* Determine bitmap boundaries */ static int bitmap_bounds(int *rect, unsigned char *pat, int lw) { unsigned char buf[MAX_WIDTH / 8], *tmp; int i, j, k, x0, x1, y0, y1, w, h; /* Find top row */ k = lw * rect[3]; tmp = pat; i = k; while (!*tmp++ && i--); if (i <= 0) return (0); /* Nothing there */ y0 = y1 = (tmp - pat - 1) / lw; /* Find bottom row */ for (j = y0 + 1; j < rect[3]; j++) { tmp = pat + j * lw; i = lw; while (!*tmp++ && i--); if (i > 0) y1 = j; } y1++; /* Find left & right extents (8 pixels granular) */ memcpy(buf, tmp = pat + y0 * lw, lw); tmp += lw; for (j = y0 + 1; j < y1; j++) { for (i = 0; i < lw; i++) buf[i] |= *tmp++; } for (x0 = 0; !buf[x0] && (x0 < lw); x0++); for (x1 = lw - 1; !buf[x1] && (x1 > x0); x1--); x0 *= 8; x1 = x1 * 8 + 8; if (x1 > rect[2]) x1 = rect[2]; /* Set up boundaries */ rect[0] += x0; rect[1] += y0; rect[2] = w = x1 - x0; rect[3] = h = y1 - y0; return (w * h); } /* Flood fill - may use temporary area (1 bit per pixel) */ void flood_fill(int x, int y, unsigned int target) { unsigned char *pat, *buf, *temp; int i, j, k, l, sb, lw = (mem_width + 7) >> 3; /* Shapeburst mode */ sb = STROKE_GRADIENT; /* Regular fill? */ if (!sb && !mem_tool_pat && (tool_opacity == 255) && !flood_step && (!flood_img || (mem_channel == CHN_IMAGE))) { wjfloodfill(x, y, target, NULL, 0); return; } buf = calloc(1, mem_width + lw * mem_height); if (!buf) { memory_errors(1); return; } pat = temp = buf + mem_width; while (wjfloodfill(x, y, target, pat, lw)) { if (sb) /* Shapeburst - setup rendering backbuffer */ { sb_rect[0] = sb_rect[1] = 0; sb_rect[2] = mem_width; sb_rect[3] = mem_height; l = bitmap_bounds(sb_rect, pat, lw); if (!l) break; /* Nothing to draw */ if (!init_sb()) break; /* Not enough memory */ } for (i = 0; i < mem_height; i++) { for (j = l = 0; j < mem_width; ) { k = *temp++; if (!k) { j += 8; continue; } for (; k; k >>= 1) { if (k & 1) l = buf[j] = 255; j++; } j = (j + 7) & ~(7); } if (!l) continue; // Avoid wasting time on empty rows put_pixel_row(0, i, mem_width, buf); memset(buf, 0, mem_width); } if (sb) render_sb(NULL); /* Finalize */ break; } free(buf); } void f_rectangle(int x, int y, int w, int h) // Draw a filled rectangle { w += x; h += y; if (x < 0) x = 0; if (y < 0) y = 0; if (w > mem_width) w = mem_width; if (h > mem_height) h = mem_height; w -= x; for (; y < h; y++) put_pixel_row(x, y, w, NULL); } /* * This code uses midpoint ellipse algorithm modified for uncentered ellipses, * with floating-point arithmetics to prevent overflows. (C) Dmitry Groshev */ static void trace_ellipse(int w, int h, int *left, int *right) { int dx, dy; double err, stx, sty, w2, h2; if (left[0] > w) left[0] = w; if (right[0] < w) right[0] = w; if (h <= 1) return; /* Too small */ h2 = h * h; w2 = w * w; dx = w & 1; dy = h; stx = h2 * dx; sty = w2 * dy; err = h2 * (dx * 5 + 4) + w2 * (1 - h - h); while (1) /* Have to force first step */ { if (left[dy >> 1] > dx) left[dy >> 1] = dx; if (right[dy >> 1] < dx) right[dy >> 1] = dx; if (err >= 0.0) { dy -= 2; sty -= w2 + w2; err -= 4.0 * sty; } dx += 2; stx += h2 + h2; err += 4.0 * (h2 + stx); if ((dy < 2) || (stx >= sty)) break; } err += 3.0 * (w2 - h2) - 2.0 * (stx + sty); while (dy > 1) { if (left[dy >> 1] > dx) left[dy >> 1] = dx; if (right[dy >> 1] < dx) right[dy >> 1] = dx; if (err < 0.0) { dx += 2; stx += h2 + h2; err += 4.0 * stx; } dy -= 2; sty -= w2 + w2; err += 4.0 * (w2 - sty); } /* For too-flat ellipses */ if (left[1] > dx) left[1] = dx; if (right[1] < w - 2) right[1] = w - 2; } static void wjellipse(int xs, int ys, int w, int h, int type, int thick) { int i, j, k, dx0, dx1, dy, *left, *right; /* Prepare */ ys += ys + --h; xs += xs + --w; k = type ? w + 1 : w & 1; j = h / 2 + 1; left = malloc(2 * j * sizeof(int)); if (!left) return; right = left + j; for (i = 0; i < j; i++) { left[i] = k; right[i] = 0; } /* Plot outer */ trace_ellipse(w, h, left, right); /* Plot inner */ if (type && (thick > 1)) { int i, j, k; /* Determine possible height */ thick += thick - 2; for (i = h; i >= 0; i -= 2) { if (left[i >> 1] > thick + 1) break; } i = i >= h - thick ? h - thick : i + 2; /* Determine possible width */ j = left[thick >> 1]; if (j > w - thick) j = w - thick; if (j < 2) i = h & 1; /* Do the plotting */ for (k = i >> 1; k <= h >> 1; k++) left[k] = w & 1; if (i > 1) trace_ellipse(j, i, left, right); } /* Draw result */ for (dy = h & 1; dy <= h; dy += 2) { int y0 = ys - dy, y1 = ys + dy; if (y1 < 0) continue; if (y0 < 0) y0 = y1; y0 >>= 1; y1 >>= 1; if (y0 >= mem_height) continue; dx0 = right[dy >> 1]; dx1 = left[dy >> 1]; if (dx1 <= 1) dx1 = -dx0; // Merge two spans while (TRUE) { int x0 = xs - dx0, x1 = xs - dx1; if ((x1 >= 0) && (x0 < mem_width * 2)) { x0 >>= 1; x1 >>= 1; if (x0 < 0) x0 = 0; if (++x1 > mem_width) x1 = mem_width; x1 -= x0; put_pixel_row(x0, y0, x1, NULL); if (y1 != y0) put_pixel_row(x0, y1, x1, NULL); } if (dx1 <= 0) break; x1 = -dx0; dx0 = -dx1; dx1 = x1; } } free(left); } /* Thickness 0 means filled */ void mem_ellipse(int x1, int y1, int x2, int y2, int thick) { int xs, ys, xl, yl, sb = FALSE; xs = x1 < x2 ? x1 : x2; ys = y1 < y2 ? y1 : y2; xl = abs(x2 - x1) + 1; yl = abs(y2 - y1) + 1; /* Shapeburst mode */ if (STROKE_GRADIENT) { sb_rect[0] = xs; sb_rect[1] = ys; sb_rect[2] = xl; sb_rect[3] = yl; sb = init_sb(); } /* Draw rectangle instead if too small */ if ((xl <= 2) || (yl <= 2)) f_rectangle(xs, ys, xl, yl); else wjellipse(xs, ys, xl, yl, thick && (thick * 2 < xl) && (thick * 2 < yl), thick); if (sb) render_sb(NULL); } static int circ_r, circ_trace[128]; static void retrace_circle(int r) { int sz, left[128]; circ_r = r--; sz = ((r >> 1) + 1) * sizeof(int); memset(left, 0, sz); memset(circ_trace, 0, sz); trace_ellipse(r, r, left, circ_trace); } void f_circle( int x, int y, int r ) // Draw a filled circle { int i, x0, x1, y0, y1, r1 = r - 1, half = r1 & 1; /* Prepare & cache circle contour */ if (circ_r != r) retrace_circle(r); /* Draw result */ for (i = half; i <= r1; i += 2) { y0 = y - ((i + half) >> 1); y1 = y + ((i - half) >> 1); if ((y0 >= mem_height) || (y1 < 0)) continue; x0 = x - ((circ_trace[i >> 1] + half) >> 1); x1 = x + ((circ_trace[i >> 1] - half) >> 1) + 1; if (x0 < 0) x0 = 0; if (x1 > mem_width) x1 = mem_width; x1 -= x0; if (y0 >= 0) put_pixel_row(x0, y0, x1, NULL); if ((y1 != y0) && (y1 < mem_height)) put_pixel_row(x0, y1, x1, NULL); } } static int find_tangent(int dx, int dy) { int i, j = 0, yy = (circ_r + 1) & 1, d, dist = 0; dx = abs(dx); dy = abs(dy); for (i = 0; i < (circ_r + 1) >> 1; i++) { d = (i + i + yy) * dy + circ_trace[i] * dx; if (d < dist) continue; dist = d; j = i; } return (j); } /* Draw line as if traced by circle brush */ void circle_line(int x0, int y0, int dx, int dy, int thick) { int n, ix, iy, xx[2], yy[2], dt = (thick + 1) & 1; if (circ_r != thick) retrace_circle(thick); n = find_tangent(dx, dy); ix = dx >= 0 ? 0 : 1; iy = dy >= 0 ? 0 : 1; xx[ix] = x0 - n - dt; xx[ix ^ 1] = x0 + n; yy[iy] = y0 + ((circ_trace[n] - dt) >> 1); yy[iy ^ 1] = y0 - ((circ_trace[n] + dt) >> 1); g_para(xx[0], yy[0], xx[1], yy[1], dx, dy); } void mem_flip_v(char *mem, char *tmp, int w, int h, int bpp) { unsigned char *src, *dest; int i, k; k = w * bpp; src = mem; dest = mem + (h - 1) * k; h /= 2; for (i = 0; i < h; i++) { memcpy(tmp, src, k); memcpy(src, dest, k); memcpy(dest, tmp, k); src += k; dest -= k; } } void mem_flip_h( char *mem, int w, int h, int bpp ) { unsigned char tmp, *src, *dest; int i, j, k; k = w * bpp; w /= 2; for (i = 0; i < h; i++) { src = mem + i * k; dest = src + k - bpp; if (bpp == 1) { for (j = 0; j < w; j++) { tmp = *src; *src++ = *dest; *dest-- = tmp; } } else { for (j = 0; j < w; j++) { tmp = src[0]; src[0] = dest[0]; dest[0] = tmp; tmp = src[1]; src[1] = dest[1]; dest[1] = tmp; tmp = src[2]; src[2] = dest[2]; dest[2] = tmp; src += 3; dest -= 3; } } } } void mem_bacteria( int val ) // Apply bacteria effect val times the canvas area { // Ode to 1994 and my Acorn A3000 int i, j, x, y, w = mem_width-2, h = mem_height-2, tot = w*h, np, cancel; unsigned int pixy; unsigned char *img; while ( tot > PROGRESS_LIM ) // Ensure the user gets a regular opportunity to cancel { tot /= 2; val *= 2; } cancel = (w * h * val > PROGRESS_LIM); if (cancel) progress_init(_("Bacteria Effect"), 1); for ( i=0; i= val - 20)) if (progress_update((float)i / val)) break; for ( j=0; j PROGRESS_LIM * 4); j = old_w * bpp; l = dir ? -bpp : bpp; k = -old_w * l; old += dir ? j - bpp: (old_h - 1) * j; if (flag) progress_init(_("Rotating"), 1); for (i = 0; i < old_w; i++) { if (flag && ((i * 5) % old_w >= old_w - 5)) progress_update((float)i / old_w); src = old; if (bpp == 1) { for (j = 0; j < old_h; j++) { *new++ = *src; src += k; } } else { for (j = 0; j < old_h; j++) { *new++ = src[0]; *new++ = src[1]; *new++ = src[2]; src += k; } } old += l; } if (flag) progress_end(); } int mem_sel_rot( int dir ) // Rotate clipboard 90 degrees { unsigned char *buf = NULL; int i, j = mem_clip_w * mem_clip_h, bpp = mem_clip_bpp; for (i = 0; i < NUM_CHANNELS; i++ , bpp = 1) { if (!mem_clip.img[i]) continue; buf = malloc(j * bpp); if (!buf) break; // Not enough memory mem_rotate(buf, mem_clip.img[i], mem_clip_w, mem_clip_h, dir, bpp); free(mem_clip.img[i]); mem_clip.img[i] = buf; } /* Don't leave a mix of rotated and unrotated channels */ if (!buf && i) mem_free_image(&mem_clip, FREE_ALL); if (!buf) return (1); i = mem_clip_w; mem_clip_w = mem_clip_h; // Flip geometry mem_clip_h = i; return (0); } /* Clear the channels */ static void mem_clear_img(chanlist img, int w, int h, int bpp) { int i, j, k, l = w * h; if (!img[CHN_IMAGE]); // !!! Here, image channel CAN be absent else if (bpp == 3) { unsigned char *tmp = img[CHN_IMAGE]; tmp[0] = mem_col_A24.red; tmp[1] = mem_col_A24.green; tmp[2] = mem_col_A24.blue; j = l * 3; for (i = 3; i < j; i++) tmp[i] = tmp[i - 3]; } else memset(img[CHN_IMAGE], mem_col_A, l); for (k = CHN_IMAGE + 1; k < NUM_CHANNELS; k++) if (img[k]) memset(img[k], 0, l); } void mem_rotate_free_real(chanlist old_img, chanlist new_img, int ow, int oh, int nw, int nh, int bpp, double angle, int mode, int gcor, int dis_a, int silent) { unsigned char *src, *dest, *alpha, A_rgb[3]; unsigned char *pix1, *pix2, *pix3, *pix4; int nx, ny, ox, oy, cc; double rangle = (M_PI / 180.0) * angle; // Radians double s1, s2, c1, c2; // Trig values double cx0, cy0, cx1, cy1; double x00, y00, x0y, y0y; // Quick look up values double fox, foy, k1, k2, k3, k4; // Pixel weights double aa1, aa2, aa3, aa4, aa; double rr, gg, bb; double tw, th, ta, ca, sa, sca, csa, Y00, Y0h, Yw0, Ywh, X00, Xwh; c2 = cos(rangle); s2 = sin(rangle); c1 = -s2; s1 = c2; /* Centerpoints, including half-pixel offsets */ cx0 = (ow - 1) / 2.0; cy0 = (oh - 1) / 2.0; cx1 = (nw - 1) / 2.0; cy1 = (nh - 1) / 2.0; x00 = cx0 - cx1 * s1 - cy1 * s2; y00 = cy0 - cx1 * c1 - cy1 * c2; A_rgb[0] = mem_col_A24.red; A_rgb[1] = mem_col_A24.green; A_rgb[2] = mem_col_A24.blue; /* Prepare clipping rectangle */ tw = 0.5 * (ow + (mode ? 1 : 0)); th = 0.5 * (oh + (mode ? 1 : 0)); ta = M_PI * (angle / 180.0 - floor(angle / 180.0)); ca = cos(ta); sa = sin(ta); sca = ca ? sa / ca : 0.0; csa = sa ? ca / sa : 0.0; Y00 = cy1 - th * ca - tw * sa; Y0h = cy1 + th * ca - tw * sa; Yw0 = cy1 - th * ca + tw * sa; Ywh = cy1 + th * ca + tw * sa; X00 = cx1 - tw * ca + th * sa; Xwh = cx1 + tw * ca - th * sa; mem_clear_img(new_img, nw, nh, bpp); /* Clear the channels */ for (ny = 0; ny < nh; ny++) { int xl, xm; if (!silent && ((ny * 10) % nh >= nh - 10)) progress_update((float)ny / nh); /* Clip this row */ if (ny < Y0h) xl = ceil(X00 + (Y00 - ny) * sca); else if (ny < Ywh) xl = ceil(Xwh + (ny - Ywh) * csa); else /* if (ny < Yw0) */ xl = ceil(Xwh + (Ywh - ny) * sca); if (ny < Y00) xm = ceil(X00 + (Y00 - ny) * sca); else if (ny < Yw0) xm = ceil(X00 + (ny - Y00) * csa); else /* if (ny < Ywh) */ xm = ceil(Xwh + (Ywh - ny) * sca); if (xl < 0) xl = 0; if (--xm >= nw) xm = nw - 1; x0y = ny * s2 + x00; y0y = ny * c2 + y00; for (cc = 0; cc < NUM_CHANNELS; cc++) { if (!new_img[cc]) continue; /* RGB nearest neighbour */ if (!mode && (cc == CHN_IMAGE) && (bpp == 3)) { dest = new_img[CHN_IMAGE] + (ny * nw + xl) * 3; for (nx = xl; nx <= xm; nx++ , dest += 3) { WJ_ROUND(ox, nx * s1 + x0y); WJ_ROUND(oy, nx * c1 + y0y); src = old_img[CHN_IMAGE] + (oy * ow + ox) * 3; dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } continue; } /* One-bpp nearest neighbour */ if (!mode) { dest = new_img[cc] + ny * nw + xl; for (nx = xl; nx <= xm; nx++) { WJ_ROUND(ox, nx * s1 + x0y); WJ_ROUND(oy, nx * c1 + y0y); *dest++ = old_img[cc][oy * ow + ox]; } continue; } /* RGB/RGBA bilinear */ if (cc == CHN_IMAGE) { alpha = NULL; if (new_img[CHN_ALPHA] && !dis_a) alpha = new_img[CHN_ALPHA] + ny * nw + xl; dest = new_img[CHN_IMAGE] + (ny * nw + xl) * 3; for (nx = xl; nx <= xm; nx++ , dest += 3) { fox = nx * s1 + x0y; foy = nx * c1 + y0y; /* floor() is *SLOW* on Win32 - avoiding... */ ox = (int)(fox + 2.0) - 2; oy = (int)(foy + 2.0) - 2; fox -= ox; foy -= oy; k4 = fox * foy; k3 = foy - k4; k2 = fox - k4; k1 = 1.0 - fox - foy + k4; pix1 = old_img[CHN_IMAGE] + (oy * ow + ox) * 3; pix2 = pix1 + 3; pix3 = pix1 + ow * 3; pix4 = pix3 + 3; if (ox > ow - 2) pix2 = pix4 = A_rgb; else if (ox < 0) pix1 = pix3 = A_rgb; if (oy > oh - 2) pix3 = pix4 = A_rgb; else if (oy < 0) pix1 = pix2 = A_rgb; if (alpha) { aa1 = aa2 = aa3 = aa4 = 0.0; src = old_img[CHN_ALPHA] + oy * ow + ox; if (pix1 != A_rgb) aa1 = src[0] * k1; if (pix2 != A_rgb) aa2 = src[1] * k2; if (pix3 != A_rgb) aa3 = src[ow] * k3; if (pix4 != A_rgb) aa4 = src[ow + 1] * k4; aa = aa1 + aa2 + aa3 + aa4; if ((*alpha++ = rint(aa))) { aa = 1.0 / aa; k1 = aa1 * aa; k2 = aa2 * aa; k3 = aa3 * aa; k4 = aa4 * aa; } } if (gcor) /* Gamma-correct */ { rr = gamma256[pix1[0]] * k1 + gamma256[pix2[0]] * k2 + gamma256[pix3[0]] * k3 + gamma256[pix4[0]] * k4; gg = gamma256[pix1[1]] * k1 + gamma256[pix2[1]] * k2 + gamma256[pix3[1]] * k3 + gamma256[pix4[1]] * k4; bb = gamma256[pix1[2]] * k1 + gamma256[pix2[2]] * k2 + gamma256[pix3[2]] * k3 + gamma256[pix4[2]] * k4; dest[0] = UNGAMMA256(rr); dest[1] = UNGAMMA256(gg); dest[2] = UNGAMMA256(bb); } else /* Leave as is */ { rr = pix1[0] * k1 + pix2[0] * k2 + pix3[0] * k3 + pix4[0] * k4; gg = pix1[1] * k1 + pix2[1] * k2 + pix3[1] * k3 + pix4[1] * k4; bb = pix1[2] * k1 + pix2[2] * k2 + pix3[2] * k3 + pix4[2] * k4; dest[0] = rint(rr); dest[1] = rint(gg); dest[2] = rint(bb); } } continue; } /* Alpha channel already done... maybe */ if ((cc == CHN_ALPHA) && !dis_a) continue; /* Utility channel bilinear */ dest = new_img[cc] + ny * nw + xl; for (nx = xl; nx <= xm; nx++) { fox = nx * s1 + x0y; foy = nx * c1 + y0y; /* floor() is *SLOW* on Win32 - avoiding... */ ox = (int)(fox + 2.0) - 2; oy = (int)(foy + 2.0) - 2; fox -= ox; foy -= oy; k4 = fox * foy; k3 = foy - k4; k2 = fox - k4; k1 = 1.0 - fox - foy + k4; src = old_img[cc] + oy * ow + ox; aa1 = aa2 = aa3 = aa4 = 0.0; if (ox < ow - 1) { if (oy < oh - 1) aa4 = src[ow + 1] * k4; if (oy >= 0) aa2 = src[1] * k2; } if (ox >= 0) { if (oy < oh - 1) aa3 = src[ow] * k3; if (oy >= 0) aa1 = src[0] * k1; } *dest++ = rint(aa1 + aa2 + aa3 + aa4); } } } } #define PIX_ADD (127.0 / 128.0) /* Include all _visibly_ altered pixels */ void mem_rotate_geometry(int ow, int oh, double angle, int *nw, int *nh) // Get new image geometry of rotation. angle = degrees { int dx, dy; double rangle = (M_PI / 180.0) * angle, // Radians s2, c2; // Trig values c2 = fabs(cos(rangle)); s2 = fabs(sin(rangle)); /* Preserve original centering */ dx = ow & 1; dy = oh & 1; /* Exchange Y with X when rotated Y is nearer to old X */ if ((dx ^ dy) && (c2 < s2)) dx ^= 1 , dy ^= 1; *nw = 2 * (int)(0.5 * (ow * c2 + oh * s2 - dx) + PIX_ADD) + dx; *nh = 2 * (int)(0.5 * (oh * c2 + ow * s2 - dy) + PIX_ADD) + dy; } // Rotate canvas or clipboard by any angle (degrees) int mem_rotate_free(double angle, int type, int gcor, int clipboard) { chanlist old_img, new_img; unsigned char **oldmask; int ow, oh, nw, nh, res, rot_bpp; if (clipboard) { if (!mem_clipboard) return (-1); // Nothing to rotate if (!HAVE_OLD_CLIP) clipboard = 2; if (clipboard == 1) { ow = mem_clip_real_w; oh = mem_clip_real_h; } else { mem_clip_real_clear(); ow = mem_clip_w; oh = mem_clip_h; } rot_bpp = mem_clip_bpp; } else { ow = mem_width; oh = mem_height; rot_bpp = mem_img_bpp; } mem_rotate_geometry(ow, oh, angle, &nw, &nh); if ( nw>MAX_WIDTH || nh>MAX_HEIGHT ) return -5; // If new image is too big return -5 if (!clipboard) { memcpy(old_img, mem_img, sizeof(chanlist)); res = undo_next_core(UC_NOCOPY, nw, nh, mem_img_bpp, CMASK_ALL); if (res) return (res); // No undo space memcpy(new_img, mem_img, sizeof(chanlist)); progress_init(_("Free Rotation"), 0); } else { /* Note: even if the original clipboard doesn't have a mask, * the rotation will need one to chop off the corners of * a rotated rectangle. */ oldmask = (HAVE_OLD_CLIP ? mem_clip_real_img : mem_clip.img) + CHN_SEL; if (!*oldmask) { if (!(*oldmask = malloc(ow * oh))) return (1); // Not enough memory memset(*oldmask, 255, ow * oh); } res = mem_clip_new(nw, nh, mem_clip_bpp, 0, TRUE); if (res) return (1); // Not enough memory memcpy(old_img, mem_clip_real_img, sizeof(chanlist)); memcpy(new_img, mem_clip.img, sizeof(chanlist)); } if ( rot_bpp == 1 ) type = FALSE; mem_rotate_free_real(old_img, new_img, ow, oh, nw, nh, rot_bpp, angle, type, gcor, channel_dis[CHN_ALPHA] && !clipboard, clipboard); if (!clipboard) progress_end(); /* Destructive rotation - lose old unwanted clipboard */ if (clipboard > 1) mem_clip_real_clear(); return 0; } int mem_image_rot( int dir ) // Rotate image 90 degrees { chanlist old_img; int i, ow = mem_width, oh = mem_height; memcpy(old_img, mem_img, sizeof(chanlist)); i = undo_next_core(UC_NOCOPY, oh, ow, mem_img_bpp, CMASK_ALL); if (i) return (i); // Not enough memory for (i = 0; i < NUM_CHANNELS; i++) { if (!mem_img[i]) continue; mem_rotate(mem_img[i], old_img[i], ow, oh, dir, BPP(i)); } mem_undo_prepare(); return 0; } /// Code for scaling contributed by Dmitry Groshev, January 2006 /// Multicore support added by Dmitry Groshev, November 2010 typedef struct { float *k; int idx; } fstep; static double Cubic(double x, double A) { if (x < -1.5) return (0.0); else if (x < -0.5) return (A * (-1.0 / 8.0) * (((x * 8.0 + 28.0) * x + 30.0) * x + 9.0)); else if (x < 0.5) return (0.5 * (((-4.0 * A - 4.0) * x * x + A + 3.0) * x + 1.0)); else if (x < 1.5) return (A * (-1.0 / 8.0) * (((x * 8.0 - 28.0) * x + 30.0) * x - 9.0) + 1.0); else return (1.0); } static double BH1(double x) { if (x < 1e-7) return (1.0); return ((sin(M_PI * x) / (M_PI * x)) * (0.42323 + 0.49755 * cos(x * (M_PI * 2.0 / 6.0)) + 0.07922 * cos(x * (M_PI * 4.0 / 6.0)))); } static double BH(double x) { double y = 0.0, xx = fabs(x); if (xx < 2.5) { y = BH1(xx + 0.5); if (xx < 1.5) y += BH1(xx + 1.5); if (xx < 0.5) y += BH1(xx + 2.5); } return (x > 0.0 ? 1.0 - y : y); } static const double Aarray[4] = {-0.5, -2.0 / 3.0, -0.75, -1.0}; /* !!! Filter as a whole must be perfectly symmetric, and "idx" of step 0 * must be <= 0; these natural properties are relied on when allocating and * extending horizontal temp arrays for BOUND_TILE mode. * 2 extra steps at end hold end pointer & index, and terminating NULL. */ static fstep *make_filter(int l0, int l1, int type, int sharp, int bound) { fstep *res, *buf; __typeof__(*res->k) *kp; double x, y, basept, fwidth, delta, scale = (double)l1 / (double)l0; double A = 0.0, kk = 1.0, sum; int i, j, k, ix, j0, k0 = 0; /* To correct scale-shift */ delta = 0.5 / scale - 0.5; /* Untransformed bilinear is useless for reduction */ if (type == 1) sharp = TRUE; /* 1:1 transform is special */ if (scale == 1.0) type = 0; if (scale < 1.0) kk = scale; else sharp = FALSE; switch (type) { case 1: fwidth = 2.0; /* Bilinear / Area-mapping */ break; case 2: case 3: case 4: case 5: /* Bicubic, all flavors */ fwidth = 4.0; A = Aarray[type - 2]; break; case 6: fwidth = 6.0; /* Blackman-Harris windowed sinc */ break; default: /* 1:1 */ fwidth = 0.0; break; } if (sharp) fwidth += scale - 1.0; fwidth /= kk; buf = multialloc(MA_ALIGN_DOUBLE, &res, (l1 + 2) * sizeof(*res), &kp, l1 * ((int)floor(fwidth) + 1) * sizeof(*res->k), NULL); if (!buf) return (NULL); res = buf; /* No need to double-align the index array */ fwidth *= 0.5; type = type * 2 + !!sharp; for (i = 0; i < l1; i++ , buf++) { basept = (double)i / scale + delta; j = j0 = (int)ceil(basept - fwidth); k = k0 = (int)floor(basept + fwidth) + 1; if (j0 < 0) j0 = 0; if (k0 > l0) k0 = l0; /* If filter doesn't cover source from end to end, tiling will * require physical copying */ if ((bound == BOUND_TILE) && (k0 - j0 < l0)) k0 = k , j0 = j; buf->idx = j0; buf->k = kp; kp += k0 - j0; sum = 0.0; for (; j < k; j++) { ix = j; if ((j < j0) || (j >= k0)) { if (bound == BOUND_VOID) continue; if (bound == BOUND_TILE) { if (ix < 0) ix = k0 - (-ix % k0); ix %= k0; } else if (k0 == 1) ix = 0; else { ix = abs(ix) % (k0 + k0 - 2); if (ix >= k0) ix = k0 + k0 - 2 - ix; } } ix -= j0; x = fabs(((double)j - basept) * kk); switch (type) { case 0: /* 1:1 */ case 2: /* Bilinear */ y = 1.0 - x; break; case 3: /* Area mapping */ if (x <= 0.5 - scale / 2.0) y = 1.0; else y = 0.5 - (x - 0.5) / scale; break; case 4: case 6: case 8: case 10: /* Bicubic */ if (x < 1.0) y = ((A + 2.0) * x - (A + 3)) * x * x + 1.0; else y = A * (((x - 5.0) * x + 8.0) * x - 4.0); break; case 5: case 7: case 9: case 11: /* Sharpened bicubic */ y = Cubic(x + scale * 0.5, A) - Cubic(x - scale * 0.5, A); break; case 12: /* Blackman-Harris */ y = BH1(x); break; case 13: /* Sharpened Blackman-Harris */ y = BH(x + scale * 0.5) - BH(x - scale * 0.5); break; default: /* Bug */ y = 0; break; } buf->k[ix] += y; sum += y; } /* Normalize */ if ((sum != 0.0) && (sum != 1.0)) { __typeof__(*kp) *tp = buf->k; sum = 1.0 / sum; while (tp != kp) *tp++ *= sum; } } /* Finalize */ buf->idx = k0; // The rightmost extent buf->k = kp; return (res); } typedef struct { int tmask, gcor, progress; int ow, oh, nw, nh, bpp; unsigned char **src, **dest; double *rgb; fstep *hfilter, *vfilter; threaddata *tdata; // For simplicity } scale_context; static void clear_scale(scale_context *ctx) { free(ctx->hfilter); free(ctx->vfilter); free(ctx->tdata); } static int prepare_scale(scale_context *ctx, int type, int sharp, int bound) { ctx->hfilter = ctx->vfilter = NULL; ctx->tdata = NULL; /* We don't use threading for NN */ if (!type || (ctx->bpp == 1)) return (TRUE); if ((ctx->hfilter = make_filter(ctx->ow, ctx->nw, type, sharp, bound)) && (ctx->vfilter = make_filter(ctx->oh, ctx->nh, type, sharp, bound))) { int l = (ctx->ow - ctx->hfilter[0].idx * 2) * sizeof(double); if ((ctx->tdata = talloc(MA_ALIGN_DOUBLE, image_threads(ctx->nw, ctx->nh), ctx, sizeof(*ctx), NULL, // !!! No space for RGBAS for now &ctx->rgb, l * (ctx->tmask ? 7 : 3), NULL))) return (TRUE); } clear_scale(ctx); return (FALSE); } static void tile_extend(double *temp, int w, int l) { memcpy(temp - l, temp + w - l, l * sizeof(*temp)); memcpy(temp + w, temp, l * sizeof(*temp)); } typedef void REGPARM2 (*istore_func)(unsigned char *img, const double *sum); static void REGPARM2 istore_gc(unsigned char *img, const double *sum) { /* Reverse gamma correction */ img[0] = UNGAMMA256X(sum[0]); img[1] = UNGAMMA256X(sum[1]); img[2] = UNGAMMA256X(sum[2]); } static void REGPARM2 istore_3(unsigned char *img, const double *sum) { int j = (int)rint(sum[0]); img[0] = j < 0 ? 0 : j > 0xFF ? 0xFF : j; j = (int)rint(sum[1]); img[1] = j < 0 ? 0 : j > 0xFF ? 0xFF : j; j = (int)rint(sum[2]); img[2] = j < 0 ? 0 : j > 0xFF ? 0xFF : j; } static void REGPARM2 istore_1(unsigned char *img, const double *sum) { int j = (int)rint(sum[0]); img[0] = j < 0 ? 0 : j > 0xFF ? 0xFF : j; } /* !!! Once again, beware of GCC misoptimization! The two functions below * should not be both inlineable at once, otherwise poor code wasting both * time and space will be produced - WJ */ static void scale_row(fstep *tmpy, fstep *hfilter, double *work_area, int bpp, int gc, int ow, int oh, int nw, int i, unsigned char *src, unsigned char *dest) { /* !!! Protect from possible stack misalignment */ unsigned char sum_[4 * sizeof(double)]; double *sum = ALIGNED(sum_, sizeof(double)); istore_func istore; unsigned char *img; fstep *tmpx; __typeof__(*tmpy->k) *kp = tmpy->k - tmpy->idx; int j, y, h = tmpy[1].k - kp, ll = hfilter[0].idx; work_area -= ll * bpp; ow *= bpp; memset(work_area, 0, ow * sizeof(double)); /* Build one vertically-scaled row */ for (y = tmpy->idx; y < h; y++) { const double tk = kp[y]; double *wrk = work_area; /* Only simple tiling isn't built into filter */ img = src + ((y + oh) % oh) * ow; if (gc) /* Gamma-correct */ { for (j = 0; j < ow; j++) *wrk++ += gamma256[*img++] * tk; } else /* Leave as is */ { for (j = 0; j < ow; j++) *wrk++ += *img++ * tk; } } tile_extend(work_area, ow, -ll * bpp); /* Scale it horizontally */ istore = gc ? istore_gc : bpp == 1 ? istore_1 : istore_3; img = dest + i * nw * bpp; for (tmpx = hfilter; tmpx[1].k; tmpx++ , img += bpp) { __typeof__(*tmpx->k) *tp, *kp = tmpx[1].k; double *wrk = work_area + tmpx->idx * bpp; double sum0, sum1, sum2; sum0 = sum1 = sum2 = 0.0; tp = tmpx->k; while (tp != kp) { const double kk = *tp++; sum0 += *wrk++ * kk; if (bpp == 1) continue; sum1 += *wrk++ * kk; sum2 += *wrk++ * kk; } sum[0] = sum0; sum[1] = sum1; sum[2] = sum2; istore(img, sum); } } static void scale_rgba(fstep *tmpy, fstep *hfilter, double *work_area, int bpp, int gc, int ow, int oh, int nw, int i, unsigned char *src, unsigned char *dest, unsigned char *srca, unsigned char *dsta) { /* !!! Protect from possible stack misalignment */ unsigned char sum_[4 * sizeof(double)]; double *sum = ALIGNED(sum_, sizeof(double)); istore_func istore; unsigned char *img, *imga; fstep *tmpx; __typeof__(*tmpy->k) *kp = tmpy->k - tmpy->idx; int j, y, h = tmpy[1].k - kp, ll = hfilter[0].idx; double *wrka = work_area + ow * 6 - ll * 13; work_area -= ll * 6; memset(work_area, 0, (ow - ll) * 7 * sizeof(double)); for (y = tmpy->idx; y < h; y++) { double *wrk = work_area; unsigned char *img, *imga; int ix = (y + oh) % oh; img = src + ix * ow * 3; imga = srca + ix * ow; if (gc) /* Gamma-correct */ { const double tk = kp[y]; for (j = 0; j < ow; j++) { const double kk = imga[j] * tk; double tv; wrka[j] += kk; wrk[0] += (tv = gamma256[img[0]]) * tk; wrk[3] += tv * kk; wrk[1] += (tv = gamma256[img[1]]) * tk; wrk[4] += tv * kk; wrk[2] += (tv = gamma256[img[2]]) * tk; wrk[5] += tv * kk; wrk += 6; img += 3; } } else /* Leave as is */ { const double tk = kp[y]; for (j = 0; j < ow; j++) { const double kk = imga[j] * tk; double tv; wrka[j] += kk; wrk[0] += (tv = img[0]) * tk; wrk[3] += tv * kk; wrk[1] += (tv = img[1]) * tk; wrk[4] += tv * kk; wrk[2] += (tv = img[2]) * tk; wrk[5] += tv * kk; wrk += 6; img += 3; } } } tile_extend(work_area, ow * 6, -ll * 6); tile_extend(wrka, ow, -ll); /* Scale it horizontally */ istore = gc ? istore_gc : bpp == 1 ? istore_1 : istore_3; img = dest + i * nw * 3; imga = dsta + i * nw; for (tmpx = hfilter; tmpx[1].k; tmpx++) { __typeof__(*tmpx->k) *tp, *kp = tmpx[1].k; double *wrk; double sum0, sum1, sum2, mult; sum0 = 0.0; wrk = wrka + tmpx->idx; tp = tmpx->k; while (tp != kp) sum0 += *wrk++ * *tp++; j = (int)rint(sum0); *imga = j < 0 ? 0 : j > 0xFF ? 0xFF : j; wrk = work_area + tmpx->idx * 6; mult = 1.0; if (*imga++) { wrk += 3; mult /= sum0; } sum0 = sum1 = sum2 = 0.0; tp = tmpx->k; while (tp != kp) { const double kk = *tp++; sum0 += wrk[0] * kk; sum1 += wrk[1] * kk; sum2 += wrk[2] * kk; wrk += 6; } sum[0] = sum0 * mult; sum[1] = sum1 * mult; sum[2] = sum2 * mult; istore(img, sum); img += 3; } } static void do_scale(tcb *thread) { scale_context ctx = *(scale_context *)thread->data; fstep *tmpy; int i, ii, cc, cnt = thread->nsteps; /* For each destination line */ for (i = thread->step0 , ii = 0; ii < cnt; i++ , ii++) { tmpy = ctx.vfilter + i; if (ctx.dest[CHN_IMAGE]) // Chanlist may contain, e.g., only mask { (ctx.tmask == CMASK_NONE ? (__typeof__(&scale_rgba))scale_row : scale_rgba)(tmpy, ctx.hfilter, ctx.rgb, 3, ctx.gcor, ctx.ow, ctx.oh, ctx.nw, i, ctx.src[CHN_IMAGE], ctx.dest[CHN_IMAGE], ctx.src[CHN_ALPHA], ctx.dest[CHN_ALPHA]); } for (cc = CHN_IMAGE + 1; cc < NUM_CHANNELS; cc++) { if (ctx.dest[cc] && !(ctx.tmask & CMASK_FOR(cc))) scale_row(tmpy, ctx.hfilter, ctx.rgb, 1, FALSE, ctx.ow, ctx.oh, ctx.nw, i, ctx.src[cc], ctx.dest[cc]); } if (ctx.progress && thread_step(thread, ii + 1, cnt, 10)) break; } thread_done(thread); } static void do_scale_nn(chanlist old_img, chanlist neo_img, int img_bpp, int type, int ow, int oh, int nw, int nh, int gcor, int progress) { char *src, *dest; int i, j, oi, oj, cc, bpp; double scalex, scaley, deltax, deltay; scalex = (double)ow / (double)nw; scaley = (double)oh / (double)nh; deltax = 0.5 * scalex - 0.5; deltay = 0.5 * scaley - 0.5; for (j = 0; j < nh; j++) { for (cc = 0 , bpp = img_bpp; cc < NUM_CHANNELS; cc++ , bpp = 1) { if (!neo_img[cc]) continue; dest = neo_img[cc] + nw * j * bpp; WJ_ROUND(oj, scaley * j + deltay); src = old_img[cc] + ow * oj * bpp; for (i = 0; i < nw; i++) { WJ_ROUND(oi, scalex * i + deltax); oi *= bpp; *dest++ = src[oi]; if (bpp == 1) continue; *dest++ = src[oi + 1]; *dest++ = src[oi + 2]; } } if (progress && ((j * 10) % nh >= nh - 10)) progress_update((float)(j + 1) / nh); } } int mem_image_scale_real(chanlist old_img, int ow, int oh, int bpp, chanlist new_img, int nw, int nh, int type, int gcor, int sharp) { scale_context ctx; ctx.tmask = CMASK_NONE; ctx.gcor = gcor; ctx.progress = FALSE; ctx.ow = ow; ctx.oh = oh; ctx.nw = nw; ctx.nh = nh; ctx.bpp = bpp; ctx.src = old_img; ctx.dest = new_img; if (!prepare_scale(&ctx, type, sharp, BOUND_MIRROR)) return (1); // Not enough memory if (type && (bpp == 3)) launch_threads(do_scale, ctx.tdata, NULL, nh); else do_scale_nn(old_img, new_img, bpp, type, ow, oh, nw, nh, gcor, FALSE); return (0); } int mem_image_scale(int nw, int nh, int type, int gcor, int sharp, int bound) // Scale image { scale_context ctx; chanlist old_img; int res; memcpy(old_img, mem_img, sizeof(chanlist)); nw = nw < 1 ? 1 : nw > MAX_WIDTH ? MAX_WIDTH : nw; nh = nh < 1 ? 1 : nh > MAX_HEIGHT ? MAX_HEIGHT : nh; ctx.tmask = mem_img[CHN_ALPHA] && !channel_dis[CHN_ALPHA] ? CMASK_RGBA : CMASK_NONE; ctx.gcor = gcor; ctx.progress = TRUE; ctx.ow = mem_width; ctx.oh = mem_height; ctx.nw = nw; ctx.nh = nh; ctx.bpp = mem_img_bpp; ctx.src = old_img; ctx.dest = mem_img; if (!prepare_scale(&ctx, type, sharp, bound)) return (1); // Not enough memory if (!(res = undo_next_core(UC_NOCOPY, nw, nh, mem_img_bpp, CMASK_ALL))) { progress_init(_("Scaling Image"), 0); if (type && (mem_img_bpp == 3)) launch_threads(do_scale, ctx.tdata, NULL, mem_height); else do_scale_nn(old_img, mem_img, mem_img_bpp, type, ctx.ow, ctx.oh, nw, nh, gcor, TRUE); progress_end(); } clear_scale(&ctx); return (res); } int mem_isometrics(int type) { unsigned char *wrk, *src, *dest, *fill; int i, j, k, l, cc, step, bpp, ow = mem_width, oh = mem_height; if ( type<2 ) { if ( (oh + (ow-1)/2) > MAX_HEIGHT ) return -5; i = mem_image_resize(ow, oh + (ow-1)/2, 0, 0, 0); } if ( type>1 ) { if ( (ow+oh-1) > MAX_WIDTH ) return -5; i = mem_image_resize(ow + oh - 1, oh, 0, 0, 0); } if (i) return (i); for (cc = 0; cc < NUM_CHANNELS; cc++) { if (!mem_img[cc]) continue; bpp = BPP(cc); if ( type < 2 ) // Left/Right side down { fill = mem_img[cc] + (mem_height - 1) * ow * bpp; step = ow * bpp; if (type) step = -step; else fill += (2 - (ow & 1)) * bpp; for (i = mem_height - 1; i >= 0; i--) { k = i + i + 2; if (k > ow) k = ow; l = k; j = 0; dest = mem_img[cc] + i * ow * bpp; src = dest - step; if (!type) { j = ow - k; dest += j * bpp; src += (j - ow * ((ow - j - 1) >> 1)) * bpp; j = j ? 0 : ow & 1; k += j; if (j) src += step; } for (; j < k; j++) { if (!(j & 1)) src += step; *dest++ = *src++; if (bpp == 1) continue; *dest++ = *src++; *dest++ = *src++; } if (l < ow) { if (!type) dest = mem_img[cc] + i * ow * bpp; memcpy(dest, fill, (ow - l) * bpp); } } } else // Top/Bottom side right { step = mem_width * bpp; fill = mem_img[cc] + ow * bpp; k = (oh - 1) * mem_width * bpp; if (type == 2) { fill += k; step = -step; } wrk = fill + step - 1; k = ow * bpp; for (i = 1; i < oh; i++) { src = wrk; dest = wrk + i * bpp; for (j = 0; j < k; j++) *dest-- = *src--; memcpy(src + 1, fill, i * bpp); wrk += step; } } } return 0; } /* Modes: 0 - clear, 1 - tile, 2 - mirror tile */ int mem_image_resize(int nw, int nh, int ox, int oy, int mode) { chanlist old_img; char *src, *dest; int i, h, ow = mem_width, oh = mem_height, hmode = mode; int res, hstep, vstep, vstep2 = 0, oxo = 0, oyo = 0, nxo = 0, nyo = 0; int rspan1 = 0, span1 = 0, rspan2 = 0, span2 = 0, rep = 0, tail = 0; nw = nw < 1 ? 1 : nw > MAX_WIDTH ? MAX_WIDTH : nw; nh = nh < 1 ? 1 : nh > MAX_HEIGHT ? MAX_HEIGHT : nh; memcpy(old_img, mem_img, sizeof(chanlist)); res = undo_next_core(UC_NOCOPY, nw, nh, mem_img_bpp, CMASK_ALL); if (res) return (res); // Not enough memory /* Special mode for simplest, one-piece-covering case */ if ((ox <= 0) && (nw - ox <= ow)) hmode = -1; if ((oy <= 0) && (nh - oy <= oh)) mode = -1; /* Clear */ if (!mode || !hmode) { int i, l, cc; l = nw * nh; for (cc = 0; cc < NUM_CHANNELS; cc++) { if (!mem_img[cc]) continue; dest = mem_img[cc]; if ((cc != CHN_IMAGE) || (mem_img_bpp == 1)) { memset(dest, cc == CHN_IMAGE ? mem_col_A : 0, l); continue; } for (i = 0; i < l; i++) // Background is current colour A { *dest++ = mem_col_A24.red; *dest++ = mem_col_A24.green; *dest++ = mem_col_A24.blue; } } /* All done if source out of bounds */ if ((ox >= nw) || (ox + ow <= 0) || (oy >= nh) || (oy + oh <= 0)) return (0); } /* Tiled vertically */ if (mode > 0) { /* No mirror when height < 3 */ if (oh < 3) mode = 1; /* Period length */ if (mode == 2) vstep = 2 * (vstep2 = oh - 1); else vstep = oh; /* Normalize offset */ oyo = oy <= 0 ? -oy % vstep : vstep - 1 - (oy - 1) % vstep; h = nh; } /* Single vertical span */ else { /* No periodicity */ vstep = nh + oh; /* Normalize offset */ if (oy < 0) oyo = -oy; else nyo = oy; h = oh + oy; if (h > nh) h = nh; } /* Tiled horizontally */ if (hmode > 0) { /* No mirror when width < 3 */ if (ow < 3) hmode = 1; /* Period length */ if (hmode == 2) hstep = ow + ow - 2; else hstep = ow; /* Normalize offset */ oxo = ox <= 0 ? -ox % hstep : hstep - 1 - (ox - 1) % hstep; /* Single direct span? */ if ((oxo <= 0) && (oxo + ow >= nw)) hmode = -1; if (hmode == 2) /* Mirror tiling */ { if (oxo < ow - 1) span1 = ow - 1 - oxo; res = nw - span1; rspan1 = hstep - oxo - span1; if (rspan1 > res) rspan1 = res; span2 = (res = res - rspan1); if (span2 > ow - 1 - span1) span2 = ow - 1 - span1; rspan2 = res - span2; if (rspan2 > ow - 1 - rspan1) rspan2 = ow - 1 - rspan1; } else /* Normal tiling */ { span1 = ow - oxo; span2 = nw - span1; if (span2 > oxo) span2 = oxo; } rep = nw / hstep; if (rep) tail = nw % hstep; } /* Single horizontal span */ else { /* No periodicity */ hstep = nw; /* Normalize offset */ if (ox < 0) oxo = -ox; else nxo = ox; /* First direct span */ span1 = nw - nxo; if (span1 > ow - oxo) span1 = ow - oxo; } /* Row loop */ for (i = nyo; i < h; i++) { int j, k, l, bpp, cc; /* Main period */ k = i - vstep; /* Mirror period */ if ((k < 0) && (vstep2 > 1)) k = i - ((i + oyo) % vstep2) * 2; /* The row is there - copy it */ if ((k >= 0) && (k < i)) { for (cc = 0; cc < NUM_CHANNELS; cc++) { if (!mem_img[cc]) continue; l = nw * BPP(cc); src = mem_img[cc] + k * l; dest = mem_img[cc] + i * l; memcpy(dest, src, l); } continue; } /* First encounter - have to build the row anew */ k = (i - nyo + oyo) % vstep; if (k >= oh) k = vstep - k; for (cc = 0; cc < NUM_CHANNELS; cc++) { if (!mem_img[cc]) continue; bpp = BPP(cc); dest = mem_img[cc] + (i * nw + nxo) * bpp; /* First direct span */ if (span1) { src = old_img[cc] + (k * ow + oxo) * bpp; memcpy(dest, src, span1 * bpp); if (hmode < 1) continue; /* Single-span mode */ dest += span1 * bpp; } /* First reverse span */ if (rspan1) { src = old_img[cc] + (k * ow + hstep - oxo - span1) * bpp; for (j = 0; j < rspan1; j++ , src -= bpp) { *dest++ = src[0]; if (bpp == 1) continue; *dest++ = src[1]; *dest++ = src[2]; } } /* Second direct span */ if (span2) { src = old_img[cc] + k * ow * bpp; memcpy(dest, src, span2 * bpp); dest += span2 * bpp; } /* Second reverse span */ if (rspan2) { src = old_img[cc] + (k * ow + ow - 1) * bpp; for (j = 0; j < rspan2; j++ , src -= bpp) { *dest++ = src[0]; if (bpp == 1) continue; *dest++ = src[1]; *dest++ = src[2]; } } /* Repeats */ if (rep) { src = mem_img[cc] + i * nw * bpp; l = hstep * bpp; for (j = 1; j < rep; j++) { memcpy(dest, src, l); dest += l; } memcpy(dest, src, tail * bpp); } } } mem_undo_prepare(); return (0); } /* Threshold channel values */ void mem_threshold(unsigned char *img, int len, int level) { if (!img) return; /* Paranoia */ for (; len; len-- , img++) *img = *img < level ? 0 : 255; } /* Only supports BPP = 1 and 3 */ void mem_demultiply(unsigned char *img, unsigned char *alpha, int len, int bpp) { int i, k; double d; for (i = 0; i < len; i++ , img += bpp) { if (!alpha[i]) continue; d = 255.0 / (double)alpha[i]; k = rint(d * img[0]); img[0] = k > 255 ? 255 : k; if (bpp == 1) continue; k = rint(d * img[1]); img[1] = k > 255 ? 255 : k; k = rint(d * img[2]); img[2] = k > 255 ? 255 : k; } } /* Build bitdepth translation table */ void set_xlate(unsigned char *xlat, int bpp) { int i, j, m, n = (1 << bpp) - 1; for (i = 0 , j = n , m = n + n; i <= n; i++ , j += 255 * 2) xlat[i] = j / m; } /* Check if byte array is all one value */ int is_filled(unsigned char *data, unsigned char val, int len) { len++; while (--len && (*data++ == val)); return (!len); } int get_pixel( int x, int y ) /* Mixed */ { x = mem_width * y + x; if ((mem_channel != CHN_IMAGE) || (mem_img_bpp == 1)) return (mem_img[mem_channel][x]); x *= 3; return (MEM_2_INT(mem_img[CHN_IMAGE], x)); } int get_pixel_RGB( int x, int y ) /* RGB */ { x = mem_width * y + x; if (mem_img_bpp == 1) return (PNG_2_INT(mem_pal[mem_img[CHN_IMAGE][x]])); x *= 3; return (MEM_2_INT(mem_img[CHN_IMAGE], x)); } int get_pixel_img( int x, int y ) /* RGB or indexed */ { x = mem_width * y + x; if (mem_img_bpp == 1) return (mem_img[CHN_IMAGE][x]); x *= 3; return (MEM_2_INT(mem_img[CHN_IMAGE], x)); } int mem_protected_RGB(int intcol) // Is this intcol in list? { int i; if (!mem_prot) return (0); for (i = 0; i < mem_prot; i++) if (intcol == mem_prot_RGB[i]) return (255); return (0); } int pixel_protected(int x, int y) { int offset = y * mem_width + x; if (mem_unmask) return (0); /* Colour protection */ if (mem_img_bpp == 1) { if (mem_prot_mask[mem_img[CHN_IMAGE][offset]]) return (255); } else { if (mem_prot && mem_protected_RGB(MEM_2_INT(mem_img[CHN_IMAGE], offset * 3))) return (255); } /* Colour selectivity */ if (mem_cselect && csel_scan(offset, 1, 1, NULL, mem_img[CHN_IMAGE], csel_data)) return (255); /* Mask channel */ if ((mem_channel <= CHN_ALPHA) && mem_img[CHN_MASK] && !channel_dis[CHN_MASK]) return (mem_img[CHN_MASK][offset]); return (0); } void prep_mask(int start, int step, int cnt, unsigned char *mask, unsigned char *mask0, unsigned char *img0) { int i, j; j = start + step * (cnt - 1) + 1; if (mem_unmask) { memset(mask, 0, j); return; } /* Clear mask or copy mask channel into it */ if (mask0) memcpy(mask, mask0, j); else memset(mask, 0, j); /* Add colour protection to it */ if (mem_img_bpp == 1) { for (i = start; i < j; i += step) { mask[i] |= mem_prot_mask[img0[i]]; } } else if (mem_prot) { for (i = start; i < j; i += step) { mask[i] |= mem_protected_RGB(MEM_2_INT(img0, i * 3)); } } /* Add colour selectivity to it */ if (mem_cselect) csel_scan(start, step, cnt, mask, img0, csel_data); } /* Prepare mask array - for each pixel >0 if masked, 0 if not */ void row_protected(int x, int y, int len, unsigned char *mask) { unsigned char *mask0 = NULL; int ofs = y * mem_width + x; /* Clear mask or copy mask channel into it */ if ((mem_channel <= CHN_ALPHA) && mem_img[CHN_MASK] && !channel_dis[CHN_MASK]) mask0 = mem_img[CHN_MASK] + ofs; prep_mask(0, 1, len, mask, mask0, mem_img[CHN_IMAGE] + ofs * mem_img_bpp); } static int blend_pixels(int start, int step, int cnt, const unsigned char *mask, unsigned char *imgr, unsigned char *img0, unsigned char *img, int bpp) { static const unsigned char hhsv[8 * 3] = { 0, 1, 2, /* #0: B..M */ 2, 1, 0, /* #1: M+..R- */ 0, 1, 2, /* #2: B..M alt */ 1, 0, 2, /* #3: C+..B- */ 2, 0, 1, /* #4: G..C */ 0, 2, 1, /* #5: Y+..G- */ 1, 2, 0, /* #6: R..Y */ 1, 2, 0 /* #7: W */ }; const unsigned char *new, *old; int j, step3, uninit_(nhex), uninit_(ohex), mode = blend_mode; /* Backward transfer? */ if (mode & BLEND_REVERSE) new = img0 , old = img; else new = img , old = img0; mode &= BLEND_MMASK; if (bpp == 1) mode += BLEND_NMODES; cnt = start + step * (cnt - 1); step3 = step * bpp; new += (start - step) * bpp; old += (start - step) * bpp; j = start - step; while (j < cnt) { unsigned char *dest; int j0, j1, j2; j += step; old += step3; new += step3; if (!mask[j]) continue; dest = imgr + j * bpp; if (mode < BLEND_1BPP) { nhex = ((((0x200 + new[0]) - new[1]) ^ ((0x400 + new[1]) - new[2]) ^ ((0x100 + new[2]) - new[0])) >> 8) * 3; ohex = ((((0x200 + old[0]) - old[1]) ^ ((0x400 + old[1]) - old[2]) ^ ((0x100 + old[2]) - old[0])) >> 8) * 3; } switch (mode) { case BLEND_HUE: /* HS* Hue */ { int i, nsi, nvi; unsigned char os, ov; ov = old[hhsv[ohex + 2]]; if (nhex == 7 * 3) /* New is white */ { dest[0] = dest[1] = dest[2] = ov; break; } os = old[hhsv[ohex + 1]]; nsi = hhsv[nhex + 1]; nvi = hhsv[nhex + 2]; i = new[nvi] - new[nsi]; dest[hhsv[nhex]] = (i + (ov - os) * 2 * (new[hhsv[nhex]] - new[nsi])) / (i + i) + os; dest[nsi] = os; dest[nvi] = ov; break; } case BLEND_SAT: /* HSV Saturation */ { int i, osi, ovi; unsigned char ov, os, ns, nv; if (ohex == 7 * 3) /* Old is white - leave it so */ { dest[0] = old[0]; dest[1] = old[1]; dest[2] = old[2]; break; } ovi = hhsv[ohex + 2]; ov = old[ovi]; if (nhex == 7 * 3) /* New is white */ { dest[0] = dest[1] = dest[2] = ov; break; } osi = hhsv[ohex + 1]; os = old[osi]; nv = new[hhsv[nhex + 2]]; ns = (new[hhsv[nhex + 1]] * ov * 2 + nv) / (nv + nv); i = ov - os; dest[hhsv[ohex]] = (i + (ov - ns) * 2 * (old[hhsv[ohex]] - os)) / (i + i) + ns; dest[osi] = ns; dest[ovi] = ov; break; } case BLEND_VALUE: /* HSV Value */ { int osi, ovi; unsigned char ov, nv; nv = new[hhsv[nhex + 2]]; if (ohex == 7 * 3) /* Old is white */ { dest[0] = dest[1] = dest[2] = nv; break; } ov = old[hhsv[ohex + 2]]; osi = hhsv[ohex + 1]; ovi = hhsv[ohex + 2]; dest[hhsv[ohex]] = (old[hhsv[ohex]] * nv * 2 + ov) / (ov + ov); dest[osi] = (old[osi] * nv * 2 + ov) / (ov + ov); dest[ovi] = nv; break; } case BLEND_COLOR: /* HSL Hue + Saturation */ { int nsi, nvi, x0, x1, y0, y1, vsy1, vs1y; unsigned char os, ov; os = old[hhsv[ohex + 1]]; ov = old[hhsv[ohex + 2]]; x0 = os + ov; /* New is white */ if (nhex == 7 * 3) { dest[0] = dest[1] = dest[2] = (x0 + 1) >> 1; break; } nsi = hhsv[nhex + 1]; nvi = hhsv[nhex + 2]; x1 = new[nvi] + new[nsi]; y1 = x1 > 255 ? 510 - x1 : x1; vs1y = (x0 + 1) * y1; y0 = x0 > 255 ? 510 - x0 : x0; vsy1 = (new[nvi] - new[nsi]) * y0; y1 += y1; dest[hhsv[nhex]] = (vs1y + (new[hhsv[nhex]] * 2 - x1) * y0) / y1; dest[nsi] = (vs1y - vsy1) / y1; dest[nvi] = (vs1y + vsy1) / y1; break; } case BLEND_SATPP: /* Perceived saturation (a hack, but useful one) */ { int i, xyz = old[0] + old[1] + old[2]; /* This makes difference between MIN and MAX twice larger - * somewhat like doubling HSL saturation, but without strictly * preserving L */ i = (old[0] * 6 - xyz + 2) / 3; dest[0] = i < 0 ? 0 : i > 255 ? 255 : i; i = (old[1] * 6 - xyz + 2) / 3; dest[1] = i < 0 ? 0 : i > 255 ? 255 : i; i = (old[2] * 6 - xyz + 2) / 3; dest[2] = i < 0 ? 0 : i > 255 ? 255 : i; break; } case BLEND_SCREEN: // ~mult(~old, ~new) j1 = (old[1] + new[1]) * 255 - old[1] * new[1]; dest[1] = (j1 + (j1 >> 8) + 1) >> 8; j2 = (old[2] + new[2]) * 255 - old[2] * new[2]; dest[2] = (j2 + (j2 >> 8) + 1) >> 8; case BLEND_SCREEN + BLEND_NMODES: j0 = (old[0] + new[0]) * 255 - old[0] * new[0]; dest[0] = (j0 + (j0 >> 8) + 1) >> 8; break; case BLEND_MULT: j1 = old[1] * new[1]; dest[1] = (j1 + (j1 >> 8) + 1) >> 8; j2 = old[2] * new[2]; dest[2] = (j2 + (j2 >> 8) + 1) >> 8; case BLEND_MULT + BLEND_NMODES: j0 = old[0] * new[0]; dest[0] = (j0 + (j0 >> 8) + 1) >> 8; break; case BLEND_BURN: // ~div(~old, new) j1 = ((unsigned char)~old[1] << 8) / (new[1] + 1); dest[1] = 255 - j1 >= 0 ? 255 - j1 : 0; j2 = ((unsigned char)~old[2] << 8) / (new[2] + 1); dest[2] = 255 - j2 >= 0 ? 255 - j2 : 0; case BLEND_BURN + BLEND_NMODES: j0 = ((unsigned char)~old[0] << 8) / (new[0] + 1); dest[0] = 255 - j0 >= 0 ? 255 - j0 : 0; break; case BLEND_DODGE: // div(old, ~new) j1 = (old[1] << 8) / ((unsigned char)~new[1] + 1); dest[1] = j1 < 255 ? j1 : 255; j2 = (old[2] << 8) / ((unsigned char)~new[2] + 1); dest[2] = j2 < 255 ? j2 : 255; case BLEND_DODGE + BLEND_NMODES: j0 = (old[0] << 8) / ((unsigned char)~new[0] + 1); dest[0] = j0 < 255 ? j0 : 255; break; case BLEND_DIV: j1 = (old[1] << 8) / (new[1] + 1); dest[1] = j1 < 255 ? j1 : 255; j2 = (old[2] << 8) / (new[2] + 1); dest[2] = j2 < 255 ? j2 : 255; case BLEND_DIV + BLEND_NMODES: j0 = (old[0] << 8) / (new[0] + 1); dest[0] = j0 < 255 ? j0 : 255; break; case BLEND_HLIGHT: j1 = old[1] * new[1] * 2; if (new[1] >= 128) j1 = (old[1] + new[1]) * (255 * 2) - (255 * 255) - j1; dest[1] = (j1 + (j1 >> 8) + 1) >> 8; j2 = old[2] * new[2] * 2; if (new[2] >= 128) j2 = (old[2] + new[2]) * (255 * 2) - (255 * 255) - j2; dest[2] = (j2 + (j2 >> 8) + 1) >> 8; case BLEND_HLIGHT + BLEND_NMODES: j0 = old[0] * new[0] * 2; if (new[0] >= 128) j0 = (old[0] + new[0]) * (255 * 2) - (255 * 255) - j0; dest[0] = (j0 + (j0 >> 8) + 1) >> 8; break; case BLEND_SLIGHT: // !!! This formula is equivalent to one used in Pegtop XFader and GIMP, // !!! and differs from one used by Photoshop and PhotoPaint j1 = old[1] * ((255 * 255) - (unsigned char)~old[1] * (255 - (new[1] << 1))); // Precise division by 255^2 j1 += j1 >> 7; dest[1] = (j1 + ((j1 * 3 + 0x480) >> 16)) >> 16; j2 = old[2] * ((255 * 255) - (unsigned char)~old[2] * (255 - (new[2] << 1))); j2 += j2 >> 7; dest[2] = (j2 + ((j2 * 3 + 0x480) >> 16)) >> 16; case BLEND_SLIGHT + BLEND_NMODES: j0 = old[0] * ((255 * 255) - (unsigned char)~old[0] * (255 - (new[0] << 1))); j0 += j0 >> 7; dest[0] = (j0 + ((j0 * 3 + 0x480) >> 16)) >> 16; break; // "Negation" : ~BLEND_DIFF(~old, new) case BLEND_DIFF: dest[1] = abs(old[1] - new[1]); dest[2] = abs(old[2] - new[2]); case BLEND_DIFF + BLEND_NMODES: dest[0] = abs(old[0] - new[0]); break; case BLEND_DARK: dest[1] = old[1] < new[1] ? old[1] : new[1]; dest[2] = old[2] < new[2] ? old[2] : new[2]; case BLEND_DARK + BLEND_NMODES: dest[0] = old[0] < new[0] ? old[0] : new[0]; break; case BLEND_LIGHT: dest[1] = old[1] > new[1] ? old[1] : new[1]; dest[2] = old[2] > new[2] ? old[2] : new[2]; case BLEND_LIGHT + BLEND_NMODES: dest[0] = old[0] > new[0] ? old[0] : new[0]; break; case BLEND_GRAINX: j1 = old[1] - new[1] + 128; dest[1] = j1 < 0 ? 0 : j1 > 255 ? 255 : j1; j2 = old[2] - new[2] + 128; dest[2] = j2 < 0 ? 0 : j2 > 255 ? 255 : j2; case BLEND_GRAINX + BLEND_NMODES: j0 = old[0] - new[0] + 128; dest[0] = j0 < 0 ? 0 : j0 > 255 ? 255 : j0; break; case BLEND_GRAINM: j1 = old[1] + new[1] - 128; dest[1] = j1 < 0 ? 0 : j1 > 255 ? 255 : j1; j2 = old[2] + new[2] - 128; dest[2] = j2 < 0 ? 0 : j2 > 255 ? 255 : j2; case BLEND_GRAINM + BLEND_NMODES: j0 = old[0] + new[0] - 128; dest[0] = j0 < 0 ? 0 : j0 > 255 ? 255 : j0; break; // Photoshop's "Linear light" is equivalent to XFader's "Stamp" with swapped A&B default: /* RGB mode applied to 1bpp */ dest[0] = img0[j]; break; } } return (TRUE); } void put_pixel_def(int x, int y) /* Combined */ { unsigned char *ti, *old_image, *old_alpha = NULL; unsigned char fmask, opacity = 255, cset[NUM_CHANNELS + 3]; int i, j, offset, idx, bpp, tint, op = tool_opacity; idx = IS_INDEXED; j = pixel_protected(x, y); if (idx ? j : j == 255) return; bpp = MEM_BPP; ti = cset + (bpp == 3 ? 0 : mem_channel + 3); tint = tint_mode[0]; if (tint_mode[1] ^ (tint_mode[2] < 2)) tint = -tint; if (mem_gradient) /* Gradient mode - ask for one pixel */ { fmask = 0; // Fake mask on input grad_pixels(0, 1, 1, x, y, &fmask, &fmask, ti, cset + CHN_ALPHA + 3); if (!(op = fmask)) return; } else /* Default mode - init "colorset" */ { i = ((x & 7) + 8 * (y & 7)); cset[mem_channel + 3] = channel_col_[mem_pattern[i]][mem_channel]; cset[CHN_ALPHA + 3] = channel_col_[mem_pattern[i]][CHN_ALPHA]; cset[CHN_IMAGE + 3] = mem_col_pat[i]; /* !!! This must be last! */ i *= 3; cset[0] = mem_col_pat24[i + 0]; cset[1] = mem_col_pat24[i + 1]; cset[2] = mem_col_pat24[i + 2]; } old_image = mem_undo_opacity ? mem_undo_previous(mem_channel) : mem_img[mem_channel]; if ((mem_channel == CHN_IMAGE) && RGBA_mode) old_alpha = mem_undo_opacity ? mem_undo_previous(CHN_ALPHA) : mem_img[CHN_ALPHA]; if (!idx) // No use for opacity with indexed images { j = (255 - j) * op; opacity = (j + (j >> 8) + 1) >> 8; } offset = x + mem_width * y; /* Coupled alpha channel */ if (old_alpha && mem_img[CHN_ALPHA]) { unsigned char newc = cset[CHN_ALPHA + 3]; if (opacity < 255) { unsigned char oldc = old_alpha[offset]; int j = oldc * 255 + (newc - oldc) * opacity; if (j && !channel_dis[CHN_ALPHA]) opacity = (255 * opacity * newc) / j; newc = (j + (j >> 8) + 1) >> 8; } mem_img[CHN_ALPHA][offset] = newc; } offset *= bpp; process_img(0, 1, 1, &opacity, mem_img[mem_channel] + offset, old_image + offset, ti, ti, bpp, !idx); } /* Repeat pattern in buffer */ static void pattern_rep(unsigned char *dest, unsigned char *src, int ofs, int rep, int len, int bpp) { int l1; ofs *= bpp; rep *= bpp; len *= bpp; l1 = rep - ofs; if (l1 > len) l1 = len; memcpy(dest, src + ofs, l1); if (!(len -= l1)) return; dest += l1; if ((len -= rep) > 0) { memcpy(dest, src, rep); src = dest; dest += rep; while ((len -= rep) > 0) { memcpy(dest, src, rep); dest += rep; rep += rep; } } memcpy(dest, src, len + rep); } /* Merge mask with selection */ static void mask_select(unsigned char *mask, unsigned char *xsel, int l) { int i, j, k; for (i = 0; i < l; i++) { k = mask[i] * (j = xsel[i]); mask[i] = ((k + (k >> 8) + 1) >> 8) + 255 - j; } } /* Faster function for large brushes and fills */ void put_pixel_row_def(int x, int y, int len, unsigned char *xsel) { unsigned char tmp_image[ROW_BUFLEN * 3], mask[ROW_BUFLEN], tmp_alpha[ROW_BUFLEN], tmp_opacity[ROW_BUFLEN], *source_alpha = NULL, *source_opacity = NULL; unsigned char *old_image, *old_alpha, *srcp, src1[8]; int offset, use_mask, bpp, idx; if (len <= 0) return; old_image = mem_undo_opacity ? mem_undo_previous(mem_channel) : mem_img[mem_channel]; old_alpha = mem_undo_opacity ? mem_undo_previous(CHN_ALPHA) : mem_img[CHN_ALPHA]; offset = x + mem_width * y; bpp = MEM_BPP; idx = IS_INDEXED; use_mask = (mem_channel <= CHN_ALPHA) && mem_img[CHN_MASK] && !channel_dis[CHN_MASK]; if ((mem_channel == CHN_IMAGE) && RGBA_mode && mem_img[CHN_ALPHA]) source_alpha = tmp_alpha; // !!! This depends on buffer length being a multiple of pattern length if (!mem_gradient) /* Default mode - init buffer(s) from pattern */ { int i, dy = 8 * (y & 7), l = len <= ROW_BUFLEN ? len : ROW_BUFLEN; srcp = mem_pattern + dy; if (source_alpha) { for (i = 0; i < 8; i++) src1[i] = channel_col_[srcp[i]][CHN_ALPHA]; pattern_rep(tmp_alpha, src1, x & 7, 8, l, 1); } if (mem_channel != CHN_IMAGE) { for (i = 0; i < 8; i++) src1[i] = channel_col_[srcp[i]][mem_channel]; srcp = src1; } else srcp = idx ? mem_col_pat + dy : mem_col_pat24 + dy * 3; pattern_rep(tmp_image, srcp, x & 7, 8, l, bpp); } idx ^= 1; // 0 if indexed, now while (TRUE) { int l = len <= ROW_BUFLEN ? len : ROW_BUFLEN; prep_mask(0, 1, l, mask, use_mask ? mem_img[CHN_MASK] + offset : NULL, mem_img[CHN_IMAGE] + offset * mem_img_bpp); if (xsel) { mask_select(mask, xsel, l); xsel += l; } /* Gradient mode */ if (mem_gradient) grad_pixels(0, 1, l, x, y, mask, source_opacity = tmp_opacity, tmp_image, source_alpha); /* Buffers stay unchanged for default mode */ process_mask(0, 1, l, mask, mem_img[CHN_ALPHA] + offset, old_alpha + offset, source_alpha, source_opacity, idx * tool_opacity, channel_dis[CHN_ALPHA]); process_img(0, 1, l, mask, mem_img[mem_channel] + offset * bpp, old_image + offset * bpp, tmp_image, tmp_image, bpp, idx); if (!(len -= l)) return; x += l; offset += l; } } void process_mask(int start, int step, int cnt, unsigned char *mask, unsigned char *alphar, unsigned char *alpha0, unsigned char *alpha, unsigned char *trans, int opacity, int noalpha) { unsigned char *xalpha = NULL; cnt = start + step * cnt; /* Use alpha as selection when pasting RGBA to RGB */ if (alpha && !alphar) { *(trans ? &xalpha : &trans) = alpha; alpha = NULL; } /* Opacity mode */ if (opacity) { int i, j, k; for (i = start; i < cnt; i += step) { unsigned char newc, oldc; k = (255 - mask[i]) * opacity; if (!k) { mask[i] = 0; continue; } k = (k + (k >> 8) + 1) >> 8; if (trans) /* Have transparency mask */ { if (xalpha) /* Have two :-) */ { k *= xalpha[i]; k = (k + (k >> 8) + 1) >> 8; } k *= trans[i]; k = (k + (k >> 8) + 1) >> 8; } mask[i] = k; if (!alpha || !k) continue; /* Have coupled alpha channel - process it */ newc = alpha[i]; oldc = alpha0[i]; j = oldc * 255 + (newc - oldc) * k; alphar[i] = (j + (j >> 8) + 1) >> 8; if (noalpha) continue; if (j) mask[i] = (255 * k * newc) / j; } } /* Indexed mode - set mask to on-off */ else { int i, k; for (i = start; i < cnt; i += step) { k = mask[i]; if (trans) { unsigned char oldc = trans[i]; if (xalpha) oldc &= xalpha[i]; k |= oldc ^ 255; } mask[i] = k = k ? 0 : 255; if (!alpha || !k) continue; /* Have coupled alpha channel - process it */ alphar[i] = alpha[i]; } } } /* Here, opacity is just a "not indexed" flag, any nonzero value will serve */ void process_img(int start, int step, int cnt, unsigned char *mask, unsigned char *imgr, unsigned char *img0, unsigned char *img, unsigned char *xbuf, int bpp, int opacity) { int tint; /* Apply blend mode's transform part */ if (mem_blend && (blend_mode & BLEND_MMASK) && blend_pixels(start, step, cnt, mask, xbuf, img0, img, bpp)) img = xbuf; cnt = start + step * cnt; tint = tint_mode[0]; if (tint_mode[1] ^ (tint_mode[2] < 2)) tint = -tint; /* Indexed image or utility channel */ if (bpp < 3) { unsigned char newc, oldc; int i, j, mx = opacity ? 255 : mem_cols - 1; for (i = start; i < cnt; i += step) { j = mask[i]; if (!j) continue; newc = img[i]; oldc = img0[i]; if (!tint); // Do nothing else if (tint < 0) newc = oldc + newc < mx ? oldc + newc : mx; else newc = oldc > newc ? oldc - newc : 0; if (j < 255) { j = oldc * 255 + (newc - oldc) * j; newc = (j + (j >> 8) + 1) >> 8; } imgr[i] = newc; } } /* RGB image */ else { int rgbmask = mem_blend ? (blend_mode >> BLEND_RGBSHIFT) & 7 : 0; unsigned char r, g, b, nrgb[3]; int i, j, ofs3, opacity; for (i = start; i < cnt; i += step) { opacity = mask[i]; if (!opacity) continue; ofs3 = i * 3; nrgb[0] = img[ofs3 + 0]; nrgb[1] = img[ofs3 + 1]; nrgb[2] = img[ofs3 + 2]; /* !!! On x86, register pressure here is too large already, so rereading img0 * is preferable to lengthening r/g/b's living ranges - WJ */ if (tint) { r = img0[ofs3 + 0]; g = img0[ofs3 + 1]; b = img0[ofs3 + 2]; if (tint < 0) { nrgb[0] = r > 255 - nrgb[0] ? 255 : r + nrgb[0]; nrgb[1] = g > 255 - nrgb[1] ? 255 : g + nrgb[1]; nrgb[2] = b > 255 - nrgb[2] ? 255 : b + nrgb[2]; } else { nrgb[0] = r > nrgb[0] ? r - nrgb[0] : 0; nrgb[1] = g > nrgb[1] ? g - nrgb[1] : 0; nrgb[2] = b > nrgb[2] ? b - nrgb[2] : 0; } } if (opacity < 255) { r = img0[ofs3 + 0]; g = img0[ofs3 + 1]; b = img0[ofs3 + 2]; j = r * 255 + (nrgb[0] - r) * opacity; nrgb[0] = (j + (j >> 8) + 1) >> 8; j = g * 255 + (nrgb[1] - g) * opacity; nrgb[1] = (j + (j >> 8) + 1) >> 8; j = b * 255 + (nrgb[2] - b) * opacity; nrgb[2] = (j + (j >> 8) + 1) >> 8; } if (rgbmask) switch (rgbmask) { case 6: nrgb[1] = img0[ofs3 + 1]; /* Red */ case 4: nrgb[2] = img0[ofs3 + 2]; /* Red + Green */ break; case 5: nrgb[2] = img0[ofs3 + 2]; /* Green */ case 1: nrgb[0] = img0[ofs3 + 0]; /* Green + Blue */ break; case 3: nrgb[0] = img0[ofs3 + 0]; /* Blue */ case 2: nrgb[1] = img0[ofs3 + 1]; /* Blue + Red */ break; } imgr[ofs3 + 0] = nrgb[0]; imgr[ofs3 + 1] = nrgb[1]; imgr[ofs3 + 2] = nrgb[2]; } } } /* !!! This assumes dest area lies entirely within src, its bpp matches src's * current channel bpp, and it has alpha channel only if src has it too */ void copy_area(image_info *dest, image_info *src, int x, int y) { int w = dest->width, h = dest->height, bpp = dest->bpp, ww = src->width; int i, ofs, delta, len; /* Current channel */ ofs = (y * ww + x) * bpp; delta = 0; len = w * bpp; for (i = 0; i < h; i++) { memcpy(dest->img[CHN_IMAGE] + delta, src->img[mem_channel] + ofs, len); ofs += ww * bpp; delta += len; } /* Alpha channel */ if (!dest->img[CHN_ALPHA]) return; ofs = y * ww + x; delta = 0; for (i = 0; i < h; i++) { memcpy(dest->img[CHN_ALPHA] + delta, src->img[CHN_ALPHA] + ofs, w); ofs += ww; delta += w; } } int mem_count_all_cols() // Count all colours - Using main image { return mem_count_all_cols_real(mem_img[CHN_IMAGE], mem_width, mem_height); } int mem_count_all_cols_real(unsigned char *im, int w, int h) // Count all colours - very memory greedy { guint32 *tab; int i, j, k, ix; j = 0x80000; tab = calloc(j, sizeof(guint32)); // HUGE colour cube if (!tab) return -1; // Not enough memory Mr Greedy ;-) k = w * h; for (i = 0; i < k; i++) // Scan each pixel { ix = (im[0] >> 5) + (im[1] << 3) + (im[2] << 11); tab[ix] |= 1 << (im[0] & 31); im += 3; } // Count each colour for (i = k = 0; i < j; i++) k += bitcount(tab[i]); free(tab); return k; } int mem_cols_used(int max_count) // Count colours used in main RGB image { if ( mem_img_bpp == 1 ) return -1; // RGB only return (mem_cols_used_real(mem_img[CHN_IMAGE], mem_width, mem_height, max_count, 1)); } int mem_cols_used_real(unsigned char *im, int w, int h, int max_count, int prog) // Count colours used in RGB chunk { int i, j = w * h * 3, k, res = 1, pix; found[0] = MEM_2_INT(im, 0); if (prog) progress_init(_("Counting Unique RGB Pixels"), 0); for (i = 3; (i < j) && (res < max_count); i += 3) // Skim all pixels { pix = MEM_2_INT(im, i); for (k = 0; k < res; k++) { if (found[k] == pix) break; } if (k >= res) // New colour so add to list { found[res++] = pix; if (!prog || (res & 7)) continue; if (progress_update((float)res / max_count)) break; } } if (prog) progress_end(); return (res); } //// EFFECTS static inline double dist(int n1, int n2) { return (sqrt(n1 * n1 + n2 * n2)); } void do_effect(int type, int param) { unsigned char *src, *dest, *tmp = "\0", *mask = NULL; int i, j, k = 0, k1, k2, bpp, ll, dxp1, dxm1, dyp1, dym1; int op, md, ms; double blur = (double)param / 200.0; bpp = MEM_BPP; ll = mem_width * bpp; ms = bpp == 3 ? 1 : 4; src = mem_undo_previous(mem_channel); dest = mem_img[mem_channel]; mask = malloc(mem_width); if (!mask) { memory_errors(1); return; } progress_init(_("Applying Effect"), 1); for (i = 0; i < mem_height; i++) { if (mask) row_protected(0, i, mem_width, tmp = mask); dyp1 = i < mem_height - 1 ? ll : -ll; dym1 = i ? -ll : ll; for (md = j = 0; j < ll; j++ , src++ , dest++) { op = *tmp; /* One step for 1 or 3 bytes */ md += ms + (md >> 1); tmp += md >> 2; md &= 3; if (op == 255) continue; dxp1 = j < ll - bpp ? bpp : -bpp; dxm1 = j >= bpp ? -bpp : bpp; switch (type) { case FX_EDGE: /* Edge detect */ k = *src; k = abs(k - src[dym1]) + abs(k - src[dyp1]) + abs(k - src[dxm1]) + abs(k - src[dxp1]); k += k >> 1; break; case FX_EMBOSS: /* Emboss */ k = src[dym1] + src[dxm1] + src[dxm1 + dym1] + src[dxp1 + dym1]; k = k / 4 - *src + 127; break; case FX_SHARPEN: /* Edge sharpen */ k = src[dym1] + src[dyp1] + src[dxm1] + src[dxp1] - 4 * src[0]; k = *src - blur * k; break; case FX_SOFTEN: /* Edge soften */ k = src[dym1] + src[dyp1] + src[dxm1] + src[dxp1] - 4 * src[0]; k = *src + (5 * k) / (125 - param); break; case FX_SOBEL: /* Another edge detector */ k = dist((src[dxp1] - src[dxm1]) * 2 + src[dym1 + dxp1] - src[dym1 + dxm1] + src[dyp1 + dxp1] - src[dyp1 + dxm1], (src[dyp1] - src[dym1]) * 2 + src[dyp1 + dxm1] + src[dyp1 + dxp1] - src[dym1 + dxm1] - src[dym1 + dxp1]); break; case FX_PREWITT: /* Yet another edge detector */ /* Actually, the filter kernel used is "Robinson"; what is attributable to * Prewitt is "compass filtering", which can be done with other filter * kernels too - WJ */ case FX_KIRSCH: /* Compass detector with another kernel */ /* Optimized compass detection algorithm: I calculate three values (compass, * plus and minus) and then mix them according to filter type - WJ */ k = 0; k1 = src[dyp1 + dxm1] - src[dxp1]; if (k < k1) k = k1; k1 += src[dyp1] - src[dym1 + dxp1]; if (k < k1) k = k1; k1 += src[dyp1 + dxp1] - src[dym1]; if (k < k1) k = k1; k1 += src[dxp1] - src[dym1 + dxm1]; if (k < k1) k = k1; k1 += src[dym1 + dxp1] - src[dxm1]; if (k < k1) k = k1; k1 += src[dym1] - src[dyp1 + dxm1]; if (k < k1) k = k1; k1 += src[dym1 + dxm1] - src[dyp1]; if (k < k1) k = k1; k1 = src[dym1 + dxm1] + src[dym1] + src[dym1 + dxp1] + src[dxm1] + src[dxp1]; k2 = src[dyp1 + dxm1] + src[dyp1] + src[dyp1 + dxp1]; if (type == FX_PREWITT) k = k * 2 + k1 - k2 - src[0] * 2; else /* if (type == FX_KIRSCH) */ k = (k * 8 + k1 * 3 - k2 * 5) / 4; // Division is for equalizing weight of edge break; case FX_GRADIENT: /* Still another edge detector */ k = 4.0 * dist(src[dxp1] - src[0], src[dyp1] - src[0]); break; case FX_ROBERTS: /* One more edge detector */ k = 4.0 * dist(src[dyp1 + dxp1] - src[0], src[dxp1] - src[dyp1]); break; case FX_LAPLACE: /* The last edge detector... I hope */ k = src[dym1 + dxm1] + src[dym1] + src[dym1 + dxp1] + src[dxm1] - 8 * src[0] + src[dxp1] + src[dyp1 + dxm1] + src[dyp1] + src[dyp1 + dxp1]; break; case FX_MORPHEDGE: /* Morphological edge detection */ case FX_ERODE: /* Greyscale erosion */ k = src[0]; if (k > src[dym1 + dxm1]) k = src[dym1 + dxm1]; if (k > src[dym1]) k = src[dym1]; if (k > src[dym1 + dxp1]) k = src[dym1 + dxp1]; if (k > src[dxm1]) k = src[dxm1]; if (k > src[dxp1]) k = src[dxp1]; if (k > src[dyp1 + dxm1]) k = src[dyp1 + dxm1]; if (k > src[dyp1]) k = src[dyp1]; if (k > src[dyp1 + dxp1]) k = src[dyp1 + dxp1]; if (type == FX_MORPHEDGE) k = (src[0] - k) * 2; break; case FX_DILATE: /* Greyscale dilation */ k = src[0]; if (k < src[dym1 + dxm1]) k = src[dym1 + dxm1]; if (k < src[dym1]) k = src[dym1]; if (k < src[dym1 + dxp1]) k = src[dym1 + dxp1]; if (k < src[dxm1]) k = src[dxm1]; if (k < src[dxp1]) k = src[dxp1]; if (k < src[dyp1 + dxm1]) k = src[dyp1 + dxm1]; if (k < src[dyp1]) k = src[dyp1]; if (k < src[dyp1 + dxp1]) k = src[dyp1 + dxp1]; break; } k = k < 0 ? 0 : k > 0xFF ? 0xFF : k; k = 255 * k + (*src - k) * op; *dest = (k + (k >> 8) + 1) >> 8; } if ((i * 10) % mem_height >= mem_height - 10) if (progress_update((float)(i + 1) / mem_height)) break; } free(mask); progress_end(); } /* Apply vertical filter */ static void vert_gauss(unsigned char *chan, int w, int h, int y, double *temp, double *gaussY, int lenY, int gcor) { unsigned char *src0, *src1; double gv = gaussY[0]; int j, k, mh2 = h > 1 ? h + h - 2 : 1; src0 = chan + y * w; if (gcor) /* Gamma-correct RGB values */ { for (j = 0; j < w; j++) temp[j] = gamma256[src0[j]] * gv; } else /* Leave RGB values as they were */ { for (j = 0; j < w; j++) temp[j] = src0[j] * gv; } for (j = 1; j < lenY; j++) { double gv = gaussY[j]; k = (y + j) % mh2; if (k >= h) k = mh2 - k; src0 = chan + k * w; k = abs(y - j) % mh2; if (k >= h) k = mh2 - k; src1 = chan + k * w; if (gcor) /* Gamma-correct */ { for (k = 0; k < w; k++) { temp[k] += (gamma256[src0[k]] + gamma256[src1[k]]) * gv; } } else /* Leave alone */ { for (k = 0; k < w; k++) { temp[k] += (src0[k] + src1[k]) * gv; } } } } typedef struct { double *gaussX, *gaussY, *temp; unsigned char *mask; int *idx; int lenX, lenY; int channel, gcor; // For unsharp mask int threshold; double amount; } gaussd; /* Extend horizontal array, using precomputed indices */ static void gauss_extend(gaussd *gd, double *temp, int w, int bpp) { double *dest, *src; int i, l = gd->lenX - 1, *tp = gd->idx; dest = temp - l * bpp; while (TRUE) { for (i = 0; i < l; i++ , dest += bpp) { src = temp + *tp++ * bpp; dest[0] = src[0]; if (bpp == 1) continue; dest[1] = src[1]; dest[2] = src[2]; } if (dest != temp) break; // "w * bpp" is definitely nonzero dest += w * bpp; } } /* Apply RGB horizontal filter */ static void hor_gauss3(double *temp, int w, double *gaussX, int lenX, unsigned char *mask) { int j, jj, k, x1, x2; double sum0, sum1, sum2; for (j = jj = 0; jj < w; jj++ , j += 3) { if (mask[jj] == 255) continue; sum0 = temp[j] * gaussX[0]; sum1 = temp[j + 1] * gaussX[0]; sum2 = temp[j + 2] * gaussX[0]; x1 = x2 = j; for (k = 1; k < lenX; k++) { double gv = gaussX[k]; x1 -= 3; x2 += 3; sum0 += (temp[x1] + temp[x2]) * gv; sum1 += (temp[x1 + 1] + temp[x2 + 1]) * gv; sum2 += (temp[x1 + 2] + temp[x2 + 2]) * gv; } temp[x1] = sum0; temp[x1 + 1] = sum1; temp[x1 + 2] = sum2; } } // !!! Will need extra checks if used for out-of-range values static void pack_row3(unsigned char *dest, const double *src, int w, int gcor, unsigned char *mask) { int j, jj, k0, k1, k2, m; double sum0, sum1, sum2; for (j = jj = 0; jj < w; jj++ , j += 3) { sum0 = src[j]; sum1 = src[j + 1]; sum2 = src[j + 2]; if (gcor) /* Reverse gamma correction */ { k0 = UNGAMMA256(sum0); k1 = UNGAMMA256(sum1); k2 = UNGAMMA256(sum2); } else /* Simply round to nearest */ { k0 = rint(sum0); k1 = rint(sum1); k2 = rint(sum2); } m = mask[jj]; k0 = k0 * 255 + (dest[j] - k0) * m; dest[j] = (k0 + (k0 >> 8) + 1) >> 8; k1 = k1 * 255 + (dest[j + 1] - k1) * m; dest[j + 1] = (k1 + (k1 >> 8) + 1) >> 8; k2 = k2 * 255 + (dest[j + 2] - k2) * m; dest[j + 2] = (k2 + (k2 >> 8) + 1) >> 8; } } /* Most-used variables are local to inner blocks to shorten their live ranges - * otherwise stupid compilers might allocate them to memory */ static void gauss_filter(tcb *thread) { gaussd *gd = thread->data; int lenX = gd->lenX, gcor = gd->gcor, channel = gd->channel; int i, ii, cnt, wid, bpp; double sum, *temp, *gaussX = gd->gaussX; unsigned char *chan, *dest, *mask = gd->mask; cnt = thread->nsteps; bpp = BPP(channel); wid = mem_width * bpp; chan = mem_undo_previous(channel); temp = gd->temp + (lenX - 1) * bpp; for (i = thread->step0 , ii = 0; ii < cnt; i++ , ii++) { vert_gauss(chan, wid, mem_height, i, temp, gd->gaussY, gd->lenY, gcor); gauss_extend(gd, temp, mem_width, bpp); row_protected(0, i, mem_width, mask); dest = mem_img[channel] + i * wid; if (bpp == 3) /* Run 3-bpp horizontal filter */ { hor_gauss3(temp, mem_width, gaussX, lenX, mask); pack_row3(dest, gd->temp, mem_width, gcor, mask); } else /* Run 1-bpp horizontal filter - no gamma here */ { int j, k, k0; for (j = 0; j < mem_width; j++) { if (mask[j] == 255) continue; sum = temp[j] * gaussX[0]; for (k = 1; k < lenX; k++) { sum += (temp[j - k] + temp[j + k]) * gaussX[k]; } k0 = rint(sum); k0 = k0 * 255 + (dest[j] - k0) * mask[j]; dest[j] = (k0 + (k0 >> 8) + 1) >> 8; } } if (thread_step(thread, ii + 1, cnt, 10)) break; } thread_done(thread); } /* The inner loops are coded the way they are because one must spell everything * out for dumb compiler to get acceptable code out of it */ static void gauss_filter_rgba(tcb *thread) { gaussd *gd = thread->data; int i, ii, cnt, mh2, lenX = gd->lenX, lenY = gd->lenY, gcor = gd->gcor; double sum, sum1, sum2, mult, *temp, *tmpa, *atmp, *src, *gaussX, *gaussY; unsigned char *chan, *dest, *alpha, *dsta, *mask = gd->mask; cnt = thread->nsteps; chan = mem_undo_previous(CHN_IMAGE); alpha = mem_undo_previous(CHN_ALPHA); gaussX = gd->gaussX; gaussY = gd->gaussY; temp = gd->temp + (lenX - 1) * 3; mh2 = mem_height > 1 ? 2 * mem_height - 2 : 1; /* Set up the main row buffer and process the image */ tmpa = temp + mem_width * 3 + (lenX - 1) * (3 + 3); atmp = tmpa + mem_width * 3 + (lenX - 1) * (3 + 1); for (i = thread->step0 , ii = 0; ii < cnt; i++ , ii++) { /* Apply vertical filter */ { unsigned char *srcc, *src0, *src1; unsigned char *alff, *alf0, *alf1; int j, k; alff = alpha + i * mem_width; srcc = chan + i * mem_width * 3; if (gcor) /* Gamma correct */ { double gk = gaussY[0]; int j, jj; for (j = jj = 0; j < mem_width; j++) { double ak, tv; atmp[j] = ak = alff[j] * gk; temp[jj] = (tv = gamma256[srcc[jj]]) * gk; tmpa[jj++] = tv * ak; temp[jj] = (tv = gamma256[srcc[jj]]) * gk; tmpa[jj++] = tv * ak; temp[jj] = (tv = gamma256[srcc[jj]]) * gk; tmpa[jj++] = tv * ak; } } else /* Use as is */ { double gk = gaussY[0]; int j, jj; for (j = jj = 0; j < mem_width; j++) { double ak, tv; atmp[j] = ak = alff[j] * gk; temp[jj] = (tv = srcc[jj]) * gk; tmpa[jj++] = tv * ak; temp[jj] = (tv = srcc[jj]) * gk; tmpa[jj++] = tv * ak; temp[jj] = (tv = srcc[jj]) * gk; tmpa[jj++] = tv * ak; } } for (j = 1; j < lenY; j++) { double gk = gaussY[j]; k = (i + j) % mh2; if (k >= mem_height) k = mh2 - k; alf0 = alpha + k * mem_width; src0 = chan + k * mem_width * 3; k = abs(i - j) % mh2; if (k >= mem_height) k = mh2 - k; alf1 = alpha + k * mem_width; src1 = chan + k * mem_width * 3; if (gcor) /* Gamma correct */ { int k, kk; for (k = kk = 0; k < mem_width; k++) { double ak0, ak1, tv0, tv1; ak0 = alf0[k] * gk; ak1 = alf1[k] * gk; atmp[k] += ak0 + ak1; tv0 = gamma256[src0[kk]]; tv1 = gamma256[src1[kk]]; temp[kk] += (tv0 + tv1) * gk; tmpa[kk++] += tv0 * ak0 + tv1 * ak1; tv0 = gamma256[src0[kk]]; tv1 = gamma256[src1[kk]]; temp[kk] += (tv0 + tv1) * gk; tmpa[kk++] += tv0 * ak0 + tv1 * ak1; tv0 = gamma256[src0[kk]]; tv1 = gamma256[src1[kk]]; temp[kk] += (tv0 + tv1) * gk; tmpa[kk++] += tv0 * ak0 + tv1 * ak1; } } else /* Use as is */ { int k, kk; for (k = kk = 0; k < mem_width; k++) { double ak0, ak1, tv0, tv1; ak0 = alf0[k] * gk; ak1 = alf1[k] * gk; atmp[k] += ak0 + ak1; tv0 = src0[kk]; tv1 = src1[kk]; temp[kk] += (tv0 + tv1) * gk; tmpa[kk++] += tv0 * ak0 + tv1 * ak1; tv0 = src0[kk]; tv1 = src1[kk]; temp[kk] += (tv0 + tv1) * gk; tmpa[kk++] += tv0 * ak0 + tv1 * ak1; tv0 = src0[kk]; tv1 = src1[kk]; temp[kk] += (tv0 + tv1) * gk; tmpa[kk++] += tv0 * ak0 + tv1 * ak1; } } } } gauss_extend(gd, temp, mem_width, 3); gauss_extend(gd, tmpa, mem_width, 3); gauss_extend(gd, atmp, mem_width, 1); row_protected(0, i, mem_width, mask); dest = mem_img[CHN_IMAGE] + i * mem_width * 3; dsta = mem_img[CHN_ALPHA] + i * mem_width; /* Horizontal RGBA filter */ { int j, jj, k, kk, x1, x2; for (j = jj = 0; j < mem_width; j++ , jj += 3) { if (mask[j] == 255) continue; sum = atmp[j] * gaussX[0]; for (k = 1; k < lenX; k++) { sum += (atmp[j - k] + atmp[j + k]) * gaussX[k]; } k = rint(sum); src = temp; mult = 1.0; if (k) { src = tmpa; mult /= sum; } kk = mask[j]; k = k * 255 + (dsta[j] - k) * kk; if (k) mask[j] = (255 * kk * dsta[j]) / k; dsta[j] = (k + (k >> 8) + 1) >> 8; sum = src[jj] * gaussX[0]; sum1 = src[jj + 1] * gaussX[0]; sum2 = src[jj + 2] * gaussX[0]; x1 = x2 = jj; for (k = 1; k < lenX; k++) { double gv = gaussX[k]; x1 -= 3; x2 += 3; sum += (src[x1] + src[x2]) * gv; sum1 += (src[x1 + 1] + src[x2 + 1]) * gv; sum2 += (src[x1 + 2] + src[x2 + 2]) * gv; } temp[x1] = sum * mult; temp[x1 + 1] = sum1 * mult; temp[x1 + 2] = sum2 * mult; } pack_row3(dest, gd->temp, mem_width, gcor, mask); } if (thread_step(thread, ii + 1, cnt, 10)) break; } thread_done(thread); } /* Modes: 0 - normal, 1 - RGBA, 2 - DoG */ static threaddata *init_gauss(gaussd *gd, double radiusX, double radiusY, int mode) { threaddata *tdata; int i, j, k, l, lenX, lenY, w, bpp = MEM_BPP; double sum, exkX, exkY, *gauss; /* Cutoff point is where gaussian becomes < 1/255 */ gd->lenX = lenX = ceil(radiusX) + 2; gd->lenY = lenY = ceil(radiusY) + 2; exkX = -log(255.0) / ((radiusX + 1.0) * (radiusX + 1.0)); exkY = -log(255.0) / ((radiusY + 1.0) * (radiusY + 1.0)); /* Allocate memory */ if (mode == 1) i = 7; /* Extra linebuffer for RGBA */ else if (mode == 2) i = bpp + bpp; /* Extra buffer in DoG mode */ else i = bpp; l = 2 * (lenX - 1); w = mem_width + l; tdata = talloc(MA_ALIGN_DOUBLE, 0, gd, sizeof(gaussd), &gd->gaussX, lenX * sizeof(double), &gd->gaussY, lenY * sizeof(double), &gd->idx, l * sizeof(int), NULL, &gd->temp, i * w * sizeof(double), &gd->mask, mem_width, NULL); if (!tdata) return (NULL); /* Prepare filters */ j = lenX; gauss = gd->gaussX; while (1) { sum = gauss[0] = 1.0; for (i = 1; i < j; i++) { sum += 2.0 * (gauss[i] = exp((double)(i * i) * exkX)); } sum = 1.0 / sum; for (i = 0; i < j; i++) { gauss[i] *= sum; } if (gauss != gd->gaussX) break; exkX = exkY; j = lenY; gauss = gd->gaussY; } /* Prepare horizontal indices, assuming mirror boundary */ if (mem_width > 1) // Else, good already (zeroed out) { int *idx = gd->idx + lenX - 1; // To simplify indexing k = 2 * mem_width - 2; for (i = 1; i < lenX; i++) { j = i % k; idx[-i] = j < mem_width ? j : k - j; j = (mem_width + i - 1) % k; idx[i - 1] = j < mem_width ? j : k - j; } } return (tdata); } /* Gaussian blur */ void mem_gauss(double radiusX, double radiusY, int gcor) { gaussd gd; threaddata *tdata; int rgba, rgbb; /* RGBA or not? */ rgba = (mem_channel == CHN_IMAGE) && mem_img[CHN_ALPHA] && RGBA_mode; rgbb = rgba && !channel_dis[CHN_ALPHA]; /* Create arrays */ if (mem_channel != CHN_IMAGE) gcor = FALSE; gd.gcor = gcor; gd.channel = mem_channel; tdata = init_gauss(&gd, radiusX, radiusY, rgbb); if (!tdata) { memory_errors(1); return; } progress_init(_("Gaussian Blur"), 1); if (rgbb) /* Coupled RGBA */ launch_threads(gauss_filter_rgba, tdata, NULL, mem_height); else /* One channel, or maybe two */ { launch_threads(gauss_filter, tdata, NULL, mem_height); if (rgba) /* Need to process alpha too */ { #ifdef U_THREADS int i, j = tdata->count; for (i = 0; i < j; i++) { gaussd *gp = tdata->threads[i]->data; gp->channel = CHN_ALPHA; gp->gcor = FALSE; } #else gaussd *gp = tdata->threads[0]->data; gp->channel = CHN_ALPHA; gp->gcor = FALSE; #endif launch_threads(gauss_filter, tdata, NULL, mem_height); } } progress_end(); free(tdata); } static void unsharp_filter(tcb *thread) { gaussd *gd = thread->data; int lenX = gd->lenX, threshold = gd->threshold, channel = gd->channel; int i, ii, cnt, wid, bpp, gcor = gd->gcor; double *temp, *gaussX = gd->gaussX; double sum, sum1, sum2, amount = gd->amount; unsigned char *chan, *dest, *mask = gd->mask; cnt = thread->nsteps; bpp = BPP(channel); wid = mem_width * bpp; chan = mem_undo_previous(channel); temp = gd->temp + (lenX - 1) * bpp; for (i = thread->step0 , ii = 0; ii < cnt; i++ , ii++) { vert_gauss(chan, wid, mem_height, i, temp, gd->gaussY, gd->lenY, gcor); gauss_extend(gd, temp, mem_width, bpp); row_protected(0, i, mem_width, mask); dest = mem_img[channel] + i * wid; if (bpp == 3) /* Run 3-bpp horizontal filter */ { int j, jj, k, k1, k2, x1, x2; for (j = jj = 0; jj < mem_width; jj++ , j += 3) { if (mask[jj] == 255) continue; sum = temp[j] * gaussX[0]; sum1 = temp[j + 1] * gaussX[0]; sum2 = temp[j + 2] * gaussX[0]; x1 = x2 = j; for (k = 1; k < lenX; k++) { double gv = gaussX[k]; x1 -= 3; x2 += 3; sum += (temp[x1] + temp[x2]) * gv; sum1 += (temp[x1 + 1] + temp[x2 + 1]) * gv; sum2 += (temp[x1 + 2] + temp[x2 + 2]) * gv; } if (gcor) /* Reverse gamma correction */ { k = UNGAMMA256(sum); k1 = UNGAMMA256(sum1); k2 = UNGAMMA256(sum2); } else /* Simply round to nearest */ { k = rint(sum); k1 = rint(sum1); k2 = rint(sum2); } /* Threshold */ /* !!! GIMP has an apparent bug which I won't reproduce - so mtPaint's * threshold value means _actual_ difference, not half of it - WJ */ if ((abs(k - dest[j]) < threshold) && (abs(k1 - dest[j + 1]) < threshold) && (abs(k2 - dest[j + 2]) < threshold)) continue; if (gcor) /* Involve gamma *AGAIN* */ { sum = gamma256[dest[j]] + amount * (gamma256[dest[j]] - sum); sum1 = gamma256[dest[j + 1]] + amount * (gamma256[dest[j + 1]] - sum1); sum2 = gamma256[dest[j + 2]] + amount * (gamma256[dest[j + 2]] - sum2); k = UNGAMMA256X(sum); k1 = UNGAMMA256X(sum1); k2 = UNGAMMA256X(sum2); } else /* Combine values as linear */ { k = rint(dest[j] + amount * (dest[j] - sum)); k = k < 0 ? 0 : k > 255 ? 255 : k; k1 = rint(dest[j + 1] + amount * (dest[j + 1] - sum1)); k1 = k1 < 0 ? 0 : k1 > 255 ? 255 : k1; k2 = rint(dest[j + 2] + amount * (dest[j + 2] - sum2)); k2 = k2 < 0 ? 0 : k2 > 255 ? 255 : k2; } /* Store the result */ k = k * 255 + (dest[j] - k) * mask[jj]; dest[j] = (k + (k >> 8) + 1) >> 8; k1 = k1 * 255 + (dest[j + 1] - k1) * mask[jj]; dest[j + 1] = (k1 + (k1 >> 8) + 1) >> 8; k2 = k2 * 255 + (dest[j + 2] - k2) * mask[jj]; dest[j + 2] = (k2 + (k2 >> 8) + 1) >> 8; } } else /* Run 1-bpp horizontal filter - no gamma here */ { int j, k; for (j = 0; j < mem_width; j++) { if (mask[j] == 255) continue; sum = temp[j] * gaussX[0]; for (k = 1; k < lenX; k++) { sum += (temp[j - k] + temp[j + k]) * gaussX[k]; } k = rint(sum); /* Threshold */ /* !!! Same non-bug as above */ if (abs(k - dest[j]) < threshold) continue; /* Combine values */ k = rint(dest[j] + amount * (dest[j] - sum)); k = k < 0 ? 0 : k > 255 ? 255 : k; /* Store the result */ k = k * 255 + (dest[j] - k) * mask[j]; dest[j] = (k + (k >> 8) + 1) >> 8; } } if (thread_step(thread, ii + 1, cnt, 10)) break; } thread_done(thread); } /* Unsharp mask */ void mem_unsharp(double radius, double amount, int threshold, int gcor) { gaussd gd; threaddata *tdata; /* Create arrays */ if (mem_channel != CHN_IMAGE) gcor = 0; gd.gcor = gcor; gd.channel = mem_channel; gd.amount = amount; gd.threshold = threshold; // !!! No RGBA mode for now tdata = init_gauss(&gd, radius, radius, 0); if (!tdata) { memory_errors(1); return; } /* Run filter */ launch_threads(unsharp_filter, tdata, _("Unsharp Mask"), mem_height); free(tdata); } static void do_alpha_blend(unsigned char *dest, unsigned char *lower, unsigned char *upper, unsigned char *alpha, int len, int bpp) { int j, k, mv; for (j = 0; j < len;) { mv = *alpha++; k = lower[j]; k = k * 255 + (upper[j] - k) * mv; dest[j++] = (k + (k >> 8) + 1) >> 8; if (bpp == 1) continue; k = lower[j]; k = k * 255 + (upper[j] - k) * mv; dest[j++] = (k + (k >> 8) + 1) >> 8; k = lower[j]; k = k * 255 + (upper[j] - k) * mv; dest[j++] = (k + (k >> 8) + 1) >> 8; } } /* Retroactive masking - by blending with undo frame */ void mask_merge(unsigned char *old, int channel, unsigned char *mask) { chanlist tlist; unsigned char *dest, *mask0 = NULL; int i, ofs, bpp = BPP(channel), w = mem_width * bpp; memcpy(tlist, mem_img, sizeof(chanlist)); tlist[channel] = old; /* Clear mask or copy mask channel into it */ if ((channel <= CHN_ALPHA) && mem_img[CHN_MASK] && !channel_dis[CHN_MASK]) mask0 = tlist[CHN_MASK]; for (i = 0; i < mem_height; i++) { ofs = i * mem_width; prep_mask(0, 1, mem_width, mask, mask0 ? mask0 + ofs : NULL, tlist[CHN_IMAGE] + ofs * mem_img_bpp); dest = mem_img[channel] + ofs * bpp; do_alpha_blend(dest, dest, old + ofs * bpp, mask, w, bpp); } } static void dog_filter(tcb *thread) { gaussd *gd = thread->data; int channel = gd->channel, bpp = BPP(channel), wid = mem_width * bpp; int i, ii, cnt, gcor = gd->gcor; int lenW = gd->lenX, lenN = gd->lenY; double sum, sum1, sum2, *tmp1, *tmp2; double *gaussW = gd->gaussX, *gaussN = gd->gaussY; unsigned char *chan, *dest; cnt = thread->nsteps; chan = mem_undo_previous(channel); tmp1 = gd->temp + (lenW - 1) * bpp; tmp2 = tmp1 + wid + (lenW - 1) * bpp * 2; for (i = thread->step0 , ii = 0; ii < cnt; i++ , ii++) { vert_gauss(chan, wid, mem_height, i, tmp1, gaussW, lenW, gcor); vert_gauss(chan, wid, mem_height, i, tmp2, gaussN, lenN, gcor); gauss_extend(gd, tmp1, mem_width, bpp); gauss_extend(gd, tmp2, mem_width, bpp); dest = mem_img[channel] + i * wid; if (bpp == 3) /* Run 3-bpp horizontal filter */ { int j, jj, k, k1, k2; for (j = jj = 0; jj < mem_width; jj++ , j += 3) { int x1, x2, x3, x4; sum = tmp1[j] * gaussW[0] - tmp2[j] * gaussN[0]; sum1 = tmp1[j + 1] * gaussW[0] - tmp2[j + 1] * gaussN[0]; sum2 = tmp1[j + 2] * gaussW[0] - tmp2[j + 2] * gaussN[0]; x1 = x2 = j; for (k = 1; k < lenW; k++) { double gv = gaussW[k]; x1 -= 3; x2 += 3; sum += (tmp1[x1] + tmp1[x2]) * gv; sum1 += (tmp1[x1 + 1] + tmp1[x2 + 1]) * gv; sum2 += (tmp1[x1 + 2] + tmp1[x2 + 2]) * gv; } x3 = x4 = j; for (k = 1; k < lenN; k++) { double gv = gaussN[k]; x3 -= 3; x4 += 3; sum -= (tmp2[x3] + tmp2[x4]) * gv; sum1 -= (tmp2[x3 + 1] + tmp2[x4 + 1]) * gv; sum2 -= (tmp2[x3 + 2] + tmp2[x4 + 2]) * gv; } if (gcor) { #if 1 /* Reverse gamma - but does it make sense? */ k = UNGAMMA256X(sum); k1 = UNGAMMA256X(sum1); k2 = UNGAMMA256X(sum2); #else /* Let values remain linear */ k = rint(sum * 255.0); k = k < 0 ? 0 : k; k1 = rint(sum1 * 255.0); k1 = k1 < 0 ? 0 : k1; k2 = rint(sum2 * 255.0); k2 = k2 < 0 ? 0 : k2; #endif } else { k = rint(sum); k = k < 0 ? 0 : k; k1 = rint(sum1); k1 = k1 < 0 ? 0 : k1; k2 = rint(sum2); k2 = k2 < 0 ? 0 : k2; } /* Store the result */ dest[j] = k; dest[j + 1] = k1; dest[j + 2] = k2; } } else /* Run 1-bpp horizontal filter - no gamma here */ { int j, k; for (j = 0; j < mem_width; j++) { sum = tmp1[j] * gaussW[0] - tmp2[j] * gaussN[0]; for (k = 1; k < lenW; k++) { sum += (tmp1[j - k] + tmp1[j + k]) * gaussW[k]; } for (k = 1; k < lenN; k++) { sum -= (tmp2[j - k] + tmp2[j + k]) * gaussN[k]; } k = rint(sum); dest[j] = k < 0 ? 0 : k; } } if (thread_step(thread, ii + 1, cnt, 10)) break; } thread_done(thread); } /* Difference of Gaussians */ void mem_dog(double radiusW, double radiusN, int norm, int gcor) { gaussd gd; threaddata *tdata; /* Create arrays */ if (mem_channel != CHN_IMAGE) gcor = 0; gd.gcor = gcor; gd.channel = mem_channel; // !!! No RGBA mode for ever - DoG mode instead tdata = init_gauss(&gd, radiusW, radiusN, 2); if (!tdata) { memory_errors(1); return; } /* Run filter */ progress_init(_("Difference of Gaussians"), 1); launch_threads(dog_filter, tdata, NULL, mem_height); /* Normalize values (expand to full 0..255) */ while (norm) { unsigned char *tmp, xtb[256]; double d; int i, l, mx = 0; l = mem_height * mem_width * BPP(mem_channel); tmp = mem_img[mem_channel]; for (i = l; i; i-- , tmp++) if (*tmp > mx) mx = *tmp; if (!mx) break; d = 255.0 / (double)mx; for (i = 0; i <= mx; i++) xtb[i] = rint(i * d); tmp = mem_img[mem_channel]; for (i = l; i; i-- , tmp++) *tmp = xtb[*tmp]; break; } /* Mask-merge with prior picture */ mask_merge(mem_undo_previous(mem_channel), mem_channel, gd.mask); progress_end(); free(tdata); } /* !!! Kuwahara-Nagao filter's radius is limited to 255, to use byte offsets */ typedef struct { int *idx; // Index array double *rs; // Sum of gamma-corrected RGB if using gamma int *avg; // Sum of pixel values (for average) int *dis; // Sum of pixel values squared (for variance) unsigned char *min; // Offset to minimum-variance square double r2i; // 1/r^2 to multiply things with int w, r; // Row width & filter radius int gcor; // Gamma correction toggle int l, rl; // Row array lengths } kuwahara_info; /* This function uses running sums, which gives x87 FPU's "precision jitter" * a chance to accumulate; to avoid, reduced-precision gamma is used - WJ */ static void kuwahara_row(unsigned char *src, int base, int add, kuwahara_info *info) { double rs0 = 0.0, rs1 = 0.0, rs2 = 0.0; int avg[3] = { 0, 0, 0 }, dis[3] = { 0, 0, 0 }; int i, w, r = info->r, gc = info->gcor, *idx = info->idx; w = info->w + r++; for (i = -r; i < w; i++) { unsigned char *tvv; int tv, i3, *iavg, *idis; tvv = src + idx[i]; avg[0] += (tv = tvv[0]); dis[0] += tv * tv; avg[1] += (tv = tvv[1]); dis[1] += tv * tv; avg[2] += (tv = tvv[2]); dis[2] += tv * tv; if (gc) { rs0 += Fgamma256[tvv[0]]; rs1 += Fgamma256[tvv[1]]; rs2 += Fgamma256[tvv[2]]; } if (i < 0) continue; tvv = src + idx[i - r]; avg[0] -= (tv = tvv[0]); dis[0] -= tv * tv; avg[1] -= (tv = tvv[1]); dis[1] -= tv * tv; avg[2] -= (tv = tvv[2]); dis[2] -= tv * tv; i3 = (base + i) * 3; iavg = info->avg + i3; idis = info->dis + i3; if (add) { iavg[0] += avg[0]; iavg[1] += avg[1]; iavg[2] += avg[2]; idis[0] += dis[0]; idis[1] += dis[1]; idis[2] += dis[2]; } else { iavg[0] -= avg[0]; iavg[1] -= avg[1]; iavg[2] -= avg[2]; idis[0] -= dis[0]; idis[1] -= dis[1]; idis[2] -= dis[2]; } if (gc) { double *irs = info->rs + i3; rs0 -= Fgamma256[tvv[0]]; rs1 -= Fgamma256[tvv[1]]; rs2 -= Fgamma256[tvv[2]]; if (add) { irs[0] += rs0; irs[1] += rs1; irs[2] += rs2; } else { irs[0] -= rs0; irs[1] -= rs1; irs[2] -= rs2; } } } } static void kuwahara_copy(int dest, int src, kuwahara_info *info) { src *= 3; dest *= 3; memcpy(info->rs + dest, info->rs + src, info->rl * 3 * sizeof(double)); memcpy(info->avg + dest, info->avg + src, info->l * 3 * sizeof(int)); memcpy(info->dis + dest, info->dis + src, info->l * 3 * sizeof(int)); } static double kuwahara_square(int idx, kuwahara_info *info) { double r2i = info->r2i; int *dp = info->dis + idx * 3, *ap = info->avg + idx * 3; // !!! Multiplication is done this way to avoid integer overflow return (dp[0] + dp[1] + dp[2] - ((r2i * ap[0]) * ap[0] + (r2i * ap[1]) * ap[1] + (r2i * ap[2]) * ap[2])); } /* For each X, locate the square with minimum variance & store its offset */ static void kuwahara_min(int base, kuwahara_info *info) { double da[256]; int i, j, j1, w = info->w, r = info->r, min = -1; for (i = 0; i < r; i++) da[i] = kuwahara_square(base + i, info); for (i = 0; i < w; i++) { j1 = (i + r) & 255; da[j1] = kuwahara_square(base + (i + r), info); if (min > i) // Old minimum still valid { if (da[j1] <= da[min & 255]) min = i + r; } else // Forced to find a new one { min = i; for (j = 1; j <= r; j++) if (da[(i + j) & 255] <= da[min & 255]) min = i + j; } info->min[base + i] = min - i; } } /* Replace each pixel in image row by nearest color in 3x3 Kuwahara'ed region */ static void kuwahara_detailed(unsigned char *buf, unsigned char *mask, int y, int gcor) { unsigned char *tmp; int l, w = mem_width * 3; #define REGION_SIZE 9 int steps[REGION_SIZE] = { 3, 3, w, 3, 3, w, 3, 3, w }; #if 0 /* Make scanning order the same as with flat image */ l = (y + 2) % 3; buf += (w + 6) * l; steps [8 - 3 * l] -= (w + 6) * 3; #endif row_protected(0, y, mem_width, mask); tmp = mem_img[CHN_IMAGE] + y * w; for (l = 0; l < mem_width; l++ , tmp += 3) { unsigned char *tb, *found; int rr, gg, bb, op = *mask++; if (op == 255) continue; /* Find the nearest color pixel */ rr = tmp[0]; gg = tmp[1]; bb = tmp[2]; found = tb = buf + l * 3; if (gcor) // Gamma corrected { double d, r2, g2, b2; int i; d = 100.0; // More than 3*1.0^2 r2 = gamma256[rr]; g2 = gamma256[gg]; b2 = gamma256[bb]; for (i = 0; i < REGION_SIZE; tb += steps[i++]) { double d2, dr, dg, db; dr = gamma256[tb[0]] - r2; dg = gamma256[tb[1]] - g2; db = gamma256[tb[2]] - b2; d2 = dr * dr + dg * dg + db * db; if (d2 >= d) continue; found = tb; d = d2; } } else // Raw RGB { int i, d, d2; d = 1000000; // More than 3*255^2 for (i = 0; i < REGION_SIZE; tb += steps[i++]) { d2 = (rr - tb[0]) * (rr - tb[0]) + (gg - tb[1]) * (gg - tb[1]) + (bb - tb[2]) * (bb - tb[2]); if (d2 >= d) continue; found = tb; d = d2; } } /* Mask-merge it into image */ rr = found[0]; gg = found[1]; bb = found[2]; rr = 255 * rr + (*tmp - rr) * op; tmp[0] = (rr + (rr >> 8) + 1) >> 8; gg = 255 * gg + (*tmp - gg) * op; tmp[1] = (gg + (gg >> 8) + 1) >> 8; bb = 255 * bb + (*tmp - bb) * op; tmp[2] = (bb + (bb >> 8) + 1) >> 8; } #undef REGION_SIZE } /* Convert virtual row to row index (mirror boundary) */ static int idx2row(int idx) { int j, k; if (mem_height == 1) return (0); k = mem_height + mem_height - 2; j = abs(idx) % k; if (j >= mem_height) j = k - j; return (j); } /* RGB only - cannot be generalized without speed loss */ void mem_kuwahara(int r, int gcor, int detail) { kuwahara_info info; unsigned char *mem, *src, *buf, *mask, *tmp, *timg; int i, j, k, l, ir, len, rl, r1 = r + 1; int w = mem_width * 3, wbuf = w + 3 * 2, ch = mem_channel; double r2i = 1.0 / (double)(r1 * r1); if (mem_img_bpp != 3) return; // Sanity check len = mem_width + r + r + 1; info.l = l = mem_width + r; info.rl = rl = gcor ? l : 0; mem = multialloc(MA_ALIGN_DOUBLE, &info.rs, rl * r1 * 3 * sizeof(double), &info.avg, l * r1 * 3 * sizeof(int), &info.dis, l * r1 * 3 * sizeof(int), &info.idx, len * sizeof(int), &info.min, l * r1, &mask, mem_width, &timg, wbuf * 3, NULL); if (!mem) { memory_errors(1); return; } info.r2i = r2i; info.w = mem_width; info.r = r; info.gcor = gcor; progress_init(_("Kuwahara-Nagao Filter"), 1); info.idx += r1; if (mem_width > 1) // All indices remain zero otherwise { k = mem_width + mem_width - 2; for (i = -(r + 1); i < mem_width + r; i++) { j = abs(i) % k; if (j >= mem_width) j = k - j; info.idx[i] = j * 3; } } mem_channel = CHN_IMAGE; // For row_protected() src = mem_undo_previous(CHN_IMAGE); /* Initialize the bottom sum */ for (i = -r; i <= 0; i++) kuwahara_row(src + idx2row(i) * w, 0, TRUE, &info); kuwahara_min(0, &info); /* Initialize the rest of sums */ for (i = 1; i <= r; i++) { int j = l * i; kuwahara_copy(j, j - l, &info); kuwahara_row(src + idx2row(i - r1) * w, j, FALSE, &info); kuwahara_row(src + idx2row(i) * w, j, TRUE, &info); kuwahara_min(j, &info); } /* Actually process image */ ir = i = 0; while (TRUE) { int j, k, jp; if ((i * 10) % mem_height >= mem_height - 10) if (progress_update((float)(i + 1) / mem_height)) break; /* Process a pixel row */ if (!detail) row_protected(0, i, mem_width, mask); tmp = buf = timg + wbuf * (i % 3); for (j = 0; j < mem_width; j++) { double dis; int jj, jk; tmp += 3; if (!detail && (mask[j] == 255)) continue; /* Select minimum variance square from covered rows */ jj = j + l; jk = j + info.min[j]; dis = kuwahara_square(jk, &info); // !!! Only the all-or-nothing mode for now - weighted mode not implemented yet for (k = 1; k < r1; k++ , jj += l) { int jv = jj + info.min[jj]; double dv = kuwahara_square(jv, &info); if (dv < dis) jk = jv , dis = dv; } /* Calculate & store new RGB */ jk *= 3; if (gcor) { double *wr = info.rs + jk; tmp[0] = UNGAMMA256(wr[0] * r2i); tmp[1] = UNGAMMA256(wr[1] * r2i); tmp[2] = UNGAMMA256(wr[2] * r2i); } else { int *ar = info.avg + jk; tmp[0] = rint(*ar++ * r2i); tmp[1] = rint(*ar++ * r2i); tmp[2] = rint(*ar * r2i); } } if (detail) { /* Copy-extend the row on both ends */ memcpy(buf, buf + 3, 3); memcpy(tmp + 3, tmp, 3); /* Copy-extend the top row */ if (!i) memcpy(timg + wbuf * 2, buf, wbuf); /* Build and mask-merge the previous row */ else kuwahara_detailed(timg, mask, i - 1, gcor); } else { /* Mask-merge current row */ tmp = mem_img[CHN_IMAGE] + i * w; do_alpha_blend(tmp, buf + 3, tmp, mask, w, 3); } if (++i < mem_height) { /* Update sums for a new row */ jp = ir * l; kuwahara_copy(jp, ((ir + r) % r1) * l, &info); kuwahara_row(src + idx2row(i - 1) * w, jp, FALSE, &info); kuwahara_row(src + idx2row(i + r) * w, jp, TRUE, &info); kuwahara_min(jp, &info); ir = (ir + 1) % r1; continue; } if (detail) { /* Copy-extend the bottom row */ memcpy(timg + wbuf * (i % 3), buf, wbuf); /* Build and mask-merge it */ kuwahara_detailed(timg, mask, i - 1, gcor); } break; } mem_channel = ch; progress_end(); free(mem); } /// CLIPBOARD MASK int mem_clip_mask_init(unsigned char val) // Initialise the clipboard mask { int j = mem_clip_w*mem_clip_h; if (mem_clipboard) mem_clip_mask_clear(); // Remove old mask mem_clip_mask = malloc(j); if (!mem_clip_mask) return 1; // Not able to allocate memory memset(mem_clip_mask, val, j); // Start with fully opaque/clear mask return 0; } void mem_mask_colors(unsigned char *mask, unsigned char *img, unsigned char v, int width, int height, int bpp, int col0, int col1) { int i, j = width * height, k; if (bpp == 1) { for (i = 0; i < j; i++) { if ((img[i] == col0) || (img[i] == col1)) mask[i] = v; } } else { for (i = 0; i < j; i++ , img += 3) { k = MEM_2_INT(img, 0); if ((k == col0) || (k == col1)) mask[i] = v; } } } void mem_clip_mask_set(unsigned char val) // (un)Mask colours A and B on the clipboard { int aa, bb; if (mem_clip_bpp == 1) /* Indexed/utility */ { if (mem_channel == CHN_IMAGE) { aa = mem_col_A; bb = mem_col_B; } else { aa = channel_col_A[mem_channel]; bb = channel_col_B[mem_channel]; } } else /* RGB */ { aa = PNG_2_INT(mem_col_A24); bb = PNG_2_INT(mem_col_B24); } mem_mask_colors(mem_clip_mask, mem_clipboard, val, mem_clip_w, mem_clip_h, mem_clip_bpp, aa, bb); } void mem_clip_mask_clear() // Clear/remove the clipboard mask { free(mem_clip_mask); mem_clip_mask = NULL; } /* * Extract alpha information from RGB image - alpha if pixel is in colour * scale of A->B. Return 0 if OK, 1 otherwise */ int mem_scale_alpha(unsigned char *img, unsigned char *alpha, int width, int height, int mode) { int i, j = width * height, AA[3], BB[3], DD[6], chan, c1, c2, dc1, dc2; double p0, p1, p2, dchan, KK[6]; if (!img || !alpha) return (1); AA[0] = mem_col_A24.red; AA[1] = mem_col_A24.green; AA[2] = mem_col_A24.blue; BB[0] = mem_col_B24.red; BB[1] = mem_col_B24.green; BB[2] = mem_col_B24.blue; for (i = 0; i < 3; i++) { if (AA[i] < BB[i]) { DD[i] = AA[i]; DD[i + 3] = BB[i]; } else { DD[i] = BB[i]; DD[i + 3] = AA[i]; } } chan = 0; // Find the channel with the widest range - gives most accurate result later if (DD[4] - DD[1] > DD[3] - DD[0]) chan = 1; if (DD[5] - DD[2] > DD[chan + 3] - DD[chan]) chan = 2; if (AA[chan] == BB[chan]) /* if A == B then work GIMP-like way */ { for (i = 0; i < 3; i++) { KK[i] = AA[i] ? 255.0 / AA[i] : 1.0; KK[i + 3] = AA[i] < 255 ? -255.0 / (255 - AA[i]) : 0.0; } for (i = 0; i < j; i++ , alpha++ , img += 3) { /* Already semi-opaque so don't touch */ if (*alpha != 255) continue; /* Evaluate the three possible alphas */ p0 = (AA[0] - img[0]) * (img[0] <= AA[0] ? KK[0] : KK[3]); p1 = (AA[1] - img[1]) * (img[1] <= AA[1] ? KK[1] : KK[4]); p2 = (AA[2] - img[2]) * (img[2] <= AA[2] ? KK[2] : KK[5]); if (p0 < p1) p0 = p1; if (p0 < p2) p0 = p2; /* Set alpha */ *alpha = rint(p0); /* Demultiply image if this is alpha and nonzero */ if (!mode) continue; dchan = p0 ? 255.0 / p0 : 0.0; img[0] = rint((img[0] - AA[0]) * dchan) + AA[0]; img[1] = rint((img[1] - AA[1]) * dchan) + AA[1]; img[2] = rint((img[2] - AA[2]) * dchan) + AA[2]; } } else /* Limit processing to A->B scale */ { dchan = 1.0 / (BB[chan] - AA[chan]); c1 = 1 ^ (chan & 1); c2 = 2 ^ (chan & 2); dc1 = BB[c1] - AA[c1]; dc2 = BB[c2] - AA[c2]; for (i = 0; i < j; i++ , alpha++ , img += 3) { /* Already semi-opaque so don't touch */ if (*alpha != 255) continue; /* Ensure pixel lies between A and B for each channel */ if ((img[0] < DD[0]) || (img[0] > DD[3])) continue; if ((img[1] < DD[1]) || (img[1] > DD[4])) continue; if ((img[2] < DD[2]) || (img[2] > DD[5])) continue; p0 = (img[chan] - AA[chan]) * dchan; /* Check delta for all channels is roughly the same ... * ... if it isn't, ignore this pixel as its not in A->B scale */ if (abs(AA[c1] + (int)rint(p0 * dc1) - img[c1]) > 2) continue; if (abs(AA[c2] + (int)rint(p0 * dc2) - img[c2]) > 2) continue; /* Pixel is a shade of A/B so set alpha */ *alpha = (int)rint(p0 * 255) ^ 255; /* Demultiply image if this is alpha */ if (!mode) continue; img[0] = AA[0]; img[1] = AA[1]; img[2] = AA[2]; } } return 0; } void do_clone(int ox, int oy, int nx, int ny, int opacity, int mode) { unsigned char mask[256], img[256 * 2 * 3], alf[256 * 2]; unsigned char *src, *dest, *srca = NULL, *dsta = NULL; int ax, ay, bx, by, w, h; int xv = nx - ox, yv = ny - oy; // Vector int i, j, delta, delta1, bpp; int y0, y1, dy, opw, op2, cpf; if (!opacity) return; /* Clip source and dest areas to image bounds */ ax = ox - tool_size / 2; bx = ax + tool_size; if (ax < 0) ax = 0; if (ax + xv < 0) ax = -xv; if (bx > mem_width) bx = mem_width; if (bx + xv > mem_width) bx = mem_width - xv; w = bx - ax; ay = oy - tool_size / 2; by = ay + tool_size; if (ay < 0) ay = 0; if (ay + yv < 0) ay = -yv; if (by > mem_height) by = mem_height; if (by + yv > mem_height) by = mem_height - yv; h = by - ay; if ((w < 1) || (h < 1)) return; if (IS_INDEXED) opacity = -1; // No mixing for indexed image /* !!! I modified this tool action somewhat - White Jaguar */ if (mode) src = mem_undo_previous(mem_channel); else src = mem_img[mem_channel]; dest = mem_img[mem_channel]; if ((mem_channel == CHN_IMAGE) && RGBA_mode && mem_img[CHN_ALPHA]) { if (mode) srca = mem_undo_previous(CHN_ALPHA); else srca = mem_img[CHN_ALPHA]; dsta = mem_img[CHN_ALPHA]; } bpp = MEM_BPP; delta1 = yv * mem_width + xv; delta = delta1 * bpp; /* Copy source if destination overwrites it */ cpf = !yv && (xv > 0) && (w > xv); /* Set up Y pass to prevent overwriting source */ if ((yv > 0) && (h > yv)) y0 = ay + h - 1 , y1 = ay - 1 , dy = -1; // Bottom to top else y0 = ay , y1 = ay + h , dy = 1; // Top to bottom for (j = y0; j != y1; j += dy) // Blend old area with new area { unsigned char *ts, *td, *tsa = NULL, *tda = NULL; int offs = j * mem_width + ax; row_protected(ax + xv, j + yv, w, mask); ts = src + offs * bpp; td = dest + offs * bpp + delta; if (cpf) { memcpy(img, ts, w * bpp + delta); ts = img; } if (dsta) { tsa = srca + offs; tda = dsta + offs + delta1; if (cpf) { memcpy(alf, tsa, w + delta1); tsa = alf; } } for (i = 0; i < w; i++ , ts += bpp , td += bpp) { int k = mask[i], k0, k1, k2; if (opacity < 0) { if (k) continue; *td = *ts; if (tda) tda[i] = tsa[i]; continue; } opw = (255 - k) * opacity; opw = (opw + (opw >> 8) + 1) >> 8; if (!opw) continue; if (tda) { int k = tsa[i + delta1]; k = k * 255 + (tsa[i] - k) * opw + 127; tda[i] = (k + (k >> 8) + 1) >> 8; if (k && !channel_dis[CHN_ALPHA]) opw = (255 * opw * tsa[i]) / k; } op2 = 255 - opw; k0 = ts[0] * opw + ts[delta] * op2 + 127; td[0] = (k0 + (k0 >> 8) + 1) >> 8; if (bpp == 1) continue; k1 = ts[1] * opw + ts[delta + 1] * op2 + 127; td[1] = (k1 + (k1 >> 8) + 1) >> 8; k2 = ts[2] * opw + ts[delta + 2] * op2 + 127; td[2] = (k2 + (k2 >> 8) + 1) >> 8; } } } /// GRADIENTS /* Evaluate channel gradient at coordinate, return opacity * Coordinate 0 is center of 1st pixel, 1 center of last * Scale of return values is 0x0000..0xFF00 (NOT 0xFFFF) */ int grad_value(int *dest, int slot, double x) { int i, k, len, op; unsigned char *gdata, *gmap; grad_map *gradmap; double xx, hsv[6]; /* Gradient slot (first RGB, then 1-bpp channels) */ gradmap = graddata + slot; /* Get opacity */ gdata = gradmap->op; gmap = gradmap->opmap; len = gradmap->oplen; xx = (gradmap->orev ? 1.0 - x : x) * (len - 1); i = xx; if (i > len - 2) i = len - 2; k = gmap[i] == GRAD_TYPE_CONST ? 0 : (int)((xx - i) * 0x10000 + 0.5); op = (gdata[i] << 8) + ((k * (gdata[i + 1] - gdata[i]) + 127) >> 8); if (!op) return (0); /* Stop if zero opacity */ /* Get channel value */ gdata = gradmap->vs; gmap = gradmap->vsmap; len = gradmap->vslen; xx = (gradmap->grev ? 1.0 - x : x) * (len - 1); i = xx; if (i > len - 2) i = len - 2; k = gmap[i] == GRAD_TYPE_CONST ? 0 : (int)((xx - i) * 0x10000 + 0.5); if (!slot) /* RGB */ { unsigned char *gslot = gdata + i * 3; int j3 = 0; switch (gmap[i]) { case GRAD_TYPE_BK_HSV: /* Backward HSV interpolation */ j3 = 3; case GRAD_TYPE_HSV: /* HSV interpolation */ /* Convert */ rgb2hsv(gslot + 0, hsv + 0); rgb2hsv(gslot + 3, hsv + 3); /* Grey has no hue */ if (hsv[1] == 0.0) hsv[0] = hsv[3]; if (hsv[4] == 0.0) hsv[3] = hsv[0]; /* Prevent wraparound */ if (hsv[j3] > hsv[j3 ^ 3]) hsv[j3] -= 6.0; /* Interpolate */ hsv[0] += (xx - i) * (hsv[3] - hsv[0]); hsv[1] += (xx - i) * (hsv[4] - hsv[1]); hsv[2] += (xx - i) * (hsv[5] - hsv[2]); /* Convert back */ hsv[2] *= 512; hsv[1] = hsv[2] * (1.0 - hsv[1]); if (hsv[0] < 0.0) hsv[0] += 6.0; j3 = hsv[0]; hsv[0] = (hsv[0] - j3) * (hsv[2] - hsv[1]); if (j3 & 1) { hsv[2] -= hsv[0]; hsv[0] += hsv[2]; } else hsv[0] += hsv[1]; j3 >>= 1; dest[j3] = ((int)hsv[2] + 1) >> 1; dest[MOD3(j3 + 1)] = ((int)hsv[0] + 1) >> 1; dest[MOD3(j3 + 2)] = ((int)hsv[1] + 1) >> 1; break; case GRAD_TYPE_SRGB: /* sRGB interpolation */ dest[0] = ungamma65281(gamma256[gslot[0]] + (xx - i) * (gamma256[gslot[3]] - gamma256[gslot[0]])); dest[1] = ungamma65281(gamma256[gslot[1]] + (xx - i) * (gamma256[gslot[4]] - gamma256[gslot[1]])); dest[2] = ungamma65281(gamma256[gslot[2]] + (xx - i) * (gamma256[gslot[5]] - gamma256[gslot[2]])); break; default: /* RGB interpolation */ dest[0] = (gslot[0] << 8) + ((k * (gslot[3] - gslot[0]) + 127) >> 8); dest[1] = (gslot[1] << 8) + ((k * (gslot[4] - gslot[1]) + 127) >> 8); dest[2] = (gslot[2] << 8) + ((k * (gslot[5] - gslot[2]) + 127) >> 8); break; } } else if (slot == CHN_IMAGE + 1) /* Indexed */ { dest[0] = gdata[i]; dest[1] = gdata[i + ((k + 0xFFFF) >> 16)]; dest[CHN_IMAGE + 3] = (k + 127) >> 8; } else /* Utility */ { dest[slot + 2] = (gdata[i] << 8) + ((k * (gdata[i + 1] - gdata[i]) + 127) >> 8); } return (op); } /* Evaluate (coupled) alpha gradient at coordinate */ static void grad_alpha(int *dest, double x) { int i, k, len; unsigned char *gdata, *gmap; grad_map *gradmap; double xx; /* Get coupled alpha */ gradmap = graddata + CHN_ALPHA + 1; gdata = gradmap->vs; gmap = gradmap->vsmap; len = gradmap->vslen; xx = (gradmap->grev ? 1.0 - x : x) * (len - 1); i = xx; if (i > len - 2) i = len - 2; k = gmap[i] == GRAD_TYPE_CONST ? 0 : (int)((xx - i) * 0x10000 + 0.5); dest[CHN_ALPHA + 3] = (gdata[i] << 8) + ((k * (gdata[i + 1] - gdata[i]) + 127) >> 8); } /* Evaluate gradient at a sequence of points */ /* !!! For now, works only in (slower) exact mode */ void grad_pixels(int start, int step, int cnt, int x, int y, unsigned char *mask, unsigned char *op0, unsigned char *img0, unsigned char *alpha0) { grad_info *grad = gradient + mem_channel; unsigned char *dest; int i, mmask, dither, op, slot, wrk[NUM_CHANNELS + 3]; double dist, len1, l2; if (!RGBA_mode) alpha0 = NULL; mmask = IS_INDEXED ? 1 : 255; /* On/off opacity */ slot = mem_channel + ((0x81 + mem_channel + mem_channel - mem_img_bpp) >> 7); cnt = start + step * cnt; x += start; for (i = start; i < cnt; op0[i] = op , x += step , i += step) { op = 0; if (mask[i] >= mmask) continue; /* Disabled because of unusable settings? */ if (grad->wmode == GRAD_MODE_NONE) continue; /* Distance for gradient mode */ if (grad->status == GRAD_NONE) { /* Stroke gradient */ if (grad->wmode != GRAD_MODE_BURST) dist = grad_path + (x - grad_x0) * grad->xv + (y - grad_y0) * grad->yv; /* Shapeburst gradient */ else { int n = sb_buf[(y - sb_rect[1]) * sb_rect[2] + (x - sb_rect[0])] - 1; if (n < 0) continue; dist = n; } } else { int dx = x - grad->xy[0], dy = y - grad->xy[1]; switch (grad->wmode) { default: case GRAD_MODE_LINEAR: /* Linear/bilinear gradient */ case GRAD_MODE_BILINEAR: dist = dx * grad->xv + dy * grad->yv; if (grad->wmode == GRAD_MODE_LINEAR) break; dist = fabs(dist); /* Bilinear */ break; case GRAD_MODE_RADIAL: /* Radial gradient */ dist = sqrt(dx * dx + dy * dy); break; case GRAD_MODE_SQUARE: /* Square gradient */ /* !!! Here is code duplication with linear/ * bilinear path - but merged paths actually * LOSE in both time and space, at least * with GCC - WJ */ dist = fabs(dx * grad->xv + dy * grad->yv) + fabs(dx * grad->yv - dy * grad->xv); break; case GRAD_MODE_ANGULAR: /* Angular/conical gradient */ case GRAD_MODE_CONICAL: dist = atan360(dx, dy) - grad->wa; if (dist < 0.0) dist += 360.0; if (grad->wmode == GRAD_MODE_ANGULAR) break; if (dist >= 180.0) dist = 360.0 - dist; break; } } dist -= grad->ofs; /* Apply repeat mode */ len1 = grad->wrep; switch (grad->wrmode) { case GRAD_BOUND_MIRROR: /* Mirror repeat */ l2 = len1 + len1; dist -= l2 * (int)(dist * grad->wil2); if (dist < 0.0) dist += l2; if (dist > len1) dist = l2 - dist; break; case GRAD_BOUND_REPEAT: /* Repeat */ l2 = len1 + 1.0; /* Repeat period is 1 pixel longer */ dist -= l2 * (int)((dist + 0.5) * grad->wil2); if (dist < -0.5) dist += l2; break; case GRAD_BOUND_REP_A: /* Angular repeat */ dist -= len1 * (int)(dist * grad->wil2); if (dist < 0.0) dist += len1; break; case GRAD_BOUND_STOP: /* Nothing is outside bounds */ if ((dist < -0.5) || (dist >= len1 + 0.5)) continue; break; case GRAD_BOUND_STOP_A: /* Nothing is outside angle */ if ((dist < 0.0) || (dist > len1)) continue; break; case GRAD_BOUND_LEVEL: /* Constant extension */ default: break; } /* Rescale to 0..1, enforce boundaries */ dist = dist <= 0.0 ? 0.0 : dist >= len1 ? 1.0 : dist * grad->wil1; /* Value from Bayer dither matrix */ dither = BAYER(x, y); /* Get gradient */ wrk[CHN_IMAGE + 3] = 0; op = (grad_value(wrk, slot, dist) + dither) >> 8; if (!op) continue; if (mem_channel == CHN_IMAGE) { if (alpha0) { grad_alpha(wrk, dist); alpha0[i] = (wrk[CHN_ALPHA + 3] + dither) >> 8; } if (mem_img_bpp == 3) { dest = img0 + i * 3; dest[0] = (wrk[0] + dither) >> 8; dest[1] = (wrk[1] + dither) >> 8; dest[2] = (wrk[2] + dither) >> 8; } else { img0[i] = (unsigned char)wrk[(wrk[CHN_IMAGE + 3] + dither) >> 8]; op = 255; } } else img0[i] = (wrk[mem_channel + 3] + dither) >> 8; } } /* Reevaluate gradient placement functions */ void grad_update(grad_info *grad) { double len, len1, l2; int dx = grad->xy[2] - grad->xy[0], dy = grad->xy[3] - grad->xy[1]; /* Distance for gradient mode */ grad->wmode = grad->gmode; len = grad->len; while (1) { /* Stroke gradient */ if (grad->status == GRAD_NONE) { if (!len) len = grad->rep + grad->ofs; if (len <= 0.0) grad->wmode = GRAD_MODE_NONE; break; } /* Placement length */ l2 = sqrt(dx * dx + dy * dy); if (l2 == 0.0) { grad->wmode = GRAD_MODE_RADIAL; break; } grad->xv = dx / l2; grad->yv = dy / l2; grad->wa = atan360(dx, dy); if (!len) len = grad->wmode == GRAD_MODE_ANGULAR ? 360.0 : grad->wmode == GRAD_MODE_CONICAL ? 180.0 : l2; break; } /* Base length (one repeat) */ len1 = grad->rep > 0 ? grad->rep : len - grad->ofs; if (len1 < 1.0) len1 = 1.0; grad->wrep = len1; grad->wil1 = 1.0 / len1; /* Inverse period */ l2 = 1.0; grad->wrmode = grad->rmode; if (grad->rmode == GRAD_BOUND_MIRROR) /* Mirror repeat */ l2 = len1 + len1; else if (grad->rmode == GRAD_BOUND_REPEAT) /* Repeat */ l2 = len1 + 1.0; /* Angular distance is in degrees, not pixels */ if ((grad->wmode == GRAD_MODE_ANGULAR) || (grad->wmode == GRAD_MODE_CONICAL)) { if (grad->rmode == GRAD_BOUND_REPEAT) grad->wrmode = GRAD_BOUND_REP_A , l2 = len1; else if (grad->rmode == GRAD_BOUND_STOP) grad->wrmode = GRAD_BOUND_STOP_A; } grad->wil2 = 1.0 / l2; } static unsigned char grad_def[4 + 8 + NUM_CHANNELS * 4]; /* Setup gradient mapping */ void gmap_setup(grad_map *gmap, grad_store gstore, int slot) { unsigned char *data, *map; data = grad_def + (slot ? 8 + slot * 4 : 4); map = grad_def + 10 + slot * 4; gmap->vslen = 2; if (gmap->gtype == GRAD_TYPE_CUSTOM) { gmap->vs = gstore + GRAD_CUSTOM_DATA(slot); gmap->vsmap = gstore + GRAD_CUSTOM_DMAP(slot); if (gmap->cvslen > 1) gmap->vslen = gmap->cvslen; else { memcpy(gmap->vs, data, slot ? 2 : 6); gmap->vsmap[0] = map[0]; } } else { gmap->vs = data; gmap->vsmap = map; grad_def[10 + slot * 4] = (unsigned char)gmap->gtype; } gmap->oplen = 2; if (gmap->otype == GRAD_TYPE_CUSTOM) { gmap->op = gstore + GRAD_CUSTOM_OPAC(slot); gmap->opmap = gstore + GRAD_CUSTOM_OMAP(slot); if (gmap->coplen > 1) gmap->oplen = gmap->coplen; else { gmap->op[0] = grad_def[0]; gmap->op[1] = grad_def[1]; gmap->opmap[0] = grad_def[2]; } } else { gmap->op = grad_def; gmap->opmap = grad_def + 2; grad_def[2] = gmap->otype; } } /* Store default gradient */ void grad_def_update(int slot) { grad_map *gradmap; /* Gradient slot (first RGB, then 1-bpp channels) */ if (slot < 0) slot = mem_channel + ((0x81 + mem_channel + mem_channel - mem_img_bpp) >> 7); gradmap = graddata + slot; grad_def[0] = tool_opacity; /* !!! As there's only 1 tool_opacity, use 0 for 2nd point */ grad_def[1] = 0; grad_def[2] = gradmap->otype; grad_def[10 + slot * 4] = gradmap->gtype; if (slot) { grad_def[8 + slot * 4] = channel_col_A[slot - 1]; grad_def[9 + slot * 4] = channel_col_B[slot - 1]; grad_def[12] = mem_col_A; grad_def[13] = mem_col_B; } else { grad_def[4] = mem_col_A24.red; grad_def[5] = mem_col_A24.green; grad_def[6] = mem_col_A24.blue; grad_def[7] = mem_col_B24.red; grad_def[8] = mem_col_B24.green; grad_def[9] = mem_col_B24.blue; } gradmap = graddata + CHN_ALPHA + 1; grad_def[12 + CHN_ALPHA * 4] = channel_col_A[CHN_ALPHA]; grad_def[13 + CHN_ALPHA * 4] = channel_col_B[CHN_ALPHA]; grad_def[14 + CHN_ALPHA * 4] = gradmap->gtype; } /* Convert to RGB & blend indexed/indexed+alpha for preview */ void blend_indexed(int start, int step, int cnt, unsigned char *rgb, unsigned char *img0, unsigned char *img, unsigned char *alpha0, unsigned char *alpha, int opacity) { png_color *col, *col0; int i, j, k, i3; cnt = start + step * cnt; for (i = start; i < cnt; i += step) { j = opacity; if (alpha) { if (alpha[i]) { if (alpha0[i]) /* Opaque both */ alpha[i] = 255; else /* Opaque new */ { alpha[i] = opacity; j = 255; } } else if (alpha0[i]) /* Opaque old */ { alpha[i] = opacity ^ 255; j = 0; } else /* Transparent both */ { alpha[i] = 0; continue; } } col = mem_pal + img[i]; col0 = mem_pal + img0[i]; i3 = i * 3; k = col0->red * 255 + j * (col->red - col0->red); rgb[i3 + 0] = (k + (k >> 8) + 1) >> 8; k = col0->green * 255 + j * (col->green - col0->green); rgb[i3 + 1] = (k + (k >> 8) + 1) >> 8; k = col0->blue * 255 + j * (col->blue - col0->blue); rgb[i3 + 2] = (k + (k >> 8) + 1) >> 8; } } static void grad_point(double *xyz, int cspace, int idx) { int wrk[NUM_CHANNELS + 3]; grad_value(wrk, 0, idx * (1.0 / 4096.0)); switch (cspace) { default: case CSPACE_RGB: xyz[0] = wrk[0] * (1.0 / 256.0); xyz[1] = wrk[1] * (1.0 / 256.0); xyz[2] = wrk[2] * (1.0 / 256.0); break; case CSPACE_LXN: case CSPACE_SRGB: xyz[0] = gamma65281(wrk[0]); xyz[1] = gamma65281(wrk[1]); xyz[2] = gamma65281(wrk[2]); if (cspace == CSPACE_LXN) rgb2LXN(xyz, xyz[0], xyz[1], xyz[2]); break; } } int mem_pick_gradient(unsigned char *buf, int cspace, int mode) { grad_map oldgr; double pal[256 * 3], near[256 * 3], dist[256], len[256], lastc[3]; unsigned char *tb = buf; int i, j, k, l; /* Set up new RGB gradient */ oldgr = graddata[0]; memset(graddata, 0, sizeof(grad_map)); graddata[0].gtype = mode; graddata[0].otype = GRAD_TYPE_CONST; graddata[0].grev = graddata[0].orev = FALSE; grad_def_update(0); gmap_setup(graddata, gradbytes, 0); /* Map palette to colorspace, and init point/distance/position */ grad_point(lastc, cspace, 0); for (i = 0; i < mem_cols; i++) { double *tmp = pal + i * 3; switch (cspace) { default: case CSPACE_RGB: tmp[0] = mem_pal[i].red; tmp[1] = mem_pal[i].green; tmp[2] = mem_pal[i].blue; break; case CSPACE_SRGB: tmp[0] = gamma256[mem_pal[i].red]; tmp[1] = gamma256[mem_pal[i].green]; tmp[2] = gamma256[mem_pal[i].blue]; break; case CSPACE_LXN: get_lxn(tmp, PNG_2_INT(mem_pal[i])); break; } dist[i] = (tmp[0] - lastc[0]) * (tmp[0] - lastc[0]) + (tmp[1] - lastc[1]) * (tmp[1] - lastc[1]) + (tmp[2] - lastc[2]) * (tmp[2] - lastc[2]); memcpy(near + i * 3, lastc, sizeof(lastc)); } memset(len, 0, sizeof(len)); /* Find nearest point on gradient curve for each palette color */ for (i = 1; i < 4096; i++) { double thisc[3], dx, dy, dz, l2; grad_point(thisc, cspace, i); dx = thisc[0] - lastc[0]; dy = thisc[1] - lastc[1]; dz = thisc[2] - lastc[2]; l2 = dx * dx + dy * dy + dz * dz; if (l2 == 0.0) continue; for (j = 0; j < mem_cols; j++) { double a, d, newc[3], *tmp = pal + j * 3; a = ((tmp[0] - lastc[0]) * dx + (tmp[1] - lastc[1]) * dy + (tmp[2] - lastc[2]) * dz) / l2; a = a < 0.0 ? 0.0 : a > 1.0 ? 1.0 : a; newc[0] = lastc[0] + a * dx; newc[1] = lastc[1] + a * dy; newc[2] = lastc[2] + a * dz; d = (tmp[0] - newc[0]) * (tmp[0] - newc[0]) + (tmp[1] - newc[1]) * (tmp[1] - newc[1]) + (tmp[2] - newc[2]) * (tmp[2] - newc[2]); if (d >= dist[j]) continue; dist[j] = d; // Distance from the curve len[j] = a + i; // Position along the curve memcpy(near + j * 3, newc, sizeof(newc)); // Point } memcpy(lastc, thisc, sizeof(thisc)); } /* Include gradient's second end */ grad_point(lastc, cspace, 4096); for (i = 0; i < mem_cols; i++) { double d, *tmp = pal + i * 3; d = (tmp[0] - lastc[0]) * (tmp[0] - lastc[0]) + (tmp[1] - lastc[1]) * (tmp[1] - lastc[1]) + (tmp[2] - lastc[2]) * (tmp[2] - lastc[2]); if (d >= dist[i]) continue; dist[i] = d; len[i] = 4096.0; memcpy(near + i * 3, lastc, sizeof(lastc)); } /* Restore old RGB gradient */ graddata[0] = oldgr; grad_def_update(-1); gmap_setup(graddata, gradbytes, 0); /* Pick colors with *uncontested* nearest points */ scan_duplicates(); // Need to avoid duplicated colors for (i = 0; i < mem_cols; i++) { double d, d0, *tmp, *xyz; if (pal_dupes[i] != i) continue; *tb++ = i; // Add to result set by default d0 = dist[i]; xyz = near + i * 3; for (j = 0 , tmp = pal; j < mem_cols; j++ , tmp += 3) { if (pal_dupes[j] == i) continue; tmp = pal + j * 3; d = (tmp[0] - xyz[0]) * (tmp[0] - xyz[0]) + (tmp[1] - xyz[1]) * (tmp[1] - xyz[1]) + (tmp[2] - xyz[2]) * (tmp[2] - xyz[2]); if (d <= d0) { tb--; // Fail - remove this color break; } } } /* Bubble-sort the result set by position */ l = tb - buf; for (i = l - 1; i > 0; i--) for (j = 0; j < i; j++) { k = buf[j + 1]; if (len[buf[j]] > len[k]) { buf[j + 1] = buf[j]; buf[j] = k; } } /* Return number of colors in result set */ return (l); } /// SKEW ENGINE #define FILT_MAX 6 /* Must be no less than largest filter width */ static void *make_skew_filter(double **filt, int **dcc, int *fw, int len, double shift, double skew, int type) { void *tmp; double x, y, x0, dy, fw2, sum, A = 0.0, *fdata; int i, j, k, y0, fwidth = 0, *ofdata; // Use NN "filter" for integer shifts if ((fabs(skew - rint(skew)) < 1e-10) && (fabs(shift - rint(shift)) < 1e-10)) type = 0; switch (type) { case 0: fwidth = 1; /* Nearest neighbor */ break; case 1: fwidth = 2; /* Bilinear */ break; case 2: case 3: case 4: case 5: /* Bicubic, all flavors */ fwidth = 4; A = Aarray[type - 2]; break; case 6: fwidth = 6; /* Blackman-Harris windowed sinc */ break; } *filt = NULL; *dcc = NULL; *fw = fwidth; tmp = multialloc(MA_ALIGN_DOUBLE, filt, len * fwidth * sizeof(double), dcc, len * sizeof(int), NULL); if (!tmp) return (NULL); fdata = *filt; ofdata = *dcc; /* Generate filter */ fw2 = fwidth >> 1; x0 = 0.5 * (len - 1); for (i = 0; i < len; i++) { /* As mapping is dest-to-src, shifts are negative */ dy = (x0 - i) * skew - shift; /* Specialcase NN filter, for simplicity */ if (!type) { WJ_FLOOR(*ofdata++, dy + 0.5); *fdata++ = 1.0; continue; } /* Build regular filters*/ dy -= (*ofdata++ = y0 = ceil(dy - fw2)); // Mirrored offset sum = 0.0; for (j = 0; j < fwidth; j++ , dy -= 1.0) { x = fabs(dy); y = 0; switch (type) { case 1: /* Bilinear */ y = 1.0 - x; break; case 2: case 3: case 4: case 5: /* Bicubic */ if (x < 1.0) y = ((A + 2.0) * x - (A + 3)) * x * x + 1.0; else y = A * (((x - 5.0) * x + 8.0) * x - 4.0); break; case 6: /* Blackman-Harris */ y = BH1(x); break; } sum += (fdata[j] = y); } /* Normalization pass */ sum = 1.0 / sum; for (k = 0; k < fwidth; k++) *fdata++ *= sum; } return (tmp); } static void skew_fill_rgba(double *buf, double *filler, unsigned char *src, unsigned char *srca, int y0, int ow, int xl, int xr, int x0l, int x0r, int xfsz, double *xfilt, int *dxx, int *dyy, int gcor) { double *dest, *tmp; int j, k, l; /* Initialize dest buffer */ k = x0l < xl ? x0l : xl; l = (x0r > xr ? x0r : xr) - k - 1; if (l < 0) return; // Nothing to do tmp = buf + k * 7; memcpy(tmp, filler, sizeof(double) * 7); for (tmp += 7 , l *= 7; l > 0; tmp++ , l--) *tmp = *(tmp - 7); /* Collect pixels */ dest = buf + xl * 7; for (j = xl; j < xr; j++ , dest += 7) { unsigned char *img, *alpha; double *filt, acc = 0.0; int x, y, x1, ofs; /* Get location */ y = y0 + dyy[j]; x = j + dxx[y]; x1 = x + xfsz; filt = xfilt - x + y * xfsz; /* Accumulate empty space */ while (x1 > ow) acc += filt[--x1]; while (x < 0) acc += filt[x++]; /* Setup source & dest */ ofs = y * ow + x; img = src + ofs * 3; alpha = srca + ofs; // !!! Maybe use temp vars for accumulators - but will it make a difference? dest[0] *= acc; dest[1] *= acc; dest[2] *= acc; /* Accumulate image data */ filt += x; for (; x < x1; x++ , img += 3) { double rr, gg, bb, aa, fv; fv = *filt++; if (gcor) { rr = gamma256[img[0]] * fv; gg = gamma256[img[1]] * fv; bb = gamma256[img[2]] * fv; } else { rr = img[0] * fv; gg = img[1] * fv; bb = img[2] * fv; } dest[6] += (aa = *alpha++) * fv; dest[0] += rr; dest[1] += gg; dest[2] += bb; dest[3] += rr * aa; dest[4] += gg * aa; dest[5] += bb * aa; } } } static void skew_fill_rgb(double *buf, double *filler, unsigned char *src, unsigned char *srca, int y0, int ow, int xl, int xr, int x0l, int x0r, int xfsz, double *xfilt, int *dxx, int *dyy, int gcor) { double *dest, *tmp; int j, k, l; /* Initialize dest buffer */ k = x0l < xl ? x0l : xl; l = (x0r > xr ? x0r : xr) - k - 1; if (l < 0) return; // Nothing to do tmp = buf + k * 3; memcpy(tmp, filler, sizeof(double) * 3); for (tmp += 3 , l *= 3; l > 0; tmp++ , l--) *tmp = *(tmp - 3); /* Collect pixels */ dest = buf + xl * 3; for (j = xl; j < xr; j++ , dest += 3) { unsigned char *img; double *filt, acc = 0.0; double rv, gv, bv; int x, y, x1; /* Get location */ y = y0 + dyy[j]; x = j + dxx[y]; x1 = x + xfsz; filt = xfilt - x + y * xfsz; /* Accumulate empty space */ while (x1 > ow) acc += filt[--x1]; while (x < 0) acc += filt[x++]; /* Setup source & dest */ img = src + (y * ow + x) * 3; rv = dest[0] * acc; gv = dest[1] * acc; bv = dest[2] * acc; /* Accumulate image data */ filt += x; for (; x < x1; x++ , img += 3) { double fv = *filt++; if (gcor) { rv += gamma256[img[0]] * fv; gv += gamma256[img[1]] * fv; bv += gamma256[img[2]] * fv; } else { rv += img[0] * fv; gv += img[1] * fv; bv += img[2] * fv; } } dest[0] = rv; dest[1] = gv; dest[2] = bv; } } static void skew_fill_util(double *buf, double *filler, unsigned char *src, unsigned char *srca, int y0, int ow, int xl, int xr, int x0l, int x0r, int xfsz, double *xfilt, int *dxx, int *dyy, int gcor) { double *dest; int j, k, l; /* Initialize dest buffer */ k = x0l < xl ? x0l : xl; l = (x0r > xr ? x0r : xr) - k; if (l <= 0) return; // Nothing to do memset(buf + k, 0, l * sizeof(double)); /* Collect pixels */ dest = buf + xl * 3; for (j = xl; j < xr; j++) { unsigned char *img; double *filt, sum; int x, y, x1; /* Get location */ y = y0 + dyy[j]; x = j + dxx[y]; x1 = x + xfsz; filt = xfilt - x + y * xfsz; /* Skip empty space */ while (x1 > ow) x1--; while (x < 0) x++; /* Setup source */ img = src + y * ow + x; /* Accumulate image data */ filt += x; sum = 0.0; for (; x < x1; x++) sum += *img++ * *filt++; *dest++ = sum; } } /* !!! This works, after a fashion - but remains 2.5 times slower than a smooth * free-rotate if using 6-tap filter, or 1.5 times if using 2-tap one. Which, * while still being several times faster than anything else, is rather bad * for a high-quality tool like mtPaint. Needs improvement. - WJ */ static void mem_skew_filt(chanlist old_img, chanlist new_img, int ow, int oh, int nw, int nh, double xskew, double yskew, int mode, int gcor, int dis_a, int silent) { void *xmem, *ymem, *tmem; double *xfilt, *yfilt, *wbuf, *rbuf; int *dxx, *dyy; double x0, y0, d, Kh, Kv, XX[4], YY[4], filler[7]; int i, cc, /*fw2, fh2,*/ xfsz, yfsz, wbsz, rgba, step, ny, nr; /* Create temp data */ step = (rgba = new_img[CHN_ALPHA] && !dis_a) ? 7 : 3; xmem = make_skew_filter(&xfilt, &dxx, &xfsz, oh, (nw - ow) * 0.5, xskew, mode); ymem = make_skew_filter(&yfilt, &dyy, &yfsz, nw, (nh - oh) * 0.5, yskew, mode); // fw2 = xfsz >> 1; fh2 = yfsz >> 1; wbsz = nw * step; tmem = multialloc(MA_ALIGN_DOUBLE, &wbuf, wbsz * yfsz * sizeof(double), &rbuf, wbsz * sizeof(double), NULL); if (!xmem || !ymem || !tmem) goto fail; x0 = 0.5 * (nw - 1); y0 = 0.5 * (nh - 1); /* Calculate clipping parallelogram's corners */ // To avoid corner cases, we add an extra pixel to original dimensions XX[1] = XX[3] = (XX[0] = XX[2] = 0.5 * (nw - ow) - 1) + ow + 1; YY[2] = YY[3] = (YY[0] = YY[1] = 0.5 * (nh - oh) - 1) + oh + 1; for (i = 0; i < 4; i++) { XX[i] += (YY[i] - y0) * xskew; YY[i] += (XX[i] - x0) * yskew; } d = 1.0 + xskew * yskew; Kv = d ? xskew / d : 0.0; // for left & right Kh = yskew ? 1.0 / yskew : 0.0; // for top & bottom /* Init filler */ memset(filler, 0, sizeof(filler)); if (gcor) { filler[0] = gamma256[mem_col_A24.red]; filler[1] = gamma256[mem_col_A24.green]; filler[2] = gamma256[mem_col_A24.blue]; } else { filler[0] = mem_col_A24.red; filler[1] = mem_col_A24.green; filler[2] = mem_col_A24.blue; } /* Process image channels */ for (nr = cc = 0; cc < NUM_CHANNELS; cc++) nr += !!new_img[cc]; nr = (nr - rgba) * (nh + yfsz - 1); for (ny = cc = 0; cc < NUM_CHANNELS; cc++) { int ring_l[FILT_MAX], ring_r[FILT_MAX]; int i, idx, bpp = cc == CHN_IMAGE ? step : 1; if (!new_img[cc]) continue; /* Alpha already processed for RGBA */ if ((cc == CHN_ALPHA) && rgba) continue; /* Init border rings to all-filled */ for (i = 0; i < yfsz; i++) ring_l[i] = 0 , ring_r[i] = nw; /* Row loop */ for (i = 1 - yfsz , idx = 0; i < nh; i++ , ++idx >= yfsz ? idx = 0 : 0) { double *filt0, *thatbuf, *thisbuf = wbuf + idx * wbsz; int j, k, y0, xl, xr, len, ofs, lfx = -xfsz; if (!silent && ((++ny * 10) % nr >= nr - 10)) progress_update((float)ny / nr); /* Locate source row */ y0 = i + yfsz - 1; // Effective Y offset /* !!! A reliable equation for pixel-precise clipping * of source rows stubbornly refuses to be found, so * a brute-force approach is used instead - WJ */ xl = 0; xr = nw; for (; xl < xr; xl++) // Skip empty pixels on the left { int j = y0 + dyy[xl]; if ((j < 0) || (j >= oh)) continue; j = xl + dxx[j]; if ((j <= lfx) || (j >= ow)) continue; break; } for (; xl < xr; xr--) // Same on the right { int j = y0 + dyy[xr - 1]; if ((j < 0) || (j >= oh)) continue; j = xr - 1 + dxx[j]; if ((j <= lfx) || (j >= ow)) continue; break; } if (xl >= xr) xl = xr = ring_r[idx]; /* Read in a new row */ (cc != CHN_IMAGE ? skew_fill_util : rgba ? skew_fill_rgba : skew_fill_rgb)(thisbuf, filler, old_img[cc], old_img[CHN_ALPHA], y0, ow, xl, xr, ring_l[idx], ring_r[idx], xfsz, xfilt, dxx, dyy, gcor); if (xl >= xr) xl = nw , xr = 0; ring_l[idx] = xl; ring_r[idx] = xr; if (i < 0) continue; // Initialization phase /* Clip target row */ if (i <= YY[0]) xl = ceil(XX[0] + (i - YY[0]) * Kh); else if (i <= YY[2]) xl = ceil(XX[2] + (i - YY[2]) * Kv); else /* if (i <= YY[3]) */ xl = ceil(XX[2] + (i - YY[2]) * Kh); if (i <= YY[1]) xr = ceil(XX[1] + (i - YY[1]) * Kh); else if (i <= YY[3]) xr = ceil(XX[3] + (i - YY[3]) * Kv); else /* if (i <= YY[2]) */ xr = ceil(XX[3] + (i - YY[3]) * Kh); if (xl < 0) xl = 0; if (xr > nw) xr = nw; // Right boundary is exclusive /* Run vertical filter over the row buffers */ thisbuf = rbuf + xl * bpp; thatbuf = wbuf + xl * bpp; len = xr - xl; if (len <= 0); // Do nothing else if (yfsz == 1) // Just copy memcpy(thisbuf, thatbuf, len * bpp * sizeof(double)); else // Apply filter { memset(thisbuf, 0, len * bpp * sizeof(double)); filt0 = yfilt + xl * yfsz; for (j = 0 , k = idx; j < yfsz; j++) { double *dsrc, *ddest = thisbuf, *filt = filt0++; int l = len; if (++k >= yfsz) k = 0; dsrc = thatbuf + k * wbsz; while (l-- > 0) { double kk = *filt; filt += yfsz; *ddest++ += *dsrc++ * kk; if (bpp < 3) continue; *ddest++ += *dsrc++ * kk; *ddest++ += *dsrc++ * kk; if (bpp == 3) continue; *ddest++ += *dsrc++ * kk; *ddest++ += *dsrc++ * kk; *ddest++ += *dsrc++ * kk; *ddest++ += *dsrc++ * kk; } } } /* Write out results */ ofs = i * nw + xl; if (cc == CHN_IMAGE) // RGB and RGBA { double *dsrc = thisbuf; unsigned char *dest, *dsta; int l = len, n = step; dest = new_img[CHN_IMAGE] + ofs * 3; dsta = rgba ? new_img[CHN_ALPHA] + ofs : NULL; while (l-- > 0) { double rr, gg, bb, aa; int a; if (dsta && (a = rint(aa = dsrc[6]) , *dsta++ = a < 0 ? 0 : a > 0xFF ? 0xFF : a)) { aa = 1.0 / aa; rr = dsrc[3] * aa; gg = dsrc[4] * aa; bb = dsrc[5] * aa; } else { rr = dsrc[0]; gg = dsrc[1]; bb = dsrc[2]; } if (gcor) { dest[0] = UNGAMMA256X(rr); dest[1] = UNGAMMA256X(gg); dest[2] = UNGAMMA256X(bb); } else { int r, g, b; r = rint(rr); dest[0] = r < 0 ? 0 : r > 0xFF ? 0xFF : r; g = rint(gg); dest[1] = g < 0 ? 0 : g > 0xFF ? 0xFF : g; b = rint(bb); dest[2] = b < 0 ? 0 : b > 0xFF ? 0xFF : b; } dsrc += n; dest += 3; } } else // Utility channel { double *dsrc = thisbuf; unsigned char *dest = new_img[cc] + ofs; int l = len, n; while (l-- > 0) { n = rint(*dsrc++); *dest++ = n < 0 ? 0 : n > 0xFF ? 0xFF : n; } } } } fail: free(xmem); free(ymem); free(tmem); } static void mem_skew_nn(chanlist old_img, chanlist new_img, int ow, int oh, int nw, int nh, int bpp, double xskew, double yskew, int silent) { double x0, y0, d, Kh, Kv, XX[4], YY[4]; int i, ny; /* Calculate clipping parallelogram's corners */ x0 = 0.5 * (nw - 1); y0 = 0.5 * (nh - 1); XX[1] = XX[3] = (XX[0] = XX[2] = 0.5 * (nw - ow - 1)) + ow; YY[2] = YY[3] = (YY[0] = YY[1] = 0.5 * (nh - oh - 1)) + oh; for (i = 0; i < 4; i++) { XX[i] += (YY[i] - y0) * xskew; YY[i] += (XX[i] - x0) * yskew; } d = 1.0 + xskew * yskew; Kv = d ? xskew / d : 0.0; // for left & right Kh = yskew ? 1.0 / yskew : 0.0; // for top & bottom /* Process image row by row */ for (ny = 0; ny < nh; ny++) { int cc, xl, xr; if (!silent && ((ny * 10) % nh >= nh - 10)) progress_update((float)ny / nh); /* Clip row */ if (ny <= YY[0]) xl = ceil(XX[0] + (ny - YY[0]) * Kh); else if (ny <= YY[2]) xl = ceil(XX[2] + (ny - YY[2]) * Kv); else /* if (ny <= YY[3]) */ xl = ceil(XX[2] + (ny - YY[2]) * Kh); if (ny <= YY[1]) xr = ceil(XX[1] + (ny - YY[1]) * Kh); else if (ny <= YY[3]) xr = ceil(XX[3] + (ny - YY[3]) * Kv); else /* if (ny <= YY[2]) */ xr = ceil(XX[3] + (ny - YY[3]) * Kh); if (xl < 0) xl = 0; if (xr > nw) xr = nw; // Right boundary is exclusive for (cc = 0; cc < NUM_CHANNELS; cc++) { unsigned char *src, *dest; double x0y, y0y; int nx, ox, oy; if (!new_img[cc]) continue; x0y = 0.5 * (ow - 1) - x0 * d + (y0 - ny) * xskew; y0y = x0 * yskew - 0.5 * (nh - oh) + ny; /* RGB nearest neighbour */ if ((cc == CHN_IMAGE) && (bpp == 3)) { dest = new_img[CHN_IMAGE] + (ny * nw + xl) * 3; for (nx = xl; nx < xr; nx++ , dest += 3) { // !!! Later, try reimplementing these calculations in row-then-column way - // !!! while less theoretically precise, it might cause less jitter, and better // !!! match what other skew-transform code does - WJ WJ_ROUND(ox, x0y + nx * d); WJ_ROUND(oy, y0y - nx * yskew); src = old_img[CHN_IMAGE] + (oy * ow + ox) * 3; dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } } /* One-bpp nearest neighbour */ else { dest = new_img[cc] + ny * nw + xl; for (nx = xl; nx < xr; nx++) { WJ_ROUND(ox, x0y + nx * d); WJ_ROUND(oy, y0y - nx * yskew); *dest++ = old_img[cc][oy * ow + ox]; } } } } } /* Skew geometry calculation is far nastier than same for rotation, and worse, * the approaches don't quite match in case of 3-skew rotation - WJ */ static void mem_skew_geometry(int ow, int oh, double xskew, double yskew, int rotation, int *nw, int *nh) { double nww, nhh, ax, ay; int dx, dy, dx0, dy0; /* Select new centering */ dx0 = ow & 1; dy0 = oh & 1; /* Pure skew */ if (!rotation) { /* For certain skew factors, when the other dimension is even, * rows/columns nearest to axis fit the pixel grid better if * skew dimension is realigned to offset them half a pixel */ dx = dy0 ? dx0 : dx0 ^ ((int)(fabs(xskew) + 0.5) & 1); dy = dx ? dy0 : dy0 ^ ((int)(fabs(yskew) + 0.5) & 1); } /* Rotation for 45 degrees or less */ else if (fabs(yskew) <= M_SQRT1_2) dx = dx0 , dy = dy0; /* Rotation for more than 45 degrees */ else { // Height gets to be odd - do width realign now if (dx0) dx = dy0; // Leave width realign till 3rd pass else if (dy0) dx = 0; // Let double realign happen when possible & useful else dx = (int)(fabs(xskew) + 0.5) & 1; dy = dx0; } /* Calculate theoretical dimensions */ ax = fabs(xskew); ay = fabs(yskew); nww = ow + oh * ax; if (xskew * yskew >= 0) nhh = nww * ay + oh; else if (ax * ay > 1) nhh = nww * ay - oh; else nhh = (ow - oh * ax) * ay + oh; /* Convert to actual pixel dimensions */ *nw = 2 * (int)(0.5 * (nww - dx) + PIX_ADD) + dx; *nh = 2 * (int)(0.5 * (nhh - dy) + PIX_ADD) + dy; } // Skew canvas in one or two directions (X then Y) // !!! Later, extend to handle skew+shift in both directions, too int mem_skew(double xskew, double yskew, int type, int gcor) { chanlist old_img, new_img; int ow, oh, nw, nh, res, bpp; ow = mem_width; oh = mem_height; bpp = mem_img_bpp; mem_skew_geometry(ow, oh, xskew, yskew, FALSE, &nw, &nh); if ((nw > MAX_WIDTH) || (nh > MAX_HEIGHT)) return (-5); memcpy(old_img, mem_img, sizeof(chanlist)); res = undo_next_core(UC_NOCOPY, nw, nh, bpp, CMASK_ALL); if (res) return (res); // No undo space memcpy(new_img, mem_img, sizeof(chanlist)); progress_init(_("Skew"), 0); mem_clear_img(new_img, nw, nh, bpp); if (!type || (mem_img_bpp == 1)) mem_skew_nn(old_img, new_img, ow, oh, nw, nh, bpp, xskew, yskew, FALSE); else mem_skew_filt(old_img, new_img, ow, oh, nw, nh, xskew, yskew, type, gcor, channel_dis[CHN_ALPHA], FALSE); progress_end(); return (0); } // Get gamma-corrected average of RGB pixels in an area, or -1 if out of bounds int average_pixels(unsigned char *rgb, int iw, int ih, int x, int y, int w, int h) { unsigned char *tmp; double rr, gg, bb, dd; int i, j; /* Clip to image */ w += x; h += y; if (x < 0) x = 0; if (w > iw) w = iw; if (y < 0) y = 0; if (h > ih) h = ih; /* Nothing remained */ if ((x >= w) || (y >= h)) return (-1); /* Average (gamma corrected) area */ w -= x; rr = gg = bb = 0.0; for (i = y; i < h; i++) { tmp = rgb + (i * iw + x) * 3; for (j = 0; j < w; j++ , tmp += 3) { rr += gamma256[tmp[0]]; gg += gamma256[tmp[1]]; bb += gamma256[tmp[2]]; } } dd = 1.0 / (w * (h - y)); rr *= dd; gg *= dd; bb *= dd; return (RGB_2_INT(UNGAMMA256(rr), UNGAMMA256(gg), UNGAMMA256(bb))); } // Convert a row of pixels to any of 3 colorspaces static void mem_convert_row(double *dest, unsigned char *src, int l, int cspace) { if (cspace == CSPACE_LXN) { while (l-- > 0) { get_lxn(dest, MEM_2_INT(src, 0)); dest += 3; src += 3; } } else if (cspace == CSPACE_SRGB) { l *= 3; while (l-- > 0) *dest++ = gamma256[*src++]; } else /* if (cspace == CSPACE_RGB) */ { l *= 3; while (l-- > 0) *dest++ = *src++; } } /// SEGMENTATION /* * This code implements a 4-way variation of the segmentation algorithm * described in: * Pedro F. Felzenszwalb, "Efficient Graph-Based Image Segmentation" */ static int cmp_edge(const void *v1, const void *v2) { float f1 = ((seg_edge *)v1)->diff, f2 = ((seg_edge *)v2)->diff; return (f1 < f2 ? -1 : f1 != f2 ? f1 > f2 : ((seg_edge *)v1)->which - ((seg_edge *)v2)->which); } static inline int seg_find(seg_pixel *pix, int n) { unsigned int i, j; for (i = n; i != (j = pix[i].group); i = j); return (pix[n].group = i); } static inline int seg_join(seg_pixel *pix, int a, int b) { seg_pixel *ca = pix + a, *cb = pix + b; if (ca->rank > cb->rank) { ca->cnt += cb->cnt; return (cb->group = a); } cb->cnt += ca->cnt; cb->rank += (ca->rank == cb->rank); return (ca->group = b); } seg_state *mem_seg_prepare(seg_state *s, unsigned char *img, int w, int h, int flags, int cspace, int dist) { static const unsigned char dist_scales[NUM_CSPACES] = { 1, 255, 1 }; seg_edge *e; double mult, *row0, *row1, *rows[2]; int i, j, k, l, bsz, sz = w * h; // !!! Will need a longer int type (and twice the memory) otherwise if (sz > (INT_MAX >> 1) + 1) return (NULL); /* 3 buffers will be sharing space */ bsz = w * 3 * 2 * sizeof(double); l = sz * sizeof(seg_pixel); if (l > bsz) bsz = l; if (!s) // Reuse existing allocation if possible { /* Allocation is HUGE, but no way to make do with smaller one - WJ */ void *v[3]; s = multialloc(MA_ALIGN_DOUBLE, v, sizeof(seg_state), // Dummy pointer (header struct) v + 1, bsz, // Row buffers/pixel nodes v + 2, sz * 2 * sizeof(seg_edge), // Pixel connections NULL); if (!s) return (NULL); s->pix = v[1]; s->edges = v[2]; s->w = w; s->h = h; } rows[0] = (void *)s->pix; // 1st row buffer rows[1] = rows[0] + w * 3; // 2nd row buffer s->phase = 0; // Struct is to be refilled if (flags & SEG_PROGRESS) progress_init(_("Segmentation Pass 1"), 1); /* Compute color distances, fill connections buffer */ l = w * 3; mult = dist_scales[cspace]; // Make all colorspaces use similar scale for (i = 0 , e = s->edges; i < h; i++) { k = i * w; mem_convert_row(row1 = rows[i & 1], img + k * 3, w, cspace); /* Right vertices for this row */ for (j = 3 , k *= 2; j < l; j += 3 , k += 2 , e++) { e->which = k; e->diff = mult * distance_3d[dist](row1 + j - 3, row1 + j); } if (!i) continue; /* Bottom vertices for previous row */ k = (i - 1) * w * 2 + 1; row0 = rows[~i & 1]; for (j = 0; j < l; j += 3 , k += 2 , e++) { e->which = k; e->diff = mult * distance_3d[dist](row0 + j, row1 + j); } if ((flags & SEG_PROGRESS) && ((i * 20) % h >= h - 20)) if (progress_update((0.9 * i) / h)) goto quit; } /* Sort connections, smallest distances first */ s->cnt = e - s->edges; qsort(s->edges, s->cnt, sizeof(seg_edge), cmp_edge); s->phase = 1; quit: if (flags & SEG_PROGRESS) progress_end(); return (s); } int mem_seg_process_chunk(int start, int cnt, seg_state *s) { seg_edge *edge; seg_pixel *cp, *pix = s->pix; double threshold = s->threshold; int minrank = s->minrank, minsize = s->minsize; int sz = s->w * s->h, w1[2] = { 1, s->w }; int i, ix, pass; /* Initialize pixel nodes */ if (!start) { for (i = 0 , cp = pix; i < sz; i++ , cp++) { cp->group = i; cp->cnt = 1; cp->rank = 0; cp->threshold = threshold; } } /* Setup loop range */ pass = start / s->cnt; i = start % s->cnt; cnt += i; for (; pass < 3; pass++) { ix = cnt < s->cnt ? cnt : s->cnt; edge = s->edges + i; for (; i < ix; i++ , edge++) { float dist; int j, k, idx; /* Get the original pixel */ dist = edge->diff; idx = edge->which; j = idx >> 1; /* Get the neighboring pixel's index */ k = j + w1[idx & 1]; /* Get segment anchors */ j = seg_find(pix, j); k = seg_find(pix, k); if (j == k) continue; /* Merge segments if difference is small enough in pass 0, * one of segments is too low rank in pass 1, or is too * small in pass 2 */ if (!pass ? ((dist <= pix[j].threshold) && (dist <= pix[k].threshold)) : pass == 1 ? ((pix[j].rank < minrank) || (pix[k].rank < minrank)) : ((pix[j].cnt < minsize) || (pix[k].cnt < minsize))) { seg_pixel *cp = pix + seg_join(pix, j, k); cp->threshold = dist + threshold / cp->cnt; } } /* Pass not yet completed - return progress */ if (cnt < s->cnt) return (pass * s->cnt + cnt); cnt -= s->cnt; i = 0; pass += !pass && !minrank; // Maybe skip pass 1 pass += pass && (minsize <= (1 << minrank)); // Maybe skip pass 2 } /* Normalize groups */ for (i = 0; i < sz; i++) seg_find(pix, i); /* All done */ s->phase |= 2; return (s->cnt * 3); } int mem_seg_process(seg_state *s) { int i, n, cnt = s->cnt * 3; if (s->w * s->h < 1024 * 1024) { /* Run silently */ mem_seg_process_chunk(0, cnt, s); return (TRUE); } /* Show progress */ n = (cnt + 19) / 20; progress_init(_("Segmentation Pass 2"), 1); for (i = 0; s->phase < 2; i = mem_seg_process_chunk(i, n, s)) if (progress_update((float)i / cnt)) break; progress_end(); return (s->phase >= 2); } /* This produces for one row 2 difference bits per pixel: left & up; if called * with segmentation still in progress, will show oversegmentation */ void mem_seg_scan(unsigned char *dest, int y, int x, int w, int zoom, const seg_state *s) { int i, j, k, l, ofs, dy; seg_pixel *pix = s->pix; memset(dest, 0, (w + 3) >> 2); ofs = (y * s->w + x) * zoom; dy = y ? s->w * zoom : 0; // No up neighbors for Y=0 j = pix[ofs + (!x - 1) * zoom].group; // No left neighbor for X=0 for (i = 0; i < w; i++ , j = k , ofs += zoom) { k = pix[ofs].group , l = pix[ofs - dy].group; dest[i >> 2] |= ((j != k) * 2 + (k != l)) << ((i + i) & 6); } } /* Draw segments in unique colors */ void mem_seg_render(unsigned char *img, const seg_state *s) { int i, k, l, sz = s->w * s->h; seg_pixel *pix = s->pix; for (i = l = 0; i < sz; i++) { int j, k, r, g, b; if (pix[i].group != i) continue; // Only new groups k = l++; /* Transform index to most distinct RGB color */ for (j = r = g = b = 0; j < 8; j++) { r += r + (k & 1); k >>= 1; g += g + (k & 1); k >>= 1; b += b + (k & 1); k >>= 1; } pix[i].cnt = RGB_2_INT(r, g, b); } for (i = 0; i < sz; i++ , img += 3) { k = pix[pix[i].group].cnt; img[0] = INT_2_R(k); img[1] = INT_2_G(k); img[2] = INT_2_B(k); } } #define FRACTAL_DIM 1.25 //#define FRACTAL_THR 20 /* dragban2.jpg */ #define FRACTAL_THR 15 /* dragban2.jpg after K-N */ #define THRESHOLD_MULT 20.0 /* Estimate contour length by fractal dimension, use the difference value found * this way as threshold's base value */ double mem_seg_threshold(seg_state *s) { int k = s->cnt - FRACTAL_THR * pow(s->cnt, 0.5 * FRACTAL_DIM); while (!s->edges[k].diff && (k < s->cnt - 1)) k++; return (s->edges[k].diff ? s->edges[k].diff * THRESHOLD_MULT : 1.0); } #undef FRACTAL_DIM #undef FRACTAL_THR #undef THRESHOLD_MULT mtpaint-3.40/src/viewer.h0000644000175000000620000000333311200264476014700 0ustar muammarstaff/* viewer.h Copyright (C) 2004-2009 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ float vw_zoom; int view_showing, vw_focus_on; int opaque_view; int max_pan; GtkWidget *vw_drawing; void create_cline_area( GtkWidget *vbox1 ); void pressed_pan(); void pressed_centralize(int state); void pressed_view_focus(int state); void init_view(); // Initial setup void view_show(); void view_hide(); int make_text_clipboard(unsigned char *img, int w, int h, int src_bpp); void pressed_help(); void pressed_text(); void render_text( GtkWidget *widget ); void vw_align_size( float new_zoom ); // Set new zoom void vw_realign(); // Reapply old zoom void vw_update_area( int x, int y, int w, int h ); // Update x,y,w,h area of current image void vw_focus_view(); // Focus view window to main window void vw_focus_idle(); // Same but done in idle cycles void view_render_rgb( unsigned char *rgb, int px, int py, int pw, int ph, double czoom ); void render_layers(unsigned char *rgb, int step, int px, int py, int pw, int ph, double czoom, int lr0, int lr1, int align); gboolean vw_configure( GtkWidget *widget, GdkEventConfigure *event ); mtpaint-3.40/src/info.h0000644000175000000620000000126510753310316014331 0ustar muammarstaff/* info.h Copyright (C) 2005-2008 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ void pressed_information(); mtpaint-3.40/src/main.c0000644000175000000620000002447711653340655014340 0ustar muammarstaff/* main.c Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "otherwindow.h" #include "viewer.h" #include "inifile.h" #include "canvas.h" #include "layer.h" #include "prefs.h" #include "csel.h" #include "spawn.h" #ifndef WIN32 #include #else /* This is Windows only, as POSIX systems have glob() implemented */ /* Error returns from glob() */ #define GLOB_NOSPACE 1 /* No memory */ #define GLOB_NOMATCH 3 /* No files */ #define GLOB_APPEND 0x020 /* Append to existing array */ #define GLOB_MAGCHAR 0x100 /* Set if any wildcards in pattern */ typedef struct { int gl_pathc; char **gl_pathv; int gl_flags; } glob_t; static void globfree(glob_t *pglob) { int i; if (!pglob->gl_pathv) return; for (i = 0; i < pglob->gl_pathc; i++) free(pglob->gl_pathv[i]); free(pglob->gl_pathv); } typedef struct { DIR *dir; char *path, *mask; // Split up the string for them int lpath; } glob_dir_level; #define MAXDEPTH (PATHBUF / 2) /* A pattern with more cannot match anything */ static int split_pattern(glob_dir_level *dirs, char *pat) { char *tm2, *tmp, *lastpart; int ch, bracket = 0, cnt = 0; dirs[0].path = tmp = lastpart = pat; while (tmp) { if (cnt >= MAXDEPTH) return (0); tmp += strcspn(tmp, "?*[]"); ch = *tmp++; if (!ch) { dirs[cnt].path = lastpart; dirs[cnt++].mask = NULL; break; } if (ch == '[') bracket = TRUE; else if ((ch != ']') || bracket) { tmp = strchr(tmp, DIR_SEP); if (tmp) *tmp++ = '\0'; tm2 = strrchr(lastpart, DIR_SEP); /* 0th slot is special - path string is counted, * not terminated, and includes path separator */ if (!cnt) { if (!tm2) tm2 = strchr(lastpart, ':'); if (tm2) dirs[0].lpath = tm2 - lastpart + 1; } else if (tm2) dirs[cnt].path = lastpart; if (tm2) *tm2++ = '\0'; else tm2 = lastpart; dirs[cnt++].mask = tm2; lastpart = tmp; bracket = FALSE; } } return (cnt); } static int glob_add_file(glob_t *pglob, char *buf) { void *tmp; int l = pglob->gl_pathc; /* Use doubling array technique */ if (!pglob->gl_pathv || (((l + 1) & ~l) > l)) { tmp = realloc(pglob->gl_pathv, (l + 1) * 2 * sizeof(char *)); if (!tmp) return (-1); pglob->gl_pathv = tmp; } /* Add the name to array */ if (!(pglob->gl_pathv[l++] = strdup(buf))) return (-1); pglob->gl_pathv[pglob->gl_pathc = l] = NULL; return (0); } static int glob_compare_names(const void *s1, const void *s2) { return (s1 == s2 ? 0 : strcoll(*(const char **)s1, *(const char **)s2)); } /* This implementation is strictly limited to mtPaint's needs, and tuned for * Win32 peculiarities; the only flag handled by it is GLOB_APPEND - WJ */ static int glob(const char *pattern, int flags, void *nothing, glob_t *pglob) { glob_dir_level dirs[MAXDEPTH + 1], *dp; struct dirent *ep; struct stat sbuf; char *pat, buf[PATHBUF]; int l, lv, maxdepth, prevcnt, memfail = 0; pglob->gl_flags = flags; if (!(flags & GLOB_APPEND)) { pglob->gl_pathc = 0; pglob->gl_pathv = NULL; } prevcnt = pglob->gl_pathc; /* Prepare the pattern */ if (!pattern[0]) return (GLOB_NOMATCH); pat = strdup(pattern); if (!pat) goto mfail; reseparate(pat); /* Split up the pattern */ memset(dirs, 0, sizeof(dirs)); if (!(maxdepth = split_pattern(dirs, pat))) { free(pat); return (GLOB_NOMATCH); } /* Scan through dir(s) */ maxdepth--; for (lv = 0; lv >= 0; ) { dp = dirs + lv--; // Step back a level in advance /* Start scanning directory */ if (!dp->dir) { l = dp->lpath; buf[l] = '\0'; if (lv < 0) memcpy(buf, dp->path, l); // Level 0 else if (!dp->path); // No extra path part else if (l + 1 + strlen(dp->path) >= PATHBUF) // Too long continue; else // Add path part { strcpy(buf + l + 1, dp->path); buf[l] = DIR_SEP; } dp->lpath = strlen(buf); if (!dp->mask) { if (!stat(buf, &sbuf)) memfail |= glob_add_file(pglob, buf); continue; } dp->dir = opendir(buf[0] ? buf : "."); if (!dp->dir) continue; } /* Finish scanning directory */ if (memfail || !(ep = readdir(dp->dir))) { closedir(dp->dir); dp->dir = NULL; continue; } lv++; // Undo step back /* Skip "." and ".." */ if (!strcmp(ep->d_name, ".") || !strcmp(ep->d_name, "..")) continue; /* Filter through mask */ if (!wjfnmatch(dp->mask, ep->d_name, FALSE)) continue; /* Combine names */ l = dp->lpath + !!lv; if (l + strlen(ep->d_name) >= PATHBUF) // Too long continue; // Should not happen, but let's make sure strcpy(buf + l, ep->d_name); if (lv) buf[l - 1] = DIR_SEP; // No forced separator on level 0 /* Filter files on lower levels */ if (stat(buf, &sbuf) || ((lv < maxdepth) && !S_ISDIR(sbuf.st_mode))) continue; /* Add to result set */ if (lv == maxdepth) memfail |= glob_add_file(pglob, buf); /* Enter into directory */ else { dp[1].lpath = strlen(buf); lv++; } } free(pat); /* Report the results */ if (memfail) { mfail: globfree(pglob); return (GLOB_NOSPACE); } if (pglob->gl_pathc == prevcnt) return (GLOB_NOMATCH); if (maxdepth) pglob->gl_flags |= GLOB_MAGCHAR; /* Sort the names */ qsort(pglob->gl_pathv + prevcnt, pglob->gl_pathc - prevcnt, sizeof(char *), glob_compare_names); return (0); } #endif int main( int argc, char *argv[] ) { glob_t globdata; int i, j, l, file_arg_start, new_empty = TRUE, get_screenshot = FALSE; if (argc > 1) { if ( strcmp(argv[1], "--version") == 0 ) { printf("%s\n\n", MT_VERSION); exit(0); } if ( strcmp(argv[1], "--help") == 0 ) { printf("%s\n\n" "Usage: mtpaint [option] [imagefile ... ]\n\n" "Options:\n" " --help Output this help\n" " --version Output version information\n" " -s Grab screenshot\n" " -v Start in viewer mode\n\n" , MT_VERSION); exit(0); } } putenv( "G_BROKEN_FILENAMES=1" ); // Needed to read non ASCII filenames in GTK+2 #if GTK2VERSION >= 4 /* Tablet handling in GTK+ 2.18+ is broken beyond repair if this mode * is set; so unset it, if g_unsetenv() is present */ g_unsetenv("GDK_NATIVE_WINDOWS"); #endif #ifdef U_THREADS /* Enable threading for GLib, but NOT for GTK+ (at least, not yet) */ g_thread_init(NULL); #endif inifile_init("/etc/mtpaint/mtpaintrc", "~/.mtpaint"); #ifdef U_NLS #if GTK_MAJOR_VERSION == 1 /* !!! GTK+1 needs locale set up before gtk_init(); GTK+2, *QUITE* * the opposite - WJ */ setup_language(); #endif #endif #ifdef U_THREADS /* !!! Uncomment to allow GTK+ calls from other threads */ /* gdk_threads_init(); */ #endif gtk_init( &argc, &argv ); gtk_init_bugfixes(); #if GTK_MAJOR_VERSION == 2 { char *theme = inifile_get(DEFAULT_THEME_INI, ""); if (theme[0]) gtk_rc_parse(theme); } #endif #ifdef U_NLS { char *locdir = extend_path(MT_LANG_DEST); #if GTK_MAJOR_VERSION == 2 /* !!! GTK+2 starts acting up if this is before gtk_init() - WJ */ setup_language(); #endif bindtextdomain("mtpaint", locdir); g_free(locdir); textdomain("mtpaint"); #if GTK_MAJOR_VERSION == 2 bind_textdomain_codeset("mtpaint", "UTF-8"); #endif } #endif file_arg_start = 1; if (argc > 1) // Argument received, so assume user is trying to load a file { if ( strcmp(argv[1], "-g") == 0 ) // Loading GIF animation frames { file_arg_start+=2; sscanf(argv[2], "%i", &preserved_gif_delay); } if ( strcmp(argv[1], "-v") == 0 ) // Viewer mode { file_arg_start++; viewer_mode = TRUE; } if ( strcmp(argv[1], "-s") == 0 ) // Screenshot { file_arg_start++; get_screenshot = TRUE; } if ( strstr(argv[0], "mtv") != NULL ) viewer_mode = TRUE; } /* Something else got passed in */ l = argc - file_arg_start; while (l) { /* First, process wildcarded args */ memset(&globdata, 0, sizeof(globdata)); /* !!! I avoid GLOB_DOOFFS here, because glibc before version 2.2 mishandled it, * and quite a few copycats had cloned those buggy versions, some libc * implementors among them. So it is possible to encounter a broken function * in the wild, and playing it safe doesn't cost all that much - WJ */ for (i = file_arg_start , j = 0; i < argc; i++) { if (strcmp(argv[i], "-w")) continue; j++; if (++i >= argc) break; j++; // Ignore errors - be glad for whatever gets returned glob(argv[i], (j > 2 ? GLOB_APPEND : 0), NULL, &globdata); } files_passed = l - j + globdata.gl_pathc; /* If no wildcarded args */ file_args = argv + file_arg_start; if (!j) break; /* If no normal args */ file_args = globdata.gl_pathv; if (l <= j) break; /* Allocate space for both kinds of args together */ file_args = calloc(files_passed + 1, sizeof(char *)); // !!! Die by SIGSEGV if this allocation fails /* Copy normal args if any */ for (i = file_arg_start , j = 0; i < argc; i++) { if (!strcmp(argv[i], "-w")) i++; // Skip the pair else file_args[j++] = argv[i]; } /* Copy globbed args after them */ if (globdata.gl_pathc) memcpy(file_args + j, globdata.gl_pathv, globdata.gl_pathc * sizeof(char *)); break; } string_init(); // Translate static strings var_init(); // Load INI variables mem_init(); // Set up memory & back end layers_init(); init_cols(); if ( get_screenshot ) { if (load_image(NULL, FS_PNG_LOAD, FT_PIXMAP) == 1) new_empty = FALSE; // Successfully grabbed so no new empty else get_screenshot = FALSE; // Screenshot failed } main_init(); // Create main window if ( get_screenshot ) { do_new_chores(FALSE); notify_changed(); } else { if ((files_passed > 0) && !do_a_load(file_args[0], FALSE)) new_empty = FALSE; } if ( new_empty ) // If no file was loaded, start with a blank canvas { create_default_image(); } update_menus(); THREADS_ENTER(); gtk_main(); THREADS_LEAVE(); spawn_quit(); inifile_quit(); return 0; } mtpaint-3.40/src/otherwindow.h0000644000175000000620000000352411652343121015746 0ustar muammarstaff/* otherwindow.h Copyright (C) 2004-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #define COLSEL_OVERLAYS 1 #define COLSEL_EDIT_AB 2 #define COLSEL_EDIT_CSEL 3 #define COLSEL_GRID 4 #define COLSEL_EDIT_ALL 256 #define CHOOSE_PATTERN 0 #define CHOOSE_BRUSH 1 #define CHOOSE_COLOR 2 typedef int (*filter_hook)(GtkWidget *content, gpointer user_data); typedef void (*colour_hook)(int what); png_color brcosa_palette[256]; int mem_preview, mem_preview_clip, brcosa_auto; int sharper_reduce; int spal_mode; seg_state *seg_preview; void generic_new_window(int type); void pressed_add_cols(); void pressed_brcosa(); void pressed_bacteria(); void pressed_scale_size(int mode); void pressed_sort_pal(); void pressed_quantize(int palette); void pressed_pick_gradient(); void choose_pattern(int typ); // Bring up pattern chooser void colour_selector( int cs_type ); // Bring up GTK+ colour wheel int do_new_one(int nw, int nh, int nc, png_color *pal, int bpp, int undo); void do_new_chores(int undo); void reset_tools(); void filter_window(gchar *title, GtkWidget *content, filter_hook filt, gpointer fdata, int istool); void memory_errors(int type); void gradient_setup(int mode); void pressed_skew(); void bkg_setup(); void pressed_segment(); mtpaint-3.40/src/channels.c0000644000175000000620000002370111250457137015171 0ustar muammarstaff/* channels.c Copyright (C) 2006-2009 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "otherwindow.h" #include "canvas.h" #include "channels.h" int overlay_alpha = FALSE; int hide_image = FALSE; int RGBA_mode = FALSE; unsigned char channel_rgb[NUM_CHANNELS][3] = { {0, 0, 0}, /* Image */ {0, 0, 255}, /* Alpha */ {255, 255, 0}, /* Selection */ {255, 0, 0} /* Mask */ }; /* The 0-th value is (255 - global opacity) - i.e., image visibility */ unsigned char channel_opacity[NUM_CHANNELS] = {128, 128, 128, 128}; /* 255 for channels where it's better to see inverse values - like alpha */ unsigned char channel_inv[NUM_CHANNELS] = {0, 255, 0, 0}; /* Default fill values for the channels */ unsigned char channel_fill[NUM_CHANNELS] = {0, 255, 0, 0}; /* Per-channel drawing "colours" */ unsigned char channel_col_[2][NUM_CHANNELS] = { {255, 255, 255, 255}, /* A */ {0, 0, 0, 0} /* B */ }; /* Channel disable flags */ int channel_dis[NUM_CHANNELS] = {0, 0, 0, 0}; static GtkWidget *newchan_window; static int chan_new_type, chan_new_state, chan_new_invert; static void click_newchan_cancel() { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( menu_widgets[MENU_CHAN0 + mem_channel]), TRUE); // Stops cancelled new channel showing as selected in the menu gtk_widget_destroy( newchan_window ); newchan_window = NULL; } static void click_newchan_ok(GtkButton *window, gpointer user_data) { chanlist tlist; int i, ii, j = mem_width * mem_height, range, rgb[3]; unsigned char sq1024[1024], *src, *dest, *tmp; unsigned int k; double r2, rr; memcpy(tlist, mem_img, sizeof(chanlist)); if ((chan_new_type == CHN_ALPHA) && (chan_new_state == 3)) i = CMASK_RGBA; else i = CMASK_FOR(chan_new_type); i = undo_next_core(UC_CREATE, mem_width, mem_height, mem_img_bpp, i); if (i) { click_newchan_cancel(); memory_errors(i); return; } dest = mem_img[chan_new_type]; switch (chan_new_state) { case 0: /* Clear */ memset(dest, 0, j); break; case 1: /* Set */ memset(dest, 255, j); break; case 2: /* Colour A radius B */ rgb[0] = mem_col_A24.red; rgb[1] = mem_col_A24.green; rgb[2] = mem_col_A24.blue; range = (mem_col_A24.red - mem_col_B24.red) * (mem_col_A24.red - mem_col_B24.red) + (mem_col_A24.green - mem_col_B24.green) * (mem_col_A24.green - mem_col_B24.green) + (mem_col_A24.blue - mem_col_B24.blue) * (mem_col_A24.blue - mem_col_B24.blue); r2 = 255.0 * 255.0; if (range) r2 /= (double)range; /* Prepare fast-square-root table */ for (i = ii = 0; i < 32; i++) { k = (i + 1) * (i + 1); for (; ii < k; ii++) sq1024[ii] = i; } src = mem_img[CHN_IMAGE]; if (mem_img_bpp == 1) { unsigned char p2l[256]; memset(p2l, 0, 256); for (i = 0; i < mem_cols; i++) { range = (mem_pal[i].red - rgb[0]) * (mem_pal[i].red - rgb[0]) + (mem_pal[i].green - rgb[1]) * (mem_pal[i].green - rgb[1]) + (mem_pal[i].blue - rgb[2]) * (mem_pal[i].blue - rgb[2]); k = rr = r2 * (double)range; /* Fast square root */ if (rr >= (255.0 * 255.0)) ii = 255; else if (k < 1024) ii = sq1024[k]; else { ii = sq1024[k >> 6] << 3; ii = (ii + k / ii) >> 1; ii -= ((k - ii * ii) >> 17) & 1; } p2l[i] = ii ^ 255; } for (i = 0; i < j; i++) { dest[i] = p2l[src[i]]; } } else { for (i = 0; i < j; i++) { range = (src[0] - rgb[0]) * (src[0] - rgb[0]) + (src[1] - rgb[1]) * (src[1] - rgb[1]) + (src[2] - rgb[2]) * (src[2] - rgb[2]); k = rr = r2 * (double)range; /* Fast square root */ if (rr >= (255.0 * 255.0)) ii = 255; else if (k < 1024) ii = sq1024[k]; else { ii = sq1024[k >> 6] << 3; ii += (k - ii * ii) / (ii + ii); ii -= ((k - ii * ii) >> 17) & 1; } dest[i] = ii ^ 255; src += 3; } } break; case 3: /* Blend A to B */ if (mem_img_bpp != 3) goto dofail; memset(dest, 255, j); /* Start with opaque */ if (mem_scale_alpha(mem_img[CHN_IMAGE], dest, mem_width, mem_height, chan_new_type == CHN_ALPHA)) goto dofail; break; case 4: /* Image red */ case 5: /* Image green */ case 6: /* Image blue */ if (mem_img_bpp == 3) /* RGB */ { src = mem_img[CHN_IMAGE] + chan_new_state - 4; for (i = 0; i < j; i++) { dest[i] = *src; src += 3; } } else /* Indexed */ { if (chan_new_state == 4) tmp = &mem_pal[0].red; else if (chan_new_state == 5) tmp = &mem_pal[0].green; else tmp = &mem_pal[0].blue; src = mem_img[CHN_IMAGE]; for (i = 0; i < j; i++) { dest[i] = *(tmp + src[i] * sizeof(png_color)); } } break; case 7: /* Alpha */ case 8: /* Selection */ case 9: /* Mask */ i = chan_new_state - 8; src = tlist[i < 0 ? CHN_ALPHA : !i ? CHN_SEL : CHN_MASK]; if (!src) goto dofail; memcpy(dest, src, j); break; default: /* If all else fails */ dofail: memset(dest, chan_new_type == CHN_ALPHA ? 255 : 0, j); break; } /* Invert */ if (chan_new_invert) { for (i = 0; i < j; i++) dest[i] ^= 255; } mem_undo_prepare(); if ((int)gtk_object_get_user_data(GTK_OBJECT(window)) >= CHN_ALPHA) { mem_channel = chan_new_type; update_stuff(UPD_NEWCH); } else update_stuff(UPD_ADDCH); click_newchan_cancel(); } void pressed_channel_create(int channel) { gchar *names2[] = { _("Cleared"), _("Set"), _("Set colour A radius B"), _("Set blend A to B"), _("Image Red"), _("Image Green"), _("Image Blue"), /* I still do not agree that we need to hide these ;-) - WJ */ mem_img[CHN_ALPHA] ? _("Alpha") : "", mem_img[CHN_SEL] ? _("Selection") : "", mem_img[CHN_MASK] ? _("Mask") : "", NULL }; GtkWidget *vbox, *vbox2, *hbox; chan_new_type = channel < CHN_ALPHA ? CHN_ALPHA : channel; chan_new_state = 0; newchan_window = add_a_window( GTK_WINDOW_TOPLEVEL, _("Create Channel"), GTK_WIN_POS_CENTER, TRUE ); gtk_object_set_user_data(GTK_OBJECT(newchan_window), (gpointer)channel); vbox = add_vbox(newchan_window); hbox = wj_radio_pack(channames, -1, 1, chan_new_type, &chan_new_type, NULL); add_with_frame(vbox, _("Channel Type"), hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); if (channel >= 0) gtk_widget_set_sensitive(hbox, FALSE); vbox2 = gtk_vbox_new(FALSE, 0); gtk_widget_show(vbox2); gtk_container_set_border_width(GTK_CONTAINER(vbox2), 5); add_with_frame(vbox, _("Initial Channel State"), vbox2); pack(vbox2, wj_radio_pack(names2, -1, 0, chan_new_state, &chan_new_state, NULL)); add_hseparator(vbox2, -2, 10); pack(vbox2, sig_toggle(_("Inverted"), FALSE, &chan_new_invert, NULL)); pack(vbox, OK_box(0, newchan_window, _("OK"), GTK_SIGNAL_FUNC(click_newchan_ok), _("Cancel"), GTK_SIGNAL_FUNC(click_newchan_cancel))); gtk_window_set_transient_for(GTK_WINDOW(newchan_window), GTK_WINDOW(main_window)); gtk_widget_show(newchan_window); } static GtkWidget *cdel_box; static int cdel_count; static void click_delete_ok(GtkWidget *window) { GtkWidget *check; int i, cmask; for (i = cmask = 0; i < cdel_count; i++) { check = BOX_CHILD(cdel_box, i); if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))) continue; cmask |= (int)gtk_object_get_user_data(GTK_OBJECT(check)); } if (cmask) { undo_next_core(UC_DELETE, mem_width, mem_height, mem_img_bpp, cmask); update_stuff(UPD_DELCH); } gtk_widget_destroy(window); } void pressed_channel_delete() { GtkWidget *window, *vbox, *check; int i; /* Are there utility channels at all? */ for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) if (mem_img[i]) break; if (i >= NUM_CHANNELS) return; window = add_a_window(GTK_WINDOW_TOPLEVEL, _("Delete Channels"), GTK_WIN_POS_CENTER, TRUE); vbox = cdel_box = add_vbox(window); cdel_count = 0; for (i = CHN_ALPHA; i < NUM_CHANNELS; i++) { if (!mem_img[i]) continue; check = add_a_toggle(channames[i], vbox, i == mem_channel); gtk_object_set_user_data(GTK_OBJECT(check), (gpointer)CMASK_FOR(i)); cdel_count++; } gtk_widget_show_all(vbox); add_hseparator(vbox, 200, 10); pack(vbox, OK_box(5, window, _("OK"), GTK_SIGNAL_FUNC(click_delete_ok), _("Cancel"), GTK_SIGNAL_FUNC(gtk_widget_destroy))); gtk_widget_show(window); } /* Being plugged into update_menus(), this is prone to be called recursively */ void pressed_channel_edit(int state, int channel) { /* Prevent spurious calls */ if (!state || newchan_window || (channel == mem_channel)) return; if (!mem_img[channel]) pressed_channel_create(channel); else { mem_channel = channel; update_stuff(UPD_CHAN); } } void pressed_channel_disable(int state, int channel) { channel_dis[channel] = state; update_stuff(UPD_RENDER); } int do_threshold(GtkWidget *spin, gpointer fdata) { int i; i = read_spin(spin); spot_undo(UNDO_FILT); mem_threshold(mem_img[mem_channel], mem_width * mem_height * MEM_BPP, i); mem_undo_prepare(); return TRUE; } void pressed_threshold() { GtkWidget *spin = add_a_spin(128, 0, 255); filter_window(_("Threshold Channel"), spin, do_threshold, NULL, FALSE); } void pressed_unassociate() { if (mem_img_bpp == 1) return; spot_undo(UNDO_COL); mem_demultiply(mem_img[CHN_IMAGE], mem_img[CHN_ALPHA], mem_width * mem_height, 3); mem_undo_prepare(); update_stuff(UPD_IMG); } void pressed_channel_toggle(int state, int what) { int *toggle = what ? &hide_image : &overlay_alpha; if (*toggle == state) return; *toggle = state; update_stuff(UPD_RENDER); } void pressed_RGBA_toggle(int state) { RGBA_mode = state; update_stuff(UPD_MODE); } mtpaint-3.40/src/toolbar.c0000644000175000000620000015164311656043714015051 0ustar muammarstaff/* toolbar.c Copyright (C) 2006-2011 Mark Tyler and Dmitry Groshev This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "inifile.h" #include "png.h" #include "mainwindow.h" #include "otherwindow.h" #include "canvas.h" #include "toolbar.h" #include "layer.h" #include "viewer.h" #include "channels.h" #include "csel.h" #include "font.h" #include "icons.h" GtkWidget *icon_buttons[TOTAL_ICONS_TOOLS]; gboolean toolbar_status[TOOLBAR_MAX]; // True=show GtkWidget *toolbar_boxes[TOOLBAR_MAX], // Used for showing/hiding *drawing_col_prev, *settings_box; GdkCursor *m_cursor[TOTAL_CURSORS]; // My mouse cursors GdkCursor *move_cursor, *busy_cursor, *corner_cursor[4]; // System cursors static GtkWidget *toolbar_zoom_main, *toolbar_zoom_view, *toolbar_labels[2], // Colour A & B details *ts_spinslides[4], // Size, flow, opacity, value *ts_label_channel; // Channel name static unsigned char mem_prev[PREVIEW_WIDTH * PREVIEW_HEIGHT * 3]; // RGB colours, tool, pattern preview static gint expose_preview( GtkWidget *widget, GdkEventExpose *event ) { int rx, ry, rw, rh; rx = event->area.x; ry = event->area.y; rw = event->area.width; rh = event->area.height; if ( ry < PREVIEW_HEIGHT ) { if ( (ry+rh) >= PREVIEW_HEIGHT ) { rh = PREVIEW_HEIGHT - ry; } gdk_draw_rgb_image( widget->window, widget->style->black_gc, rx, ry, rw, rh, GDK_RGB_DITHER_NONE, mem_prev + 3*( rx + PREVIEW_WIDTH*ry ), PREVIEW_WIDTH*3 ); } return FALSE; } static gint click_colours( GtkWidget *widget, GdkEventButton *event ) { if (mem_img[CHN_IMAGE]) { if ( event->y > 31 ) choose_pattern(0); else { if ( event->x < 48 ) colour_selector(COLSEL_EDIT_AB); else choose_pattern(1); } } return FALSE; } static GtkWidget *toolbar_add_zoom(GtkWidget *box) // Add zoom combo box { int i; static char *txt[] = { "10%", "20%", "25%", "33%", "50%", "100%", "200%", "300%", "400%", "800%", "1200%", "1600%", "2000%", NULL }; GtkWidget *combo, *combo_entry; GList *combo_list = NULL; combo = gtk_combo_new(); gtk_combo_set_value_in_list (GTK_COMBO (combo), FALSE, FALSE); gtk_widget_show (combo); combo_entry = GTK_COMBO (combo)->entry; GTK_WIDGET_UNSET_FLAGS (combo_entry, GTK_CAN_FOCUS); gtk_widget_set_usize(GTK_COMBO(combo)->button, 18, -1); #if GTK_MAJOR_VERSION == 1 gtk_widget_set_usize(combo, 75, -1); #else /* #if GTK_MAJOR_VERSION == 2 */ gtk_entry_set_width_chars(GTK_ENTRY(combo_entry), 6); #endif gtk_entry_set_editable( GTK_ENTRY(combo_entry), FALSE ); for ( i=0; txt[i]; i++ ) combo_list = g_list_append( combo_list, txt[i] ); gtk_combo_set_popdown_strings( GTK_COMBO(combo), combo_list ); g_list_free( combo_list ); gtk_entry_set_text( GTK_ENTRY(combo_entry), "100%" ); pack(box, combo); return (combo); } static float toolbar_get_zoom( GtkWidget *combo ) { int i = 0; float res = 0; char *txt = (char *) gtk_entry_get_text( GTK_ENTRY(GTK_COMBO (combo)->entry) ); if ( strlen(txt) > 2) // Weed out bogus calls { sscanf(txt, "%i%%", &i); res = (float)i / 100; if (res < 1.0) res = 1.0 / rint(1.0 / res); } return res; } void toolbar_viewzoom(gboolean visible) { (visible ? gtk_widget_show : gtk_widget_hide)(toolbar_zoom_view); } void toolbar_zoom_update() // Update the zoom combos to reflect current zoom { char txt[32]; if ( toolbar_zoom_main == NULL ) return; if ( toolbar_zoom_view == NULL ) return; snprintf( txt, 30, "%i%%", (int)(can_zoom*100) ); gtk_entry_set_text( GTK_ENTRY(GTK_COMBO(toolbar_zoom_main)->entry), txt ); snprintf( txt, 30, "%i%%", (int)(vw_zoom*100) ); gtk_entry_set_text( GTK_ENTRY(GTK_COMBO(toolbar_zoom_view)->entry), txt ); } static void toolbar_zoom_main_change() { float new = toolbar_get_zoom( toolbar_zoom_main ); if ( new > 0 ) align_size( new ); } static void toolbar_zoom_view_change() { float new = toolbar_get_zoom( toolbar_zoom_view ); if ( new > 0 ) vw_align_size( new ); } static GtkWidget *settings_buttons[TOTAL_SETTINGS]; static int *vars_settings[TOTAL_SETTINGS] = { &mem_continuous, &mem_undo_opacity, &tint_mode[0], &tint_mode[1], &mem_cselect, &mem_blend, &mem_unmask, &mem_gradient }; void mode_change(int setting, int state) { if (!GTK_TOGGLE_BUTTON(settings_buttons[setting])->active != !state) // Toggle the button gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(settings_buttons[setting]), state); if (!state == !*vars_settings[setting]) return; // No change, or changed already *(vars_settings[setting]) = state; if ((setting == SETB_CSEL) && mem_cselect && !csel_data) { csel_init(); mem_cselect = !!csel_data; } update_stuff(setting == SETB_GRAD ? UPD_GMODE : UPD_MODE); } static int set_flood(GtkWidget *box, gpointer fdata) { GtkWidget *spin, *toggle; GList *chain = GTK_BOX(box)->children; spin = ((GtkBoxChild*)chain->data)->widget; flood_step = read_float_spin(spin); chain = chain->next; toggle = ((GtkBoxChild*)chain->data)->widget; flood_cube = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)); chain = chain->next; toggle = ((GtkBoxChild*)chain->data)->widget; flood_img = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)); chain = chain->next; toggle = ((GtkBoxChild*)chain->data)->widget; flood_slide = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)); return TRUE; } void flood_settings() /* Flood fill step */ { GtkWidget *box = gtk_vbox_new(FALSE, 5); gtk_widget_show(box); pack(box, add_float_spin(flood_step, 0, 200)); add_a_toggle(_("RGB Cube"), box, flood_cube); add_a_toggle(_("By image channel"), box, flood_img); add_a_toggle(_("Gradient-driven"), box, flood_slide); filter_window(_("Fill settings"), box, set_flood, NULL, TRUE); } static int set_smudge(GtkWidget *box, gpointer fdata) { GtkWidget *toggle; toggle = BOX_CHILD_0(box); smudge_mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)); return TRUE; } void smudge_settings() /* Smudge opacity mode */ { GtkWidget *box = gtk_vbox_new(FALSE, 5); gtk_widget_show(box); add_a_toggle(_("Respect opacity mode"), box, smudge_mode); filter_window(_("Smudge settings"), box, set_smudge, NULL, TRUE); } static int set_brush_step(GtkWidget *box, gpointer fdata) { GtkWidget *spin; spin = BOX_CHILD_0(box); brush_spacing = read_spin(spin); return TRUE; } void step_settings() /* Brush spacing */ { GtkWidget *box = gtk_vbox_new(FALSE, 5); gtk_widget_show(box); pack(box, add_a_spin(brush_spacing, 0, MAX_WIDTH)); // !!! Not implemented yet // add_a_toggle(_("Flat gradient strokes"), box, ???); filter_window(_("Brush spacing"), box, set_brush_step, NULL, TRUE); } #define BLENDTEMP_SIZE 5 static int set_blend(GtkWidget *box, gpointer fdata) { int i, j, *blendtemp = fdata; i = blendtemp[0] < 0 ? BLEND_NORMAL : blendtemp[0]; j = !blendtemp[2] + (!blendtemp[3] << 1) + (!blendtemp[4] << 2); /* Don't accept stop-all or do-nothing */ if ((j == 7) || !(i | j)) return (FALSE); blend_mode = i | (blendtemp[1] ? BLEND_REVERSE : 0) | (j << BLEND_RGBSHIFT); return (TRUE); } void blend_settings() /* Blend mode */ { char *rgbnames[3] = { _("Red"), _("Green"), _("Blue") }; char *blends[BLEND_NMODES] = { _("Normal"), _("Hue"), _("Saturation"), _("Value"), _("Colour"), _("Saturate More"), _("Multiply"), _("Divide"), _("Screen"), _("Dodge"), _("Burn"), _("Hard Light"), _("Soft Light"), _("Difference"), _("Darken"), _("Lighten"), _("Grain Extract"), _("Grain Merge") }; GtkWidget *box, *hbox; int i, *blendtemp; box = gtk_vbox_new(FALSE, 5); blendtemp = bound_malloc(box, BLENDTEMP_SIZE * sizeof(int)); gtk_container_set_border_width(GTK_CONTAINER(box), 5); pack(box, wj_combo_box(blends, BLEND_NMODES, blend_mode & BLEND_MMASK, blendtemp + 0, NULL)); pack(box, sig_toggle(_("Reverse"), blend_mode & BLEND_REVERSE, blendtemp + 1, NULL)); add_hseparator(box, -2, 10); hbox = pack(box, gtk_hbox_new(TRUE, 5)); for (i = 0; i < 3; i++) { pack(hbox, sig_toggle(rgbnames[i], ~blend_mode & ((1 << BLEND_RGBSHIFT) << i), blendtemp + 2 + i, NULL)); } gtk_widget_show_all(box); filter_window(_("Blend mode"), box, set_blend, (gpointer)blendtemp, TRUE); } static void ts_update_spinslides() { mt_spinslide_set_value(ts_spinslides[0], tool_size); mt_spinslide_set_value(ts_spinslides[1], tool_flow); mt_spinslide_set_value(ts_spinslides[2], tool_opacity); if (mem_channel != CHN_IMAGE) mt_spinslide_set_value(ts_spinslides[3], channel_col_A[mem_channel]); } static void ts_spinslide_moved(GtkAdjustment *adj, gpointer user_data) { int n = ADJ2INT(adj); switch ((int)user_data) { case 0: tool_size = n; break; case 1: tool_flow = n; break; case 2: if (n != tool_opacity) pressed_opacity(n); break; case 3: if (n != channel_col_A[mem_channel]) pressed_value(n); break; } } static gboolean toolbar_settings_exit() { gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(menu_widgets[MENU_TBSET]), FALSE); return (FALSE); } static void toolbar_click(GtkWidget *widget, gpointer user_data) { toolbar_item *item = user_data; action_dispatch(item->action, item->mode, item->radio < 0 ? TRUE : GTK_TOGGLE_BUTTON(widget)->active, FALSE); } static gboolean toolbar_rclick(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { toolbar_item *item = user_data; /* Handle only right clicks */ if ((event->type != GDK_BUTTON_PRESS) || (event->button != 3)) return (FALSE); action_dispatch(item->action2, item->mode2, TRUE, FALSE); return (TRUE); } void fill_toolbar(GtkToolbar *bar, toolbar_item *items, GtkWidget **wlist, GtkSignalFunc lclick, GtkSignalFunc rclick) { GtkWidget *item, *radio[32]; if (!lclick) lclick = GTK_SIGNAL_FUNC(toolbar_click); if (!rclick) rclick = GTK_SIGNAL_FUNC(toolbar_rclick); memset(radio, 0, sizeof(radio)); for (; items->tooltip; items++) { if (!items->xpm) // This is a separator { gtk_toolbar_append_space(bar); continue; } item = gtk_toolbar_append_element(bar, items->radio < 0 ? GTK_TOOLBAR_CHILD_BUTTON : items->radio ? GTK_TOOLBAR_CHILD_RADIOBUTTON : GTK_TOOLBAR_CHILD_TOGGLEBUTTON, items->radio > 0 ? radio[items->radio] : NULL, NULL, _(items->tooltip), "Private", xpm_image(items->xpm), lclick, (gpointer)items); if (items->radio > 0) radio[items->radio] = item; if (items->action2) gtk_signal_connect(GTK_OBJECT(item), "button_press_event", rclick, (gpointer)items); mapped_dis_add(item, items->actmap); if (wlist) wlist[items->ID] = item; } } /* The following is main toolbars auto-sizing code. If toolbar is too long for * the window, some of its items get hidden, but remain accessible through an * "overflow box" - a popup with 5xN grid of buttons inside. This way, we can * support small-screen devices without penalizing large-screen ones. - WJ */ #define WRAPBOX_W 5 static void wrapbox_size_req(GtkWidget *widget, GtkRequisition *req, gpointer user_data) { GtkBox *box = GTK_BOX(widget); GtkBoxChild *child; GList *chain; GtkRequisition wreq; int cnt, nr, w, h, l, spacing; cnt = w = h = spacing = 0; for (chain = box->children; chain; chain = chain->next) { child = chain->data; if (!GTK_WIDGET_VISIBLE(child->widget)) continue; gtk_widget_size_request(child->widget, &wreq); if (w < wreq.width) w = wreq.width; if (h < wreq.height) h = wreq.height; cnt++; } if (cnt) spacing = box->spacing; nr = (cnt + WRAPBOX_W - 1) / WRAPBOX_W; cnt = nr > 1 ? WRAPBOX_W : cnt; l = GTK_CONTAINER(widget)->border_width * 2 - spacing; req->width = (w + spacing) * cnt + l; req->height = (h + spacing) * nr + l; } static void wrapbox_size_alloc(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) { GtkBox *box = GTK_BOX(widget); GtkBoxChild *child; GList *chain; GtkRequisition wreq; GtkAllocation wall; int idx, cnt, nr, l, w, h, ww, wh, spacing; widget->allocation = *alloc; /* Count widgets */ cnt = w = h = 0; for (chain = box->children; chain; chain = chain->next , idx++) { child = chain->data; if (!GTK_WIDGET_VISIBLE(child->widget)) continue; gtk_widget_get_child_requisition(child->widget, &wreq); if (w < wreq.width) w = wreq.width; if (h < wreq.height) h = wreq.height; cnt++; } if (!cnt) return; // Nothing needs positioning in here nr = (cnt + WRAPBOX_W - 1) / WRAPBOX_W; cnt = nr > 1 ? WRAPBOX_W : cnt; /* Adjust sizes (homogeneous, shrinkable, no expand, no fill) */ l = GTK_CONTAINER(widget)->border_width; spacing = box->spacing; ww = alloc->width - l * 2 + spacing; wh = alloc->height - l * 2 + spacing; if ((w + spacing) * cnt > ww) w = ww / cnt - spacing; if (w < 1) w = 1; if ((h + spacing) * nr > wh) h = wh / nr - spacing; if (h < 1) h = 1; /* Now position the widgets */ wall.height = h; wall.width = w; idx = 0; for (chain = box->children; chain; chain = chain->next) { child = chain->data; if (!GTK_WIDGET_VISIBLE(child->widget)) continue; wall.x = alloc->x + l + (w + spacing) * (idx % WRAPBOX_W); wall.y = alloc->y + l + (h + spacing) * (idx / WRAPBOX_W); gtk_widget_size_allocate(child->widget, &wall); idx++; } } static int split_toolbar_at(GtkWidget *vport, int w) { GtkWidget *tbar; GList *chain; GtkToolbarChild *child; GtkAllocation *alloc; int border, x = 0; if (w < 1) w = 1; if (!GTK_IS_VIEWPORT(vport)) return (w); tbar = GTK_BIN(vport)->child; if (!tbar || !GTK_IS_TOOLBAR(tbar)) return (w); border = GTK_CONTAINER(tbar)->border_width; for (chain = GTK_TOOLBAR(tbar)->children; chain; chain = chain->next) { child = chain->data; if (child->type == GTK_TOOLBAR_CHILD_SPACE) continue; if (!GTK_WIDGET_VISIBLE(child->widget)) continue; alloc = &child->widget->allocation; if (alloc->x < w) { if (alloc->x + alloc->width <= w) { x = alloc->x + alloc->width; continue; } w = alloc->x; } if (!x) return (1); // Nothing to see here return (x + border > w ? x : x + border); } return (w); // Toolbar is empty } static void htoolbox_size_req(GtkWidget *widget, GtkRequisition *req, gpointer user_data) { GtkBox *box = GTK_BOX(widget); GtkBoxChild *child; GList *chain; GtkRequisition wreq; int idx, cnt, w, h, l; idx = cnt = w = h = 0; for (chain = box->children; chain; chain = chain->next , idx++) { child = chain->data; if (!GTK_WIDGET_VISIBLE(child->widget)) continue; gtk_widget_size_request(child->widget, &wreq); if (h < wreq.height) h = wreq.height; /* Button in slot 1 adds no extra width */ if (idx == 1) continue; w += wreq.width + child->padding * 2; cnt++; } if (cnt > 1) w += (cnt - 1) * box->spacing; l = GTK_CONTAINER(widget)->border_width * 2; req->width = w + l; req->height = h + l; } static void htoolbox_size_alloc(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) { GtkWidget *button = NULL; GtkBox *box = GTK_BOX(widget); GtkBoxChild *child; GList *chain; GtkRequisition wreq; GtkAllocation wall; int vw, bw, xw, dw, pad, spacing; int idx, cnt, l, x, wrkw; widget->allocation = *alloc; /* Calculate required size */ idx = cnt = 0; vw = bw = xw = 0; spacing = box->spacing; for (chain = box->children; chain; chain = chain->next , idx++) { child = chain->data; pad = child->padding * 2; if (idx == 1) { gtk_widget_size_request(button = child->widget, &wreq); bw = wreq.width + pad + spacing; // Button } else if (GTK_WIDGET_VISIBLE(child->widget)) { gtk_widget_get_child_requisition(child->widget, &wreq); if (!idx) vw = wreq.width; // Viewport else xw += wreq.width; // Extra widgets xw += pad; cnt++; } } if (cnt > 1) xw += (cnt - 1) * spacing; cnt -= !!vw; // Now this counts visible extra widgets l = GTK_CONTAINER(widget)->border_width; xw += l * 2; if (vw && (xw + vw > alloc->width)) /* If viewport doesn't fit */ vw = split_toolbar_at(BOX_CHILD_0(widget), alloc->width - xw - bw); else bw = 0; /* Calculate how much to reduce extra widgets' sizes */ dw = 0; if (cnt) dw = (xw + bw + vw - alloc->width + cnt - 1) / cnt; if (dw < 0) dw = 0; /* Now position the widgets */ x = alloc->x + l; wall.y = alloc->y + l; wall.height = alloc->height - l * 2; if (wall.height < 1) wall.height = 1; idx = 0; for (chain = box->children; chain; chain = chain->next , idx++) { child = chain->data; pad = child->padding; /* Button uses size, the others, visibility */ if (idx == 1 ? !bw : !GTK_WIDGET_VISIBLE(child->widget)) continue; gtk_widget_get_child_requisition(child->widget, &wreq); wrkw = idx ? wreq.width : vw; if (idx > 1) wrkw -= dw; if (wrkw < 1) wrkw = 1; wall.width = wrkw; x = (wall.x = x + pad) + wrkw + pad + spacing; gtk_widget_size_allocate(child->widget, &wall); } if (button) (bw ? gtk_widget_show : gtk_widget_hide)(button); } static void htoolbox_popup(GtkWidget *button, gpointer user_data) { GtkWidget *tool, *vport, *btn, *popup = user_data; GtkAllocation *alloc = &button->allocation; GtkRequisition req; GtkBox *box; GtkBoxChild *child; GList *chain; gint x, y, w, h, vl; /* Pre-grab; use an already visible widget */ if (!do_grab(GRAB_PROGRAM, button, NULL)) return; /* Position the popup */ #if GTK2VERSION >= 2 /* GTK+ 2.2+ */ { GdkScreen *screen = gtk_widget_get_screen(button); w = gdk_screen_get_width(screen); h = gdk_screen_get_height(screen); /* !!! To have styles while unrealized, need at least this */ gtk_window_set_screen(GTK_WINDOW(popup), screen); } #else w = gdk_screen_width(); h = gdk_screen_height(); #endif vport = gtk_object_get_user_data(GTK_OBJECT(button)); vl = vport->allocation.width; box = gtk_object_get_user_data(GTK_OBJECT(popup)); for (chain = box->children; chain; chain = chain->next) { child = chain->data; btn = child->widget; tool = gtk_object_get_user_data(GTK_OBJECT(btn)); if (!tool) continue; // Paranoia /* Copy button relief setting of toolbar buttons */ gtk_button_set_relief(GTK_BUTTON(btn), gtk_button_get_relief(GTK_BUTTON(tool))); /* Copy their state (feedback is disabled while invisible) */ if (GTK_IS_TOGGLE_BUTTON(btn)) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(btn), GTK_TOGGLE_BUTTON(tool)->active); // gtk_widget_set_style(btn, gtk_rc_get_style(tool)); /* Set visibility */ (GTK_WIDGET_VISIBLE(tool) && (tool->allocation.x >= vl) ? gtk_widget_show : gtk_widget_hide)(btn); } gtk_widget_size_request(popup, &req); gdk_window_get_origin(button->parent->window, &x, &y); x += alloc->x + (alloc->width - req.width) / 2; y += alloc->y + alloc->height; if (x + req.width > w) x = w - req.width; if (x < 0) x = 0; if (y + req.height > h) y -= alloc->height + req.height; if (y + req.height > h) y = h - req.height; if (y < 0) y = 0; #if GTK_MAJOR_VERSION == 1 gtk_widget_realize(popup); gtk_window_reposition(GTK_WINDOW(popup), x, y); #else /* #if GTK_MAJOR_VERSION == 2 */ gtk_window_move(GTK_WINDOW(popup), x, y); #endif /* Actually popup it */ gtk_widget_show(popup); gtk_window_set_focus(GTK_WINDOW(popup), NULL); // Nothing is focused gdk_flush(); // !!! To accept grabs, window must be actually mapped /* Transfer grab to it */ do_grab(GRAB_WIDGET, popup, NULL); } static void htoolbox_popdown(GtkWidget *widget) { undo_grab(widget); gtk_widget_hide(widget); } static void htoolbox_unrealize(GtkWidget *widget, gpointer user_data) { GtkWidget *popup = user_data; if (GTK_WIDGET_VISIBLE(popup)) htoolbox_popdown(popup); gtk_widget_unrealize(popup); } static gboolean htoolbox_popup_key(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if ((event->keyval != GDK_Escape) || (event->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK))) return (FALSE); htoolbox_popdown(widget); return (TRUE); } static gboolean htoolbox_popup_click(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GtkWidget *ev = gtk_get_event_widget((GdkEvent *)event); /* Clicks on popup's descendants are OK; otherwise, remove the popup */ if (ev != widget) { while (ev) { ev = ev->parent; if (ev == widget) return (FALSE); } } htoolbox_popdown(widget); return (TRUE); } static void htoolbox_tool_clicked(GtkWidget *button, gpointer user_data) { GtkWidget *popup = user_data; /* Invisible buttons don't send (virtual) clicks to toolbar */ if (!GTK_WIDGET_VISIBLE(popup)) return; /* Ignore radio buttons getting depressed */ if (GTK_IS_RADIO_BUTTON(button) && !GTK_TOGGLE_BUTTON(button)->active) return; htoolbox_popdown(popup); gtk_button_clicked(GTK_BUTTON(gtk_object_get_user_data(GTK_OBJECT(button)))); } static gboolean htoolbox_tool_rclick(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { toolbar_item *item = user_data; /* Handle only right clicks */ if ((event->type != GDK_BUTTON_PRESS) || (event->button != 3)) return (FALSE); htoolbox_popdown(gtk_widget_get_toplevel(widget)); action_dispatch(item->action2, item->mode2, TRUE, FALSE); return (TRUE); } static GtkWidget *smart_toolbar(toolbar_item *items, GtkWidget **wlist) { GtkWidget *box, *vport, *button, *arrow, *tbar, *popup, *ebox, *frame; GtkWidget *bbox, *item, *radio[32]; box = wj_size_box(); gtk_signal_connect(GTK_OBJECT(box), "size_request", GTK_SIGNAL_FUNC(htoolbox_size_req), NULL); gtk_signal_connect(GTK_OBJECT(box), "size_allocate", GTK_SIGNAL_FUNC(htoolbox_size_alloc), NULL); vport = pack(box, gtk_viewport_new(NULL, NULL)); gtk_viewport_set_shadow_type(GTK_VIEWPORT(vport), GTK_SHADOW_NONE); gtk_widget_show(vport); vport_noshadow_fix(vport); button = pack(box, gtk_button_new()); gtk_object_set_user_data(GTK_OBJECT(button), vport); #if GTK_MAJOR_VERSION == 1 // !!! Arrow w/o shadow is invisible in plain GTK+1 arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_OUT); #else /* #if GTK_MAJOR_VERSION == 2 */ arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE); #endif gtk_widget_show(arrow); gtk_container_add(GTK_CONTAINER(button), arrow); #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE); #endif popup = gtk_window_new(GTK_WINDOW_POPUP); gtk_window_set_policy(GTK_WINDOW(popup), FALSE, FALSE, TRUE); #if GTK2VERSION >= 10 /* GTK+ 2.10+ */ gtk_window_set_type_hint(GTK_WINDOW(popup), GDK_WINDOW_TYPE_HINT_COMBO); #endif gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(htoolbox_popup), popup); gtk_signal_connect(GTK_OBJECT(box), "unrealize", GTK_SIGNAL_FUNC(htoolbox_unrealize), popup); gtk_signal_connect_object(GTK_OBJECT(box), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(popup)); /* Eventbox covers the popup, and popup has a grab; then, all clicks * inside the popup get its descendant as event widget; anything else, * including popup window itself, means click was outside, and triggers * popdown (solution from GtkCombo) - WJ */ ebox = gtk_event_box_new(); gtk_container_add(GTK_CONTAINER(popup), ebox); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); gtk_container_add(GTK_CONTAINER(ebox), frame); bbox = wj_size_box(); gtk_signal_connect(GTK_OBJECT(bbox), "size_request", GTK_SIGNAL_FUNC(wrapbox_size_req), NULL); gtk_signal_connect(GTK_OBJECT(bbox), "size_allocate", GTK_SIGNAL_FUNC(wrapbox_size_alloc), NULL); gtk_container_add(GTK_CONTAINER(frame), bbox); gtk_widget_show_all(ebox); gtk_signal_connect(GTK_OBJECT(popup), "key_press_event", GTK_SIGNAL_FUNC(htoolbox_popup_key), NULL); gtk_signal_connect(GTK_OBJECT(popup), "button_press_event", GTK_SIGNAL_FUNC(htoolbox_popup_click), NULL); gtk_object_set_user_data(GTK_OBJECT(popup), GTK_BOX(bbox)); #if GTK_MAJOR_VERSION == 1 tbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); #else /* #if GTK_MAJOR_VERSION == 2 */ tbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(tbar), GTK_TOOLBAR_ICONS); #endif gtk_widget_show(tbar); gtk_container_add(GTK_CONTAINER(vport), tbar); fill_toolbar(GTK_TOOLBAR(tbar), items, wlist, NULL, NULL); gtk_tooltips_set_tip(GTK_TOOLBAR(tbar)->tooltips, button, _("More..."), "Private"); memset(radio, 0, sizeof(radio)); for (; items->tooltip; items++) { if (!items->xpm) continue; // This is a separator if (items->radio < 0) item = gtk_button_new(); else { if (!items->radio) item = gtk_toggle_button_new(); else radio[items->radio] = item = gtk_radio_button_new_from_widget( GTK_RADIO_BUTTON_0(radio[items->radio])); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(item), FALSE); } #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ gtk_button_set_focus_on_click(GTK_BUTTON(item), FALSE); #endif gtk_container_add(GTK_CONTAINER(item), xpm_image(items->xpm)); pack(bbox, item); gtk_tooltips_set_tip(GTK_TOOLBAR(tbar)->tooltips, item, _(items->tooltip), "Private"); mapped_dis_add(item, items->actmap); gtk_object_set_user_data(GTK_OBJECT(item), wlist[items->ID]); gtk_signal_connect(GTK_OBJECT(item), "clicked", GTK_SIGNAL_FUNC(htoolbox_tool_clicked), popup); if (items->action2) gtk_signal_connect(GTK_OBJECT(item), "button_press_event", GTK_SIGNAL_FUNC(htoolbox_tool_rclick), (gpointer)items); } return (box); } #define GP_WIDTH 256 #define GP_HEIGHT 16 static GtkWidget *grad_view; #undef _ #define _(X) X static toolbar_item settings_bar[] = { { _("Continuous Mode"), 0, SETB_CONT, 0, XPM_ICON(mode_cont), ACT_MODE, SETB_CONT, DLG_STEP, 0 }, { _("Opacity Mode"), 0, SETB_OPAC, 0, XPM_ICON(mode_opac), ACT_MODE, SETB_OPAC }, { _("Tint Mode"), 0, SETB_TINT, 0, XPM_ICON(mode_tint), ACT_MODE, SETB_TINT }, { _("Tint +-"), 0, SETB_TSUB, 0, XPM_ICON(mode_tint2), ACT_MODE, SETB_TSUB }, { _("Colour-Selective Mode"), 0, SETB_CSEL, 0, XPM_ICON(mode_csel), ACT_MODE, SETB_CSEL, DLG_COLORS, COLSEL_EDIT_CSEL }, { _("Blend Mode"), 0, SETB_FILT, 0, XPM_ICON(mode_blend), ACT_MODE, SETB_FILT, DLG_FILT, 0 }, { _("Disable All Masks"), 0, SETB_MASK, 0, XPM_ICON(mode_mask), ACT_MODE, SETB_MASK }, { NULL }}; static toolbar_item gradient_button = { _("Gradient Mode"), 0, SETB_GRAD, 0, NULL, ACT_MODE, SETB_GRAD, DLG_GRAD, 1 }; #undef _ #define _(X) __(X) void create_settings_box() { char *ts_titles[4] = { _("Size"), _("Flow"), _("Opacity"), "" }; GtkWidget *box, *label, *vbox, *table, *toolbar_settings; GtkWidget *button; GdkPixmap *pmap; int i; vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show(vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); #if GTK_MAJOR_VERSION == 1 toolbar_settings = pack(vbox, gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS)); #endif #if GTK_MAJOR_VERSION == 2 toolbar_settings = pack(vbox, gtk_toolbar_new()); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar_settings), GTK_TOOLBAR_ICONS); #endif fill_toolbar(GTK_TOOLBAR(toolbar_settings), settings_bar, settings_buttons, NULL, NULL); gtk_widget_show(toolbar_settings); /* Gradient mode button+preview */ settings_buttons[SETB_GRAD] = button = pack(vbox, gtk_toggle_button_new()); button = pack(vbox, gtk_toggle_button_new()); pmap = gdk_pixmap_new(main_window->window, GP_WIDTH, GP_HEIGHT, -1); grad_view = gtk_pixmap_new(pmap, NULL); gdk_pixmap_unref(pmap); gtk_pixmap_set_build_insensitive(GTK_PIXMAP(grad_view), FALSE); gtk_container_add(GTK_CONTAINER(button), grad_view); #if GTK2VERSION >= 4 /* GTK+ 2.4+ */ gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE); #endif gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toolbar_click), (gpointer)&gradient_button); gtk_signal_connect(GTK_OBJECT(button), "button_press_event", GTK_SIGNAL_FUNC(toolbar_rclick), (gpointer)&gradient_button); gtk_widget_show_all(button); /* Parasite gradient tooltip on settings toolbar */ gtk_tooltips_set_tip(GTK_TOOLBAR(toolbar_settings)->tooltips, button, gradient_button.tooltip, "Private"); for (i = 0; i < TOTAL_SETTINGS; i++) // Initialize buttons' state { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(settings_buttons[i]), !!*(vars_settings[i])); } /* Colors A & B */ label = pack(vbox, gtk_label_new("")); toolbar_labels[0] = label; gtk_misc_set_alignment( GTK_MISC(label), 0, 0.5 ); gtk_widget_show (label); gtk_misc_set_padding (GTK_MISC (label), 5, 2); label = pack(vbox, gtk_label_new("")); toolbar_labels[1] = label; gtk_misc_set_alignment( GTK_MISC(label), 0, 0.5 ); gtk_widget_show (label); gtk_misc_set_padding (GTK_MISC (label), 5, 2); table = pack_end(vbox, gtk_table_new(4, 2, FALSE)); gtk_widget_show(table); gtk_container_set_border_width(GTK_CONTAINER(table), 5); for (i = 0; i < 4; i++) { label = add_to_table(ts_titles[i], table, i, 0, 0); ts_spinslides[i] = mt_spinslide_new(-1, -1); gtk_table_attach(GTK_TABLE(table), ts_spinslides[i], 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); mt_spinslide_set_range(ts_spinslides[i], i < 2 ? 1 : 0, 255); mt_spinslide_connect(ts_spinslides[i], GTK_SIGNAL_FUNC(ts_spinslide_moved), (gpointer)i); } // !!! Use the fact that channel value slider is the last one ts_label_channel = label; /* Keep height at max requested, to let dock contents stay put */ box = gtk_alignment_new(0.0, 0.5, 0.0, 1.0); gtk_widget_show(box); gtk_container_add(GTK_CONTAINER(box), vbox); widget_set_keepsize(box, TRUE); /* Make widget to report its demise */ gtk_signal_connect(GTK_OBJECT(box), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &settings_box); /* Keep the invariant */ gtk_widget_ref(box); gtk_object_sink(GTK_OBJECT(box)); settings_box = box; } static void toolbar_settings_init() { if (toolbar_boxes[TOOLBAR_SETTINGS]) { gtk_widget_show(toolbar_boxes[TOOLBAR_SETTINGS]); // Used when Home key is pressed #if GTK_MAJOR_VERSION == 1 gtk_widget_queue_resize(toolbar_boxes[TOOLBAR_SETTINGS]); /* Re-render sliders */ #endif return; } /// SETTINGS TOOLBAR toolbar_boxes[TOOLBAR_SETTINGS] = add_a_window(GTK_WINDOW_TOPLEVEL, _("Settings Toolbar"), GTK_WIN_POS_NONE, FALSE); gtk_widget_set_uposition(toolbar_boxes[TOOLBAR_SETTINGS], inifile_get_gint32("toolbar_settings_x", 0), inifile_get_gint32("toolbar_settings_y", 0)); dock_undock(DOCK_SETTINGS, FALSE); gtk_container_add(GTK_CONTAINER(toolbar_boxes[TOOLBAR_SETTINGS]), settings_box); gtk_widget_unref(settings_box); gtk_signal_connect(GTK_OBJECT(toolbar_boxes[TOOLBAR_SETTINGS]), "delete_event", GTK_SIGNAL_FUNC(toolbar_settings_exit), NULL); gtk_window_set_transient_for(GTK_WINDOW(toolbar_boxes[TOOLBAR_SETTINGS]), GTK_WINDOW(main_window)); toolbar_update_settings(); gtk_widget_show(toolbar_boxes[TOOLBAR_SETTINGS]); } #undef _ #define _(X) X static toolbar_item main_bar[] = { { _("New Image"), -1, MTB_NEW, 0, XPM_ICON(new), DLG_NEW, 0 }, { _("Load Image File"), -1, MTB_OPEN, 0, XPM_ICON(open), DLG_FSEL, FS_PNG_LOAD }, { _("Save Image File"), -1, MTB_SAVE, 0, XPM_ICON(save), ACT_SAVE, 0 }, {""}, { _("Cut"), -1, MTB_CUT, NEED_SEL2, XPM_ICON(cut), ACT_COPY, 1 }, { _("Copy"), -1, MTB_COPY, NEED_SEL2, XPM_ICON(copy), ACT_COPY, 0 }, { _("Paste"), -1, MTB_PASTE, NEED_CLIP, XPM_ICON(paste), ACT_PASTE, 0 }, {""}, { _("Undo"), -1, MTB_UNDO, NEED_UNDO, XPM_ICON(undo), ACT_UNDO, 0 }, { _("Redo"), -1, MTB_REDO, NEED_REDO, XPM_ICON(redo), ACT_REDO, 0 }, {""}, { _("Transform Colour"), -1, MTB_BRCOSA, 0, XPM_ICON(brcosa), DLG_BRCOSA, 0 }, { _("Pan Window"), -1, MTB_PAN, 0, XPM_ICON(pan), ACT_PAN, 0 }, { NULL }}; static toolbar_item tools_bar[] = { { _("Paint"), 1, TTB_PAINT, 0, XPM_ICON(paint), ACT_TOOL, TTB_PAINT }, { _("Shuffle"), 1, TTB_SHUFFLE, 0, XPM_ICON(shuffle), ACT_TOOL, TTB_SHUFFLE }, { _("Flood Fill"), 1, TTB_FLOOD, 0, XPM_ICON(flood), ACT_TOOL, TTB_FLOOD, DLG_FLOOD, 0 }, { _("Straight Line"), 1, TTB_LINE, 0, XPM_ICON(line), ACT_TOOL, TTB_LINE }, { _("Smudge"), 1, TTB_SMUDGE, NEED_24, XPM_ICON(smudge), ACT_TOOL, TTB_SMUDGE, DLG_SMUDGE, 0 }, { _("Clone"), 1, TTB_CLONE, 0, XPM_ICON(clone), ACT_TOOL, TTB_CLONE }, { _("Make Selection"), 1, TTB_SELECT, 0, XPM_ICON(select), ACT_TOOL, TTB_SELECT }, { _("Polygon Selection"), 1, TTB_POLY, 0, XPM_ICON(polygon), ACT_TOOL, TTB_POLY }, { _("Place Gradient"), 1, TTB_GRAD, 0, XPM_ICON(grad_place), ACT_TOOL, TTB_GRAD, DLG_GRAD, 0 }, {""}, { _("Lasso Selection"), -1, TTB_LASSO, NEED_LAS2, XPM_ICON(lasso), ACT_LASSO, 0 }, { _("Paste Text"), -1, TTB_TEXT, 0, XPM_ICON(text), DLG_TEXT, 0, DLG_TEXT_FT, 0 }, {""}, { _("Ellipse Outline"), -1, TTB_ELLIPSE, NEED_SEL, XPM_ICON(ellipse2), ACT_ELLIPSE, 0 }, { _("Filled Ellipse"), -1, TTB_FELLIPSE, NEED_SEL, XPM_ICON(ellipse), ACT_ELLIPSE, 1 }, { _("Outline Selection"), -1, TTB_OUTLINE, NEED_SEL2, XPM_ICON(rect1), ACT_OUTLINE, 0 }, { _("Fill Selection"), -1, TTB_FILL, NEED_SEL2, XPM_ICON(rect2), ACT_OUTLINE, 1 }, {""}, { _("Flip Selection Vertically"), -1, TTB_SELFV, NEED_CLIP, XPM_ICON(flip_vs), ACT_SEL_FLIP_V, 0 }, { _("Flip Selection Horizontally"), -1, TTB_SELFH, NEED_CLIP, XPM_ICON(flip_hs), ACT_SEL_FLIP_H, 0 }, { _("Rotate Selection Clockwise"), -1, TTB_SELRCW, NEED_CLIP, XPM_ICON(rotate_cs), ACT_SEL_ROT, 0 }, { _("Rotate Selection Anti-Clockwise"), -1, TTB_SELRCCW, NEED_CLIP, XPM_ICON(rotate_as), ACT_SEL_ROT, 1 }, { NULL }}; #undef _ #define _(X) __(X) #define TWOBAR_KEY "mtPaint.twobar" static void twobar_size_req(GtkWidget *widget, GtkRequisition *req, gpointer user_data) { GtkBox *box = GTK_BOX(widget); GtkBoxChild *child; GtkRequisition wreq1, wreq2; int l; wreq1.width = wreq1.height = 0; wreq2 = wreq1; if (box->children) { child = box->children->data; if (GTK_WIDGET_VISIBLE(child->widget)) gtk_widget_size_request(child->widget, &wreq1); if (box->children->next) { child = box->children->next->data; if (GTK_WIDGET_VISIBLE(child->widget)) gtk_widget_size_request(child->widget, &wreq2); } } l = box->spacing; /* One or none */ if (!wreq2.width); else if (!wreq1.width) wreq1 = wreq2; /* Two in one row */ else if (gtk_object_get_data(GTK_OBJECT(widget), TWOBAR_KEY)) { wreq1.width += wreq2.width + l; if (wreq1.height < wreq2.height) wreq1.height = wreq2.height; } /* Two rows (default) */ else { wreq1.height += wreq2.height + l; if (wreq1.width < wreq2.width) wreq1.width = wreq2.width; } /* !!! Children' padding is ignored (it isn't used anyway) */ l = GTK_CONTAINER(widget)->border_width * 2; #if GTK_MAJOR_VERSION == 1 /* !!! GTK+1 doesn't want to reallocate upper-level containers when * something on lower level gets downsized */ if (widget->requisition.height > wreq1.height + l) force_resize(widget); #endif req->width = wreq1.width + l; req->height = wreq1.height + l; } static void twobar_size_alloc(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) { GtkBox *box = GTK_BOX(widget); GtkBoxChild *child, *child2 = NULL; GtkRequisition wreq1, wreq2; GtkAllocation wall; int l, h, w2, ww, wh, bar, oldbar; widget->allocation = *alloc; if (!box->children) return; // Empty child = box->children->data; if (box->children->next) { child2 = box->children->next->data; if (!GTK_WIDGET_VISIBLE(child2->widget)) child2 = NULL; } if (!GTK_WIDGET_VISIBLE(child->widget)) child = child2 , child2 = NULL; if (!child) return; l = GTK_CONTAINER(widget)->border_width; wall.x = alloc->x + l; wall.y = alloc->y + l; l *= 2; ww = alloc->width - l; if (ww < 1) ww = 1; wall.width = ww; wh = alloc->height - l; if (wh < 1) wh = 1; wall.height = wh; if (!child2) /* Place one, and be done */ { gtk_widget_size_allocate(child->widget, &wall); return; } /* Need to arrange two */ gtk_widget_get_child_requisition(child->widget, &wreq1); gtk_widget_get_child_requisition(child2->widget, &wreq2); l = box->spacing; w2 = wreq1.width + wreq2.width + l; h = wreq1.height; if (h < wreq2.height) h = wreq2.height; bar = w2 <= ww; /* Can do one row */ if (bar) { if (wall.height > h) wall.height = h; l += (wall.width = wreq1.width); gtk_widget_size_allocate(child->widget, &wall); wall.x += l; wall.width = ww - l; } else /* Two rows */ { l += (wall.height = wreq1.height); gtk_widget_size_allocate(child->widget, &wall); wall.y += l; wall.height = wh - l; if (wall.height < 1) wall.height = 1; } gtk_widget_size_allocate(child2->widget, &wall); oldbar = (int)gtk_object_get_data(GTK_OBJECT(widget), TWOBAR_KEY); if (bar != oldbar) /* Shape change */ { gtk_object_set_data(GTK_OBJECT(widget), TWOBAR_KEY, (gpointer)bar); /* !!! GTK+1 doesn't handle requeued resizes properly */ #if GTK_MAJOR_VERSION == 1 force_resize(widget); #else gtk_widget_queue_resize(widget); #endif } } void toolbar_init(GtkWidget *vbox_main) { static char *xbm_list[TOTAL_CURSORS] = { xbm_square_bits, xbm_circle_bits, xbm_horizontal_bits, xbm_vertical_bits, xbm_slash_bits, xbm_backslash_bits, xbm_spray_bits, xbm_shuffle_bits, xbm_flood_bits, xbm_select_bits, xbm_line_bits, xbm_smudge_bits, xbm_polygon_bits, xbm_clone_bits, xbm_grad_bits }, *xbm_mask_list[TOTAL_CURSORS] = { xbm_square_mask_bits, xbm_circle_mask_bits, xbm_horizontal_mask_bits, xbm_vertical_mask_bits, xbm_slash_mask_bits, xbm_backslash_mask_bits, xbm_spray_mask_bits, xbm_shuffle_mask_bits, xbm_flood_mask_bits, xbm_select_mask_bits, xbm_line_mask_bits, xbm_smudge_mask_bits, xbm_polygon_mask_bits, xbm_clone_mask_bits, xbm_grad_mask_bits }; static unsigned char cursor_tip[TOTAL_CURSORS][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {2, 19}, {10, 10}, {0, 0}, {0, 0}, {10, 10}, {0, 0}, {0, 0} }; static GdkCursorType corners[4] = { GDK_TOP_LEFT_CORNER, GDK_TOP_RIGHT_CORNER, GDK_BOTTOM_LEFT_CORNER, GDK_BOTTOM_RIGHT_CORNER }; GtkWidget *toolbox, *box, *mbuttons[TOTAL_ICONS_MAIN]; char txt[32]; int i; for (i=0; ipopwin), "hide", GTK_SIGNAL_FUNC(toolbar_zoom_main_change), NULL); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(toolbar_zoom_view)->popwin), "hide", GTK_SIGNAL_FUNC(toolbar_zoom_view_change), NULL); #else /* #if GTK_MAJOR_VERSION == 2 */ gtk_signal_connect(GTK_OBJECT(GTK_COMBO(toolbar_zoom_main)->entry), "changed", GTK_SIGNAL_FUNC(toolbar_zoom_main_change), NULL); gtk_signal_connect(GTK_OBJECT(GTK_COMBO(toolbar_zoom_view)->entry), "changed", GTK_SIGNAL_FUNC(toolbar_zoom_view_change), NULL); #endif toolbar_viewzoom(FALSE); if (toolbar_status[TOOLBAR_MAIN]) gtk_widget_show(box); // Only show if user wants /// TOOLS TOOLBAR toolbar_boxes[TOOLBAR_TOOLS] = pack(toolbox, smart_toolbar(tools_bar, icon_buttons)); if (toolbar_status[TOOLBAR_TOOLS]) gtk_widget_show(toolbar_boxes[TOOLBAR_TOOLS]); // Only show if user wants /* !!! If hardcoded default tool isn't the default brush, this will crash */ change_to_tool(TTB_PAINT); } void ts_update_gradient() { unsigned char rgb[GP_WIDTH * GP_HEIGHT * 3], cset[3]; unsigned char pal[256 * 3], *tmp = NULL, *dest; int i, j, k, op, op2, frac, slot, idx = 255, wrk[NUM_CHANNELS + 3]; GdkPixmap *pmap; if (!grad_view) return; gtk_widget_realize(grad_view); // Ensure widget has a GC if (!GTK_WIDGET_REALIZED(grad_view)) return; slot = mem_channel + 1; if (mem_channel != CHN_IMAGE) /* Create pseudo palette */ { for (j = 0; j < 3; j++) for (i = 0; i < 256; i++) { k = mem_background * 255 + (channel_rgb[mem_channel][j] - mem_background) * i + 127; pal[i * 3 + j] = (k + (k >> 8) + 1) >> 8; } } else if (mem_img_bpp == 1) /* Read in current palette */ { memset(pal, 0, sizeof(pal)); for (i = 0; i < 256; i++) { pal[i * 3 + 0] = mem_pal[i].red; pal[i * 3 + 1] = mem_pal[i].green; pal[i * 3 + 2] = mem_pal[i].blue; } } else tmp = cset , --slot; /* Use gradient colors */ if (!IS_INDEXED) idx = 0; /* Allow intermediate opacities */ /* Draw the preview, ignoring RGBA coupling */ memset(rgb, mem_background, sizeof(rgb)); for (i = 0; i < GP_WIDTH; i++) { dest = rgb + i * 3; wrk[CHN_IMAGE + 3] = 0; op = grad_value(wrk, slot, i * (1.0 / (double)(GP_WIDTH - 1))); if (!op) continue; for (j = 0; j < GP_HEIGHT; j++ , dest += GP_WIDTH * 3) { frac = BAYER(i, j); op2 = (op + frac) >> 8; if (!op2) continue; op2 |= idx; if (tmp == cset) { cset[0] = (wrk[0] + frac) >> 8; cset[1] = (wrk[1] + frac) >> 8; cset[2] = (wrk[2] + frac) >> 8; } else { k = (wrk[mem_channel + 3] + frac) >> 8; if (mem_channel == CHN_IMAGE) k = wrk[k]; tmp = pal + 3 * k; } k = dest[0] * 255 + (tmp[0] - dest[0]) * op2; dest[0] = (k + (k >> 8) + 1) >> 8; k = dest[1] * 255 + (tmp[1] - dest[1]) * op2; dest[1] = (k + (k >> 8) + 1) >> 8; k = dest[2] * 255 + (tmp[2] - dest[2]) * op2; dest[2] = (k + (k >> 8) + 1) >> 8; } } /* Show it */ gtk_pixmap_get(GTK_PIXMAP(grad_view), &pmap, NULL); gdk_draw_rgb_image(pmap, grad_view->style->black_gc, 0, 0, GP_WIDTH, GP_HEIGHT, GDK_RGB_DITHER_NONE, rgb, GP_WIDTH * 3); gtk_widget_queue_draw(grad_view); } void toolbar_update_settings() { char txt[32]; int i, j, c; if (!settings_box) return; for (i = 0; i < 2; i++) { c = "AB"[i]; j = mem_col_[i]; if (mem_img_bpp == 1) snprintf(txt, 30, "%c [%d] = {%d,%d,%d}", c, j, mem_pal[j].red, mem_pal[j].green, mem_pal[j].blue); else snprintf(txt, 30, "%c = {%i,%i,%i}", c, mem_col_24[i].red, mem_col_24[i].green, mem_col_24[i].blue); gtk_label_set_text(GTK_LABEL(toolbar_labels[i]), txt); } if (mem_channel == CHN_IMAGE) { gtk_widget_show(toolbar_labels[0]); gtk_widget_show(toolbar_labels[1]); gtk_widget_hide(ts_label_channel); gtk_widget_hide(ts_spinslides[3]); } else { gtk_label_set_text(GTK_LABEL(ts_label_channel), channames[mem_channel]); gtk_widget_hide(toolbar_labels[0]); gtk_widget_hide(toolbar_labels[1]); gtk_widget_show(ts_label_channel); gtk_widget_show(ts_spinslides[3]); } // Disable opacity for indexed image gtk_widget_set_sensitive(ts_spinslides[2], !IS_INDEXED); ts_update_spinslides(); // Update tool settings ts_update_gradient(); } static gboolean expose_palette(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { int x1, y1, x2, y2, vport[4]; wjcanvas_get_vport(widget, vport); x2 = (x1 = event->area.x + vport[0]) + event->area.width; y2 = (y1 = event->area.y + vport[1]) + event->area.height; /* With theme engines lurking out there, weirdest things can happen */ if (y2 > PALETTE_HEIGHT) { gdk_draw_rectangle(widget->window, widget->style->black_gc, TRUE, event->area.x, PALETTE_HEIGHT - vport[1], event->area.width, y2 - PALETTE_HEIGHT); if (y1 >= PALETTE_HEIGHT) return (TRUE); y2 = PALETTE_HEIGHT; } if (x2 > PALETTE_WIDTH) { gdk_draw_rectangle(widget->window, widget->style->black_gc, TRUE, PALETTE_WIDTH - vport[0], event->area.y, x2 - PALETTE_WIDTH, event->area.height); if (x1 >= PALETTE_WIDTH) return (TRUE); x2 = PALETTE_WIDTH; } gdk_draw_rgb_image(widget->window, widget->style->black_gc, event->area.x, event->area.y, x2 - x1, y2 - y1, GDK_RGB_DITHER_NONE, mem_pals + y1 * PALETTE_W3 + x1 * 3, PALETTE_W3); return (TRUE); } static gboolean motion_palette(GtkWidget *widget, GdkEventMotion *event, gpointer user_data) { GdkModifierType state; int x, y, pindex, vport[4]; if (event->is_hint) gdk_window_get_pointer (event->window, &x, &y, &state); else { x = event->x; y = event->y; state = event->state; } /* If cursor got warped, will have another movement event to handle */ if (drag_index && wjcanvas_bind_mouse(widget, event, x, y)) return (TRUE); wjcanvas_get_vport(widget, vport); pindex = (y + vport[1] - PALETTE_SWATCH_Y) / PALETTE_SWATCH_H; pindex = pindex < 0 ? 0 : pindex >= mem_cols ? mem_cols - 1 : pindex; if (drag_index && (drag_index_vals[1] != pindex)) { mem_pal_index_move(drag_index_vals[1], pindex); update_stuff(UPD_MVPAL); drag_index_vals[1] = pindex; } return (TRUE); } static gboolean release_palette( GtkWidget *widget, GdkEventButton *event ) { if (drag_index) { drag_index = FALSE; gdk_window_set_cursor( drawing_palette->window, NULL ); if ( drag_index_vals[0] != drag_index_vals[1] ) { mem_pal_copy(mem_pal, brcosa_palette); // Get old values back mem_undo_next(UNDO_XPAL); // Do undo stuff mem_pal_index_move( drag_index_vals[0], drag_index_vals[1] ); mem_canvas_index_move( drag_index_vals[0], drag_index_vals[1] ); mem_undo_prepare(); update_stuff(UPD_TPAL | CF_MENU); } } return FALSE; } static gboolean click_palette( GtkWidget *widget, GdkEventButton *event ) { int px, py, pindex, vport[4]; /* Filter out multiple clicks */ if (event->type != GDK_BUTTON_PRESS) return (TRUE); wjcanvas_get_vport(widget, vport); px = event->x + vport[0]; py = event->y + vport[1]; if (py < PALETTE_SWATCH_Y) return (TRUE); pindex = (py - PALETTE_SWATCH_Y) / PALETTE_SWATCH_H; if (pindex >= mem_cols) return (TRUE); if (px < PALETTE_SWATCH_X) colour_selector(COLSEL_EDIT_ALL + pindex); else if (px < PALETTE_CROSS_X) // Colour A or B changed { if ((event->button == 1) && (event->state & GDK_SHIFT_MASK)) { mem_pal_copy(brcosa_palette, mem_pal); drag_index = TRUE; drag_index_vals[0] = drag_index_vals[1] = pindex; gdk_window_set_cursor(drawing_palette->window, move_cursor); } else if ((event->button == 1) || (event->button == 3)) { int ab = (event->button == 3) || (event->state & GDK_CONTROL_MASK); mem_col_[ab] = pindex; mem_col_24[ab] = mem_pal[pindex]; update_stuff(UPD_AB); } } else /* if (px >= PALETTE_CROSS_X) */ // Mask changed { mem_prot_mask[pindex] ^= 255; mem_mask_init(); // Prepare RGB masks update_stuff(UPD_CMASK); } return (TRUE); } void toolbar_palette_init(GtkWidget *box) // Set up the palette area { GtkWidget *vbox, *hbox, *scrolledwindow_palette, *viewport_palette; toolbar_boxes[TOOLBAR_PALETTE] = vbox = pack(box, gtk_vbox_new(FALSE, 0)); if (toolbar_status[TOOLBAR_PALETTE]) gtk_widget_show(vbox); hbox = pack5(vbox, gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox); drawing_col_prev = wjcanvas_new(); gtk_widget_show(drawing_col_prev); wjcanvas_size(drawing_col_prev, PREVIEW_WIDTH, PREVIEW_HEIGHT); gtk_signal_connect_object( GTK_OBJECT(drawing_col_prev), "button_release_event", GTK_SIGNAL_FUNC (click_colours), GTK_OBJECT(drawing_col_prev) ); gtk_signal_connect_object( GTK_OBJECT(drawing_col_prev), "expose_event", GTK_SIGNAL_FUNC (expose_preview), GTK_OBJECT(drawing_col_prev) ); gtk_widget_set_events (drawing_col_prev, GDK_ALL_EVENTS_MASK); viewport_palette = wjframe_new(); gtk_widget_show(viewport_palette); gtk_container_add(GTK_CONTAINER(viewport_palette), drawing_col_prev); gtk_box_pack_start(GTK_BOX(hbox), viewport_palette, TRUE, FALSE, 0); scrolledwindow_palette = xpack(vbox, gtk_scrolled_window_new(NULL, NULL)); gtk_widget_show (scrolledwindow_palette); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_palette), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); drawing_palette = wjcanvas_new(); gtk_widget_show(drawing_palette); wjcanvas_size(drawing_palette, PALETTE_WIDTH, 64); add_with_wjframe(scrolledwindow_palette, drawing_palette); gtk_signal_connect_object( GTK_OBJECT(drawing_palette), "expose_event", GTK_SIGNAL_FUNC (expose_palette), GTK_OBJECT(drawing_palette) ); gtk_signal_connect_object( GTK_OBJECT(drawing_palette), "button_press_event", GTK_SIGNAL_FUNC (click_palette), GTK_OBJECT(drawing_palette) ); gtk_signal_connect_object( GTK_OBJECT(drawing_palette), "motion_notify_event", GTK_SIGNAL_FUNC (motion_palette), GTK_OBJECT(drawing_palette) ); gtk_signal_connect_object( GTK_OBJECT(drawing_palette), "button_release_event", GTK_SIGNAL_FUNC (release_palette), GTK_OBJECT(drawing_palette) ); gtk_widget_set_events (drawing_palette, GDK_ALL_EVENTS_MASK); } void toolbar_exit() // Remember toolbar settings on program exit { int i, x, y; char txt[32]; for (i =TOOLBAR_MAIN; i < TOOLBAR_MAX; i++) // Remember current show/hide status { sprintf(txt, "toolbar%i", i); inifile_set_gboolean(txt, toolbar_status[i]); } if (!toolbar_boxes[TOOLBAR_SETTINGS]) return; gdk_window_get_root_origin(toolbar_boxes[TOOLBAR_SETTINGS]->window, &x, &y); inifile_set_gint32("toolbar_settings_x", x); inifile_set_gint32("toolbar_settings_y", y); dock_undock(DOCK_SETTINGS, TRUE); gtk_widget_destroy(toolbar_boxes[TOOLBAR_SETTINGS]); toolbar_boxes[TOOLBAR_SETTINGS] = NULL; } void toolbar_showhide() // Show/Hide all 4 toolbars { static const unsigned char bar[4] = { TOOLBAR_MAIN, TOOLBAR_TOOLS, TOOLBAR_PALETTE, TOOLBAR_STATUS }; int i; if (!toolbar_boxes[TOOLBAR_MAIN]) return; // Grubby hack to avoid segfault for (i = 0; i < 4; i++) { (toolbar_status[bar[i]] ? gtk_widget_show : gtk_widget_hide)(toolbar_boxes[bar[i]]); } if (!toolbar_status[TOOLBAR_SETTINGS]) toolbar_exit(); else { toolbar_settings_init(); gdk_window_raise(main_window->window); } } void pressed_toolbar_toggle(int state, int which) { // Menu toggle for toolbars toolbar_status[which] = state; toolbar_showhide(); } /// PATTERNS/TOOL PREVIEW AREA void mem_set_brush(int val) // Set brush, update size/flow/preview { int offset, j, o, o2; brush_type = mem_brush_list[val][0]; tool_size = mem_brush_list[val][1]; if ( mem_brush_list[val][2]>0 ) tool_flow = mem_brush_list[val][2]; offset = 3*( 2 + 36*(val % 9) + 36*PATCH_WIDTH*(val / 9) + 2*PATCH_WIDTH ); // Offset in brush RGB for ( j=0; j<32; j++ ) { o = 3*(40 + PREVIEW_WIDTH*j); // Preview offset o2 = offset + 3*PATCH_WIDTH*j; // Offset in brush RGB memcpy(mem_prev + o, mem_brushes + o2, 32 * 3); } } #include "graphics/xbm_patterns.xbm" #if (PATTERN_GRID_W * 8 != xbm_patterns_width) || (PATTERN_GRID_H * 8 != xbm_patterns_height) #error "Mismatched patterns bitmap" #endif /* Create RGB dump of patterns to display, with each pattern repeated 4x4 */ unsigned char *render_patterns() { png_color *p; unsigned char *buf, *dest; int i = 0, j, x, y, h, b; #define PAT_ROW_L (PATTERN_GRID_W * (8 * 4 + 4) * 3) #define PAT_8ROW_L (8 * PAT_ROW_L) buf = calloc(1, PATTERN_GRID_H * (8 * 4 + 4) * PAT_ROW_L); dest = buf + 2 * PAT_ROW_L + 2 * 3; for (y = 0; y < PATTERN_GRID_H; y++ , dest += (8 * 3 + 4) * PAT_ROW_L) { for (h = 0; h < 8; h++) for (x = 0; x < PATTERN_GRID_W; x++ , dest += (8 * 3 + 4) * 3) { b = xbm_patterns_bits[i++]; for (j = 0; j < 8; j++ , b >>= 1) { p = mem_col_24 + (b & 1); *dest++ = p->red; *dest++ = p->green; *dest++ = p->blue; } memcpy(dest, dest - 8 * 3, 8 * 3); memcpy(dest + 8 * 3, dest - 8 * 3, 2 * 8 * 3); } memcpy(dest, dest - PAT_8ROW_L, PAT_8ROW_L); memcpy(dest + PAT_8ROW_L, dest - PAT_8ROW_L, 2 * PAT_8ROW_L); } #undef PAT_8ROW_L #undef PAT_ROW_L return (buf); } /* Set 0-1 indexed image as new patterns */ void set_patterns(unsigned char *src) { int i, j, b, l = PATTERN_GRID_W * PATTERN_GRID_H * 8; for (i = 0; i < l; i++) { for (b = j = 0; j < 8; j++) b += *src++ << j; xbm_patterns_bits[i] = b; } } void mem_pat_update() // Update indexed and then RGB pattern preview { int i, j, k, l, ii, b; if ( mem_img_bpp == 1 ) { mem_col_A24 = mem_pal[mem_col_A]; mem_col_B24 = mem_pal[mem_col_B]; } /* Pattern bitmap starts here */ l = mem_tool_pat * 8 - (mem_tool_pat % PATTERN_GRID_W) * 7; /* Set up pattern maps from XBM */ for (i = ii = 0; i < 8; i++) { b = xbm_patterns_bits[l + i * PATTERN_GRID_W]; for (k = 0; k < 8; k++ , ii++ , b >>= 1) { mem_pattern[ii] = j = b & 1; mem_col_pat[ii] = mem_col_[j]; mem_col_pat24[ii * 3 + 0] = mem_col_24[j].red; mem_col_pat24[ii * 3 + 1] = mem_col_24[j].green; mem_col_pat24[ii * 3 + 2] = mem_col_24[j].blue; } } k = PREVIEW_WIDTH * 32 * 3; for (i = 0; i < 16; i++) { for (j = 0; j < PREVIEW_WIDTH; j++ , k += 3) { l = ((i & 7) * 8 + (j & 7)) * 3; mem_prev[k + 0] = mem_col_pat24[l + 0]; mem_prev[k + 1] = mem_col_pat24[l + 1]; mem_prev[k + 2] = mem_col_pat24[l + 2]; } } } void update_top_swatch() // Update selected colours A & B { unsigned char AA[3], BB[3], *tmp; int i, j; AA[0] = mem_col_A24.red; AA[1] = mem_col_A24.green; AA[2] = mem_col_A24.blue; BB[0] = mem_col_B24.red; BB[1] = mem_col_B24.green; BB[2] = mem_col_B24.blue; #define dAB (10 * PREVIEW_WIDTH * 3 + 10 * 3) for (j = 1; j <= 20; j++) { tmp = (mem_prev + 1 * 3) + j * (PREVIEW_WIDTH * 3); for (i = 0; i < 20; i++ , tmp += 3) { tmp[0] = AA[0]; tmp[1] = AA[1]; tmp[2] = AA[2]; tmp[dAB + 0] = BB[0]; tmp[dAB + 1] = BB[1]; tmp[dAB + 2] = BB[2]; } } #undef dAB } mtpaint-3.40/src/shifter.c0000644000175000000620000002104011343230046015023 0ustar muammarstaff/* shifter.c Copyright (C) 2006-2010 Mark Tyler This file is part of mtPaint. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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 mtPaint in the file COPYING. */ #include "global.h" #include "mygtk.h" #include "memory.h" #include "png.h" #include "mainwindow.h" #include "canvas.h" #include "shifter.h" static GtkWidget *shifter_window, *shifter_spin[8][3], *shifter_slider, *shifter_label; static png_color sh_old_pal[256]; static int shifter_in[8][3], shifter_pos, shifter_max, shift_play_state, shift_timer_state; static void pal_shift( int a, int b, int shift ) // Shift palette between a & b shift times { int dir = (a>b) ? -1 : 1, minab, maxab, i, j; if ( a == b ) return; // a=b => so nothing to do mtMIN(minab, a, b ) mtMAX(maxab, a, b ) shift = shift % (maxab-minab+1); j = minab + dir*shift; while ( j>maxab ) j = j - (maxab-minab+1); while ( jmaxab ) j=minab; } } static void shifter_set_palette(int pos) // Set current palette to a given position in cycle { int i, pos2; if ( pos<0 || pos>=shifter_max ) return; // Ensure sanity mem_pal_copy( mem_pal, sh_old_pal ); if ( pos==0 ) return; // pos=0 => original state for ( i=0; i<8; i++ ) // Implement each of the shifts { pos2 = pos / (shifter_in[i][2]+1); // Normalize the position shift for delay pal_shift( shifter_in[i][0], shifter_in[i][1], pos2 ); } } static gboolean shift_play_timer_call() { int i; if ( shift_play_state == 0 ) { shift_timer_state = 0; return FALSE; // Stop animating } else { i = mt_spinslide_get_value(shifter_slider); if (++i >= shifter_max) i = 0; mt_spinslide_set_value(shifter_slider, i); return TRUE; } } static void shift_play_start() { if (!shift_play_state) { shift_play_state = 1; if (!shift_timer_state) shift_timer_state = threads_timeout_add( 100, shift_play_timer_call, NULL); } } static void shift_play_stop() { shift_play_state = 0; } static void shift_but_playstop(GtkToggleButton *togglebutton, gpointer user_data) { if (gtk_toggle_button_get_active(togglebutton)) shift_play_start(); else shift_play_stop(); } static void shifter_slider_moved() // Slider position changed { int pos = mt_spinslide_read_value(shifter_slider); if ( pos != shifter_pos ) { shifter_pos = pos; shifter_set_palette(pos); update_stuff(UPD_PAL); } } static int gcd( int a, int b ) { int c; if ( b>a ) { c=a; a=b; b=c; } // Ensure a>=b while ( b>0 ) { c = b; b = a % b; a = c; } return a; } static void shifter_moved() // An input widget has changed in the dialog { char txt[130]; int i, j, fr[8], fs[8], tot, s1, s2, p, lcm, lcm2; for ( i=0; i<8; i++ ) { for ( j=0; j<3; j++ ) { shifter_in[i][j] = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(shifter_spin[i][j]) ); } if ( shifter_in[i][0] != shifter_in[i][1] ) fr[i] = (1 + abs(shifter_in[i][0] - shifter_in[i][1])) * (shifter_in[i][2] + 1); else fr[i] = 0; // Total frames needed for shifts, including delays } tot = 0; for ( i=0; i<8; i++ ) { if ( fr[i]>1 ) { fs[tot] = fr[i]; tot++; } } if ( tot<2 ) { if ( tot==1 ) lcm=fs[0]; else lcm=1; } else { // Calculate the lowest common multiple for all of the numbers i = 2; j = tot; s1 = fs[0]; s2 = fs[1]; p = s1 * s2; s1 = gcd( s1, s2 ); lcm = p / s1; while ( i < j ) { s2 = fs[i]; p = lcm * s2; s1 = gcd(s1, s2); lcm2 = gcd(lcm, s2); lcm = p / lcm2; i++; } } mt_spinslide_set_range(shifter_slider, 0, lcm-1); // Set min/max value of slider shifter_max = lcm; snprintf(txt, 128, "%s = %i", _("Frames"), lcm); gtk_label_set_text( GTK_LABEL(shifter_label), txt ); if ( shifter_pos >= lcm ) mt_spinslide_set_value(shifter_slider, 0); // Re-centre the slider if its out of range on the new scale } static void click_shift_fix() // Button to fix palette pressed { int i = mt_spinslide_get_value(shifter_slider); if ( i==0 || i>=shifter_max ) return; // Nothing to do mem_pal_copy( mem_pal, sh_old_pal ); spot_undo(UNDO_PAL); shifter_set_palette(i); mem_pal_copy( sh_old_pal, mem_pal ); mt_spinslide_set_value(shifter_slider, 0); update_stuff(UPD_PAL); } static gboolean click_shift_close() // Palette Shifter window closed by user or WM { shift_play_stop(); mem_pal_copy( mem_pal, sh_old_pal ); update_stuff(UPD_PAL); destroy_dialog(shifter_window); return (FALSE); } static void click_shift_clear() // Button to clear all of the values { int i, j; for ( i=0; i<8; i++ ) for ( j=0; j<3; j++ ) gtk_spin_button_set_value(GTK_SPIN_BUTTON(shifter_spin[i][j]),0); } static void click_shift_create() // Button to create a sequence of undo images { int i; if ( shifter_max<2 ) return; // Nothing to do for ( i=0; i\n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2011-09-03 18:36+0000\n" "X-Generator: Launchpad (build 13830)\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Animationsvorschau" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Wiedergabe" #: src/ani.c:695 msgid "Fix" msgstr "Reparieren" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Schließen" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Fehler" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Kann Ausgabeverzeichnis nicht anlegen" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Animationsrahmen erstellen" #: src/ani.c:857 msgid "Unable to save image" msgstr "Kann Bild nicht speichern" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Warnung" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Wollen Sie wirklich die Positions- und Zyklusdaten aller Ebenen löschen?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Nein" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Ja" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Keyframe setzen" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Für eine Animation müssen mindestens zwei Ebenen existieren." #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Für eine Animation müssen Sie die Layer vorher speichern" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Animation einstellen" #: src/ani.c:1064 msgid "Output Files" msgstr "Ausgabedateien" #: src/ani.c:1067 msgid "Start frame" msgstr "Start-Frame" #: src/ani.c:1068 msgid "End frame" msgstr "End-Frame" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Verzögerung" #: src/ani.c:1071 msgid "Output path" msgstr "Ausgabepfad" #: src/ani.c:1072 msgid "File prefix" msgstr "Dateipräfix" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "GIF-Frames erzeugen" #: src/ani.c:1098 msgid "Positions" msgstr "Positionen" #: src/ani.c:1135 msgid "Cycling" msgstr "Periodisches Durchlaufen" #: src/ani.c:1148 msgid "Save" msgstr "Speichern" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Vorschau" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Erzeuge Frames" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Das Bild ist zu groß zur Umwandlung" #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Farbverlauf" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "Morphologisch" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Kante schärfen" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Kante aufweichen" #: src/canvas.c:481 msgid "Different X/Y" msgstr "" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Gaußsche Unschärfe" #: src/canvas.c:523 msgid "Radius" msgstr "Radius" #: src/canvas.c:524 msgid "Amount" msgstr "Betrag" #: src/canvas.c:525 msgid "Threshold " msgstr "Grenzwert " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Weichzeichnen" #: src/canvas.c:563 msgid "Outer radius" msgstr "Außenradius" #: src/canvas.c:564 msgid "Inner radius" msgstr "Innerer Radius" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalisieren" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Bild ist zu groß zum Rotieren" #: src/canvas.c:668 msgid "Smooth" msgstr "Sanft" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Frei drehen" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Nicht genug Speicher für die Zwischenablage" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Ungültige Kanaldatei." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Animation ansehen" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Das ist ein animiertes %s." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "Die Datei ist zu groß, sie sollte höchstens %i breit und %i hoch sein." #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Kann Datei nicht laden" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Die Datei-Importbibliothek musste wegen eines Problems abbrechen (vermutlich " "kaputte Bilddaten oder eine abgeschnittene Datei). Einige Daten konnten " "geladen werden, weil der Datei-Header in Ordnung schien. Sie sollten das " "Bild in eine neue Datei speichern, damit sich das Problem nicht wiederholt." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Die Datei kann nicht geöffnet werden." #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Nicht unterstütztes Dateiformat" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Datei %s existiert bereits. Überschreiben?" #: src/canvas.c:1524 msgid "File Found" msgstr "Datei gefunden" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NEIN" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "JA" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Transparenz-Index" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG-Qualität (100=Hoch)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG Kompression (0=Keine)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE Kompression" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000 Kompression (0=verlustfrei)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Hotspot bei X =" #: src/canvas.c:1565 msgid "Y =" msgstr "" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Dateiformat" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Lösbar" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Animations-Verzögerung" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Kann Undo-Bilder nicht exportieren" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Kann ASCII-Datei nicht speichern" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Kann Datei nicht speichern: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Bild laden" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Bild speichern" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Palette laden" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Palette speichern" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Undo-Bilder exportieren" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Undo-Bilder exportieren (umgekehrt)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Das Bild darf zum ASCII-Export maximal 16 Farben enthalten." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "ASCII-Art exportieren" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Ebenendateien speichern" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Frame-Verzeichnis auswählen" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Für ein animiertes GIF müssen Sie mindestens ein Frame speichern." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "GIF-Animation exportieren" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Kanal laden" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Kanal speichern" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Kompositbild speichern" #: src/channels.c:236 msgid "Cleared" msgstr "Gelöscht" #: src/channels.c:237 msgid "Set" msgstr "Festlegen" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Farbe A, Radius B festlegen" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Mischung A nach B festlegen" #: src/channels.c:240 msgid "Image Red" msgstr "Bild Rot" #: src/channels.c:241 msgid "Image Green" msgstr "Bild Grün" #: src/channels.c:242 msgid "Image Blue" msgstr "Bild Blau" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alpha" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Auswahl" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maske" #: src/channels.c:256 msgid "Create Channel" msgstr "Kanal anlegen" #: src/channels.c:262 msgid "Channel Type" msgstr "Kanaltyp" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Anfänglicher Kanalstatus" #: src/channels.c:273 msgid "Inverted" msgstr "Invertiert" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Abbrechen" #: src/channels.c:316 msgid "Delete Channels" msgstr "Kanäle löschen" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Schwellwert-Kanal" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Rot" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Grün" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Blau" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Tonwert" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Sättigung" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Wert" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Deckkraft" #: src/font.c:939 msgid "Creating Font Index" msgstr "" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" "Zur Suche nach Schriftarten muss mindestens ein Verzeichnis ausgewählt sein." #: src/font.c:1468 msgid "Font" msgstr "Schriftart" #: src/font.c:1469 msgid "Style" msgstr "Stil" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Größe" #: src/font.c:1471 msgid "Filename" msgstr "Dateiname" #: src/font.c:1471 msgid "Face" msgstr "Fläche" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Verzeichnis" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Text einfügen" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Text" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Text eingeben" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Antialias" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invertieren" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Hintergrundfarbe =" #: src/font.c:1805 msgid "Oblique" msgstr "Kursiv (Oblique)" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Rotationswinkel =" #: src/font.c:1831 msgid "Font Directories" msgstr "" #: src/font.c:1836 msgid "New Directory" msgstr "Neuer Ordner" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Ordner wählen" #: src/font.c:1848 msgid "Add" msgstr "Hinzufügen" #: src/font.c:1852 msgid "Remove" msgstr "Entfernen" #: src/font.c:1856 msgid "Create Index" msgstr "Erzeuge Index" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Auf den Ordner %s kann nicht zugegriffen werden" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Löschen" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Umbenennen" #: src/fpick.c:771 msgid "Create Directory" msgstr "Ordner erstellen" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Neuen Dateinamen eingeben" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Neuen Ordnernamen eingeben" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Anlegen" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Soll \"%s\" wirklich gelöscht werden?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Kann nicht löschen" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Kann nicht umbenennen" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Kann Verzeichnis nicht anlegen" #: src/fpick.c:939 msgid "Up" msgstr "Rauf" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Neues Verzeichnis anlegen" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Verborgene Dateien anzeigen" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Sortieren (ohne Groß-/Kleinschreibung zu beachten)" #: src/fpick.c:1044 msgid "Name" msgstr "Name" #: src/fpick.c:1046 msgid "Type" msgstr "Typ" #: src/fpick.c:1047 msgid "Modified" msgstr "Geändert" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Allgemein" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Tastaturkürzel" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Mauskürzel" #: src/help.c:28 msgid "Credits" msgstr "Credits" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Die Authoren\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Sieh in der Rubrik 'Credits' nach für eine Liste der Autoren.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint ist ein einfaches GTK+1/2 Zeichenprogramm zum Bearbeiten von " "Symbolen und Pixelbildern. Es kann indizierte Paletten oder 24-bit RGB-" "Bilder bearbeiten and bietet grundlegende Werkzeuge zum Malen und zur " "Bearbeitung von Paletten. Es bietet auch einige leistungsfähige Möglchkeiten " "wie Kanäle, Ebenen und Animation. Wegen seiner Einfachheit und wenigen " "Abhängigkeiten läuft es gut unter GNU/Linux, Windows und älterer PC-" "Hardware.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Strg+N Neues Bild erstellen" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Strg+O Bild öffnen" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Strg+S Bild speichern" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Strg+Q Programm beenden\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Strg+A Alles auswählen" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr "" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Strg+C zur Zwischenablage kopieren" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Strg+V Zwischenablage in die Bildmitte infügen" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Strg+K Zwischenablage in alte Position einfügen" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr "" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr "" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr "" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr "" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr "" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr "" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr "" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr "" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr "" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr "" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr "" #: src/help.c:85 msgid " L Layers Window\n" msgstr "" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr "" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr "" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr "" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr "" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr "" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr "" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr "" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr "" #: src/help.c:110 msgid " F1 Help" msgstr "" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr "" #: src/help.c:112 msgid " F3 Choose Brush" msgstr "" #: src/help.c:113 msgid " F4 Paint Tool" msgstr "" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr "" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr "" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr "" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr "" #: src/help.c:118 msgid " F9 Selection Tool" msgstr "" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr "" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr "" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr "" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" #: src/help.c:126 msgid " Page Up Scale Image" msgstr "" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr "" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr "" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" #: src/help.c:150 msgid "Authors\n" msgstr "" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "" #: src/info.c:281 msgid "Information" msgstr "Information" #: src/info.c:290 msgid "Memory" msgstr "Speicher" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Haupt- und Bildspeicher" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Maximale Anzahl von Schritten für Rückgängig" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Zwischenablage" #: src/info.c:311 msgid "Unused" msgstr "Unbenutzt" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Zwischenablage = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Zwischenablage = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Einzigartige RGB-Pixel" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Ebenen" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Insgesamt benutzter Ebenenspeicher" #: src/info.c:350 msgid "Colour Histogram" msgstr "Farbhistogramm" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Farbindex-Statistik - %i von %i benutzt" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "Pixel der Zeichenfläche" #: src/info.c:407 msgid "Orphans" msgstr "Waisen" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Konnte das Home-Verzeichnis nicht finden. Benutze das aktuelle Verzeichnis." #: src/layer.c:70 msgid "Background" msgstr "Hintergrund" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Verändert)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Unbenannt" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Wollen Sie Ebene %i (%s) wirklich löschen?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Eine oder mehr Ebenen enthalten nicht gespeicherte Änderungen? Wollen Sie " "diese wirklich verlieren?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Aktion abbrechen" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Änderungen verlieren?" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Ein oder mehrere Ebenen sind nicht gespeichert. Sie müssen vor dem Speichern " "der Ebenen-Textdatei jedes Bild einzeln speichern, um später das " "Kompositbild öffnen zu können." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Wollen Sie wirklich alle Layer löschen?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Sie können nicht mehr Ebenen hinzufügen." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Neue Ebene" #: src/layer.c:1160 msgid "Raise" msgstr "Höher" #: src/layer.c:1161 msgid "Lower" msgstr "Tiefer" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Ebene duplizieren" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Ebene ausmitteln" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Ebene löschen" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Ebenenfenster schließen" #: src/layer.c:1268 msgid "Layer Name" msgstr "Ebenenname" #: src/layer.c:1269 msgid "Position" msgstr "Position" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Transparente Farbe" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Zeige alle Ebenen im Hauptfenster" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Es gibt keine unbenutzten Farben, die entfernt werden könnten!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Die Palette enthält keine zwei Farben mit identischem RGB-Wert." #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "Die Palette enthält %i Farben mit identischen RGB-Werten. Wollen Sie diese " "tatsächlich zu einem Index vereinen und die Zeichenfläche neu ausrichten?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "indiziert" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Ein %s-Bild kann nicht in einer %s-Datei gespeichert werden. Empfohlen wird " "das Speichern mit der Erweiterung PNG." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Eine %s-Datei kann nicht mit einer Palette gespeichert werden, die mehr als %" "d Farben enthält. Verwenden Sie ein anderes Format oder reduzieren Sie die " "Palette auf %d Farben." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Eine XPM-Datei kann nicht mehr als 4096 Farben enthalten. Verwenden Sie ein " "anderes Format oder posterisieren Sie das Bild auf 4 Bits, oder reduzieren " "Sie die Anzahl der Farben auf andere Weise." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Kann Zwischenablage nicht laden." #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Kann Zwischenablage nicht speichern." #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Die Zeichnung/Palette enthält ungespeicherte Änderungen. Wollen Sie diese " "wirklich verlieren?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Bild" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Wirklich beenden?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Datei" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Neu" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Öffnen ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Speichern" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Speichern als ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Undo-Bilder exportieren ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Undo-Bilder exportieren (umgekehrt) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//ASCII-Art exportieren ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Animiertes GIF speichern ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Beenden" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Bearbeiten" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Rückgängig" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Wiederherstellen" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Ausschneiden" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopieren" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Mittig einfügen" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//In neue Ebene einfügen" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Einfügen" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Text einfügen" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Zwischenablage laden" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Zwischenablage speichern" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Muster wählen ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Pinsel wählen ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Ansicht" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Hauptleiste zeigen" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Werkzeugleiste zeigen" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Einstellungsleiste zeigen" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Zeige Dock" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Palette zeigen" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Statusleiste anzeigen" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Bildansicht umschalten" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Bild zentrieren" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Zoomgitter zeigen" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Gitter konfigurieren ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Ansichtsfenster" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Ansichtsfenster fokussieren" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Ausschnitt verschieben" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Ebenenfenster" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/B_ild" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//In RGB umwandeln" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//In Indexiert umwandeln ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Zeichenfläche anpassen ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Größe der Zeichenfläche ändern ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Zuschneiden" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Vertikal spiegeln" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Horizontal spiegeln" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Im UZS drehen" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Gegen UZS drehen" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Frei drehen ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Einstellungen ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/Au_swahl" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Alles auswählen" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Nichts auswählen (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Lassoauswahl" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Lassoauswahl ausschneiden" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Umrissauswahl" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Auswahl füllen" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Ellipsenumriss" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Ellipse füllen" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Alpha mischen A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Alpha in die Maske verschieben" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Farbe maskieren A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Farbmaske entfernen A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Alle Farben maskieren" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Maske entfernen" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Laden ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Standards laden" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Alles maskieren" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Nichts maskieren" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//A und B vertauschen" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Farben A und B ändern ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Paletteneditor ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Palettengröße festlegen ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Doppelte Farben vereinen" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Nicht benutzte Farben entfernen" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Quantisiert ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Farben sortieren ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Effe_kte" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Farbe transformieren ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invertieren" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Graustufen" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Isometrische Transformation" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Linke Seite unten" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Rechte Seite unten" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Obere Seite rechts" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Untere Seite rechts" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Kanten finden ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Schärfen ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Aufweichen ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Relief" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Bakterien ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Kanäle" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Neu ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Löschen ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Bild bearbeiten" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Alpha bearbeiten" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Auswahl bearbeiten" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Maske bearbeiten" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Bild verbergen" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Alpha aussschalten" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Auswahl ausschalten" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Maske ausschalten" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//RGBA-Aktionen verbinden" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Schwellwert ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Alpha Verbindung lösen" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Alpha als Overlay anzeigen" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Overlays einstellen ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/Ebenen" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Neue Ebene" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Kompositbild speichern ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Compositbild in neue Ebene" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Alle Ebenen entfernen" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Animation einstellen ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Animationsvorschau ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Setze Keyframe ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Entferne alle Keyframes ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Hilfe" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Dokumentation" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Über" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Nach Indexed konvertieren" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Bakterieneffekt" #: src/memory.c:4744 msgid "Rotating" msgstr "Drehen" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Frei Drehen" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Bildgröße verändern" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Zähle nur einmal vorhandene RGB-Pixel" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Wende Effekt an" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagao Filter" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Scheren" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Bitte warten ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Browsen" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24-Bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Graustufen" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Indexierte Palette" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Aus der Zwischenablage" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Erzeuge Screenshot" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Neues Bild" #: src/otherwindow.c:288 msgid "Width" msgstr "Breite" #: src/otherwindow.c:289 msgid "Height" msgstr "Höhe" #: src/otherwindow.c:290 msgid "Colours" msgstr "Farben" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Musterauswahl" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Palettengröße anpassen" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Anwenden" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminanz" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Helligkeit" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frequenz" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Palettenfarben sortieren" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Startindex" #: src/otherwindow.c:617 msgid "End Index" msgstr "Endindex" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Umgekehrt" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Kontrast" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Farbreduktion" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Farbe transformieren" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Zeige Detail" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palette" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto-Vorschau" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Zurücksetzen" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Neue Geometrie entspricht der aktuellen: Nichts zu tun." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "Nicht genug Betriebssystemspeicher für diese Aktion" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Sie haben in den Einstellungen nicht genug Speicher für diese Aktion " "festgelegt." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Nächster Nachbar" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilinear / Flächenzuordnung" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bikubisch" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bikubisch geschärft" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bikubisch besser" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bikubisch schärfer" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "" #: src/otherwindow.c:1167 msgid "Width " msgstr "Breite " #: src/otherwindow.c:1168 msgid "Height " msgstr "Höhe " #: src/otherwindow.c:1170 msgid "Original " msgstr "Original " #: src/otherwindow.c:1176 msgid "New" msgstr "Neu" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Versatz" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Mitte" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Festes Seitenverhältnis" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Leeren" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Kacheln" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Gespiegelt kacheln" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Spiegeln" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Einstellungen" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Zeichenfläche skalieren" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Größe der Zeichenfläche ändern" #: src/otherwindow.c:1963 msgid "From" msgstr "Von" #: src/otherwindow.c:1963 msgid "To" msgstr "Bis" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Skalieren" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Paletten-Editor" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Overlays einstellen" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Farbeditor" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Grenze" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Kugel" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Winkel" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Würfel" #: src/otherwindow.c:2110 msgid "Range" msgstr "Bereich" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Invertiert" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Farbauswahl-Modus" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Undurchsichtig" #: src/otherwindow.c:2128 msgid "Border" msgstr "Rand" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Transparent" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Kachel" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Kachel Gitter" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Minimaler Gitter-Zoom" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Kachelbreite" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Kachelhöhe" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Gitter konfigurieren" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Farbraum" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Genaue Umwandlung" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Benutze aktuelle Palette" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu Quantisierung (schnell)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Max-Min Quantisierung (am besten für kleine Paletten und Dithering)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Kein" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (schnell)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "" #: src/otherwindow.c:2385 msgid "Off" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Quantisiert" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Nach Indexed umwandeln" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Verwendete indexierte Farben" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Palette abschneiden" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Konstant" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Punkte:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Linear" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radial" #: src/otherwindow.c:3018 msgid "Square" msgstr "Quadrat" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Ebene" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Wiederholen" #: src/otherwindow.c:3021 msgid "A to B" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A only" msgstr "" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Benutzerdefiniert" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "" #: src/otherwindow.c:3024 msgid "Current only" msgstr "" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Gradient konfigurieren" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Farbkanal" #: src/otherwindow.c:3047 msgid "Length" msgstr "Länge" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Gradient-Typ" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Opazität der Vorschau" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horizontal " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Vertikal" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Unverändert" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "Quelle" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Ursprung" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "Ebene" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d von %d frames konnten nicht gespeichert werden als %s - stattdessen als " "PNG gespeichert" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Druck" #: src/prefs.c:154 msgid "Current Device" msgstr "Aktuelles Gerät" #: src/prefs.c:431 msgid "Default System Language" msgstr "Standardsprache" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Chinesisch (vereinfacht)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Chinesisch (Taiwan)" #: src/prefs.c:433 msgid "Czech" msgstr "Tschechisch" #: src/prefs.c:433 msgid "Dutch" msgstr "Niederländisch" #: src/prefs.c:433 msgid "English (UK)" msgstr "Englisch (UK)" #: src/prefs.c:433 msgid "French" msgstr "Französisch" #: src/prefs.c:434 msgid "Galician" msgstr "Galizisch" #: src/prefs.c:434 msgid "German" msgstr "Deutsch" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italienisch" #: src/prefs.c:435 msgid "Japanese" msgstr "Japanisch" #: src/prefs.c:435 msgid "Polish" msgstr "Polnisch" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugiesisch" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugiesisch (Brasilien)" #: src/prefs.c:436 msgid "Russian" msgstr "Russisch" #: src/prefs.c:436 msgid "Slovak" msgstr "Slowakisch" #: src/prefs.c:437 msgid "Spanish" msgstr "Spanisch" #: src/prefs.c:437 msgid "Swedish" msgstr "Schwedisch" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Türkisch" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Kürzlich benutzte Dateien" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Zeichenflächen-Geometrie" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Auswahlgeometrie" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Rückgängig / Wiederherstellen" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Fließen" #: src/prefs.c:457 msgid "Preferences" msgstr "Einstellungen" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Für Undo max. reservierter Speicher (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Alpha-Karos optimieren" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Bildtransparenzen ausschalten" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Wählen Sie die Sprache\n" "\n" "Sie müssen mtPaint\n" "dafür neue starten" #: src/prefs.c:524 msgid "Language" msgstr "Sprache" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Graustufen-Hintergrund" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Auswahl Nudge-Pixel" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Maximale Größe Verschiebefenster" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Zeige Zwischenablage beim Einfügen" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Maustaste = Werkzeug" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Beenden bestätigen" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q-Taste beendet mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Werkzeugwechsel bestätigt Änderungen" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Neues Bild setzt Zoom auf 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Maus-Scrollrad = Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Dateien" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "Dateipfade" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Dateien in Zwischenablage" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Zwischenablage speichern" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "" #: src/prefs.c:605 msgid "Default Palette" msgstr "Standard-Palette" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Wahle Standard-Palette" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Standard-Muster" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Wähle Datei für Standard-Muster" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Statusleiste" #: src/prefs.c:633 msgid "Tablet" msgstr "Tablett" #: src/prefs.c:637 msgid "Device Settings" msgstr "Geräte-Einstellungen" #: src/prefs.c:645 msgid "Configure Device" msgstr "Gerät einstellen" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Werkzeugvariable" #: src/prefs.c:654 msgid "Factor" msgstr "Faktor" #: src/prefs.c:680 msgid "Test Area" msgstr "Testfeld" #: src/shifter.c:205 msgid "Frames" msgstr "" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "" #: src/shifter.c:279 msgid "Start" msgstr "" #: src/shifter.c:281 msgid "Finish" msgstr "Fertig" #: src/shifter.c:330 msgid "Fix Palette" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Aktion" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Befehl" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "Ausführen" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Fehler %i aufgetreten beim Ausführen von %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB-Würfel" #: src/toolbar.c:234 msgid "By image channel" msgstr "Nach Bildkanal" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Gradientengesteuert" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Füll-Einstellungen" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Normal" #: src/toolbar.c:299 msgid "Colour" msgstr "Farbe" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplikation" #: src/toolbar.c:300 msgid "Divide" msgstr "Division" #: src/toolbar.c:300 msgid "Screen" msgstr "Bildschirm" #: src/toolbar.c:300 msgid "Dodge" msgstr "Abwedeln" #: src/toolbar.c:301 msgid "Burn" msgstr "Nachbelichten" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Harte Kanten" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Weiche Kanten" #: src/toolbar.c:301 msgid "Difference" msgstr "Unterschied" #: src/toolbar.c:302 msgid "Darken" msgstr "Abdunkeln" #: src/toolbar.c:302 msgid "Lighten" msgstr "Aufhellen" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Faser extrahieren" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Faser mischen" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Kontinuierlicher Modus" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Deckkraft-Modus" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Einfärbmodus" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Einfärben +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Alle Masken deaktivieren" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Einstellungen Werkzeugleiste" #: src/toolbar.c:1041 msgid "Cut" msgstr "Ausschneiden" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopieren" #: src/toolbar.c:1043 msgid "Paste" msgstr "Einfügen" #: src/toolbar.c:1045 msgid "Undo" msgstr "Rückgängig" #: src/toolbar.c:1046 msgid "Redo" msgstr "Wiederherstellen" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Fenster verschieben" #: src/toolbar.c:1053 msgid "Paint" msgstr "Malen" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Mischen" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Füllen" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Gerade Linie" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Verwischen" #: src/toolbar.c:1058 msgid "Clone" msgstr "Klonen" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Auswählen" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Polygonauswahl" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Lasso-Auswahl" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Ellipse-Umriss" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Ellipse ausgefüllt" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Umrissauswahl" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Auswahl füllen" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Auswahl vertikal umkehren" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Auswahl horizontal umkehren" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Auswahl im Uhrzeigersinn rotieren" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Auswahl gegen Uhrzeigersinn rotieren" #: src/viewer.c:132 msgid "About" msgstr "Über" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Datei %s ungültig - Palette nicht aktualisiert" #~ msgid "Edit Frames" #~ msgstr "Frames Editieren" mtpaint-3.40/po/zh_CN.po0000644000175000000620000023652111647533372014436 0ustar muammarstaff# Simplified Chinese translation for mtpaint # This file is distributed under the same license as the mtpaint package. # Cecc , 2008. # msgid "" msgstr "" "Project-Id-Version: mtpaint 3.40\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2011-10-02 04:53+0000\n" "Last-Translator: Cecc \n" "Language-Team: Chinese (simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2011-10-02 05:04+0000\n" "X-Generator: Launchpad (build 14071)\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "动画预览" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "播放" #: src/ani.c:695 msgid "Fix" msgstr "修复" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "关闭" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "错误" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "无法建立输出目录" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "建立动画帧" #: src/ani.c:857 msgid "Unable to save image" msgstr "无法保存图像" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "警告" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "您真要清除所有图层上的全部位置和循环数据吗?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "否" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "是" #: src/ani.c:993 msgid "Set Key Frame" msgstr "设置关键帧" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "您必须至少有2层图层以建立动画" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "您必须在建立动画之前保存您的图层文件" #: src/ani.c:1054 msgid "Configure Animation" msgstr "配置动画" #: src/ani.c:1064 msgid "Output Files" msgstr "输出文件" #: src/ani.c:1067 msgid "Start frame" msgstr "起始帧" #: src/ani.c:1068 msgid "End frame" msgstr "结束帧" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "延迟" #: src/ani.c:1071 msgid "Output path" msgstr "输出路径" #: src/ani.c:1072 msgid "File prefix" msgstr "文件前缀" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "创建 GIF 帧" #: src/ani.c:1098 msgid "Positions" msgstr "位置" #: src/ani.c:1135 msgid "Cycling" msgstr "循环中" #: src/ani.c:1148 msgid "Save" msgstr "保存" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "预览" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "创建帧" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "图像太大无法转换。" #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "索贝尔" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "渐变" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "拉普拉斯" #: src/canvas.c:400 msgid "Morphological" msgstr "形态学" #: src/canvas.c:405 msgid "Edge Detect" msgstr "边缘检测" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "边缘锐化" #: src/canvas.c:429 msgid "Edge Soften" msgstr "边缘柔化" #: src/canvas.c:481 msgid "Different X/Y" msgstr "差异化 X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "高斯模糊" #: src/canvas.c:523 msgid "Radius" msgstr "半径" #: src/canvas.c:524 msgid "Amount" msgstr "数量" #: src/canvas.c:525 msgid "Threshold " msgstr "阈值 " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "钝化遮罩" #: src/canvas.c:563 msgid "Outer radius" msgstr "外半径" #: src/canvas.c:564 msgid "Inner radius" msgstr "内半径" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "标准化" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "高斯差异" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Kuwahara-Nagao 模糊" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "此旋转所用图像太大。" #: src/canvas.c:668 msgid "Smooth" msgstr "平滑" #: src/canvas.c:670 msgid "Free Rotate" msgstr "自由旋转" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "没有足够的内存来创建剪贴板" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "无效的通道文件。" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "查看动画" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "这是一个%s动画文件。" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "文件太大,宽度必须小于 %i,高度必须小于 %i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "无法导入文件" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "文件导入函式库因文件问题终止(可能是图像数据损坏或文件被缩短)。 文件头似乎正" "常,我可以载入一些数据,不过我建议您保存此图像到新文件 以确保这样的事情不再发" "生。" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "无法打开文件" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "不支持的文件格式" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "文件:%s 已经存在。您要改写它吗?" #: src/canvas.c:1524 msgid "File Found" msgstr "找到文件" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "否" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "是" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "透明索引" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG 保存质量(100 = 高)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG 压缩 (0 = 无)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE 压缩" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000 压缩 (0 = 无损)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "热点位于 X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "文件格式" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "可逆的" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "动画延迟" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "不能导出还原图像" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "无法导出 ASCII 文件" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "无法保存文件:%s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "载入图像文件" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "保存图像文件" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "载入调色板文件" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "保存调色板文件" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "导出还原图像" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "导出还原图像 (反向)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "您必须使用 16 或更少的调色板颜色来导出 ASCII 图案。" #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "导出 ASCII 图案" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "保存图层文件" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "选取帧目录" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "您必须保存至少一个帧以建立 GIF 动画。" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "导出 GIF 动画" #: src/canvas.c:2136 msgid "Load Channel" msgstr "载入通道" #: src/canvas.c:2140 msgid "Save Channel" msgstr "保存通道" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "保存合成图像" #: src/channels.c:236 msgid "Cleared" msgstr "已清除" #: src/channels.c:237 msgid "Set" msgstr "设置" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "设置颜色 A 半径 B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "设置混色 A 到 B" #: src/channels.c:240 msgid "Image Red" msgstr "红色图像" #: src/channels.c:241 msgid "Image Green" msgstr "绿色图像" #: src/channels.c:242 msgid "Image Blue" msgstr "蓝色图像" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "透明效果" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "选择" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "遮罩" #: src/channels.c:256 msgid "Create Channel" msgstr "建立通道" #: src/channels.c:262 msgid "Channel Type" msgstr "通道类型" #: src/channels.c:269 msgid "Initial Channel State" msgstr "初始通道状态" #: src/channels.c:273 msgid "Inverted" msgstr "反向" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "确定" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "取消" #: src/channels.c:316 msgid "Delete Channels" msgstr "删除通道" #: src/channels.c:373 msgid "Threshold Channel" msgstr "临界通道" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "红色" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "绿色" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "蓝色" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "色调" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "饱和度" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "数值" #: src/cpick.c:902 msgid "Hex" msgstr "十六进制" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "不透明" #: src/font.c:939 msgid "Creating Font Index" msgstr "创建字体索引" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "您必须为搜索字体选择一个目录。" #: src/font.c:1468 msgid "Font" msgstr "字体" #: src/font.c:1469 msgid "Style" msgstr "风格" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "大小" #: src/font.c:1471 msgid "Filename" msgstr "文件名" #: src/font.c:1471 msgid "Face" msgstr "字体名" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "目录" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "粘贴文本" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "文本" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "在此输入文字" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "抗锯齿" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "反向" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "背景颜色 =" #: src/font.c:1805 msgid "Oblique" msgstr "斜体" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "旋转角度=" #: src/font.c:1831 msgid "Font Directories" msgstr "字体目录" #: src/font.c:1836 msgid "New Directory" msgstr "新建目录" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "选择目录" #: src/font.c:1848 msgid "Add" msgstr "添加" #: src/font.c:1852 msgid "Remove" msgstr "移除" #: src/font.c:1856 msgid "Create Index" msgstr "创建索引" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "无法访问目录 %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "删除" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "重命名" #: src/fpick.c:771 msgid "Create Directory" msgstr "创建目录" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "输入新文件名" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "输入新目录名" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "创建" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "您确定要删除 \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "无法删除" #: src/fpick.c:843 msgid "Unable to rename" msgstr "无法重命名" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "无法创建目录" #: src/fpick.c:939 msgid "Up" msgstr "向上" #: src/fpick.c:940 msgid "Home" msgstr "主目录" #: src/fpick.c:941 msgid "Create New Directory" msgstr "新建目录" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "显示隐藏文件" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "不区分大小写排序" #: src/fpick.c:1044 msgid "Name" msgstr "名称" #: src/fpick.c:1046 msgid "Type" msgstr "类型" #: src/fpick.c:1047 msgid "Modified" msgstr "修改日期" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "常规" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "键盘快捷键" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "鼠标快捷键" #: src/help.c:28 msgid "Credits" msgstr "致谢" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - 版权 (C) 2004-2011 作者群\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "作者列表请查看「致谢」部分。\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint为自由软件;基于自由软件基金会发布的GNU通用公共许可,您可以再次散布它" "和/或修改它;可依版本3的授权,或是(依您的选择)任何之后的版本。\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint 是希望它会有用而发行的,但是不做任何保证;也不暗示任何的适销性或特定" "目的的合用性。参看 GNU 通用公共许可来获得更多细节。\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint 是一个简单的 GTK+1/2 绘画程序,专为创建图标和像素图而设计。它可以编辑" "索引过的调色板或 24 位 RGB 图像,提供基本的绘画和调色板处理工具。它还有其他几" "个更强大的特征例如通道,图层和动画等。由于它的简单易用和较少的依赖性,它在 " "GNU/Linux,Windows和较旧的 PC 硬件上运行良好。\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "有关 mtPaint 特性的完整文档包含在手册之中。如果您尚未得到它,您可以从 " "mtPaint 网站下载。\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "如果您喜欢 mtPaint 并想使用最新版本,或是您想提供一些反馈信息,那么您也许会对" "邮件列表感兴趣:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N 新建图像" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O 打开图像" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S 保存图像" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q 退出\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A 选择整个图像" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Esc 取消选择,取消粘贴框" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C 复制选择区对象到剪贴板" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr " Ctrl-X 复制选择区对象到剪贴板并绘制当前图案到所选区域" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V 粘贴剪贴板到当前视图中心" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K 粘贴剪贴板到它的来源位置" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " 回车键 粘贴到画布" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " 方向键 绘画模式 - 移动鼠标指针" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr " 方向键 选择模式 - 以一个像素挪动选择框或粘贴框" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr " Shift+方向键 以 x 个像素挪动鼠标指针,选择框或粘贴框 - x 由首选项窗口定义" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+方向键 移动图层或调整选择框大小" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr " [ 或 ] 把颜色 A 改为下一个或前一个调色板项目" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr " Shift+[ 或 ] 把颜色 B 改为下一个或前一个调色板项目\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete 裁切图像到选择区域" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr " Insert 变换颜色 - 例如亮度,对比度,饱和度,海报化,伽马" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G 图像灰度处理" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G 图像灰度处理(伽玛修正)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr " Ctrl-T 用当前填充在选择区域绘制一个矩形" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T 用当前填充填满选择区域" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L 绘制一个椭圆跨越选择区域" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L 绘制一个填充椭圆跨越选择区域\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E 编辑颜色 A 和 B 的 RGB 值" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W 编辑所有调色板颜色\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P 首选项" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I 信息\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z 撤销上次操作" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R 恢复上一次操作\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V 查看窗口" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L 图层窗口\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr " A 使用直线工具时绘制开放箭头(大小由流量设置规定)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr " S 使用直线工具时绘制封闭箭头(大小由流量设置规定)\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= 主编辑窗口 - 放大" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - 主编辑窗口 - 缩小" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= 查看窗口 - 放大" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - 查看窗口 - 缩小\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 编辑图像通道" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 编辑透明通道" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 编辑选定的通道" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 编辑蒙版通道\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 帮助" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 选择样式" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 选择画笔" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 绘画工具" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 切换主工具栏" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 切换工具工具栏" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 切换设置工具栏" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 切换调色板" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 选取工具" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 切换停靠区\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 保存当前剪贴板到文件 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 从文件 1-12 载入剪贴板\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 设置不透明度为10%, 20%, ... , 100%(主键盘或小键盘数字" "键)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + 或 = 增加不透明度 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - 减少不透明度 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr " Home 显示或隐藏主窗口菜单/工具栏/状态栏/调色板" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up 缩放图像" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down 调整图像画布大小" #: src/help.c:128 msgid " End Pan Window" msgstr " End 全景窗口" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " 左键 使用当前工具绘制到画布" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr " 中键 选取下次缩放后作为图像中心的点" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr " 右键 粘贴到画布/停止画当前的直线/取消选择\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " 转动滚轮 在 GTK+2 上使用者可通过首选项窗口设置使用鼠标滚轮进" "行缩放\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+左键 从鼠标指针下选择颜色 A" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+中键 创建颜色 A/B 和基于 A 中 RGB 颜色的图案(仅 RGB 图" "像)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+右键 从鼠标指针下选择颜色 B" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr " Ctrl+滚轮 向左或向右移动主编辑窗口\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctrl+双击 设置颜色 A 或 B 为笔刷方格或选取框下的平均色(仅" "RGB)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+右键 选取下次缩放后作为图像中心的点\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "您可在移动鼠标的同时锁定 X/Y 坐标:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift 强迫鼠标移动为垂直线" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl 强迫鼠标移动为水平线" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint 由 Dmitry Groshev 维护。\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "下列人士(以字母排序)对本项目有直接贡献,对他们的慷慨和辛勤工作表示衷心感" "谢:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "作者群\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - version 2.30 贡献开发者。从 version 3.00 到现在的主导开发者" "和维护者。" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "Mark Tyler - 原作者和直到 version 3.00 的维护者,其后的偶尔贡献者。" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Wu 量化方法的作者,请看 wu.c 以获取更多信息。\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "一般贡献者(反馈和改进意见,除另有说明外)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - 网站重设计 2005年4月" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - 用于建立和查看 GIF 动画文件的 Gifsicle 的作者 http://www.lcdf." "org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex 团队(Junta de Andalucia)- 参考指南,Launchpad/Rosetta 注册" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "翻译\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "巴西葡萄牙语 - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "捷克语 - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "荷兰语 - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "法语 - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, Philippe " "Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "加利西亚语 - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "德语 - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "意大利语 - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "日语 - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "波兰语 - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "葡萄牙语 - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "俄语 - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "简体中文 - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "斯洛伐克语 - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "西班牙语 - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "瑞典语 - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "繁体中文 - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "土耳其语 - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "信息" #: src/info.c:290 msgid "Memory" msgstr "内存" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "用于主文件 + 还原图像的全部内存" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "撤销/重做/最大撤销次数" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "剪贴板" #: src/info.c:311 msgid "Unused" msgstr "未使用的" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "剪贴板 = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "剪贴板 = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "独特 RGB 像素数" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "图层" #: src/info.c:343 msgid "Total layer memory usage" msgstr "图层内存总计" #: src/info.c:350 msgid "Colour Histogram" msgstr "颜色柱状图" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "颜色索引总计 - %i 在 %i 中已使用" #: src/info.c:391 msgid "Index" msgstr "索引" #: src/info.c:392 msgid "Canvas pixels" msgstr "画布像素" #: src/info.c:407 msgid "Orphans" msgstr "段落前分页" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "无法找到主目录。使用当前目录作为主目录。" #: src/layer.c:70 msgid "Background" msgstr "背景" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(已修改)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "无标题" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "您真的要删除图层 %i (%s) 吗?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "一个或更多的图层包含未保存的修改,您确定放弃这些修改吗?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "取消操作" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "放弃修改" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d 层无法成功加载" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "一个或多个图层未保存。您必须在保存图层文本文件之前单独地保存每个图像, 以便后" "面载入这个合成图像。" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "您真的要删除全部的图层吗?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "您不可以再添加更多图层。" #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "新建图层" #: src/layer.c:1160 msgid "Raise" msgstr "提升" #: src/layer.c:1161 msgid "Lower" msgstr "降低" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "复制图层" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "图层居中" #: src/layer.c:1164 msgid "Delete Layer" msgstr "删除图层" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "关闭图层窗口" #: src/layer.c:1268 msgid "Layer Name" msgstr "图层名称" #: src/layer.c:1269 msgid "Position" msgstr "位置" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "透明色" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "在主窗口中显示全部图层" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "没有未使用的颜色可移除!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "调色板不包含 RGB 值相同的两种颜色" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "调色板包含%i种 RGB 值相同的颜色。您真的要将它们合并到一个索引并且重新对齐画布" "吗?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "已索引" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "您正试图将图像%s保存到文件%s,这是无法实现的。我建议您将其保存为 PNG 格式文" "件。" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "您正试图保存的文件%s所用调色板的颜色数多于%d种。请使用另一种格式或将调色板颜" "色数减少为%d种。" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "您正试图保存多于 4096 种颜色的 XPM 文件。建议您或者使用另外一种格式, 或者将" "多色调图像分色为 4 位,或者减少颜色数。" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "无法载入剪贴板" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "无法保存剪贴板" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "此画布/调色板包含未保存的修改。您确定放弃这些修改吗?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "图像" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "您确定要退出吗?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/文件(_F)" #: src/mainwindow.c:4665 msgid "//New" msgstr "//新建" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//打开…" #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//保存" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//另存为…" #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//导出还原图像…" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//导出还原图像(反向)…" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//导出 ASCII 图案…" #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//导出 GIF 动画…" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//动作" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///配置" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//退出" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/编辑(_E)" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//撤消" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//重做" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//剪切" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//复制" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//复制到调色板" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//粘贴到中心" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//粘贴到新图层" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//粘贴" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//粘贴文本" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//粘贴文本 (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//粘贴调色板" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//载入剪贴板" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//保存剪贴板" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//从系统导入剪贴板" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//导出剪贴板到系统" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//选取图案…" #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//选取笔刷…" #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/查看(_V)" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//显示主工具栏" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//显示工具工具栏" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//显示设置工具栏" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//显示停靠" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//显示调色板" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//显示状态栏" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//切换为图像查看" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//图像居中" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//显示缩放格线" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//配置网格…" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//描摹图像…" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//查看窗口" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//水平分隔" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//同步查看窗口" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//全景窗口" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//图层窗口" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/图像(_I)" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//转换到 RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//转换到索引值…" #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//伸缩画布…" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//调整画布大小…" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//裁切" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//垂直翻转" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//水平翻转" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//顺时针旋转" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//逆时针旋转" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//自由旋转…" #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//倾斜…" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//信息…" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//首选项…" #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/选择(_S)" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//全选" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//全部不选(Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//套索选择" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//剪切套索选择区" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//描边选择" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//填充选择" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//描边椭圆" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//填充椭圆" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//水平渐变" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//垂直渐变" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//透明混色 A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//移动透明到遮罩" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//遮罩颜色 A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//取消遮罩颜色 A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//遮罩所有颜色" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//清除遮罩" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/调色板(_P)" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//载入…" #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//载入默认调色板" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//全部遮罩" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//无遮罩" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//交换 A 和 B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//编辑 A 和 B 的颜色…" #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "//抖动 A" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//调色板编辑器…" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//设置调色板大小…" #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//合并重复的颜色" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//移除未使用的颜色" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//建立量化…" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//颜色排序…" #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//调色板变换…" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/效果(_C)" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//变换颜色…" #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//反向" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//灰阶" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//灰度处理(伽玛修正)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//等量变换" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///左侧向下" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///右侧向下" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///顶端向右" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///底侧向右" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//边缘检测…" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//高斯差异…" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//锐化…" #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//钝化遮罩…" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//柔化…" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//高斯模糊…" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Kuwahara-Nagao 模糊…" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//浮雕" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//膨胀" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//腐蚀" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//菌化…" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/通道(_N)" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//新建…" #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//删除…" #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//编辑图像" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//编辑透明" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//编辑选择" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//编辑遮罩" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//隐藏图像" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//停用透明" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//停用选择" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//停用遮罩" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//结合 RGBA 操作" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//阈值…" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//解除关联透明" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//将透明作为外罩查看" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//配置外罩…" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/图层(_L)" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//新建图层" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//保存合成图像…" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//合并到新图层" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//移除所有图层" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//配置动画…" #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//预览动画…" #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//设置关键帧…" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//移除所有关键帧…" #: src/mainwindow.c:4929 msgid "/More..." msgstr "/更多…" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/帮助(_H)" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//文件" #: src/mainwindow.c:4933 msgid "//About" msgstr "//关于" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//重新绑定快捷键" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "转换到索引过的调色板" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "菌化效果" #: src/memory.c:4744 msgid "Rotating" msgstr "旋转" #: src/memory.c:5096 msgid "Free Rotation" msgstr "自由旋转" #: src/memory.c:5682 msgid "Scaling Image" msgstr "伸缩图像" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "计算唯一 RGB 像素" #: src/memory.c:6950 msgid "Applying Effect" msgstr "应用效果" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagao 过滤" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "倾斜" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "请稍等…" #: src/mygtk.c:189 msgid "STOP" msgstr "停止" #: src/mygtk.c:816 msgid "Browse" msgstr "浏览" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "伽马修正" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 位 RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "灰度" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "索引过的调色板" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "从剪贴板" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "抓取屏幕快照" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "新建图像" #: src/otherwindow.c:288 msgid "Width" msgstr "宽度" #: src/otherwindow.c:289 msgid "Height" msgstr "高度" #: src/otherwindow.c:290 msgid "Colours" msgstr "颜色" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "图案选择器" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "设置调色板大小" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "应用" #: src/otherwindow.c:599 msgid "Luminance" msgstr "亮度" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "亮度" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "到 A 的距离" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "A->B 投影" #: src/otherwindow.c:602 msgid "Frequency" msgstr "频率" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "调色板颜色排序" #: src/otherwindow.c:616 msgid "Start Index" msgstr "开始索引" #: src/otherwindow.c:617 msgid "End Index" msgstr "结束索引" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "反向排序" #: src/otherwindow.c:868 msgid "Contrast" msgstr "对比" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "色调分离" #: src/otherwindow.c:869 msgid "Gamma" msgstr "伽玛" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "变换颜色" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "显示明细" #: src/otherwindow.c:927 msgid "Store Values" msgstr "保存数值" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "调色板" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "自动预览" #: src/otherwindow.c:1006 msgid "Reset" msgstr "重置" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "新坐标位置与现在相同 - 无变化。" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "操作系统无法为此操作分配内存。" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "您未在首选项窗口中为此项操作分配足够的内存。" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "最近的邻居" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "双线性/区域映射" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "双线性" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "双立体" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "双立体边缘化" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "双立体优化" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "双立体锐化" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "宽 " #: src/otherwindow.c:1168 msgid "Height " msgstr "高 " #: src/otherwindow.c:1170 msgid "Original " msgstr "原值 " #: src/otherwindow.c:1176 msgid "New" msgstr "新值" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "偏移" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "居中" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "修复高宽比" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "清除" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "平铺效果" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "镜像平铺效果" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "镜像" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "配置" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "锐化缩小图像" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "伸缩画布" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "调整画布大小" #: src/otherwindow.c:1963 msgid "From" msgstr "从" #: src/otherwindow.c:1963 msgid "To" msgstr "到" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "缩放" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "调色板编辑器" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "配置外罩" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "颜色编辑器" #: src/otherwindow.c:2079 msgid "Limit" msgstr "限制" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "球体" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "角度" #: src/otherwindow.c:2080 msgid "Cube" msgstr "立方体" #: src/otherwindow.c:2110 msgid "Range" msgstr "范围" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "反向" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "颜色选择模式" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "不透明" #: src/otherwindow.c:2128 msgid "Border" msgstr "分界" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "透明" #: src/otherwindow.c:2129 msgid "Tile " msgstr "平铺 " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "智能网格" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "平铺网格" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "最小格线缩放" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "平铺宽" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "平铺高" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "配置网格" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "色彩空间" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "最大(Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "总和(L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "欧几里德(L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "差异度测量" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "精确转换" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "使用当前调色板" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN 量化(慢但质量更好)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu 量化(快速)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "最大 - 最小量化(适合小调色盘和抖动)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "无" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg(快速)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "抖动(效果)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "分散(效果)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "色域" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "弱化" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "强化" #: src/otherwindow.c:2385 msgid "Off" msgstr "关闭" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "单独/总和" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "单独/分割" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "长度/总和" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "长度/分割" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "建立量化" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "转换到索引" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "所使用的索引颜色" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "缩短调色板" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "基于直径的称量" #: src/otherwindow.c:2442 msgid "Dither" msgstr "抖动" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "减少渗色" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "蛇形扫描" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "误差传播,%" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "选择性误差传播" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "全误差精度" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "HSV 反向" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "常量" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "编辑渐变" #: src/otherwindow.c:2837 msgid "Points:" msgstr "点:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "反向" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "编辑自定义" #: src/otherwindow.c:3018 msgid "Linear" msgstr "线性的" #: src/otherwindow.c:3018 msgid "Radial" msgstr "放射状的" #: src/otherwindow.c:3018 msgid "Square" msgstr "方形的" #: src/otherwindow.c:3019 msgid "Angular" msgstr "有角的" #: src/otherwindow.c:3019 msgid "Conical" msgstr "锥形的" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "水平的" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "重复" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A 到 B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A 到 B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A 到 B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A 到 B (反向HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "仅 A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "自定义" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "当前到 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "仅当前" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "设置渐变" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "通道" #: src/otherwindow.c:3047 msgid "Length" msgstr "长度" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "重复长度" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "渐变类型" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "扩展类型" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "预览不透明度" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "距离" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "水平 " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "垂直线" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "未改变" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "描摹图像" #: src/otherwindow.c:3323 msgid "Source" msgstr "来源" #: src/otherwindow.c:3325 msgid "Origin" msgstr "位移" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "相对比例" #: src/otherwindow.c:3337 msgid "Display" msgstr "显示" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "保存图像 %s 中" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "加载 %s 图像中" #: src/png.c:850 msgid "Layer" msgstr "图层" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "%d/%d 的帧不能保存为%s,改为以 PNG 格式保存" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "压力" #: src/prefs.c:154 msgid "Current Device" msgstr "当前设备" #: src/prefs.c:431 msgid "Default System Language" msgstr "系统默认语言" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "简体中文" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "繁体中文" #: src/prefs.c:433 msgid "Czech" msgstr "捷克语" #: src/prefs.c:433 msgid "Dutch" msgstr "荷兰语" #: src/prefs.c:433 msgid "English (UK)" msgstr "英语(英国)" #: src/prefs.c:433 msgid "French" msgstr "法语" #: src/prefs.c:434 msgid "Galician" msgstr "加利西亚语" #: src/prefs.c:434 msgid "German" msgstr "德语" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "意大利语" #: src/prefs.c:435 msgid "Japanese" msgstr "日语" #: src/prefs.c:435 msgid "Polish" msgstr "波兰语" #: src/prefs.c:435 msgid "Portuguese" msgstr "葡萄牙语" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "葡萄牙语(巴西)" #: src/prefs.c:436 msgid "Russian" msgstr "俄语" #: src/prefs.c:436 msgid "Slovak" msgstr "斯洛伐克语" #: src/prefs.c:437 msgid "Spanish" msgstr "西班牙语" #: src/prefs.c:437 msgid "Swedish" msgstr "瑞典语" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "土耳其语" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X 热点" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y 热点" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "最近使用的文件" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "进度条沉默限制" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "画布宽度和高度" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "光标 X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "像素[I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "矩形选择区宽度和高度" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "撤销/重做" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "流畅" #: src/prefs.c:457 msgid "Preferences" msgstr "首选项" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "用于还原的最大内存(MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "最大撤销次数" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "图层共享还原内存(%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "默认使用伽马修正" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "优化透明方格" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "停用查看窗口透明" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "选择首选翻译语言\n" "\n" "您需要重启mtPaint\n" "让其完全生效" #: src/prefs.c:524 msgid "Language" msgstr "语言" #: src/prefs.c:529 msgid "Interface" msgstr "界面" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "灰度背景" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "选框跳越像素设置" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "最大全景窗口大小" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "粘贴时显示剪贴板图像" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "鼠标光标 = 工具" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "确认退出" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q 键退出 mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "改换工具时粘贴" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "工具配置对话框居中" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "新图像缩放设置为100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "鼠标滚轮 = 缩放" #: src/prefs.c:559 msgid "Use menu icons" msgstr "使用菜单图标" #: src/prefs.c:564 msgid "Files" msgstr "文件" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "读取16 位 TGA 为5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "以自下而上的行序写 TGA" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "可逆图像加载中" #: src/prefs.c:588 msgid "Paths" msgstr "路径" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "剪贴板文件" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "选取剪贴板文件" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML 浏览程序" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "选择浏览程序" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "索引手册位置" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "选择索引手册文件" #: src/prefs.c:605 msgid "Default Palette" msgstr "默认调色板" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "选择默认调色板" #: src/prefs.c:610 msgid "Default Patterns" msgstr "默认图案" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "选择默认图案" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "状态栏" #: src/prefs.c:633 msgid "Tablet" msgstr "绘图板" #: src/prefs.c:637 msgid "Device Settings" msgstr "设备设置" #: src/prefs.c:645 msgid "Configure Device" msgstr "配置设备" #: src/prefs.c:652 msgid "Tool Variable" msgstr "工具变量" #: src/prefs.c:654 msgid "Factor" msgstr "系数" #: src/prefs.c:680 msgid "Test Area" msgstr "测试区域" #: src/shifter.c:205 msgid "Frames" msgstr "帧" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "调色板变换" #: src/shifter.c:279 msgid "Start" msgstr "开始" #: src/shifter.c:281 msgid "Finish" msgstr "完成" #: src/shifter.c:330 msgid "Fix Palette" msgstr "修复调色板" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "动作" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "命令" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "配置文件动作" #: src/spawn.c:515 msgid "Execute" msgstr "运行" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "尝试运行 %2$s 时报告错误 %1$i" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "我无法找到文档。您需要从网上下载 mtPaint 手册并安装它,或者在首选项窗口中设置" "正确的路径。" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "运行 HTML 浏览器出现问题。您需要在首选项窗口中设置正确的程序名。" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB 立方体" #: src/toolbar.c:234 msgid "By image channel" msgstr "根据图像通道" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "渐变驱动" #: src/toolbar.c:236 msgid "Fill settings" msgstr "填充设置" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "顾及不透明模式" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "斑点配置" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "绘制的时间间隔" #: src/toolbar.c:298 msgid "Normal" msgstr "正常" #: src/toolbar.c:299 msgid "Colour" msgstr "颜色" #: src/toolbar.c:299 msgid "Saturate More" msgstr "更多饱和度" #: src/toolbar.c:300 msgid "Multiply" msgstr "叠加" #: src/toolbar.c:300 msgid "Divide" msgstr "分割" #: src/toolbar.c:300 msgid "Screen" msgstr "滤色" #: src/toolbar.c:300 msgid "Dodge" msgstr "减淡" #: src/toolbar.c:301 msgid "Burn" msgstr "加深" #: src/toolbar.c:301 msgid "Hard Light" msgstr "强光" #: src/toolbar.c:301 msgid "Soft Light" msgstr "柔光" #: src/toolbar.c:301 msgid "Difference" msgstr "差异" #: src/toolbar.c:302 msgid "Darken" msgstr "较暗" #: src/toolbar.c:302 msgid "Lighten" msgstr "较亮" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "颗粒提取" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "颗粒合并" #: src/toolbar.c:323 msgid "Blend mode" msgstr "混合模式" #: src/toolbar.c:846 msgid "More..." msgstr "更多…" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "连续模式" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "不透明模式" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "色调模式" #: src/toolbar.c:889 msgid "Tint +-" msgstr "色调 +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "混合模式" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "停用全部遮罩" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "渐变模式" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "设置工具栏" #: src/toolbar.c:1041 msgid "Cut" msgstr "剪切" #: src/toolbar.c:1042 msgid "Copy" msgstr "复制" #: src/toolbar.c:1043 msgid "Paste" msgstr "粘贴" #: src/toolbar.c:1045 msgid "Undo" msgstr "撤消" #: src/toolbar.c:1046 msgid "Redo" msgstr "重做" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "全景窗口" #: src/toolbar.c:1053 msgid "Paint" msgstr "绘制" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "随机" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "填充" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "直线" #: src/toolbar.c:1057 msgid "Smudge" msgstr "涂抹" #: src/toolbar.c:1058 msgid "Clone" msgstr "克隆" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "建立选区" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "多边形选择" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "放置渐变" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "套索选择" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "描边椭圆" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "填充椭圆" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "描边选择" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "填充选择" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "垂直翻转选择区域" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "水平翻转选择区域" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "顺时针旋转选择区域" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "逆时针旋转选择区域" #: src/viewer.c:132 msgid "About" msgstr "关于" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "文件:%s 无效 调色板未更新" #~ msgid "Distance to A+B" #~ msgstr "到 A+B 的距离" #~ msgid "Edit Frames" #~ msgstr "编辑帧" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "调色盘不包含足够的颜色来做合并" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "有太多相同的调色盘项目可以来缩小。" #~ msgid "/View/Command Line Window" #~ msgstr "/查看/命令列窗口" #~ msgid "Grid colour RGB" #~ msgstr "格线颜色RGB" #~ msgid "Zoom" #~ msgstr "缩放" #~ msgid "%i Files on Command Line" #~ msgstr "%i个文件在命令列上" mtpaint-3.40/po/tl.po0000644000175000000620000021061011647046423014037 0ustar muammarstaff# Tagalog translation for mtpaint # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-01-25 17:15+0000\n" "Last-Translator: yavinfour \n" "Language-Team: Tagalog \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-12-06 22:08+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Silipin ang Animation" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Paganahin" #: src/ani.c:695 msgid "Fix" msgstr "Ayusin" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Isara" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Error" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Hindi makagawa ng output directory" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Gumagawa na ng Animation Frames" #: src/ani.c:857 msgid "Unable to save image" msgstr "Hindi Mai-save ang Imahe" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Babala" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Hindi" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Oo" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Mag-set ng Key Frame" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Dapat ay meron kang 2 layers kahit papaano para makabuo ng animation" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Dapay ma-save ang mga layers file mo bago bumuo ng animation" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Isaayos ang Animation" #: src/ani.c:1064 msgid "Output Files" msgstr "Output Files" #: src/ani.c:1067 msgid "Start frame" msgstr "Panimulang frame" #: src/ani.c:1068 msgid "End frame" msgstr "Katapusang Frame" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Pabagal" #: src/ani.c:1071 msgid "Output path" msgstr "" #: src/ani.c:1072 msgid "File prefix" msgstr "" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Gumawa ng GIF frames" #: src/ani.c:1098 msgid "Positions" msgstr "Mga Posisyon" #: src/ani.c:1135 msgid "Cycling" msgstr "Pag-ikot" #: src/ani.c:1148 msgid "Save" msgstr "I-save" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Tignan" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Gumawa ng Frames" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Masyadong malaki ang imahe para ma-transform." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Palinawin ang mga Singit" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Palambutin ang Edge" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Magkaibang X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Blur na Gaussian" #: src/canvas.c:523 msgid "Radius" msgstr "Radius" #: src/canvas.c:524 msgid "Amount" msgstr "Dami" #: src/canvas.c:525 msgid "Threshold " msgstr "" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "" #: src/canvas.c:563 msgid "Outer radius" msgstr "Panlabas na Radius" #: src/canvas.c:564 msgid "Inner radius" msgstr "Panloob na Radius" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Gawing normal" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Pagkakaiba ng mga Gaussians" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Masyadong malaki ang imahe para sa pag-ikot na ito" #: src/canvas.c:668 msgid "Smooth" msgstr "Malambot" #: src/canvas.c:670 msgid "Free Rotate" msgstr "" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Hindi sapat ang memory para makabuo ng clipboard" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Ipakita ang Animasyon" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "Masyadong malaki ang file, dapat ay <= %i na haba at %i na taas" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Hindi maikarga ang file" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Hindi mabuksan ang file" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Hindi suportadong file format" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Meron nang file na: %s gusto mo ba siyang mapalitan?" #: src/canvas.c:1524 msgid "File Found" msgstr "Nakita ang file" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "HINDI" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "OO" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Index sa transparency" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Save Quality para sa JPEG (100=mataas)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "Kompresiyon ng PNG (0=Kung Wala)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "Kompresiyon ng TGA RLE" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "Kompresiyon ng JPEG2000 (0=Lossless)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Hotspot sa X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Format ng File" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Hindi Maa-undo" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Delay sa Animation" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Hindi mai-export ang mga undo image" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Hindi mai-export ang ASCII file" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Hindi mai-save ang file: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Ikarga ang Image File" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "I-save ang Image File" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Ikarga ng Palette File" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "I-save ang Palette File" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "I-export" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "I-export ang mga Undo Image (nakabaligtad)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "I-export ang ASCII Art" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "I-save ang mga Layer Files" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Pumili ng frames directory" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "" "Dapat ay meron kang kahit isang frame para makagawa ng GIF na animated " "(gumagalaw)." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "I-export ang GIF animation" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Ikarga ang Tsanel" #: src/canvas.c:2140 msgid "Save Channel" msgstr "I-save ang Tsanel" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "I-save ang Composite na Imahe" #: src/channels.c:236 msgid "Cleared" msgstr "Nilinis" #: src/channels.c:237 msgid "Set" msgstr "Itakda" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Itakda ang kulay A radius B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Itakta ang blend A hanggang B" #: src/channels.c:240 msgid "Image Red" msgstr "" #: src/channels.c:241 msgid "Image Green" msgstr "" #: src/channels.c:242 msgid "Image Blue" msgstr "" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alpa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Seleksyon" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maskara" #: src/channels.c:256 msgid "Create Channel" msgstr "Gumawa ng Tsanel" #: src/channels.c:262 msgid "Channel Type" msgstr "Uri ng Tsanel" #: src/channels.c:269 msgid "Initial Channel State" msgstr "" #: src/channels.c:273 msgid "Inverted" msgstr "Binaligtad" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Huwag Ituloy" #: src/channels.c:316 msgid "Delete Channels" msgstr "Burahin ang mga Tsanel" #: src/channels.c:373 msgid "Threshold Channel" msgstr "" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Pula" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Berde" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Asul" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Hue" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Tinkad" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "" #: src/font.c:939 msgid "Creating Font Index" msgstr "Gumagawa ng Font Index" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" "Dapat ay pumili ka ng kahit isang directory mara makahanap ng mga font." #: src/font.c:1468 msgid "Font" msgstr "Font" #: src/font.c:1469 msgid "Style" msgstr "Istilo" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Sukat" #: src/font.c:1471 msgid "Filename" msgstr "Pangalan ng file" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Directory" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Idikit ang Teksto" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Teksto" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Ilagay ang Teksto Dito" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Baliktarin" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Kulay ng Likuran =" #: src/font.c:1805 msgid "Oblique" msgstr "Tabinge" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Anggulo ng pag-ikot" #: src/font.c:1831 msgid "Font Directories" msgstr "Directory ng Font" #: src/font.c:1836 msgid "New Directory" msgstr "Bagong directory" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Piliin ang Directory" #: src/font.c:1848 msgid "Add" msgstr "Magdagdag" #: src/font.c:1852 msgid "Remove" msgstr "Alisin" #: src/font.c:1856 msgid "Create Index" msgstr "Gumawa ng Index" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "" #: src/fpick.c:771 msgid "Create Directory" msgstr "" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Lumikha" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "" #: src/fpick.c:838 msgid "Unable to delete" msgstr "" #: src/fpick.c:843 msgid "Unable to rename" msgstr "" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "" #: src/fpick.c:939 msgid "Up" msgstr "" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "" #: src/fpick.c:1044 msgid "Name" msgstr "" #: src/fpick.c:1046 msgid "Type" msgstr "" #: src/fpick.c:1047 msgid "Modified" msgstr "" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Pangkalahatan" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Shortcut sa kibord" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Shortcut sa Mouse" #: src/help.c:28 msgid "Credits" msgstr "Mga Pagkilala" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "Ang mtPaint ay isang libreng software; pwede mo siyang ipakalat at/o kaya " "baguhin ayon sa mga tuntunin ng GNU General Public License na inilimbag ng " "Free Software Foundation; either version 3 of the License, or (at your " "option) any later version.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Merong kumpetong dokyumentasyon ng lahat ng pwedeng magawa ng mtPaint at ito " "ay nasa handbook. Kung wala ka pa nito, pwede mo siyang ma-download mula sa " "websayt ng mtPaint\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Gumawa ng bagong imahe" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Magbukas ng Image" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S I-Save ang Imahe" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Umalis sa Program\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr "" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr "" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Kopyahin ang seleksyon patungo sa clipboard" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr "" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr "" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr "" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr "" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr "" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr "" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr "" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr "" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr "" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr "" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr "" #: src/help.c:85 msgid " L Layers Window\n" msgstr "" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr "" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr "" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr "" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr "" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr "" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr "" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr "" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr "" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Tulong" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr "" #: src/help.c:112 msgid " F3 Choose Brush" msgstr "" #: src/help.c:113 msgid " F4 Paint Tool" msgstr "" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr "" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr "" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr "" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr "" #: src/help.c:118 msgid " F9 Selection Tool" msgstr "" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr "" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr "" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr "" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" #: src/help.c:126 msgid " Page Up Scale Image" msgstr "" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr "" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr "" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" #: src/help.c:150 msgid "Authors\n" msgstr "Mga May-Akda\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Orihinal na awtor at tagapamahala hanggang sa version 3.00, " "kasalukuyang kontributor pa rin." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Ang gumawa ng Gifsicle na kailangan para makabuo at " "makatingin ng mga animated GIF files http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Mga Pag-sasalin ng Wika\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galician - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Aleman - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Hapon - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polish - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portuges - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Ruso - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Slovak - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwanese Chinese - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turko - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Impormasyon" #: src/info.c:290 msgid "Memory" msgstr "Memory" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Kabuuang memory para sa main + mga undo na imahe" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Clipboard" #: src/info.c:311 msgid "Unused" msgstr "Hindi nagamit" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Clipboard = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Clipboard = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Magkaibang RGB pixels" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Mga Layer" #: src/info.c:343 msgid "Total layer memory usage" msgstr "" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histogram sa Kulay" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Kabuuang index ng kulay - %i ng %i ang nagagamit" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "" #: src/info.c:407 msgid "Orphans" msgstr "Mga Ampon" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" #: src/layer.c:70 msgid "Background" msgstr "Likuran" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Binago)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Walang Pamagat" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Gusto mo bang murahin ang layer na %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Kanselahin ang operasyon." #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Gusto mo ba talagang burahin ang lahat ng mga leyer?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Hindi ka na pwedeng magdadag pa ng mga layer" #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Bagong Layer" #: src/layer.c:1160 msgid "Raise" msgstr "" #: src/layer.c:1161 msgid "Lower" msgstr "" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "" #: src/layer.c:1164 msgid "Delete Layer" msgstr "" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "" #: src/layer.c:1268 msgid "Layer Name" msgstr "Pangalan ng Layer" #: src/layer.c:1269 msgid "Position" msgstr "Posisyon" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Ipakita lahat ng mga layer sa main window" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "naka-index" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Hindi mai-karga ang clipboard" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Hindi mai-save ang clipboard" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Ang kanbas/paleyt na ito ay may mga nabago at hindi pa nai-sasave. Gusto mo " "bang bali-walain ang mga nabago?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Imahe" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Gusto mo ba talagang umalis?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "" #: src/mainwindow.c:4665 msgid "//New" msgstr "" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "" #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "" #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "" #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Putulin" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopyahin" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Idikit sa Gitna" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Idikit sa Bagong Layer" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Idikit" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Idikit ang Teksto" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Ikarga ang Clipbord" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//I-save ang Clipboard" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "" #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Pumili ng Brush ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Tignan" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Ipakita ang Main Toolbar" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Ipakita ang Tools Toolbar" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Ipakita ang Settings Toolbar" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Ipakita ang Palette" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Ipakita ang Istatus Bar" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Igitna ang Imahe" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Pahalang na hati" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Ipokus ang View Window" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "" #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "" #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "" #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "" #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "" #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "" #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "" #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "" #: src/mainwindow.c:4868 msgid "//Invert" msgstr "" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "" #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "" #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "" #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "" #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "" #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "" #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "" #: src/mainwindow.c:4933 msgid "//About" msgstr "" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Epektong Mala-Bakterya" #: src/memory.c:4744 msgid "Rotating" msgstr "Iniikot" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Libreng Pag-iikot" #: src/memory.c:5682 msgid "Scaling Image" msgstr "" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Ginagawa ang Effect" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Maghintay lang po ..." #: src/mygtk.c:189 msgid "STOP" msgstr "ITIGIL" #: src/mygtk.c:816 msgid "Browse" msgstr "Magtingin-tingin" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Inayos ng Gama" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit na RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Greyscale" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Mula sa Klipbord" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Dumukot ng Iskrinshat" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Bagong Imahe" #: src/otherwindow.c:288 msgid "Width" msgstr "Lapad" #: src/otherwindow.c:289 msgid "Height" msgstr "Taas" #: src/otherwindow.c:290 msgid "Colours" msgstr "Mga Kulay" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "I-apply" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Pagka-liwanag" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Pagka-liwanag" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Layo patungo sa A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frequency" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Simulan ang Indes" #: src/otherwindow.c:617 msgid "End Index" msgstr "Tapusin ang Index" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "" #: src/otherwindow.c:868 msgid "Contrast" msgstr "" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterize" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gama" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Ipakita ang Detalye" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palette" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Ibalik sa Dati" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Pinakamalapit na Kapitbahay" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "" #: src/otherwindow.c:1167 msgid "Width " msgstr "Lapad " #: src/otherwindow.c:1168 msgid "Height " msgstr "Taas " #: src/otherwindow.c:1170 msgid "Original " msgstr "Orihinal " #: src/otherwindow.c:1176 msgid "New" msgstr "Panibago" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Gitna" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Burahin" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Salamin" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Mga Kaayusan" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Ibahin ang Size ng Kanbas" #: src/otherwindow.c:1963 msgid "From" msgstr "Mula sa" #: src/otherwindow.c:1963 msgid "To" msgstr "Hanggang" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Baguhin ang Laki" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Editor ng Palette" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Editor ng Kulay" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Hangganan" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Bola" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Anggulo" #: src/otherwindow.c:2080 msgid "Cube" msgstr "" #: src/otherwindow.c:2110 msgid "Range" msgstr "" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "Gilid" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Transparent" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Matalinong grid" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Lapad ng Tile" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Taas ng Tile" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Pinakamalaki (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Kabuuan (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Saktong Konbersyon" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Wala" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (madalian)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Dithered (effect)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Pakalat (effect)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamut" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "" #: src/otherwindow.c:2385 msgid "Off" msgstr "Off" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Putulin ang paleyt" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "" #: src/otherwindow.c:2837 msgid "Points:" msgstr "" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "" #: src/otherwindow.c:3018 msgid "Linear" msgstr "" #: src/otherwindow.c:3018 msgid "Radial" msgstr "" #: src/otherwindow.c:3018 msgid "Square" msgstr "Parisukat" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "" #: src/otherwindow.c:3021 msgid "A to B" msgstr "Mula A hanggang B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "Mula A hanggang B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "Mula A hanggang B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "Mula A hanggang B (pabaligtad na HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "A lang" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "" #: src/otherwindow.c:3024 msgid "Current only" msgstr "" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "" #: src/otherwindow.c:3047 msgid "Length" msgstr "Haba" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Ulitin ang haba" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Pahalang " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Patindig" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Hindi nagbago" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "Pinanggalingan" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Pinagmulan" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "Display" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Sinasave na ang imaheng %s" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Kinakarga na ang imaheng %s" #: src/png.c:850 msgid "Layer" msgstr "Leyer" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Presyur" #: src/prefs.c:154 msgid "Current Device" msgstr "" #: src/prefs.c:431 msgid "Default System Language" msgstr "" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Intsik (Simple)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Intsik (Taiwanese)" #: src/prefs.c:433 msgid "Czech" msgstr "Czech" #: src/prefs.c:433 msgid "Dutch" msgstr "Dutch" #: src/prefs.c:433 msgid "English (UK)" msgstr "Ingles (UK)" #: src/prefs.c:433 msgid "French" msgstr "Pranses" #: src/prefs.c:434 msgid "Galician" msgstr "Galisyiano" #: src/prefs.c:434 msgid "German" msgstr "Aleman" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "Hapones" #: src/prefs.c:435 msgid "Polish" msgstr "Polish" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portuges" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portuges (Pam-Brazil)" #: src/prefs.c:436 msgid "Russian" msgstr "Ruso" #: src/prefs.c:436 msgid "Slovak" msgstr "Islovak" #: src/prefs.c:437 msgid "Spanish" msgstr "Kastila" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turko" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X na hotspot" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y na hotspot" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Mga Files na Kasalukuyang Ginamit" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometry ng Kanbas" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Cursor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Selection Geometry" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Daloy" #: src/prefs.c:457 msgid "Preferences" msgstr "Mga kagustuhan" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Pumili ng gustong lenguahe\n" "\n" "Dapat i-restart mo ang mtPaint\n" "para gumana ito" #: src/prefs.c:524 msgid "Language" msgstr "Wika/Lenguahe" #: src/prefs.c:529 msgid "Interface" msgstr "Interpeys" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Greyscale na bakdrop" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Ipakita ang klipbord habang nagdidikit" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Gumamit ng menu icons" #: src/prefs.c:564 msgid "Files" msgstr "Mga Files" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Browser Program sa HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Pumili ng Browser Program" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Lokasyon ng Handbook index" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Pumili ng Handbook Index File" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Istatus Bar" #: src/prefs.c:633 msgid "Tablet" msgstr "Tabletas" #: src/prefs.c:637 msgid "Device Settings" msgstr "Device Settings" #: src/prefs.c:645 msgid "Configure Device" msgstr "" #: src/prefs.c:652 msgid "Tool Variable" msgstr "" #: src/prefs.c:654 msgid "Factor" msgstr "Paktor" #: src/prefs.c:680 msgid "Test Area" msgstr "Test Area" #: src/shifter.c:205 msgid "Frames" msgstr "Mga Preym" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "" #: src/shifter.c:279 msgid "Start" msgstr "Simulan" #: src/shifter.c:281 msgid "Finish" msgstr "Wakas" #: src/shifter.c:330 msgid "Fix Palette" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Aksyon" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Command" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "Isagawa" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "" #: src/toolbar.c:234 msgid "By image channel" msgstr "" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "" #: src/toolbar.c:236 msgid "Fill settings" msgstr "" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Normal" #: src/toolbar.c:299 msgid "Colour" msgstr "Kulay" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiply" #: src/toolbar.c:300 msgid "Divide" msgstr "Hatiin" #: src/toolbar.c:300 msgid "Screen" msgstr "Screen" #: src/toolbar.c:300 msgid "Dodge" msgstr "" #: src/toolbar.c:301 msgid "Burn" msgstr "Sungin" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Malakas na Ilaw" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Mahinang Ilaw" #: src/toolbar.c:301 msgid "Difference" msgstr "Pagkakaiba" #: src/toolbar.c:302 msgid "Darken" msgstr "Padilimin" #: src/toolbar.c:302 msgid "Lighten" msgstr "" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "" #: src/toolbar.c:889 msgid "Tint +-" msgstr "" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "" #: src/toolbar.c:1041 msgid "Cut" msgstr "Putulin" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopyahin" #: src/toolbar.c:1043 msgid "Paste" msgstr "Idikit" #: src/toolbar.c:1045 msgid "Undo" msgstr "Ibalik" #: src/toolbar.c:1046 msgid "Redo" msgstr "Gawin muli" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "" #: src/toolbar.c:1053 msgid "Paint" msgstr "I-pinta" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Balasahin" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Deretsong linya" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Punasan" #: src/toolbar.c:1058 msgid "Clone" msgstr "Gayahin" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Bumuo ng Seleksyon" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Polygon na Seleksyon" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Ilagay ang Gradient" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Seleksyong Lasso" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Ellipse na Outliine" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Ellipse na may Laman" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Selekyiong Outline" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Baligtarin ang Seleksyon ng Patayo" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Baligtarin ang Seleksyon ng Palihis" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Iikot ang Seleksyon ng Pa-clockwise" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Iikot ang Seleksyon ng Pa-counterclockwise" #: src/viewer.c:132 msgid "About" msgstr "Tungkol dito" #~ msgid "Distance to A+B" #~ msgstr "Layo patungo sa A+B" mtpaint-3.40/po/sv.po0000644000175000000620000024111211647046423014051 0ustar muammarstaff# Swedish translation for mtpaint # Copyright (c) (c) 2005 Canonical Ltd, and Rosetta Contributors 2005 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2005. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-02-13 14:54+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-02-14 18:20+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Förhansvisning Animation" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Spela upp" #: src/ani.c:695 msgid "Fix" msgstr "Rätta till" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Stäng" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Fel" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Kunde inte skapa utdatakatalogen" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Skapar Animationsbildrutor" #: src/ani.c:857 msgid "Unable to save image" msgstr "Kunde inte spara bild" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Varning" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Är du säker på att du vill rensa all positions och cykeldata för alla lager?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Nej" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Ja" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Sätt Nyckelbildruta" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Du måste ha minst 2 lager för att skapa en animering" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Du måste spara din lagerfil innan en animering skapas" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Konfigurera animering" #: src/ani.c:1064 msgid "Output Files" msgstr "Utdata Filer" #: src/ani.c:1067 msgid "Start frame" msgstr "Startruta" #: src/ani.c:1068 msgid "End frame" msgstr "Slutruta" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Fördröjning" #: src/ani.c:1071 msgid "Output path" msgstr "Sökväg för utmatning" #: src/ani.c:1072 msgid "File prefix" msgstr "Filprefix" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Skapa gifbildrutor" #: src/ani.c:1098 msgid "Positions" msgstr "Positioner" #: src/ani.c:1135 msgid "Cycling" msgstr "" #: src/ani.c:1148 msgid "Save" msgstr "Spara" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Förhandsvisa" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Skapa Bildrutor" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Bilden är för stor för att transformera." #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Gradient" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfologiska" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Hitta Kanter" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Gör Kanter Skarpare" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Gör Kanter Mjukare" #: src/canvas.c:481 msgid "Different X/Y" msgstr "DIfferens X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Gaussisk oskärpa" #: src/canvas.c:523 msgid "Radius" msgstr "Radie" #: src/canvas.c:524 msgid "Amount" msgstr "Mängd" #: src/canvas.c:525 msgid "Threshold " msgstr "Tröskelvärde " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Oskarp mask" #: src/canvas.c:563 msgid "Outer radius" msgstr "Yttre radie" #: src/canvas.c:564 msgid "Inner radius" msgstr "Innerradie" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalisera" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Gaussiandifferens" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Kuwahara-Nagao Oskärpa" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Bilden är för stor för denna rotering." #: src/canvas.c:668 msgid "Smooth" msgstr "Mjuk" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Fri Rotering" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Inte tillräckligt mycket minne för att skapa urklipp" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Ogiltig kanalfil." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Visa animering" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Detta är en animerad %s-fil." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "Filen är för stor, måste vara <= till bredd=%i höjd=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Kunde inte läsa in filen" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Filimportsbiblioteket avslutades p.g.a. ett problem med fil (möjligen " "beroende på korrupt fildata eller avskärd fil). Jag har lyckats ladda en del " "data eftersom huvudet verkar korrekt, men jag skulle reckommendera att spara " "bilden till en ny fil för att försäkra att detta inte händer igen." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Kan inte öppna filen" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Filformatet stöds inte" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Filen %s finns redan. Vill du skriva över den?" #: src/canvas.c:1524 msgid "File Found" msgstr "Filen hittades" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NEJ" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "JA" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Genomskinlighetsindex" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Kvalitet på JPEG-fil (100=Hög)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG-komprimering (0=ingen)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE-komprimering" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000-komprimering (0=förlustfri)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Filformat" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Ångras" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Animationsfördröjning" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Kunde inte exportera ångra-historik" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Kunde inte exportera ASCII-filen" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Kunde inte spara filen: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Läs in bildfil" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Spara bildfil" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Läs in palettfil" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Spara palettfil" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Exportera Ångra-historik" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Exportera Ångra-historik (omvänd)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "Du måste ha 16 eller mindre palettfärger för att exportera ASCII-grafik." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportera ASCII-grafik" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Spara lagerfiler" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Välj katalog för bildrutor" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Du måste spara minst en bildruta för att skapa en animerad GIF." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exportera GIF-animering" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Läs in kanal" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Spara kanal" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Spara sammansatt bild" #: src/channels.c:236 msgid "Cleared" msgstr "Rensad" #: src/channels.c:237 msgid "Set" msgstr "Ange" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Sätt färg A omkrets B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Sätt blandning A till B" #: src/channels.c:240 msgid "Image Red" msgstr "Bild Röd" #: src/channels.c:241 msgid "Image Green" msgstr "Bild Grön" #: src/channels.c:242 msgid "Image Blue" msgstr "Bild Blå" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Markering" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Mask" #: src/channels.c:256 msgid "Create Channel" msgstr "Skapa kanal" #: src/channels.c:262 msgid "Channel Type" msgstr "Kanaltyp" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Ursprunglig kanalinställning" #: src/channels.c:273 msgid "Inverted" msgstr "Inverterad" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Avbryt" #: src/channels.c:316 msgid "Delete Channels" msgstr "Ta bort kanaler" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Tröskel kanal" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Röd" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Grön" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Blå" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Nyans" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Mättnad" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Värde" #: src/cpick.c:902 msgid "Hex" msgstr "Hex" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacitet" #: src/font.c:939 msgid "Creating Font Index" msgstr "Skapar typsnittsindex" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Du måste välj minst en katalog att söka i efter typsnitt." #: src/font.c:1468 msgid "Font" msgstr "Typsnitt" #: src/font.c:1469 msgid "Style" msgstr "Stil" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Storlek" #: src/font.c:1471 msgid "Filename" msgstr "Filnamn" #: src/font.c:1471 msgid "Face" msgstr "Typsnitt" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Katalog" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Klistra in text" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Text" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Ange text här" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Kantutjämning" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invertera" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Bakgrundsfärg =" #: src/font.c:1805 msgid "Oblique" msgstr "Oblik" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Vinkel på rotering =" #: src/font.c:1831 msgid "Font Directories" msgstr "Typsnittskataloger" #: src/font.c:1836 msgid "New Directory" msgstr "Ny katalog" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Välj katalog" #: src/font.c:1848 msgid "Add" msgstr "Lägg till" #: src/font.c:1852 msgid "Remove" msgstr "Ta bort" #: src/font.c:1856 msgid "Create Index" msgstr "Skapa index" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Kunde inte komma åt katalogen %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Ta bort" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Byt namn" #: src/fpick.c:771 msgid "Create Directory" msgstr "Skapa katalog" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Ange nytt filnamn" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Ange namnet på nya katalogen" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Skapa" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Vill du verkligen ta bort \"%s\"?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Kunde inte ta bort" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Kunde inte byta namn" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Kunde inte skapa katalogen" #: src/fpick.c:939 msgid "Up" msgstr "Uppåt" #: src/fpick.c:940 msgid "Home" msgstr "Hem" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Skapa ny katalog" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Visa dolda filer" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Skiftlägesokänslig sortering" #: src/fpick.c:1044 msgid "Name" msgstr "Namn" #: src/fpick.c:1046 msgid "Type" msgstr "Typ" #: src/fpick.c:1047 msgid "Modified" msgstr "Ändrad" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Allmänt" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Tangentbordsgenvägar" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Musgenvägar" #: src/help.c:28 msgid "Credits" msgstr "Tack till" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright © 2004-2011 Upphovsmännen\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Se \"Tack till\"-avsnittet för en lista över upphovsmännen.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint är fri programvara. Du kan distribuera det och/eller modifiera det " "under villkoren i GNU General Public License, publicerad av Free Software " "Foundation, antingen version 3 eller (om du så vill) någon senare version.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint distribueras i hopp om att det ska vara användbart, men UTAN NÅGON " "SOM HELST GARANTI, även utan underförstådd garanti om SÄLJBARHET eller " "LÄMPLIGHET FÖR NÅGOT SPECIELLT ÄNDAMÅL. Se GNU General Public License för " "ytterligare information.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint är ett enkelt ritprogram som använder GTK+1/2 och är designat för " "att skapa ikoner och bildpunktsbaserad grafik. Det kan redigera indexerade " "paletter eller 24-bitars RGB-bilder och erbjuder grundläggande verktyg för " "att rita och ändra paletter. Det innehåller även flera andra kraftfullare " "funktioner som kanaler, lager och animering. På grund av dess enkelhet och " "avsaknad av beroenden så fungerar det bra på GNU/Linux, Windows och äldre PC-" "datorer.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Det finns fullständig dokumentation över mtPaints funktioner i en handbok. " "Om du inte redan har den så kan du hämta den från mtPaints webbplats.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Om du tycker om mtPaint och vill hålla dig uppdaterad med nya utgåvor, eller " "om du vill ge förslag på ändringar, så kan sändlistorna vara intressanta för " "dig:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Skapa ny bild" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Öppna bild" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Spara bild" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Avsluta programmet\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Markera hela bilden" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Markera ingenting, avbryt inklistringsruta" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Kopiera markering till urklipp" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Kopiera markering till urklipp och rita sedan ut " "aktuellt mönster till markeringsytan" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Klistra in urklipp till mitten av aktuell vy" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" " Ctrl-K Klistra in urklipp till platsen den kopierades från" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return Verkställ inklistring till rityta" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Piltangenter Ritläge - Flytta muspekaren" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Piltangenter Markeringsläge - Flytta markeringsrutan eller " "inklistringsrutan med en bildpunkt" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+Piltangenter Knuffa muspekaren, urvalsboxen eller inklistringsboxen " "med x pixlar - x är definierat i Inställningsfönstret" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Piltangenter Flytta lager eller ändra storlek på urvalsboxen" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ eller ] Ändra färg A till nästa eller föregående färg i paletten" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ eller ] Ändra färg A till nästa eller föregående färg i " "paletten\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Beskär bilden till markeringen" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Ändra bilden till gråskala" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G Ändra bilden till gråskala (Tillrättad gamma)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Rita en rektangel runt det valda området med vald " "fyllning" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Fyll det valda området med vald fyllning" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr "" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Redigera alla palettfärger\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Inställningar" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Information\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Ångra senaste åtgärd" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Gör om en ångrad åtgärd\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Visningsfönster" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Lagerfönster\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Rita öppet pilhuvud vid användande av linjeverktyget " "(storlek sätts av flödesinställning)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Rita stängt pilhuvud vid användande av linjeverktyget " "(storlek sätts av flödesinställning)\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Huvudredigeringsfönster - Zooma in" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Huvudredigeringsfönster - Zooma ut" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Visningsfönster - Zooma in" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Visningsfönster - Zooma ut\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% zoom" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% zoom" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% zoom" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% zoom" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% zoom" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% zoom" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% zoom" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% zoom" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% zoom\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Redigera bildkanal" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Redigera alfakanal" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Redigera markeringskanal" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Redigera maskkanal\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Hjälp" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Välj mönster" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Välj pensel" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Ritverktyg" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Växla huvudverktygsrad" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Växla Verktygsrad" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Växla Inställningsrad" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Växla palett" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Markeringsverktyg" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Växla Dockningsområde\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Spara aktuellt urklipp till fil 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Läs in urklipp från fil 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Ställ in opacitet till 10%, 20%, ... , 100% (huvud- " "eller numeriska tangenter)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + eller = Öka opacitet med 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Minska opacitet med 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Visa eller dölj huvudfönsrets meny/verktygsrad/statusrad/" "palett" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up Skala bild" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down Ändra storlek på bildens rityta" #: src/help.c:128 msgid " End Pan Window" msgstr " End Panorera Fönster" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Vänster knapp Rita till kanvas med valt verktyg" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Mittknappen Väljer punkten som kommer att bli bildens center " "efter nästa zoom" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Höger knapp Utför inklistring till kanvas / Sluta rita linje / " "Avbryt val\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Skrollhjulet I GITK+2 kan användaren välja att låta scrollhjulet " "zooma in och ut i Inställningsfönstret\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+Vänster knapp Välj färg A från där muspekaren är" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+Mittenknappen Skapa färg A/B och mönster baserat på RGB-färg i A " "(Endast för RGB-bilder)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Höger knapp Välj färg B från där muspekaren är" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr " Ctrl+Skrollhjul Skorlla huvudfönstret höger eller vänster\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Höger knapp Väljer den punkt som kommer att vara center av bilden " "efter nästa zoom\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "Du kan låsa fast X/Y kordinaterna medans du flyttar musen:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift Begränsa musrörelser till vertikal linje" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl Begränsa musrörelser till horisontel linje" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint underhålls av Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Följande personer (i alfabetisk ordning) har bidragit direkt till projektet " "och är därför värda ett stort tack för deras generösitet och hårda arbete:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Upphovsmän\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - Bidragande utvecklare för version 2.30. Huvudutvecklare och " "ansvarig från version 3.00 till nuvarande." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Ursprunglig upphovsman och ansvarig upp till version 3.00, " "stundtals bidragsgivare efter det." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Skrev Wu-kvantiseringsmetoden - se wu.c för mer information.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Allmänna bidrag (återkoppling och idéer för förbättringar om inte annat har " "angivits)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Designade om webbplatsen i april 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Skapade Gifsicle som behövs för att skapa och visa animerade " "GIF-filer, http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - manualsida, Launchpad/Rosetta-" "registrering" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Översättningar\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brasilisk portugisiska - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Tjeckiska - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Nederländska - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Franska - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galiciska - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Tyyska - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italienska - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Japanska - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polska - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugisiska - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Ryska - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Förenklad kinesiska - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Slovakiska - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Spanska - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Svenska - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwanesisk kinesiska - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turkiska - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Information" #: src/info.c:290 msgid "Memory" msgstr "Minne" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Totalt minne för huvud + ångra-bilder" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Ångra / Återskapa / Max nivåer använda" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Urklipp" #: src/info.c:311 msgid "Unused" msgstr "Oanvänt" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Urklipp = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Urklipp = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Unika RGB pixlar" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Lager" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Totalt använt minne för lager" #: src/info.c:350 msgid "Colour Histogram" msgstr "Färghistogram" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Färgindexnummer totalbeloppen - %i av %i används" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "" #: src/info.c:407 msgid "Orphans" msgstr "" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Kunde inte hitta hemkatalogen. Använder aktuell katalog som hemkatalog." #: src/layer.c:70 msgid "Background" msgstr "Bakgrund" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Ändrad)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Namnlös" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Vill du verkligen ta bort lagret %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Ett eller flera av lagren innehåller ändringar som inte har sparats. Vill du " "verkligen förlora dessa ändringar?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Avbryt åtgärd" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Förlora ändringar" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d lager gick inte att läsa in" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Ett eller flera av bildlagren har inte sparats. Du måste spara varje bild " "individuellt innan du sparar lagrens textfil för att kunna läsa in denna " "kompositbild i framtiden." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Vill du verkligen ta bort alla lagren?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Du kan inte lägga till fler lager." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nytt lager" #: src/layer.c:1160 msgid "Raise" msgstr "Höj" #: src/layer.c:1161 msgid "Lower" msgstr "Sänk" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplicera lager" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centrera lager" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Ta bort lager" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Stäng lagerfönster" #: src/layer.c:1268 msgid "Layer Name" msgstr "Lagernamn" #: src/layer.c:1269 msgid "Position" msgstr "Position" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Transparent färg" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Visa alla lager i huvudfönstret" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Det fanns inga oanvända färger att ta bort!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Paletten innehåller inte två färger som har identiska RGB-värden" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "Paletten innehåller %i färger som har identiska RGB-värden. Vill du " "verkligen sammanfoga dem till ett index och justera om ritytan?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "indexerad" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Du försöker att spara en %s-bild till en %s-fil, vilket inte är möjligt. Jag " "föreslår att du sparar med en PNG-ändelse." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Du försöker att spara en %s-fil med en palett med fler än %d färger. Använd " "antingen ett annat format eller minska paletten till %d färger." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Du försöker att spara en XPM-fil med fler än 4096 färger. Använd antingen " "ett annat format eller posterisera bilden till 4 bitar, annars minska " "antalet färger." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Kunde inte läsa in urklipp" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Kunde inte spara urklipp" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Denna rityta/palett innehåller ändringar som inte har sparats. Vill du " "verkligen förlora dessa ändringar?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Bild" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Vill du verkligen avsluta?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Arkiv" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Ny" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Öppna ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Spara" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Spara som ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Exportera Ångra-historik ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Exportera Ångra-historik (omvänd) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportera ASCII-grafik ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportera animerad GIF ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Åtgärder" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Konfigurera" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Avsluta" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Redigera" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Ångra" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Gör om" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Klipp ut" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopiera" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Kopiera till palett" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Klistra in i mitten" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Klistra in i nytt lager" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Klistra in" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Klistra in text" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Klistra in text (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Klistra in palett" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Läs in urklipp" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Spara urklipp" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importera urklipp från systemet" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Exportera urklipp till systemet" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Välj mönster ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Välj pensel ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Visa" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Visa huvudverktygsrad" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Visa verktygsrad" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Visa inställningsrad" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Visa docka" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Visa palett" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Visa statusrad" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Växla bildvy" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Centrera bild" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Konfigurera rutnät ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Visningsfönster" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Fokusera visningsfönster" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Lagerfönster" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Bild" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Konvertera till RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Konvertera till indexerad ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Beskär" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Vänd vertikalt" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Vänd horisontellt" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Rotera medsols" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Rotera motsols" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Fri rotering ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Inställningar ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Markering" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Markera allt" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Markera ingenting (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Markera med lasso" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Konturmarkering" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Flytta alfa till mask" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Maskera alla färger" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Töm mask" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Palett" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Läs in ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Läs in standard" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Maskera alla" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Maskera inget" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Växla A & B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Redigera färg A & B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Palettredigerare ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Ställ in palettstorlek ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Slå samman dubbletta färger" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Ta bort oanvända färger" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Skapa kvantiserad ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Sortera färger ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Palettväxlare ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Effe_kter" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformera färg ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invertera" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Gråskala" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Gråskala (Gamma-korrigerad)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Isometrisk transformering" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Vänster sida ner" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Höger sida ner" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Övre sidan åt höger" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Nedre sidan åt höger" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Gör skarp ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Gaussisk oskärpa ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Kuwahara-Nagao-oskärpa ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Ka_naler" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Ny ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Ta bort ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Redigera bild" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Redigera alfa" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Redigera markering" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Redigera mask" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Dölj bild" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Inaktivera alfa" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Inaktivera markering" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Inaktivera mask" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Tröskelvärde ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Lager" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nytt lager" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Ta bort alla lager" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Konfigurera animering ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Förhandsvisa animering ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "" #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Mer..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Hjälp" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Dokumentation" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Om" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Konverterar till indexerad palett" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Bakterie-effekt" #: src/memory.c:4744 msgid "Rotating" msgstr "Roterar" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Fri rotering" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Skalar bild" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Räknar unika RGB-bildpunkter" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Tillämpar effekt" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagao-filter" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Gör sned" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Vänta ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Bläddra" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gamma korrigerad" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24-bitars RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Gråskala" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Indexerad palett" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Från urklipp" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Fånga skärmbild" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Ny bild" #: src/otherwindow.c:288 msgid "Width" msgstr "Bredd" #: src/otherwindow.c:289 msgid "Height" msgstr "Höjd" #: src/otherwindow.c:290 msgid "Colours" msgstr "Färger" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Mönsterväljare" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Ange palettstorlek" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Verkställ" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminans" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Ljusstyrka" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Avstånd till A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Projektion till A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frekvens" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Sortera palettfärger" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Indexbörjan" #: src/otherwindow.c:617 msgid "End Index" msgstr "Indexslut" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Omvänd ordning" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Kontrast" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterisera" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Transformera färg" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Visa detalj" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Lagra värden" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palett" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto-förhandsvisning" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Återställ" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Ny geometri är samma som nu - ingenting att göra." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "Operativsystemet kan inte allokera minne för denna åtgärd." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Du har inte allokerat tillräckligt mycket minne i inställningsfönstret för " "denna åtgärd." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Närmsta granne" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilinjär / Områdesmappning" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilinjär" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bikubisk" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bikubisk kantad" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bättre Bikubisk" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Skarpare Bikubisk" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Bredd " #: src/otherwindow.c:1168 msgid "Height " msgstr "Höjd " #: src/otherwindow.c:1170 msgid "Original " msgstr "" #: src/otherwindow.c:1176 msgid "New" msgstr "Ny" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Center" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Fixa Bildformat" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Töm" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Ruta" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Spegla Ruta" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Spegla" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Inställningar" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Skarpare bildreduktion" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Skala rityta" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Ändra storlek på rityta" #: src/otherwindow.c:1963 msgid "From" msgstr "Från" #: src/otherwindow.c:1963 msgid "To" msgstr "Till" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "NMI" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Skala" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Palettredigerare" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Konfigurera Överdrag" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Färgredigerare" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Gräns" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Sfär" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Vinkel" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Kub" #: src/otherwindow.c:2110 msgid "Range" msgstr "Intervall" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Invertera" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Färg-Selektivt Läge" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Opak" #: src/otherwindow.c:2128 msgid "Border" msgstr "Ram" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Genomskinlig" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Ruta " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Smart rutnät" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Rutnät" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Minimal rutnätszoom" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Bredd på ruta" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Höjd på ruta" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Konfigurera rutnät" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Färgrymd" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Största (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Summa (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euklidisk (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Exakt konvertering" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Använd aktuell palett" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN-kvantisering (långsam, bättre kvalitet)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu-kvantisering (snabb)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Max-Min-kvantisering (bäst för mindre paletter och dithering)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Ingen" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (snabb)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Dithered (effekt)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Skingra (effekt)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamut" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Svagt" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Starkt" #: src/otherwindow.c:2385 msgid "Off" msgstr "Av" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Separera/Summa" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Separera/Dela" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Längd/Summa" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Längd/Dela" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Konvertera till indexerad" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Indexerade färger att använda" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Skär av pallett" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Diameterbaserad viktning" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Dither" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Reducera blödning av färg" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Felaktig spridning, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Selektiv felaktig spridning" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "Full felprecision" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Konstant" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Redigera gradient" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Punkter:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Omvänd" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Redigera anpassad" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Linjär" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radiell" #: src/otherwindow.c:3018 msgid "Square" msgstr "Fyrkantig" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Vinkelformad" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Konisk" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Nivå" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Upprepa" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A till B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A till B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A till B (NMI)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A till B (omvänd NMI)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Endast A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Anpassad" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Aktuell till 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Endast aktuell" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Konfigurera gradient" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Kanal" #: src/otherwindow.c:3047 msgid "Length" msgstr "Längd" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Repetera längd" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Gradienttyp" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Förhandsvisa opacitet" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "Vid avstånd" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horisontell " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Vertikal" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Oförändrad" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "Skissa Bild" #: src/otherwindow.c:3323 msgid "Source" msgstr "Källa" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Ursprung" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Relativ skala" #: src/otherwindow.c:3337 msgid "Display" msgstr "Bildskärm" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Sparar %s-bild" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Läser in %s-bild" #: src/png.c:850 msgid "Layer" msgstr "Lager" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d ut av %d bildrutor kunde inte sparas som %s - sparades som PNG istället" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Tryck" #: src/prefs.c:154 msgid "Current Device" msgstr "Aktuell enhet" #: src/prefs.c:431 msgid "Default System Language" msgstr "Standardspråk i systemet" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Kinesiska (förenklad)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Kinesiska (Taiwan)" #: src/prefs.c:433 msgid "Czech" msgstr "Tjeckiska" #: src/prefs.c:433 msgid "Dutch" msgstr "Nederländska" #: src/prefs.c:433 msgid "English (UK)" msgstr "Engelska (UK)" #: src/prefs.c:433 msgid "French" msgstr "Franska" #: src/prefs.c:434 msgid "Galician" msgstr "Galiciska" #: src/prefs.c:434 msgid "German" msgstr "Tyska" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italienska" #: src/prefs.c:435 msgid "Japanese" msgstr "Japanska" #: src/prefs.c:435 msgid "Polish" msgstr "Polska" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugisiska" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugisiska (brasiliansk)" #: src/prefs.c:436 msgid "Russian" msgstr "Ryska" #: src/prefs.c:436 msgid "Slovak" msgstr "Slovakiska" #: src/prefs.c:437 msgid "Spanish" msgstr "Spanska" #: src/prefs.c:437 msgid "Swedish" msgstr "Svenska" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turkiska" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Tidigare använda filer" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometri för ram" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Pekare X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Geometri för urval" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Ångra / Gör om" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Flöde" #: src/prefs.c:457 msgid "Preferences" msgstr "Inställningar" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Max mängd minne för ångra (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Max ångra-nivåer" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Använd gammakorrigering som standard" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Stäng av visningsfönstrets genomskinlighet" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Välj föredragen språköversättning\n" "\n" "Du kommer att behöver starta om\n" "mtPaint för att aktivera nytt språk" #: src/prefs.c:524 msgid "Language" msgstr "Språk" #: src/prefs.c:529 msgid "Interface" msgstr "Gränssnitt" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Gråskala bakgrund" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Knuffa pixlar i urval" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Max storlek för panoreringsfönstret" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Visa urklipp vid inklistring" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Muspekare = Verktyg" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Bekräfta avslut" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q knappen avslutar mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Byta verktyg verkställer inklistring" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Centrera verktygsinställningsrutan" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Ny bild sätter zoom till 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Musens Skrollhjul = Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Använd menyikoner" #: src/prefs.c:564 msgid "Files" msgstr "Filer" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Läs 16-bits TGA:er som 5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Skriv TGA:er rad för rad nedifrån och upp" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "Sökvägar" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Urklippsfiler" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Välj urklippsfil" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML Läsarprogram" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Välj webbläsarprogram" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Plats för Handbokens index" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Välj Hanbokens indexfil" #: src/prefs.c:605 msgid "Default Palette" msgstr "Standardpalett" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Välj standardpalett" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Standardmönster" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Välj standardmönsterfil" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Statusrad" #: src/prefs.c:633 msgid "Tablet" msgstr "Ritbord" #: src/prefs.c:637 msgid "Device Settings" msgstr "Enhetsinställningar" #: src/prefs.c:645 msgid "Configure Device" msgstr "Konfigurera enhet" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Verktygsvariabel" #: src/prefs.c:654 msgid "Factor" msgstr "Faktor" #: src/prefs.c:680 msgid "Test Area" msgstr "Testområde" #: src/shifter.c:205 msgid "Frames" msgstr "Bildrutor" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Palettväxlare" #: src/shifter.c:279 msgid "Start" msgstr "Start" #: src/shifter.c:281 msgid "Finish" msgstr "Slut" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Rätta till palett" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Åtgärd" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Kommando" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Konfigurera filåtgärder" #: src/spawn.c:515 msgid "Execute" msgstr "Kör" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Fel %i rapporterat vid försök att köra %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Jag kunde inte hitta dokumentationen. Antingen så behöver du ladda ner " "mtPaint Handboken från hemsidan och installera den, eller så behöver du " "sätta den korrekta platsen i Inställningsfönstret." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Det uppstod ett problem med att köra HTML-läsaren. Du behöver sätta korrekt " "programnamn i Inställningsfönstret." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB Kub" #: src/toolbar.c:234 msgid "By image channel" msgstr "Av bildkanal" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Inställningar för fylla" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Inställningar för smeta" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "" #: src/toolbar.c:299 msgid "Colour" msgstr "Färg" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplicera" #: src/toolbar.c:300 msgid "Divide" msgstr "Dividera" #: src/toolbar.c:300 msgid "Screen" msgstr "Skärm" #: src/toolbar.c:300 msgid "Dodge" msgstr "Undvik" #: src/toolbar.c:301 msgid "Burn" msgstr "Bränn" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Hårt ljus" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Mjukt ljus" #: src/toolbar.c:301 msgid "Difference" msgstr "Skillnad" #: src/toolbar.c:302 msgid "Darken" msgstr "Mörkare" #: src/toolbar.c:302 msgid "Lighten" msgstr "Ljusare" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Grynextrahering" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Kornsammanfogning" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Intoningsläge" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Kontinuerligt Läge" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Opacitetsläge" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Toningsläge" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Tona +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Blandningsläge" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Inaktivera alla masker" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Gradientläge" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Inställningsverktygsrad" #: src/toolbar.c:1041 msgid "Cut" msgstr "Klipp ut" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopiera" #: src/toolbar.c:1043 msgid "Paste" msgstr "Klistra in" #: src/toolbar.c:1045 msgid "Undo" msgstr "Ångra" #: src/toolbar.c:1046 msgid "Redo" msgstr "Gör om" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Panorera Fönster" #: src/toolbar.c:1053 msgid "Paint" msgstr "Måla" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Blanda" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Rak linje" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Smeta" #: src/toolbar.c:1058 msgid "Clone" msgstr "Klona" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Gör Urval" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Polygonurval" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Placera gradient" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Lasso-markering" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Oval Kontur" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Fylld Oval" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Konturmarkering" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Fyll Urval" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Vänd markering vertikalt" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Vänd markering horisontellt" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Rotera markering medsols" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Rotera markering motsols" #: src/viewer.c:132 msgid "About" msgstr "Om" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Fil: %s ogiltig - paletten inte uppdaterad" #~ msgid "Distance to A+B" #~ msgstr "Avstånd till A+B" #~ msgid "Edit Frames" #~ msgstr "Redigera Bildrutor" mtpaint-3.40/po/ru.po0000644000175000000620000031334011647064732014055 0ustar muammarstaff# Russian translation for mtpaint # Copyright (c) (c) 2005 Canonical Ltd, and Rosetta Contributors 2005 # This file is distributed under the same license as the mtpaint package. # Sergei Irupin , 2008. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 16:09+0400\n" "PO-Revision-Date: 2011-10-17 17:57+0300\n" "Last-Translator: Dmitry Groshev \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Просмотр анимации" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Запустить" #: src/ani.c:695 msgid "Fix" msgstr "Исправить" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Закрыть" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Ошибка" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Невозможно создать каталог для вывода" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Создание фреймов анимации" #: src/ani.c:857 msgid "Unable to save image" msgstr "Невозможно сохранить изображение" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Внимание" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Вы действительно хотите очистить все данные положения и циклов для всех " "слоев?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Нет" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Да" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Установить ключевой кадр" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Вы должны иметь по крайней мере 2 слоя для создания анимации" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Вы должны сохранить файл слоев, прежде чем создавать анимацию" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Настройка анимации" #: src/ani.c:1064 msgid "Output Files" msgstr "Файл вывода" #: src/ani.c:1067 msgid "Start frame" msgstr "Стартовый кадр" #: src/ani.c:1068 msgid "End frame" msgstr "Конечный кадр" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Задержка" #: src/ani.c:1071 msgid "Output path" msgstr "Путь для вывода" #: src/ani.c:1072 msgid "File prefix" msgstr "Префикс файла" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Создать GIF кадры" #: src/ani.c:1098 msgid "Positions" msgstr "Позиции" #: src/ani.c:1135 msgid "Cycling" msgstr "Циклы" #: src/ani.c:1148 msgid "Save" msgstr "Сохранить" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Просмотр" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Создать кадры" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Изображение слишком велико для преобразования." #: src/canvas.c:399 msgid "MT" msgstr "МТ" #: src/canvas.c:399 msgid "Sobel" msgstr "Собел" #: src/canvas.c:399 msgid "Prewitt" msgstr "Превитт" #: src/canvas.c:399 msgid "Kirsch" msgstr "Кирш" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Градиент" #: src/canvas.c:400 msgid "Roberts" msgstr "Робертс" #: src/canvas.c:400 msgid "Laplace" msgstr "Лаплас" #: src/canvas.c:400 msgid "Morphological" msgstr "Морфологический" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Выделить границы" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Резкие границы" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Сглаженные границы" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Отдельно по X и Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Гауссово размывание" #: src/canvas.c:523 msgid "Radius" msgstr "Радиус" #: src/canvas.c:524 msgid "Amount" msgstr "Величина" #: src/canvas.c:525 msgid "Threshold " msgstr "Порог " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Нерезкая маска" #: src/canvas.c:563 msgid "Outer radius" msgstr "Наружный радиус" #: src/canvas.c:564 msgid "Inner radius" msgstr "Внутренний радиус" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Нормализация" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Разница по Гауссу" #: src/canvas.c:594 msgid "Protect details" msgstr "Защитить детали" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Размывание Кувахары-Нагао" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Изображение слишком велико для поворота." #: src/canvas.c:668 msgid "Smooth" msgstr "Сглаживание" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Поворот" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Не хватает памяти для создания буфера обмена" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "Неверный файл палитры" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Неверный файл канала." #: src/canvas.c:1311 msgid "Raw frames" msgstr "Необработанные кадры" #: src/canvas.c:1311 msgid "Composited frames" msgstr "Сведенные кадры" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "Сведенные кадры с ненулевой задержкой" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "Загрузить первый кадр" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "Распаковать кадры" #: src/canvas.c:1315 msgid "View Animation" msgstr "Просмотреть анимацию" #: src/canvas.c:1332 msgid "Load Frames" msgstr "Загрузить кадры" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Это анимированный файл %s." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "Это многостраничный файл %s." #: src/canvas.c:1345 msgid "Load into Layers" msgstr "Загрузить в слои" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "Файл слишком велик, должно быть <= ширина=%i высота=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "Не удалось распаковать кадры" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Не удалось загрузить файл" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Библиотека импорта файла вернула ошибку из-за проблемы с файлом (возможно, " "повреждены данные изображения, или файл усечен). Часть данных удалось " "загрузить, но следовало бы сохранить эту картинку в новом файле, чтобы " "проблема не повторилась." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "Анимация слишком длинная чтобы целиком загрузить ее в слои." #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "Удалось распаковать не все кадры анимации." #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Невозможно открыть файл" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Неподдерживаемый формат файла" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Файл: %s уже существует. Вы хотите его перезаписать?" #: src/canvas.c:1524 msgid "File Found" msgstr "Файл найден" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "НЕТ" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "ДА" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Прозрачный цвет" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG качество (100=высшее)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG сжатие (0=нет)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE-сжатие" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000 сжатие (0=без потерь)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Горячая точка at X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Формат файла" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "С отменой" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "Применить цветовой профиль" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Задержка анимации" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Невозможно экспортировать отмененные изображения" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Невозможно экспортировать ASCII файл" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Невозможно сохранить файл: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Загрузить изображение" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Сохранить изображение" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Загрузить палитру" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Сохранить палитру" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Экспортировать отмененные изображения" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Экспортировать отмененные изображения (с последнего)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "Вы должны иметь не больше 16 цветов в палитре для экспорта ASCII картинки." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Экспортировать в ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Сохранить файлы слоев" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Выберите каталог для кадров" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "" "Вы должны сохранить по крайней мере один кадр для создания анимированного " "GIF." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Экспорт GIF анимации" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Загрузить канал" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Сохранить канал" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Сохранить составное изображение" #: src/channels.c:236 msgid "Cleared" msgstr "Очищен" #: src/channels.c:237 msgid "Set" msgstr "Заполнен" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Цвет A радиус B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Переход от A к B" #: src/channels.c:240 msgid "Image Red" msgstr "Канал красного" #: src/channels.c:241 msgid "Image Green" msgstr "Канал зеленого" #: src/channels.c:242 msgid "Image Blue" msgstr "Канал синего" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Альфа" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Выделение" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Маска" #: src/channels.c:256 msgid "Create Channel" msgstr "Создать канал" #: src/channels.c:262 msgid "Channel Type" msgstr "Тип канала" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Начальное состояние канала" #: src/channels.c:273 msgid "Inverted" msgstr "Инвертированный" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Отменить" #: src/channels.c:316 msgid "Delete Channels" msgstr "Удалить каналы" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Порог канала" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Красный" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Зеленый" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Синий" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Тон" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Насыщенность" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Значение" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Непрозрачность" #: src/font.c:939 msgid "Creating Font Index" msgstr "Создание индекса шрифтов" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Вы должны выбрать как минимум один каталог для поиска шрифтов." #: src/font.c:1468 msgid "Font" msgstr "Шрифт" #: src/font.c:1469 msgid "Style" msgstr "Стиль" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Размер" #: src/font.c:1471 msgid "Filename" msgstr "Имя файла" #: src/font.c:1471 msgid "Face" msgstr "Начертание" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Каталог" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Вставить текст" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Текст" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Введите текст здесь" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Антиалиасинг" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Инвертировать" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Цвет фона =" #: src/font.c:1805 msgid "Oblique" msgstr "Наклонный" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Угол поворота =" #: src/font.c:1831 msgid "Font Directories" msgstr "Каталоги шрифтов" #: src/font.c:1836 msgid "New Directory" msgstr "Новый каталог" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Выбрать каталог" #: src/font.c:1848 msgid "Add" msgstr "Добавить" #: src/font.c:1852 msgid "Remove" msgstr "Удалить" #: src/font.c:1856 msgid "Create Index" msgstr "Создать индекс" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Невозможно войти в каталог %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Удалить" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Переименовать" #: src/fpick.c:771 msgid "Create Directory" msgstr "Создать каталог" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Введите новое имя файла" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Введите имя нового каталога" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Создать" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Вы действительно хотите удалить \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Невозможно удалить" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Невозможно переименовать" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Невозможно создать каталог" #: src/fpick.c:939 msgid "Up" msgstr "На уровень выше" #: src/fpick.c:940 msgid "Home" msgstr "Домашний каталог" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Создать новый каталог" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Показать скрытые файлы" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Не учитывать регистр" #: src/fpick.c:1044 msgid "Name" msgstr "Имя" #: src/fpick.c:1046 msgid "Type" msgstr "Тип" #: src/fpick.c:1047 msgid "Modified" msgstr "Изменен" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Основное" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Комбинации клавиш" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Комбинации мыши" #: src/help.c:28 msgid "Credits" msgstr "Разработчики" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 авторы\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Список всех авторов смотрите в закладке 'Разработчики'.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint - свободное программное обеспечение, вы можете распространять и/или " "изменять его на условиях GNU General Public License, опубликованной Free " "Software Foundation; либо версии 3 лицензии, либо (по вашему выбору) любой " "более поздней версии.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint распространяется в надежде, что он будет полезен, но БЕЗ КАКИХ-ЛИБО " "ГАРАНТИЙ; даже без подразумеваемых гарантий КОММЕРЧЕСКОЙ ПРИГОДНОСТИ или " "ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННОЙ ЦЕЛИ. Смотрите GNU General Public License для " "более детальной информации.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint - простая программа рисования для GTK+1/2, предназначенная для " "создания иконок и пиксельной графики. Он может работать с индексированными и " "24-битными RGB изображениями и предоставляет базовые инструменты для " "рисования и манипуляций с палитрой. Он также имеет и более мощные функции, " "такие как каналы, слои и анимация. Из-за своей простоты и отсутствия " "зависимостей программа хорошо работает под GNU/Linux, Windows и на " "компьютерах c устаревшим железом.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Полная документация по возможностям mtPaint содержится в Руководстве " "пользователя. Если у вас нет этого Руководства, вы можете скачать его с " "сайта mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Если вам понравится mtPaint и вы хотите идти в ногу с новыми выпусками, или " "хотите поделиться своим мнением, то эти списки рассылки могут представлять " "для вас интерес:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Создать новое изображение" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Открыть изображение" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Сохранить изображение" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr " Ctrl-Shift-S Сохранить файл слоев" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Выйти из программы\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Выбрать все изображение" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Ничего не выбирать, отменить вставку" #: src/help.c:49 msgid " J Lasso selection\n" msgstr " J Выделение лассо\n" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Копировать отмеченное в буфер обмена" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Копировать отмеченное в буфер обмена и закрасить текущим " "шаблоном выбранную область" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Вставить буфер обмена в центр текущего просмотра" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K Вставить буфер обмена в место копирования" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr " Ctrl-Shift-V Вставить буфер обмена в новый слой" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return Фиксировать вставку на холсте" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr " Shift+Enter/Return Фиксировать вставку и скопировать затертую ею область в буфер обмена\n" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Стрелки Режим рисования - перемещение указателя мыши" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Стрелки Режим выделения - перемещение прямоугольника выделения" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+стрелки Перемещение мыши и выделения на x пикселов - x " "определяется в окне настроек" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+стрелки Перемещение слоя или изменение размера выделения" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr " Ctrl+Shift+Arrows Перемещение слоя или изменение размера выделения на x пикселов\n" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr " Enter/Return Режим рисования - Имитировать левую кнопку мыши" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr " Backspace Режим рисования - Имитировать правую кнопку мыши\n" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ or ] Изменить цвет A на следующий или предыдущий в палитре" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ or ] Изменить цвет B на следующий или предыдущий в палитре\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Обрезать изображение по размеру выделения" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Преобразование цветов - т.e. яркость, контраст, " "насыщенность, постеризация, гамма" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Изображение - в градации серого" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" " Shift-Ctrl-G Изображение - в градации серого (с гамма-коррекцией)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr " Ctrl+M Перевернуть изображение по горизонтали" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr " Shift-Ctrl-I Инвертировать изображение\n" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Рисовать прямоугольник вокруг выделения с текущим " "заполнением" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Заполнить выделенную область текущим заполнением" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Рисовать эллипс в выделенной области" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L Рисовать заполненный эллипс в выделенной области\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Редактировать значения RGB для цветов A и B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Редактировать все цвета палитры\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Настройки" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Информация\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Отменить последнее действие" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Вернуть отмененное действие\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr " Shift-T Вставка текста (GTK+)" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr " T Вставка текста (FreeType)\n" #: src/help.c:84 msgid " V View Window" msgstr " V Окно просмотра" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Окно слоев\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr " B Вкл/выкл прилипание к сетке тайлов\n" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr " X Обменять цвета A и B" #: src/help.c:88 msgid " E Choose Colour\n" msgstr " E Выбрать цвет\n" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Нарисовать открытую стрелку в режиме рисования линий " "(размер задается Flow)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Нарисовать закрытую стрелку в режиме рисования линий " "(размер задается Flow)\n" #: src/help.c:91 msgid " D Line Tool" msgstr " D Инструмент рисования линий" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr " F Инструмент заливки\n" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Увеличить масштаб главного окна" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Уменьшить масштаб главного окна" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Увеличить масштаб просмотра" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Уменьшить масштаб просмотра\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 Масштаб 10%" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 Масштаб 25%" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 Масштаб 50%" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 Масштаб 100%" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 Масштаб 400%" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 Масштаб 800%" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 Масштаб 1200%" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 Масштаб 1600%" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 Масштаб 2000%\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Редактировать канал изображения" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Редактировать альфа-канал" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Редактировать канал выделения" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Редактировать канал маски\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Справка" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Выбор шаблона" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Выбор кисти" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Инструмент рисования" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Вкл/выкл главную панель" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Вкл/выкл панель инструментов" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Вкл/выкл панель установок" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Вкл/выкл палитру" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Инструмент выбора" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Вкл/выкл боковую панель\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Сохранить буфер обмена в файл 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Загрузить буфер обмена из файла 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Установить непрозрачность 10%, 20%, ... , 100% " "(основной или цифровой клавиатурой)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Увеличение непрозрачности на 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Уменьшение непрозрачности на 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Показать или скрыть главное меню/панель инструментов/" "строку статуса/палитру" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up Масштабирование изображения" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down Изменение размера холста" #: src/help.c:128 msgid " End Pan Window" msgstr " End Окно навигации" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Левая кнопка Рисовать на холсте выбранным инструментом" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Средняя кнопка Выделить точку, которая будет в центре изображения " "после следующего увеличения" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Правая кнопка Зафиксировать вставку на холст / Остановить рисование " "текущей линии / Отменить выделение\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Колесо мыши В GTK+2 пользователь может масштабировать " "изображение, включив эту возможность в настройках\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+Левая кнопка Выбрать цвет А из-под указателя мыши" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+Средняя кнопка Создать цвет A/B и шаблон на базе RGB цвета A (только " "для RGB изображений)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Правая кнопка Выбрать цвет B из-под указателя мыши" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr " Ctrl+Колесо мыши Прокручивать главное окно влево или вправо\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctrl+Двойной щелчок Установить цвет A или B в усредненный цвет области " "под кистью или в рамке выделения (только RGB)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Правая кнопка Выбрать точку, которая будет в центре после " "следующего масштабирования\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "Вы можете фиксировать X/Y координаты при перемещении мыши:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift Удержание движения мыши строго по вертикали" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl Удержание движения мыши строго по горизонтали" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint сопровождает Дмитрий Грошев.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Следующие лица (в алфавитном порядке) внесли свой вклад непосредственно в " "проект, и поэтому заслуживает щедрой благодарности за их великодушие и " "трудолюбие:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Авторы\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Дмитрий Грошев - участник разработки версии 2.30. Ведущий разработчик и " "руководитель проекта с версии 3.00 по настоящее время." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - автор программы и руководитель проекта до версии 3.00, " "продолжает делать свой вклад время от времени." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - написал метод квантизации Wu - смотрите wu.c для получения " "дополнительной информации.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Общие вклады (обратная связь и идеи для улучшений, если не указано иное)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - редизайн сайта, апрель 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Александр Прокудин" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - создал Gifsicle, которая необходима для создания и просмотра " "анимированных GIF файлов http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - страница руководства, регистрация на " "Launchpad/Rosetta" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Переводы\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Бразильский португальский - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Чешский - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Голландский - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Французский - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Галисийский - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Немецкий - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "Венгерский - Ur Balazs" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Итальянский - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Японский - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Польский - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Португальский - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Русский - Сергей Ирюпин, Дмитрий Грошев" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Китайский - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Словацкий - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Испанский - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Шведский - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "Тагальский - Anjelo delCarmen" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Тайванский китайский - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Турецкий - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Информация" #: src/info.c:290 msgid "Memory" msgstr "Память" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Всего памяти для главного изображения + отмены" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Отмена/Возврат/Максимальная глубина отмены" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Буфер обмена" #: src/info.c:311 msgid "Unused" msgstr "Неиспользуемые" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Буфер обмена = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Буфер обмена = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Уникальные RGB пикселы" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Слои" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Всего памяти для слоев" #: src/info.c:350 msgid "Colour Histogram" msgstr "Гистограмма цветов" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Итоги по палитре - используется %i из %i" #: src/info.c:391 msgid "Index" msgstr "Индекс" #: src/info.c:392 msgid "Canvas pixels" msgstr "Пикселов в изображении" #: src/info.c:407 msgid "Orphans" msgstr "Пикселов вне палитры" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Не удалось найти домашний каталог. Использую текущий каталог в качестве " "домашнего." #: src/layer.c:70 msgid "Background" msgstr "Фон" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(изменено)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Без названия" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Вы действительно хотите удалить слой %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Изменения в одном или нескольких слоях не сохранены. Вы действительно хотите " "потерять изменения?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Отменить операцию" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Потеря изменений" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d слоев загрузить не удалось" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Один или несколько слоев изображения не были сохранены. Вы должны сохранить " "каждое изображения по отдельности перед сохранением файла слоев для загрузки " "этого составного изображения в будущем." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Вы действительно хотите удалить все слои?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Вы не можете добавлять новые слои." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Новый слой" #: src/layer.c:1160 msgid "Raise" msgstr "Поднять" #: src/layer.c:1161 msgid "Lower" msgstr "Опустить" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Дублировать слой" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Центрировать слой" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Удалить слой" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Закрыть окно слоев" #: src/layer.c:1268 msgid "Layer Name" msgstr "Имя слоя" #: src/layer.c:1269 msgid "Position" msgstr "Позиция" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Прозрачный цвет" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Показать все слои в главном окне" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Неиспользуемых цветов нет!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Палитра не содержит цветов с одинаковыми значениями RGB" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "Палитра содержит %i цветов с одинаковыми значениями RGB. Вы действительно " "хотите объединить их в один индекс и обновить холст?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "с палитрой" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Вы пытаетесь сохранить изображение %s в файл %s, что невозможно. Предлагаю " "вам сохранить его с расширением PNG." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Вы пытаетесь сохранить %s файл с палитрой более %d цветов. Используйте " "другой формат либо уменьшите палитру до %d цветов." #: src/mainwindow.c:528 #, fuzzy msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Вы пытаетесь сохранить XPM файл с более чем 4096 цветов. Используйте другой " "формат, либо постеризуйте изображение в 4 бита, либо иным образом уменьшите " "количество цветов." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Невозможно загрузить буфер обмена" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Невозможно сохранить буфер обмена" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Этот холст/палитра содержит изменения, которые не были сохранены. Вы " "действительно хотите потерять эти изменения?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Изображение" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Вы действительно хотите выйти?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Файл" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Новый" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Открыть ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Сохранить" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Сохранить как ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Экспорт отмененных изображений ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Экспорт отмененных изображений (с конца) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Экспорт ASCII картинки ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Экспорт анимированного GIF ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Действия" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Настроить" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Выход" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Правка" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Отменить" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Вернуть" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Вырезать" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Копировать" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Копировать в палитру" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Вставить в центр" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Вставить в новый слой" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Вставить" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Вставить текст" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Вставить текст (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Вставить палитру" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Загрузить буфер обмена" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Сохранить буфер обмена" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Заполнить буфер обмена из системного" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Передать буфер обмена в системный" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Выбрать шаблон ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Выбрать кисть ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "//Выбрать цвет ..." #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Вид" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Основная панель" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Панель инструментов" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Панель настроек" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Боковая панель" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Палитра" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Строка статуса" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Режим просмотра" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Центрировать изображение" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Показать сетку" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "//Прилипать к сетке тайлов" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Настроить сетку ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//Трафаретное изображение ..." #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Окно просмотра" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Горизонтальное деление" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Синхронизация окна просмотра" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Окно навигации" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Окно слоев" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Изображение" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Преобразовать в RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Преобразовать в индексированное ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Размер изображения ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Размер холста ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Обрезать" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Перевернуть по вертикали" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Перевернуть по горизонтали" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Повернуть по часовой" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Повернуть против часовой" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Повернуть произвольно ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Наклонить ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "//Сегментировать ..." #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Информация ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Настройки ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/В_ыделение" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Выделить все" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Отменить выделение (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Выделение лассо" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Выделить+вырезать лассо" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Контур" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Заполнить" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Контур эллипса" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Заполненный эллипс" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//Горизонтальный переход цвета" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//Вертикальный переход цвета" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Переход А->В в маску" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Сделать альфа-канал маской" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Маскировать цвета А,В" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Размаскировать цвета A,В" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Маскировать все цвета" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Очистить маску" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Палитра" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Загрузить ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Загрузить по умолчанию" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Маскировать все" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Размаскировать все" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Обменять A с B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Изменить A и B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Редактор палитры ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Установить размер палитры ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Слияние повторяющихся цветов" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Удаление неиспользуемых цветов" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Создать квантизацией ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Сортировать цвета ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Сдвиг палитры ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "//Подобрать градиент ..." #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/_Эффекты" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Трансформация цветов ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Инвертирование" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Оттенки серого" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Оттенки серого (с гамма-коррекцией)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Изометрическое преобразование" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Левый край вниз" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Правый край вниз" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Верхний край вправо" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Нижний край вправо" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Выделить границы ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//Разница по Гауссу ..." #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Резкость ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Нерезкая маска ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Сгладить ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Гауссово размывание ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Размывание Кувахары-Нагао ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Барельеф" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//Дилатация" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Эрозия" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Бактерии ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/_Каналы" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Новый ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Удалить ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Редактировать изображение" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Редактировать альфа" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Редактировать выделение" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Редактировать маску" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Скрыть изображение" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Выключить альфа" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Выключить выделение" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Выключить маску" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Разрешить RGBA операции" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Порог ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Отделить альфа" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Показать альфа как наложение" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Настроить наложение ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Слои" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Новый слой" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Сохранить составное изображение ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Составное изображение в новый слой" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Удалить все слои" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Настроить анимацию ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Просмотр анимации ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Установить ключевой кадр ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Удалить все ключевые кадры ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Дальше..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/С_правка" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Документация" #: src/mainwindow.c:4933 msgid "//About" msgstr "//О программе" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Переопределить горячие клавиши" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "Квантизация - проход 1" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "Квантизация - проход 2" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Преобразование в индексированную палитру" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Эффект Бактерии" #: src/memory.c:4744 msgid "Rotating" msgstr "Поворот" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Произвольный поворот" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Масштабирование изображения" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Подсчет уникальных RGB пикселей" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Применение эффекта" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Фильтр Кувахары-Нагао" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Наклон" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "Сегментирование - проход 1" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "Сегментирование - проход 2" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Подождите ..." #: src/mygtk.c:189 msgid "STOP" msgstr "СТОП" #: src/mygtk.c:816 msgid "Browse" msgstr "Выбрать" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Гамма-коррекция" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24-битный RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Оттенки серого" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Индексированная палитра" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Из буфера обмена" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Снимок экрана" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Новое изображение" #: src/otherwindow.c:288 msgid "Width" msgstr "Ширина" #: src/otherwindow.c:289 msgid "Height" msgstr "Высота" #: src/otherwindow.c:290 msgid "Colours" msgstr "Цвета" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Выбор шаблона" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Установить размер палитры" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Применить" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Яркость" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Яркость" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Расстояние до А" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Проекция на A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Встречаемость" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Сортировать цвета палитры" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Начальный индекс" #: src/otherwindow.c:617 msgid "End Index" msgstr "Конечный индекс" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "В обратном порядке" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Контраст" #: src/otherwindow.c:869 src/otherwindow.c:2048 #, fuzzy msgid "Posterize" msgstr "Постеризация" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Гамма" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "Побитовая" #: src/otherwindow.c:870 msgid "Truncated" msgstr "Усеченная" #: src/otherwindow.c:870 msgid "Rounded" msgstr "Округленная" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Трансформация цветов" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Показать детали" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Сохранить значения" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "Тип постеризации" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Палитра" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Авто-предпросмотр" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Сбросить" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Новая геометрия та же что и сейчас - ничего не делать." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "Операционная система не может выделить память для этой операции." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "Вы не выделили достаточно памяти в окне настроек для этой операции." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Ближайший" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Билинейный/Площадь" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Билинейный" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Бикубический" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Бикубический контурный" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Бикубический улучшенный" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Бикубический резкий" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Блэкман-Харрис" #: src/otherwindow.c:1167 msgid "Width " msgstr "Ширина " #: src/otherwindow.c:1168 msgid "Height " msgstr "Высота " #: src/otherwindow.c:1170 msgid "Original " msgstr "Исходный " #: src/otherwindow.c:1176 msgid "New" msgstr "Новый" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Смещение" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Центр" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Фиксировать соотношение сторон" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Очистить" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Черепица" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Зеркальная черепица" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Зеркало" #: src/otherwindow.c:1221 msgid "Void" msgstr "Пустота" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Настройки" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Повысить четкость при уменьшении" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "Продолжение за границы" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Масштабирование холста" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Изменение размера холста" #: src/otherwindow.c:1963 msgid "From" msgstr "От" #: src/otherwindow.c:1963 msgid "To" msgstr "До" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Переход" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Редактор палитры" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Настройка наложения" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Редактор цветов" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Предел" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Сфера" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Угол" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Куб" #: src/otherwindow.c:2110 msgid "Range" msgstr "Дистанция" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Инвертировать" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Режим выбора по цвету" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Непрозрачный" #: src/otherwindow.c:2128 msgid "Border" msgstr "Граница" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Прозрачный" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Тайл" #: src/otherwindow.c:2129 msgid "Segment" msgstr "Сегмент" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "\"Умная сетка\"" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Сетка тайлов" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Минимальный масштаб для сетки" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Ширина тайлов" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Высота тайлов" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Настроить сетку" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Цветовое пространство" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Наибольшее (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Сумма (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Эвклидово (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Мера расстояния" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Точное соответствие" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Текущая палитра" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN квантизация (медленно но качественно)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Квантизация Wu (быстро)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Max-Min квантизация (лучшая для небольших палитр и dithering'а)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Нет" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Флойд-Стейнберг" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Флойд-Стейнберг (быстрый)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Dithered (эффект)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Scattered (эффект)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Гамут" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Слабо" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Сильно" #: src/otherwindow.c:2385 msgid "Off" msgstr "Нет" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Раздельно/Сумма" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Раздельно/Сброс" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Длина/Сумма" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Длина/Сброс" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Создать квантизацией" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Преобразовать в индексированное" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Число цветов" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Обрезать палитру" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Вес как диаметр" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Dither" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Ограничить растекание" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Сканирование зигзагом" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Распространение ошибки, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Выборочное распространение ошибки" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "Полная точность ошибки" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "Обратный HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Постоянный" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Редактировать градиент" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Точек:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Обратный" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Редактировать" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Линейный" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Круговой" #: src/otherwindow.c:3018 msgid "Square" msgstr "Квадратный" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Угловой" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Конический" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Уровень" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Повторить" #: src/otherwindow.c:3021 msgid "A to B" msgstr "От A к B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "От A к B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "От A к B (sRGB)" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "От A к B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "От A к B (обратный HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Только A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Пользовательский" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "От текущего до 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Только текущий" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Настройка градиента" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Канал" #: src/otherwindow.c:3047 msgid "Length" msgstr "Длина" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Длина повтора" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Тип градиента" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Тип продолжения" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Непрозрачность при просмотре" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "Подбор градиента" #: src/otherwindow.c:3220 msgid "At distance" msgstr "На расстоянии" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Горизонтальный " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Вертикальный" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Не меняется" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "Трафаретное изображение" #: src/otherwindow.c:3323 msgid "Source" msgstr "Источник" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Начало координат" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Относительный масштаб" #: src/otherwindow.c:3337 msgid "Display" msgstr "Показать" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "Сегментирование изображения" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "Порог" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "Минимальный размер" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Сохранение изображения: %s" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Загрузка изображения: %s" #: src/png.c:850 msgid "Layer" msgstr "Слой" #: src/png.c:6318 msgid "Applying colour profile" msgstr "Применение цветового профиля" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "%d из %d кадров нельзя было сохранить в %s - сохранены в PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "Распаковка кадров" #: src/prefs.c:146 msgid "Pressure" msgstr "Давление" #: src/prefs.c:154 msgid "Current Device" msgstr "Текущее устройство" #: src/prefs.c:431 msgid "Default System Language" msgstr "Язык системы по умолчанию" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Китайский" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Китайский (Тайванский)" #: src/prefs.c:433 msgid "Czech" msgstr "Чешский" #: src/prefs.c:433 msgid "Dutch" msgstr "Голландский" #: src/prefs.c:433 msgid "English (UK)" msgstr "Английский (UK)" #: src/prefs.c:433 msgid "French" msgstr "Французский" #: src/prefs.c:434 msgid "Galician" msgstr "Галисийский" #: src/prefs.c:434 msgid "German" msgstr "Немецкий" #: src/prefs.c:434 msgid "Hungarian" msgstr "Венгерский" #: src/prefs.c:434 msgid "Italian" msgstr "Итальянский" #: src/prefs.c:435 msgid "Japanese" msgstr "Японский" #: src/prefs.c:435 msgid "Polish" msgstr "Польский" #: src/prefs.c:435 msgid "Portuguese" msgstr "Португальский" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Португальский (Бразильский)" #: src/prefs.c:436 msgid "Russian" msgstr "Русский" #: src/prefs.c:436 msgid "Slovak" msgstr "Словацкий" #: src/prefs.c:437 msgid "Spanish" msgstr "Испанский" #: src/prefs.c:437 msgid "Swedish" msgstr "Шведский" #: src/prefs.c:437 msgid "Tagalog" msgstr "Тагальский" #: src/prefs.c:437 msgid "Turkish" msgstr "Турецкий" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Недавно открытые файлы" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Размеры холста" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Координаты курсора" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Цвет пиксела" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Размеры выделения" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Отменить/Вернуть" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Поток" #: src/prefs.c:457 msgid "Preferences" msgstr "Настройки" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "Число потоков (0 - определить)" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Максимум памяти для отмены (МБ)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Максимум уровней отмены" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "Общая для всех слоев область отмены (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Включать гамма-коррекцию по умолчанию" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Оптимизировать клетки фона" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Отключить прозрачность в окне просмотра" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Выберите язык\n" "\n" "Вам нужно будет перезапустить mtPaint\n" "чтобы язык полностью сменился" #: src/prefs.c:524 msgid "Language" msgstr "Язык" #: src/prefs.c:529 msgid "Interface" msgstr "Интерфейс" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Серый фон" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Размер окна навигации" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Показывать буфер обмена при вставке" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Показывать инструмент на курсоре" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Подтверждать выход" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Выход по клавише Q" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Вставка при смене инструмента" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Центрировать диалоги настроек" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Масштаб 100% для новых изображений" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Колесо прокрутки меняет масштаб" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Показывать иконки в меню" #: src/prefs.c:564 msgid "Files" msgstr "Файлы" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Загружать 16-битные TGA как 5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Сохранять TGA с порядком строк снизу вверх" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "Отменяемая загрузка изображений" #: src/prefs.c:588 msgid "Paths" msgstr "Пути" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Файлы буфера обмена" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Выберите файл буфера обмена" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Программа просмотра HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Выбрать программу просиотра" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Путь к Руководству пользователя" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Выбрать index-файл Руководства пользователя" #: src/prefs.c:605 msgid "Default Palette" msgstr "Палитра по умолчанию" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Выбрать палитру по умолчанию" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Шаблоны по умолчанию" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Выбрать файл шаблонов по умолчанию" #: src/prefs.c:616 msgid "Default Theme" msgstr "Тема по умолчанию" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "Выбрать файл темы по умолчанию" #: src/prefs.c:624 msgid "Status Bar" msgstr "Строка статуса" #: src/prefs.c:633 msgid "Tablet" msgstr "Планшет" #: src/prefs.c:637 msgid "Device Settings" msgstr "Настройки устройства" #: src/prefs.c:645 msgid "Configure Device" msgstr "Конфигурация устройства" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Переменная" #: src/prefs.c:654 msgid "Factor" msgstr "Множитель" #: src/prefs.c:680 msgid "Test Area" msgstr "Тестовая область" #: src/shifter.c:205 msgid "Frames" msgstr "Кадры" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Сдвиг палитры" #: src/shifter.c:279 msgid "Start" msgstr "Начало" #: src/shifter.c:281 msgid "Finish" msgstr "Конец" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Зафиксировать палитру" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Действие" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Команда" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Настроить действия с файлами" #: src/spawn.c:515 msgid "Execute" msgstr "Выполнить" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Ошибка %i при попытке запустить %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Документация не найдена. Либо вам нужно скачать Руководство пользователя с " "сайта программы и установить его, либо указать правильный путь к нему в окне " "настроек." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Не удалось запустить программу просмотра HTML. Вам нужно указать правильное " "имя программы в окне настроек." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "Вспомогательный поток не отвечает. Сохраните файлы и выйдите из программы." #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB-куб" #: src/toolbar.c:234 msgid "By image channel" msgstr "По каналу изображения" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "По градиенту" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Настройки заливки" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Учитывать режим непрозрачности" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Настройки размазывания" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "Шаг кисти" #: src/toolbar.c:298 msgid "Normal" msgstr "Обычный" #: src/toolbar.c:299 msgid "Colour" msgstr "Цвет" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Повысить насыщенность" #: src/toolbar.c:300 msgid "Multiply" msgstr "Умножение" #: src/toolbar.c:300 msgid "Divide" msgstr "Деление" #: src/toolbar.c:300 msgid "Screen" msgstr "Экран" #: src/toolbar.c:300 msgid "Dodge" msgstr "Осветление" #: src/toolbar.c:301 msgid "Burn" msgstr "Затемнение" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Направленный свет" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Рассеянный свет" #: src/toolbar.c:301 msgid "Difference" msgstr "Разница" #: src/toolbar.c:302 msgid "Darken" msgstr "Замена темным" #: src/toolbar.c:302 msgid "Lighten" msgstr "Замена светлым" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Извлечение зерна" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Объединение зерна" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Режим смешивания" #: src/toolbar.c:846 msgid "More..." msgstr "Дальше..." #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Режим непрерывности" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Режим непрозрачности" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Режим оттенков" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Оттенок +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Режим смешивания" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Отключить все маски" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Режим градиента" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Панель установок" #: src/toolbar.c:1041 msgid "Cut" msgstr "Вырезать" #: src/toolbar.c:1042 msgid "Copy" msgstr "Копировать" #: src/toolbar.c:1043 msgid "Paste" msgstr "Вставить" #: src/toolbar.c:1045 msgid "Undo" msgstr "Отменить" #: src/toolbar.c:1046 msgid "Redo" msgstr "Вернуть" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Окно навигации" #: src/toolbar.c:1053 msgid "Paint" msgstr "Рисовать" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Перетасовка" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Заливка" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Прямая линия" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Размазывание" #: src/toolbar.c:1058 msgid "Clone" msgstr "Клонирование" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Выделение прямоугольником" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Выделение многоугольником" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Разместить градиент" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Выделение лассо" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Контур эллипса" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Заполненный эллипс" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Обвести выделение" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Заполнить выделенное" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Перевернуть выделение по вертикали" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Перевернуть выделение по горизонтали" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Повернуть выделение по часовой" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Повернуть выделение против часовой" #: src/viewer.c:132 msgid "About" msgstr "О программе" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Файл: %s неверный - палитра не обновлялась" #~ msgid "Distance to A+B" #~ msgstr "Расстояние до А+B" #~ msgid "Edit Frames" #~ msgstr "Редактировать кадры" #~ msgid " C Command Line Window" #~ msgstr " C Окно командной строки" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "В палитре недостаточно цветов для слияния" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "В палитре слишком много одинаковых цветов." #~ msgid "/View/Command Line Window" #~ msgstr "/Вид/Окно командной строки" #~ msgid "Grid colour RGB" #~ msgstr "Цвет сетки (RGB)" #~ msgid "Zoom" #~ msgstr "Масштаб" #~ msgid "%i Files on Command Line" #~ msgstr "%i файлов в командной строке" mtpaint-3.40/po/gl.po0000644000175000000620000025602711647046422014035 0ustar muammarstaff# Galician translations for mtpaint package # Traduccións ao galego para o paquete mtpaint. # Copyright (C) 2005 THE mtpaint'S COPYRIGHT HOLDER # This file is distributed under the same license as the mtpaint package. # Mark Tyler, 2005. # msgid "" msgstr "" "Project-Id-Version: mtpaint-3.40 galego\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-10-08 14:26+0000\n" "Last-Translator: Miguel Anxo Bouzada \n" "Language-Team: GALPon MiniNo \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-12-06 22:32+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Poedit-Country: SPAIN\n" "X-Poedit-Language: Galician\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Vista previa da animación" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Reproducir" #: src/ani.c:695 msgid "Fix" msgstr "Fixar" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Pechar" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Produciuse un erro" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Non se pode crear o directório" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Crear fotogramas" #: src/ani.c:857 msgid "Unable to save image" msgstr "Imposible gardar a imaxe" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Aviso" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "Realmente queres limpar todas as capas?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Non" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Si" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Establecer número de fotogramas" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Debes ter ao menos 2 capas para crear unha animación" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Debes gardar as capas antes de crear unha animación" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Configurar animación" #: src/ani.c:1064 msgid "Output Files" msgstr "Ficheiros de saida" #: src/ani.c:1067 msgid "Start frame" msgstr "Comezar no fotograma" #: src/ani.c:1068 msgid "End frame" msgstr "Rematar no fotograma" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Retardo" #: src/ani.c:1071 msgid "Output path" msgstr "Ruta de saida" #: src/ani.c:1072 msgid "File prefix" msgstr "Prefixo do ficheiro" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Crear fotogramas GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Posicions" #: src/ani.c:1135 msgid "Cycling" msgstr "Ciclo" #: src/ani.c:1148 msgid "Save" msgstr "Gardar" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Vista previa" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Crear fotogramas" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "A imaxe é demasiado grande para a transformación." #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Gradación" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfolóxica" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Detección de bordos" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Realzado de bordos" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Suavizado de bordos" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Diferenza X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Desenfoque Gausiano" #: src/canvas.c:523 msgid "Radius" msgstr "Radio" #: src/canvas.c:524 msgid "Amount" msgstr "Cantidade" #: src/canvas.c:525 msgid "Threshold " msgstr "Limiar " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Máscara de desenfoque" #: src/canvas.c:563 msgid "Outer radius" msgstr "Radio exterior" #: src/canvas.c:564 msgid "Inner radius" msgstr "Radio interior" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizar" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Diferenza de Gauss" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Difuminado Kuwahara-Nagao" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "A imaxe é demasiado grande para a rotación." #: src/canvas.c:668 msgid "Smooth" msgstr "Suavizado" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Rotación libre" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Non hai memoria dabondo para crear o portapapeis" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Canle non válido" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Ver animación" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Esto é un %s animado." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "O ficheiro é demasiado grande, debe ser <= a anchura=%i altura=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Non é posible cargar o ficheiro" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "A biblioteca de ficheiros importados pechouse debido a un problema co " "ficheiro (posiblemente por datos incorrectos da imaxe ou un ficheiro " "danado). Puidose cargar algunha información, xa que a cabeceira está " "correcta, pero suxiro que garde esta imaxe nun novo ficheiro, para que esto " "no volva a ocurrir." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "No se pode abrir o ficheiro" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Formato non soportado" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "O ficheiro: %s xa existe. Desexa sobreescribirlo?" #: src/canvas.c:1524 msgid "File Found" msgstr "Ficheiro atopado" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NON" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "SI" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Índice de transparencia" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Nivel de calidade JPEG (100=Alta)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "Compresión PNG (0=ningunha)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "Compresión TGA RLE" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "Compresión JPEG2000 (0=sen perda)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Punto en X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Formato de ficheiro" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Reversíbel" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Retardo para a animación" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Non se puido exportar o historial de cambios" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Non se puido exportar ficheiro ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Non se puido gardar: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Cargar imaxe" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Gardar imaxe" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Cargar paleta" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Gardar paleta" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Exportar o historial de cambios" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Exportar o historial de cambios (á inversa)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Ten que ter 16 ou menos cores na paleta para exportar arte ASCII." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportar arte ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Gravar ficheiros de capas" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Elixe directório de fotogramas" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Debes ter ao menos un debuxo para crear un GIF animado" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exportar animación GIF" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Cargar canle" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Gardar canle" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Gardar imaxe composta" #: src/channels.c:236 msgid "Cleared" msgstr "Limpando" #: src/channels.c:237 msgid "Set" msgstr "Establecer" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Corar A radio B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Misturar A en B" #: src/channels.c:240 msgid "Image Red" msgstr "Imaxe vermella" #: src/channels.c:241 msgid "Image Green" msgstr "Imaxe verde" #: src/channels.c:242 msgid "Image Blue" msgstr "Imaxe azul" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Selección" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Máscara" #: src/channels.c:256 msgid "Create Channel" msgstr "Crear canle" #: src/channels.c:262 msgid "Channel Type" msgstr "Tipo de canle" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Estado inicial da canle" #: src/channels.c:273 msgid "Inverted" msgstr "Invertida" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "Conforme" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Cancelar" #: src/channels.c:316 msgid "Delete Channels" msgstr "Borrar canles" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Limiar da canle" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Vermello" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Verde" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Azul" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Matiz" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturación" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Valor" #: src/cpick.c:902 msgid "Hex" msgstr "Hex" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacidade" #: src/font.c:939 msgid "Creating Font Index" msgstr "Crear índice de fontes" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Debe seleccionar ao menos un directório para buscar fontes." #: src/font.c:1468 msgid "Font" msgstr "Fonte" #: src/font.c:1469 msgid "Style" msgstr "Estilo" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Tamaño" #: src/font.c:1471 msgid "Filename" msgstr "Nome do ficheiro" #: src/font.c:1471 msgid "Face" msgstr "Cara" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Directório" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Pegar texto" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Texto" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Introduza aquí o texto" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Suavizar" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invertir" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Cor de fondo =" #: src/font.c:1805 msgid "Oblique" msgstr "Oblicuo" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Ángulo de rotación =" #: src/font.c:1831 msgid "Font Directories" msgstr "Directório de fontes" #: src/font.c:1836 msgid "New Directory" msgstr "Novo directório" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Seleccionar directório" #: src/font.c:1848 msgid "Add" msgstr "Engadir" #: src/font.c:1852 msgid "Remove" msgstr "Eliminar" #: src/font.c:1856 msgid "Create Index" msgstr "Crear índice" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Non se pode acceder ao directorio %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Borrar" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Renomear" #: src/fpick.c:771 msgid "Create Directory" msgstr "Crear cartafol" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Introduza o novo nome do ficheiro" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Introduza o nome do novo directorio" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Crear" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Desexa borrar \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Non se pode borrar" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Non se pode renomear" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Non se pode crear o cartafol" #: src/fpick.c:939 msgid "Up" msgstr "Arriba" #: src/fpick.c:940 msgid "Home" msgstr "Inicio" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Crear novo cartafol" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Mostrar os ficheiros agochados" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Ordenar sen sensibilidade a maiúsculas" #: src/fpick.c:1044 msgid "Name" msgstr "Nome" #: src/fpick.c:1046 msgid "Type" msgstr "Tipo" #: src/fpick.c:1047 msgid "Modified" msgstr "Modificado" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Xeral" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Atallos de teclado" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Atallos de rato" #: src/help.c:28 msgid "Credits" msgstr "Créditos" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Os Autores\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Ver a sección de «Créditos» para o listado de autores.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint é Software Libre; podes residtribuilo e/ou modificalo baixo os " "termos da GNU General Public License publicada pola Free Software " "Foundation; coa versión 3 da licencia, ou calquer versión posterior.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint distribuese coa esperanza de que sexa útil, pero SIN NINGUNHA " "GARANTÍA. Ver a GNU General Public License para máis detalles.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint é un programa de pintura sinxelo baseado en GTK+1/2 deseñado para " "crear iconas e traballos artísticos de píxeles. Pode editar paletas " "indexadas ou imaxes de 24 bit RGB e fornece ferramentas básicas para pintar " "e manipular paletas. Ten moitas outras características interesantes como " "canles, capas e animacións. Debido a sua simplicidade carece de dependencias " "e funciona moi ben en GNU/Linux e en Windows con hardware anticuado.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Ha unha extensa documentación de mtPaint no manual. Se non o tes xa, podes " "descargarlo do sitio web de mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Si mtPaint é do teu gusto e queres manterte informado sobre novas " "actualizacions ou queres enviar algún comentario, entonces pode que che " "interese a lista de correo:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "ttp://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Crear nova imaxe" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Abrir imaxe" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Gardar imaxe" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Sair\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Seleccionar imaxe enteira" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Non seleccionar nada, cancelar caixa de pegado" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Copiar selección ao portapapeis" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Copiar a selección ao portapapeis, e entonces pintar o " "actual patrón a área seleccionada" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Pegar do portapepeis" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K Pegar do portapapeis ao sitio do que foi copiado" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Intro/Retorno Pegar no lenzo" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Teclas de frecha Modo pintar - Cambiar cor A o B" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Teclas de frecha Modo selección - Empurrar marco de selección ou " "pegar de un en un (píxeles)" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Mayús+Teclas de frecha Empurrar marco de selección ou pegar en x píxeles " "- x está definido na ventá de preferencias" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Frechas Mover capa ou redimensionar marco de selección" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr " [ ou ] Cambia a cor A á seguinte ou á anterior na paleta" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Mayús+[ ou ] Cambia a cor B á seguinte ou á anterior na paleta\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Supr Cortar imaxe á selección" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Transformar cores - ex. brillo, contraste, saturación, " "posterizar, gama" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Escala de grises da imaxe" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Mayús-Ctrl-G Escala a imaxe á grises (gama corrixida)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Debuxar un rectángulo arredor da área de selección co " "recheo actual" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Mayús-T Encher a área de selección co actual recheo" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" " Ctrl-L Debuxar unha elipse atravesando a área de selección" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" " Ctrl-Mayús-L Debuxar unha elipse enchida atravesando a área de " "selección\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Editar os valores RGB para as cores A e B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Editar toda a paleta de cores\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Preferencias" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Información\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Desfacer a última acción" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Refacer a acción\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Ver ventá" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Ventá de capas\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Debuxar cabeza de frecha aberta coa ferramenta de liña " "(según o axuste de tamaño de fluxo)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Debuxar cabeza de frecha pechada coa ferramenta de liña " "(según o axuste de tamaño de fluxo)\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Zoom acercar" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Zoom alonxar" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Mayús +,= Ampliar" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Mayús - Reducir\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% zoom" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% zoom" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% zoom" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% zoom" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% zoom" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% zoom" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% zoom" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% zoo" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% zoom\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Mayús + 1 Editar canle de imaxe" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Mayús + 2 Editar canle alfa" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Mayús + 3 Editar canle de selección" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Mayús + 4 Editar canle de máscara\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Axuda" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Elixir patrón" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Elixir brocha" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Ferramenta de pintura" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Elixir barra principal" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Elixir barra de ferramentas" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Elixir barra de preferencias" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Elixir paleta" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Ferramenta de selección" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Alternar área ancorada\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Gardar o portapapeis actual ao ficheiro 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Mayús + F1 - F12 Cargar portapapeis desde o ficheiro 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Establecer opacidade ao 10%, 20%, ... , 100% (no " "teclado numérico ou no principal)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + ou = Incrementar opacidade nun 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Diminuir opacidade nun 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Inicio Amosar ou esconder a ventá principal menu/barra de " "ferramentas/barra de estado/paleta" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Re Pag Escalar a imaxe" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Av Pag Redimensionar o lenzo" #: src/help.c:128 msgid " End Pan Window" msgstr " Fin Quitar a ventá" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Botón esquerdo Pinta no lenzo usando a ferramenta activa" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr " Botón central Fixa o centro para o seguinte zoom" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Botón dereito Pega no lenzo / Termina o trazado dunha liña / " "Cancela unha selección\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Roda de desprazamento En GTK+2 o usuario pode activar o zoom coa " "roda de desprazamento na ventá de preferencias\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+Botón esquerdo Elixir cor A co rato" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+Botón central Crea cor A/B e patrón de puntos baseado en cores RGB " "en A (só imaxes RGB)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Botón dereito Elixir cor B co rato" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+Roda de desprazamento Moverse na ventá principal á esquerda ou á " "dereita\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctrl + doble clic establece a cor intermedia para A ou B que esté baixo o " "pincel ou a selección marcada (só para RGB)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Mayús+Botón dereito Fixa o centro para o zoom seguinte\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "Pode fixar as coordenadas X/Y mentras move o rato:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" " Mayús Restrinxe os movimentos do rato a unha liña vertical" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" " Mayús+Ctrl Restrinxe os movimentos do rato a unha liña horizontal" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint é mantido por Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "As seguintes persoas (en orde alfabético) contribuiron directamente no " "proxecto e, por tanto, agradeceselles moitisimo a sua xenerosidade e " "traballo arreo:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Autores\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - Contribuiu como desenvolvedor na versión 2.30. Principal " "desenvolvedor e mantedor dende a versión 3.00 até a actualidade." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Autor orixinal e mantedor até a versión 3.00, colaborador " "ocasional desde entón." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Escribiu o metodo de cuantización Wu - ver wu.c para máis " "información.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "Contribucions xerais (retornos e ideas de mellora)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Redeseñou o sito wen en Abril do 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Creo Gifsicle que é necesario para a creación e visualización " "de ficheiros GIF animados http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Traduccions\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Portugés do Brasil - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Checo - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Holandés - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Francés - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galego - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Alemán - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italiano - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Xaponés - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polaco - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugués - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Ruso - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Chinés simplificado - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Eslovaco - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Castelán - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Sueco - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Chines de Taiwan - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turco - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Información" #: src/info.c:290 msgid "Memory" msgstr "Memoria" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Memoria total dispoñible para principal + desfacer imaxes" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Desfacer / Refacer/ Máximo número de niveis usados" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Portapapeis" #: src/info.c:311 msgid "Unused" msgstr "Sin usar" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Portapapeis = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Portapapeis = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Píxeles RGB illados" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Capas" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Consumo total de memoria da capa" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histograma da cor" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Total de cores indexadas - %i de %i usados" #: src/info.c:391 msgid "Index" msgstr "Índice" #: src/info.c:392 msgid "Canvas pixels" msgstr "Píxeles do lenzo" #: src/info.c:407 msgid "Orphans" msgstr "Orfos" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "No se puido atopar o cartafol. Usarase o cartafol actual como local." #: src/layer.c:70 msgid "Background" msgstr "Fondo" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Modificado)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Sin nome" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Seguro que desexa borrar a capa %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Unha ou máis capas conteñen cambios que non se gardaron gardaron. Seguro que " "quere perder estos cambios?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Cancelar operación" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Perder os cambios" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d capas fallaron ao cargar" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Unha ou máis capas da imaxe non foron gardadas. Debes gardar cada imaxe " "individualmente para cargar a imaxe composta no futuro." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Está seguro de que desexa borrar todas as capas?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Non podes engadir máis capas." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nova capa" #: src/layer.c:1160 msgid "Raise" msgstr "Elevar" #: src/layer.c:1161 msgid "Lower" msgstr "Baixar" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplicar capa" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centrar capa" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Borrar capa" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Cerrar ventá de capas" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nome da capa" #: src/layer.c:1269 msgid "Position" msgstr "Posición" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Cor transparente" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Amosar todalas capas na ventá principal" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Non había cores sin usar para eliminar!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "A paleta non conten 2 cores que posuan idénticos valores RGB" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "A paleta conten %i cores que teñen idénticos valores RGB. Quere misturalos " "nun e realiñar o lenzo?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "indexado" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Pretende gardar unha imaxe %s nun ficheiro %s o que non és posible. " "Suxirolle que o garde coa extensión PNG." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Pretende gardar un ficheiro %s con unha paleta de máis de %d cores. Use " "outro formato o reduza la paleta a %d cores." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Pretende gardar un ficheiro XPM con máis de 4096 cores. Use outro formato ou " "posterize a imaxe a 4 bits, ou de outro xeito reduza o número de cores." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Non se puido cargar o portapapeis" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Non se puido gardar o portapapeis" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Este lenzo/paleta conten cambios que non foron gardados. Seguro que quere " "perdelos?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "imaxe" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Seguro que desexa sair?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Ficheiro" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Novo" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Abrir ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Gardar" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Gardar como ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Exportar o historial de imaxes ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Exportar o historial de imaxes (á inversa) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportar en ASCII ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportar GIF Animado ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Accións" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Configurar" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Sair" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Editar" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Desfacer" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Refacer" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Cortar" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Copiar" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Copiar na paleta" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Pegar no centro" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Pegar nunha nova capa" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Pegar" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Pegar texto" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Pegar texto (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Cargar portapapeis" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Gardar portapapeis" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importar de portapapeis do sistema" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Escoller patrón ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Escoller brocha ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Ver" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Amosar barra de ferramentas principal" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Amosar barra de ferramentas" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Amosar barra de preferencias" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Amosar ancoraxe" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Amosar paleta" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Amosar barra de estado" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Cambiar a vista completa" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Centrar imaxe" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Amosar rella de ampliación" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Configurar rella ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//Trazado de imaxe ..." #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Ver ventá" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Dividir en horizontal" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Ver ventá en foco" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Vista reducida" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Ventá de capas" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Imaxe" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Converter a RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Converter a Indexado ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Escalar lenzo ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Redimensionar lenzo ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Recortar" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Reflexo vertical" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Reflexo horizontal" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Rotar no sentido do reloxo" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Rotar no sentido contrario do reloxo" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Rotar libremente ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Inclinar ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Información ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Preferencias ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Selección" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Seleccionar todo" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Eliminar selección (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Selección de lazo" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Cortar selección de lazo" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Contorna de selección" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Encher selección" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Contorna de elipse" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Encher elipse" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//Rampa horizontal" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//Rampa vertical" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Misturar alfa A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Mover alfa a máscara" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Enmascarar cores A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Eliminar máscara cores A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Enmascarar todas as Cores" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Limpar máscara" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Paleta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Cargar ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Cargar valores predeterminados" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Enmascarar todo" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Non enmascarar nada" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Intercambiar A e B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Editar cores A e B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "//Trama A" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Editar paleta ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Establecer o tamaño da paleta ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Misturar cores duplicados" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Eliminar cores non usados" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Crear cuantificado ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Listar cores ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Paleta «Shifter» ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Efe_ctos" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformar cor ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invertir" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Escala de grises" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Escala de grises (gama corrixida)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Transformación isométrica" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Hacia abaixo lado esquerdo" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Hacia abaixo lado dereito" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Deica a dereita parte superior" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Deica a dereita parte inferior" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Detección de bordos ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//Diferenza de Gauss ..." #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Remarcado ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Máscara de desenfoque ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Suavizado ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Desenfoque gaussiano ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Difuminado Kuwahara-Nagao ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Realce" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//Dilatar" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Erosionar" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//«Bacteria» ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Ca_nles" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Novo ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Borrar ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Editar imaxe" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Editar alfa" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Editar selección" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Editar máscara" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Esconder imaxe" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Deshabilitar alfa" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Deshabilitar selección" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Deshabilitar máscara" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Xuntar operacions RGBA" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Limiar ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Disociar alfa" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Ver alfa como un revestimento" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Configurar revestimentos ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Capas" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nova capa" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Gardar imaxe composta ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Compoñer nunha capa nova" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Borrar todalas capas" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Configurar animación ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Animación vista previa ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Establecer número de fotogramas ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Borrar todolos fotogramas ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Máis..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Axuda" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Documentación" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Acerca de" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Vincular teclas acceso rápido" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Convertir á paleta indexada" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Efecto «bacteria»" #: src/memory.c:4744 msgid "Rotating" msgstr "Rotando" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Rotación libre" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Escalando a imaxe" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Contando píxeles RGB únicos" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Aplicando efecto" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Filtro Kuwahara-Nagao" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Inclinar" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Agarde por favor ..." #: src/mygtk.c:189 msgid "STOP" msgstr "PARAR" #: src/mygtk.c:816 msgid "Browse" msgstr "Buscar" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gama corrixida" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "RGB de 24 bits" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Escala de grises" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Paleta indexada" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "De portapapeis" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Capturar pantalla" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nova imaxe" #: src/otherwindow.c:288 msgid "Width" msgstr "Anchura" #: src/otherwindow.c:289 msgid "Height" msgstr "Altura" #: src/otherwindow.c:290 msgid "Colours" msgstr "Cores" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Selector de patrón" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Establecer o tamaño da paleta" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Aplicar" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminancia" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Brillo" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Distancia á A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Proxección A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frecuencia" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Amosar paleta de cores" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Inicio do índice" #: src/otherwindow.c:617 msgid "End Index" msgstr "Fin do índice" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Invertir a orde" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contraste" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterizar" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gama" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Tansformar a cor" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Amosar detalle" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Valores gardados" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paleta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto previsualización" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Restablecer" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "A nova xeometría é a mesma que a actual - Non se fai nada" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "O sistema operativo non pode asignar memoria para esta operación." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Non asignou a suficiente memoria na ventá de preferencias para esta " "operación." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Inmediato máis próximo" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineal / Mapear área" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineal" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bicúbico" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bicúbico recortado" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bicubic mellorado" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bicúbico realzado" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "«Blackman-Harris»" #: src/otherwindow.c:1167 msgid "Width " msgstr "Ancho " #: src/otherwindow.c:1168 msgid "Height " msgstr "Alto " #: src/otherwindow.c:1170 msgid "Original " msgstr "Orixinal " #: src/otherwindow.c:1176 msgid "New" msgstr "Novo" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Compensar" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centrado" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Fixar relación alto/ancho" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Limpar" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Mosaico" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Mosaico de espello" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Espello" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Preferencias" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Reducción enfocada de imaxe" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Escalar o lenzo" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Redimensionar o lenzo" #: src/otherwindow.c:1963 msgid "From" msgstr "Desde" #: src/otherwindow.c:1963 msgid "To" msgstr "Deica" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Escala" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Editor da paleta" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Configurar resvestimentos" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Editor de cores" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Límite" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Esfera" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Ángulo" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Cubo" #: src/otherwindow.c:2110 msgid "Range" msgstr "Rango" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Inverso" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Cor-modo de selección" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Opaco" #: src/otherwindow.c:2128 msgid "Border" msgstr "Bordo" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Transparente" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Mosaico " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Rella intelixente" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Rella de mosaico" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Mínima ampliación da rella" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Ancho do mosaico" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Altura do mosaico" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Configurar rella" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Espacio de cor" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "El más grande" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Suma (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclidiano (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Diferenza de medida" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Conversión exacta" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Usar paleta actual" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "Cuantificar PNN (lento, mellor calidade)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Cuantificar «Wu» (rápido)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Cuantificar «Max-Min» (mellor para pequenas paletas e punteados)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Ningún" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "«Floyd-Steinberg»" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "«Stucki»" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (rápido)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Punteado (efecto)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Disperso (efecto)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Fora de gama" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Débil" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Forte" #: src/otherwindow.c:2385 msgid "Off" msgstr "Apagado" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Separar/Sumar" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Separar/Cortar" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Lonxitude/Sumar" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Lonxitude/Cortar" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Crear cuantificado" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Converter a indexado" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Cores indexados a usar" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Paleta truncada" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Baseado na ponderación do diámetro" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Punteado" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Reducir cor sangrado" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Exploración serpeante" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Erro de propagación, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Produciuse un erro selectivo de propagación" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "Produciuse un erro total de precisión" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "Atrás HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Constante" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Editar a gradación" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Puntos:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Inverso" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Editar a personalización" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineal" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radial" #: src/otherwindow.c:3018 msgid "Square" msgstr "Cadrado" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Angular" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Cónico" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Nivel" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Repetir" #: src/otherwindow.c:3021 msgid "A to B" msgstr "de A á B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "de A á B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "de A á B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "de A á B (voltar HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Só A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Personalizado" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Actual á 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Só o actual" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Configurar a gradación" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Canle" #: src/otherwindow.c:3047 msgid "Length" msgstr "Lonxitude" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Repetir lonxitude" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Tipo de gradación" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Tipo de extensión" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Previsualizar opacidade" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "A distancia" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horizontal " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Vertical" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Sen cambios" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "Trazando imaxe" #: src/otherwindow.c:3323 msgid "Source" msgstr "Orixe" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Orixe" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Escala relativa" #: src/otherwindow.c:3337 msgid "Display" msgstr "Visualización" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Gardar imaxe %s" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Cargando imaxe %s" #: src/png.c:850 msgid "Layer" msgstr "Capa" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "%d fora de %d fotogramas non se gardaron como %s - guardados como PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Presión" #: src/prefs.c:154 msgid "Current Device" msgstr "Dispositivo actual" #: src/prefs.c:431 msgid "Default System Language" msgstr "Idioma predefinido" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Chinés (Simplificado)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Chinés (Taiwanés)" #: src/prefs.c:433 msgid "Czech" msgstr "Checo" #: src/prefs.c:433 msgid "Dutch" msgstr "Holandés" #: src/prefs.c:433 msgid "English (UK)" msgstr "Inglés (Reino Unido)" #: src/prefs.c:433 msgid "French" msgstr "Francés" #: src/prefs.c:434 msgid "Galician" msgstr "Galego" #: src/prefs.c:434 msgid "German" msgstr "Alemán" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italiano" #: src/prefs.c:435 msgid "Japanese" msgstr "Xaponés" #: src/prefs.c:435 msgid "Polish" msgstr "Polaco" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugués" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugués (Brasileño)" #: src/prefs.c:436 msgid "Russian" msgstr "Ruso" #: src/prefs.c:436 msgid "Slovak" msgstr "Eslovaco" #: src/prefs.c:437 msgid "Spanish" msgstr "Español" #: src/prefs.c:437 msgid "Swedish" msgstr "Sueco" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turco" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "Referencia XBM X" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "Referencia XBM Y" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Ficheiros recentes" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Límite de silencio da barra de progreso" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Xeometría do lenzo" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Cursor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Píxel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Selección da xeometria" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Desfacer / Refacer" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Fluxo" #: src/prefs.c:457 msgid "Preferences" msgstr "Preferencias" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Máxima memoria usada para desfacer (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Nivel máximo de desfacer" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "Porcentaxe de espazo que elimina a capa común (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Usar corrección gama por defecto" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Optimiza comprobación alpha" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Deshabilitar ventá de transparencias" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Seleccione a traducción ao idioma desexado\n" "\n" "Necesita reiniciar mtPaint\n" "para que esta selección teña efecto" #: src/prefs.c:524 msgid "Language" msgstr "Idioma" #: src/prefs.c:529 msgid "Interface" msgstr "Interface" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Fondo de grises" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Selección mover pixeles" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Máximo tamaño de ventá reducida" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Amosar portapapeis mentras se pega" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Movimento do rato = Ferramenta" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Confirmar saida" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Prema Q para sair de mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "O cambio de ferramenta implica o pegado" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Preferencias de ferramenta de centrado" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "A nova imaxe establece o zoom ao 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Roda do rato = Ampliar" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Usar iconas de menu" #: src/prefs.c:564 msgid "Files" msgstr "Ficheiros" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Ler 16-bit TGAs como 5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Escribir TGAs de abaixo á arriba según orden" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "Carga reversibel de imaxes" #: src/prefs.c:588 msgid "Paths" msgstr "Rutas" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Ficheiros do portapapeis" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Seleccione portapapeis" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Programa navegador HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Seleccionar programa de navegación" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Localización do ficheiro indice do manual" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Seleccionar o Ficheiro índice do manual" #: src/prefs.c:605 msgid "Default Palette" msgstr "Paleta predeterminada" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Seleccionar paleta predefinida" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Patróns predefinidos" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Seleccionar ficheiros de patróns predefinidos" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Barra de estado" #: src/prefs.c:633 msgid "Tablet" msgstr "Tableta" #: src/prefs.c:637 msgid "Device Settings" msgstr "Parámetros de dispositivo" #: src/prefs.c:645 msgid "Configure Device" msgstr "Configurar dispositivo" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Variables do lápis" #: src/prefs.c:654 msgid "Factor" msgstr "Factor" #: src/prefs.c:680 msgid "Test Area" msgstr "Area de proba" #: src/shifter.c:205 msgid "Frames" msgstr "Fotogramas" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Paleta «Shifter»" #: src/shifter.c:279 msgid "Start" msgstr "Comezar" #: src/shifter.c:281 msgid "Finish" msgstr "Terminar" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Pegar paleta" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Acción" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Orde" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Configurar accións de ficheiros" #: src/spawn.c:515 msgid "Execute" msgstr "Executar" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Produciuse un erro %i cando se intentaba cargar %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Non se pode atopar a documentación. Necesitas descargar o manual de mtPaint " "e instalálo, ou determinar a localización correcta na ventá de preferencias." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Ha un problema arrancando o navegador HTML. Necesitas determinar un programa " "de navegación na ventá de preferencias." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "Cubo RGB" #: src/toolbar.c:234 msgid "By image channel" msgstr "No lugar de canle de imaxe" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Executar-gradación" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Preferencias de recheo" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Respetar opacidade" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Preferencias de esborranchado" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "Espaciado da brocha" #: src/toolbar.c:298 msgid "Normal" msgstr "Normal" #: src/toolbar.c:299 msgid "Colour" msgstr "Cor" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Saturar máis" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplicar" #: src/toolbar.c:300 msgid "Divide" msgstr "Dividir" #: src/toolbar.c:300 msgid "Screen" msgstr "Pantalla" #: src/toolbar.c:300 msgid "Dodge" msgstr "Subexposición" #: src/toolbar.c:301 msgid "Burn" msgstr "Superexposición" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Luz forte" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Luz suave" #: src/toolbar.c:301 msgid "Difference" msgstr "Diferenza" #: src/toolbar.c:302 msgid "Darken" msgstr "Escurecer" #: src/toolbar.c:302 msgid "Lighten" msgstr "Aclarar" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extraer granulado" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Combinar granulado" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Modo de mistura" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Modo continuo" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Modo opaco" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Modo tinguido" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Tinguido +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Modo de mistura" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Deshabilitar todas as máscaras" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Modo de gradación" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Barra de propiedades" #: src/toolbar.c:1041 msgid "Cut" msgstr "Cortar" #: src/toolbar.c:1042 msgid "Copy" msgstr "Copiar" #: src/toolbar.c:1043 msgid "Paste" msgstr "Pegar" #: src/toolbar.c:1045 msgid "Undo" msgstr "Desfacer" #: src/toolbar.c:1046 msgid "Redo" msgstr "Refacer" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Vista preliminar" #: src/toolbar.c:1053 msgid "Paint" msgstr "Debuxar" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Esborranchar" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Encher con pintura" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Liña recta" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Esborranchar" #: src/toolbar.c:1058 msgid "Clone" msgstr "Clonar" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Facer selección" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Selección poligonal" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Situar gradación" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Selección libre" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Contorna de elipse" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Elipse chea" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Resaltar a selección" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Encher a selección" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Voltear selección verticalmente" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Voltear selección horizontalmente" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Rotar a Selección no sentido do reloxo" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Rotar a elección no sentido contrario do reloxo" #: src/viewer.c:132 msgid "About" msgstr "Acerca de" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "O ficheiro: %s non é valido - A paleta non se actualizou" #~ msgid "Distance to A+B" #~ msgstr "Distancia á A+B" #~ msgid "Edit Frames" #~ msgstr "Editar fotogramas" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "" #~ "Ficheiro demasiado grande, o tamaño debe ser <= ancho=%i alto=%i : %s" #~ msgid "Could not open %s: %s" #~ msgstr "Non se pudo abrir %s: %s" #~ msgid "Error closing %s: %s" #~ msgstr "Produciuse un erro ao pechar %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Non se puido escribir a %s: %s" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "A paleta non conten suficientes cores para facer unha fusión" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Ha demasiados elementos na paleta a reducir." #~ msgid "Done" #~ msgstr "Feito" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "A imaxe actual non ten as dimensions 94x94x3 polo que non pode crearse o " #~ "ficheiro de patróns «patterns_user.c»" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está intentando gardar unha imaxe RGB nun fichero XPM, o que non é " #~ "posible. Suxiro que o garde con extensión PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está intentando gardar unha imaxe RGB a un fichero GIF, o que non é " #~ "posible. Suxiro que o garde con extensión PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Está intentando gardar un ficheiro XBM con unha paleta de máis de 2 " #~ "cores. Reduza a paleta a 2 cores ou use outro formato." #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está intentando gardar un lenzo nun fichero JPEG, o que non é posible. " #~ "Suxiro que o garde con extensión PNG." #~ msgid "/Edit/Create Patterns" #~ msgstr "/Editar/Crear Patróns" #~ msgid "/View/Command Line Window" #~ msgstr "/Ver/Liña de ordenes" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Paleta/Crear cuantificado (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Paleta/Crear cuantificado (DL3)" #~ msgid "/File/%i" #~ msgstr "/Ficheiro/%i" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "Calidade JPEG para gardar (100=Alta) " #~ msgid "DL1 Quantize (fastest)" #~ msgstr "Ponderado DL1 (o máis rápido)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "Ponderado DL3 (moi lento, mellor calidade)" #~ msgid "Loading PNG image" #~ msgstr "Cargar imaxe PNG" #~ msgid "Loading clipboard image" #~ msgstr "Cargar imaxe do portapapeis" #~ msgid "Saving PNG image" #~ msgstr "Gardar imaxe PNG" #~ msgid "Saving Clipboard image" #~ msgstr "Gardar imaxe do portapapeis" #~ msgid "Saving Layer image" #~ msgstr "Gardar imaxe da capa" #~ msgid "Loading GIF image" #~ msgstr "Cargar imaxe GIF" #~ msgid "Saving GIF image" #~ msgstr "Gardar imaxe GIF" #~ msgid "Loading JPEG image" #~ msgstr "Cargar imaxe JPEG" #~ msgid "Saving JPEG image" #~ msgstr "Gardar imaxe JPEG" #~ msgid "Loading TIFF image" #~ msgstr "Cargar imaxe TIFF" #~ msgid "Saving TIFF image" #~ msgstr "Gardar imaxe TIFF" #~ msgid "Loading BMP image" #~ msgstr "Cargar imaxe BMP" #~ msgid "Saving BMP image" #~ msgstr "Gardar imaxe BMP" #~ msgid "Loading XPM image" #~ msgstr "Cargar imaxe XPM" #~ msgid "Saving XPM image" #~ msgstr "Gardar imaxe XPM" #~ msgid "Loading XBM image" #~ msgstr "Cargar imaxe XBM" #~ msgid "Saving XBM image" #~ msgstr "Gardar imaxe XBM" #~ msgid "Saving UNDO images" #~ msgstr "Gardando histórico de imaxes" #~ msgid "%i Files on Command Line" #~ msgstr "%i Ficheiros na liña de ordenes" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Paleta/Crear cuantificado (Wu)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Cuantificación «Wu» (o mellor método para paletas pequenas)" #~ msgid "Grid colour RGB" #~ msgstr "Cor RGB da rella" #~ msgid "Zoom" #~ msgstr "Ampliación" #~ msgid "Lanczos3" #~ msgstr "Lanczos3" #~ msgid "Saving Channel image" #~ msgstr "Gardar imaxe da canle" #~ msgid "Loading LSS16 image" #~ msgstr "Cargar imaxe LSS16" #~ msgid "Saving LSS16 image" #~ msgstr "Gardar imaxe LSS16" #~ msgid " C Command Line Window" #~ msgstr " C Ventá de liña de ordenes" #~ msgid "/File/Actions/sep2" #~ msgstr "/Ficheiro/Accións/sep2" #~ msgid "/Frames" #~ msgstr "/Fotogramas" #~ msgid "/File/Actions/%i" #~ msgstr "/Ficheiro/Accións/%i" mtpaint-3.40/po/cs.po0000644000175000000620000024353711647046422014042 0ustar muammarstaff# translation of cs.po to Czech # translation of cs.po to # Czech translations for mtpaint package. # Copyright (C) 2005 THE mtpaint'S COPYRIGHT HOLDER # This file is distributed under the same license as the mtpaint package. # # Pavel Ruzicka , 2005, 2006. # Pavel Ruzicka , 2006, 2007. msgid "" msgstr "" "Project-Id-Version: cs\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2010-04-06 23:55+0000\n" "Last-Translator: Roman Horník \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2011-09-03 18:36+0000\n" "X-Generator: Launchpad (build 13830)\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Náhled animace" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Přehrát" #: src/ani.c:695 msgid "Fix" msgstr "Fixovat" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Zavřít" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Chyba" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Nelze vytvořit výstupní adresář" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Vytvářím snímky animace" #: src/ani.c:857 msgid "Unable to save image" msgstr "Nelze uložit obrázek" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Varování" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Opravdu chcete vymazat všechna poziční a cyklová data pro všechny vrstvy?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Ne" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Ano" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Nastavit klíčový snímek" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Musíte mít alespoň 2 vrstvy pro vytvoření animace" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Před vytvořením animace musíte nejprve uložit soubor vrstev" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Konfigurovat animaci" #: src/ani.c:1064 msgid "Output Files" msgstr "Výstupní soubory" #: src/ani.c:1067 msgid "Start frame" msgstr "První snímek" #: src/ani.c:1068 msgid "End frame" msgstr "Poslední snímek" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Zpoždění" #: src/ani.c:1071 msgid "Output path" msgstr "Výstupní cesta" #: src/ani.c:1072 msgid "File prefix" msgstr "Předpona souboru" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Vytvořit snímky GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Pozice" #: src/ani.c:1135 msgid "Cycling" msgstr "Cyklus" #: src/ani.c:1148 msgid "Save" msgstr "Uložit" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Náhled" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Vytvořit snímky" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Obrázek je pro transformaci příliš velký." #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Přechod" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfologické" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Detekce hran" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Zaostření hran" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Zjemnění hran" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Rozdílné X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Gaussovo rozmazání" #: src/canvas.c:523 msgid "Radius" msgstr "Poloměr" #: src/canvas.c:524 msgid "Amount" msgstr "Množství" #: src/canvas.c:525 msgid "Threshold " msgstr "Práh " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Zaostřovací maska" #: src/canvas.c:563 msgid "Outer radius" msgstr "Vnější poloměr" #: src/canvas.c:564 msgid "Inner radius" msgstr "Vnitřní poloměr" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizovat" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Rozdíl gausiánů" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Rozostření Kuwahara-Nagao" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Obrázek je moc velký pro tuto rotaci." #: src/canvas.c:668 msgid "Smooth" msgstr "Vyhladit" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Libovolná rotace" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Nedostatek paměti pro vytvoření schránky" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Neplatný soubor kanálů." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Zobrazit animaci" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Toto je animovaný %s." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "Soubor je příliš velký, musí být <= šířka=%i výška=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Nelze načíst soubor" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Knihovna pro import souborů skončila z důvodu problémů se souborem (možná " "poškozená obrazová data, nebo zkrácený soubor) Podařilo se načíst nějaká " "data, jelikož hlavička se zdá být v pořádku, ale doporučuji uložit tento " "obrázek do nového souboru, aby se situace již neopakovala." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Nelze otevřít soubor" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Nepodporovaný typ souboru" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Soubor: %s již existuje. Chcete ho přepsat?" #: src/canvas.c:1524 msgid "File Found" msgstr "Soubor nalezen" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NE" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "ANO" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Index průhlednosti" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Kvalita ukládání JPEGu (100=Vysoká)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG komprese (0=žádná)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE komprese" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000 komprese (0=bezeztrátová)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Aktivní bod na X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Typ souboru" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Vratitelné" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Zpoždění animace" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Nelze exportovat obrázky historie" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Nelze exportovat do ASCII souboru" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Nelze uložit soubor: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Načtení obrázku" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Uložení obrázku" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Načtení palety" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Uložení palety" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Export obrázků historie" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Export obrázků historie (reverzně)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Pokud chcete exportovat ASCII kresbu, musíte mít maximálně 16 barev." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportovat jako ASCII kresbu" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Uložení souborů vrstev" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Vyberte adresář snímků" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Abyste vytvořili animovaný GIF, musíte uložit alespoň jeden snímek." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exportovat GIF animaci" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Otevřít kanálový soubor" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Uložit kanálový soubor" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Uložit kompozitní obrázek" #: src/channels.c:236 msgid "Cleared" msgstr "Nenastaven" #: src/channels.c:237 msgid "Set" msgstr "Nastavený" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Nastavena barva A radius B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Nastaveno smíchání A do B" #: src/channels.c:240 msgid "Image Red" msgstr "Červená obrázku" #: src/channels.c:241 msgid "Image Green" msgstr "Zelená obrázku" #: src/channels.c:242 msgid "Image Blue" msgstr "Modrá obrázku" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alpha" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Výběr" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maska" #: src/channels.c:256 msgid "Create Channel" msgstr "Vytvořit kanál" #: src/channels.c:262 msgid "Channel Type" msgstr "Typ kanálu" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Počáteční stav kanálu" #: src/channels.c:273 msgid "Inverted" msgstr "Invertovaný" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Storno" #: src/channels.c:316 msgid "Delete Channels" msgstr "Smazat kanály" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Práh kanálu" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Červená" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Zelená" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Modrá" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Odstín" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturace" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Hodnota" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Neprůsvitnost" #: src/font.c:939 msgid "Creating Font Index" msgstr "Vytvářím seznam písem" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Musíte vybrat alespoň jeden adresář, ve kterém se bude hledat písmo." #: src/font.c:1468 msgid "Font" msgstr "Písmo" #: src/font.c:1469 msgid "Style" msgstr "Styl" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Velikost" #: src/font.c:1471 msgid "Filename" msgstr "Název souboru" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Adresář" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Vložit text" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Text" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Zadejte text" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Vyhlazení" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invertovat" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Barva pozadí =" #: src/font.c:1805 msgid "Oblique" msgstr "Skloněné" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Úhel rotace =" #: src/font.c:1831 msgid "Font Directories" msgstr "Adresáře s fonty" #: src/font.c:1836 msgid "New Directory" msgstr "Nový adresář" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Vybrat adresář" #: src/font.c:1848 msgid "Add" msgstr "Přidat" #: src/font.c:1852 msgid "Remove" msgstr "Odstranit" #: src/font.c:1856 msgid "Create Index" msgstr "Vytvořit index" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Nemohu přistoupit do složky %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Smazat" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Přejmenovat" #: src/fpick.c:771 msgid "Create Directory" msgstr "Vytvořit adresář" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Zadejte nové jméno souboru" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Zadejte jméno nového adresáře" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Vytvořit" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Opravdu chcete smazat \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Nelze smazat" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Nelze přejmenovat" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Nelze vytvořit adresář" #: src/fpick.c:939 msgid "Up" msgstr "Nahoru" #: src/fpick.c:940 msgid "Home" msgstr "Domovský adresář" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Vytvořit nový adresář" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Zobrazit skryté soubory" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Třídění bez rozlišení velikosti písmen" #: src/fpick.c:1044 msgid "Name" msgstr "Jméno" #: src/fpick.c:1046 msgid "Type" msgstr "Typ" #: src/fpick.c:1047 msgid "Modified" msgstr "Změněno" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Obecné" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Klávesové zkratky" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Zkratky myši" #: src/help.c:28 msgid "Credits" msgstr "Poděkování" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Autoři\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Seznam autorů naleznete v záložce Poděkování.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint je svobodný software; můžete ho šířit a/nebo modifikovat v souladu s " "GNU General Public Licencí jak byla publikována Free Software Foundation; " "buď verzí 3, nebo( dle vašeho zvážení) jakoukoliv další verzí.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint je distribuován v naději, že bude používán, ale BEZ JAKÉKOLIV " "ZÁRUKY; a také bez samozřejmé záruky PRODEJNOSTI, nebo SCHOPNOSTI PLNIT " "SPECIÁLNÍ ÚČELY. Pro více detailů si přečtěte GNU General Public Licenci.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint je jednoduchý GTK+1/2 kreslící program navržený pro vytváření ikon a " "kreseb tvořených pixely. Může upravovat obrázky s indexovanou, nebo 24 bit " "RGB paletou a nabídnout základní kreslicí a manipulační nástroje. Má také " "mnoho dalších mocných nástrojů, jako kanály, vrstvy a animace. Vzhledem ke " "své jednoduchosti a bez závislostí běží dobře na GNU/ Linuxu, Windows a " "starším PC hardware.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Kompletní dokumentace funkcí mtPaintu je k dispozici v příručce. Jestliže " "ji ještě nemáte, můžete si ji stáhnout z webových stránek mtPaintu.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Pokud se vám mtPaint líbí a chcete mít vždy nejnovější verzi, nebo chcete " "sdělit nějaké názory, může být pro vás zajímavá tato mailová konference:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Vytvořit nový obrázek" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Otevřít obrázek" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Uložit obrázek" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Ukončit program\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Vybrat celý obrázek" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Zrušit výběr, vkládání" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Zkopírovat výběr do schránky" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Zkopírovat výběr do schránky, a potom vyplnit oblast " "výběru aktuálním vzorem" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Vložit schránku do středu obrázku" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K Vložit schránku do míst, odkud byla kopírována" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return Potvrdit vložení na plátno" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Klávesy šipek Režim kreslení - Změna barvy A, nebo B" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Klávesy šipek Režim výběru - Posun oblasti výběru, nebo vkládání o " "jeden pixel" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+šipky Posun oblasti výběru, vkládání o x pixelů - x je definováno v " "okně voleb" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" " Ctrl+šipky Přesunout vrstvu, nebo změnit velikost výběrového boxu" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ or ] Změnit barvu A na další, nebo předchozí položku palety" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ or ] Změnit barvu B na další, nebo předchozí položku palety\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Oříznout obrázek dle výběru" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Transformovat barvy - jako Jas, Kontrast, Saturace, bity " "na barvu, Gamma" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Převést na škálu šedi" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G Převést na škálu šedi (S Gamma korekcí)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Nakreslit obdélník okolo oblasti výběru aktuální výplní" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Vyplnit oblast výběru aktuální výplní" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Nakreslit elipsu uvnitř oblasti výběru" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L Nakreslit vyplněnou elipsu uvnitř oblasti výběru\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Upravit RGB hodnoty pro barvy A a B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Upravit všechny barvy palety\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Volby" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Informace\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Vrátit poslední akci" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Znovu provést vrácenou akci\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Okno zobrazení" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Okno vrstev\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Hlavní editační okno - Přiblížit" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Hlavní editační okno - Vzdálit" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Okno zobrazení - Přiblížit" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Okno zobrazení - Vzdálit\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% zoom" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% zoom" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% zoom" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% zoom" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% zoom" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% zoom" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% zoom" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% zoom" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% zoom\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Upravit kanál obrázku" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Upravit alfa kanál" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Upravit kanál výběru" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Upravit kanál masky\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Pomoc" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Vybrat vzor" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Vybrat štětec" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Nástroj malování" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Hlavní lišta" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Nástrojová lišta" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Lišta nastavení" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Paleta" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Nástroj výběru" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Uloží aktuální schránku do souboru 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Načte soubor 1-12 do schránky\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Nastaví neprůsvitnost na 10%, 20%, ... , 100% " "(hlavní i numerická klávesnice)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Zvýší neprůsvitnost o 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Sníží neprůsvitnost o 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Zobrazí, nebo skryje hlavní nabídku, panely, nástroje a " "paletu" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up Změna měřítka plátna" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down Změna velikosti plátna" #: src/help.c:128 msgid " End Pan Window" msgstr " End Přehledové okno" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Levé tlačítko Maluje na plátno pomocí vybraného nástroje" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Střední tlačítko Nastaví bod, který bude středem obrázku při další " "změně zoomu" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Pravé tlačítko Potvrdí vložení na plátno / Přeruší kreslení čáry / " "Zruší výběr oblasti\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Kolečko myši V GTK+2 může mít uživatel kolečko ke změně přiblížení " "nastavením v okně voleb\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+Levé tlačítko Výběr barvy A z pod ukazatele myši" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Pravé tlačítko Výběr barvy B z pod ukazatele myši" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr " Ctrl+kolečko Posouvá hlavní editační okno doleva, nebo doprava\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Pravé tlačítko Nastaví bod, který bude středem obrázku při další " "změně zoomu\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "Při posouvání myši můžete zablokovat osy X/Y takto:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift Omezí posuny myší na vertikální osu" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl Omezí posuny myší na horizontální osu" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint aktuálně spravuje Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Následující lidé (v abecedním pořadí) se přímo podílejí na projektu a proto " "jim patří velké díky za jejich velkorysost a těžkou práci:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Autoři\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - Přispívající vývojář pro verzi 2.30. Vedoucí vývojář a " "správce od verze 3.00 do současnosti." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Původní autor a správce do verze 3.00 a od té doby občasný " "přispěvatel." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Napsal Wu quantovací metodu - více informací v souboru wu.c\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Základní přispěvatelé (Zpětná vazba a nápady na vylepšení, pokud není " "uvedeno jinak)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Redesign stránek - Duben 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Vytvořil Gifsicle, který je potřeba pro vytvoření a " "prohlížení animovaných GIFů http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - manuálová stránka, Launchpad/ Rosetta " "registrace" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Překlady\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brazilská Portugalština - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Čeština - Pavel Ruzicka, Martin Petricek, Roman Horník" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Holandština - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Francouzština - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galicijsky - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Němčina - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italisky - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Japonština - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polština - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugalština - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Ruština - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Zjednodušená čínština - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Slovenština - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Španělština - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Švédsky - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwanská Čínština - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turečtina - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Informace" #: src/info.c:290 msgid "Memory" msgstr "Paměť" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Celková paměť pro hlavní obrázky a historii" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Zpět / Vpřed / Max počet úrovní" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Schránka" #: src/info.c:311 msgid "Unused" msgstr "Nepoužito" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Schránka = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Schránka = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Unikátních RGB pixelů" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Vrstvy" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Spotřeba paměti všech vrstev" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histogram barev" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Barevný index celkově - použito %i z %i" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "Pixelů na plátně" #: src/info.c:407 msgid "Orphans" msgstr "Sirotků" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "Nelze nalézt domovský adresář. Použiji aktuální adresář jako domovský." #: src/layer.c:70 msgid "Background" msgstr "Pozadí" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Změněno)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Nenazvan" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Opravdu chcete smazat vrstvu %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Jedna, nebo více vrstev obsahuje změny, které nebyly uloženy. Opravdu je " "chcete ztratit?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Storno" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Budiž" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d vrstev se nepodařilo nahrát" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Jedna, nebo více vrstev nebyla uložena. Musíte uložit každý obrázek zvlášť," "než uložíte textový soubor s vrstvami, abyste mohli v budoucnosti otevřít " "tento kompozitní obrázek." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Opravdu chcete smazat všechny vrstvy?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Nemůžete již přidat žádné další vrstvy." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nová vrstva" #: src/layer.c:1160 msgid "Raise" msgstr "Nahoru" #: src/layer.c:1161 msgid "Lower" msgstr "Dolů" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Zduplikovat vrstvu" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Vycentrovat vrstvu" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Smazat vrstvu" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Zavřít okno vrstev" #: src/layer.c:1268 msgid "Layer Name" msgstr "Název vrstvy" #: src/layer.c:1269 msgid "Position" msgstr "Pozice" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Průhledná barva" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Zobrazit všechny vrstvy v hlavním okně" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Nejsou žádné nepoužité barvy na odstranění!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Paleta neobsahuje žádné barvy s identickými RGB hodnotami" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "Paleta obsahuje %i barev se stejnými RGB hodnotami. Opravdu je chcete " "sloučit do jedné a upravit plátno?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "indexováno" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Pokoušíte se uložit obrázek %s do %s souboru. Toto není možné, nejlepší je " "uložit jej s příponou PNG." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Pokoušíte se uložit soubor %s s paletu obsahující více než %d barev. Buď " "použijte jiný formát, nebo snížte počet barev maximálně na %d." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Pokoušíte se uložit XPM soubor s více než 4096 barvami. Buď použijte jiný " "formát, posterizujete obrázek na 4 bity na kanál, nebo jinak snížte počet " "barev." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Nelze načíst schránku" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Nelze uložit schránku" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "Plátno / paleta obsahuje neuložené změny. Opravdu je chcete ztratit?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Obrázek" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Opravdu chcete skončit?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Soubor" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nový" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Otevřít ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Uložit" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Uložit jako ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Export obrázků historie ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Export obrázků historie (reverzně) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportovat jako ASCII kresbu ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportovat jako animovaný GIF ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Konec" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Upravit" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Zpět" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Vpřed" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Vyjmout" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopírovat" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Vložit doprostřed" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Vložit do nové vrstvy" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Vložit" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Vložit text" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Načíst schránku" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Uložit schránku" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Vybrat vzor ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Vybrat štětec ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Zobrazit" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Hlavní lišta" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Nástrojová lišta" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Lišta nastavení" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Paleta" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Stavová lišta" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Přepnout zobrazení" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Vycentrovat obrázek" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Rastr při zvětšení" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Okno zobrazení" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Horizontální dělení" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Okno přiblížení" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Přehledové okno" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Okno vrstev" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Obrázek" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Převést na RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Převést na indexovaný ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Změnit měřítko plátna ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Změnit velikost plátna ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Oříznout" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Otočit vertikálně" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Otočit horizontálně" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Otočit po směru ručiček" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Otočit proti směru ručiček" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Otočit libovolně ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Informace ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Volby ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Výběr" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Vybrat vše" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Zrušit výběr (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Výběr lasem" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Vyjmout lasem" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Orámovat výběr" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Vyplnit výběr" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Orámovat elipsu" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Vyplnit elipsu" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Alfa přechod mezi A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Přesun Alfa do masky" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Maskovat barvy A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Odmaskovat barvy A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Maskovat všechny barvy" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Zrušit masku" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Paleta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Otevřít ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Načíst výchozí" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Maskovat všechny barvy" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Nemaskovat žádnou barvu" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Prohodit A a B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Upravit barvy A a B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Editor barev ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Nastavit počet barev ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Sloučit duplicitní barvy" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Odstranit nepoužité barvy" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Vytvořit kvantované ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Uspořádat barvy ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Posunovač palety ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/_Efekty" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformovat barvy ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invertovat" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Šedá škála" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Šedá škála (s Gamma korekcí)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Isometrické transformace" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Levá strana dolů" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Pravá strana dolů" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Horní strana vpravo" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Dolní strana vpravo" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Detekce hran ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Zaostřit ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Zaostřovací maska ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Zjemnit ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Gaussovo rozmazání ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Reliéfy" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Baktérie ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Kanály" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nový ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Smazat ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Upravit obrázek" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Upravit alfakanál" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Upravit výběr" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Upravit masku" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Skrýt obrázek" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Vypnout alfakanál" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Vypnout výběr" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Vypnout masku" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Párovat RGBA operace" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Práh ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Zobrazit alfakanál jako overlay" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Konfigurovat overlaye ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/Vrstvy" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Uložit kompozitní obrázek ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Odstranit všechny vrstvy" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Konfigurovat animaci ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Náhled animace ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Nastavit klíčový snímek ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Odstranit všechny klíčové snímky ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Více..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/Po_moc" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Dokumentace" #: src/mainwindow.c:4933 msgid "//About" msgstr "//O aplikaci" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Převázat klávesové zkratky" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Převádím na indexovou paletu" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Efekt baktérie" #: src/memory.c:4744 msgid "Rotating" msgstr "Otáčím" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Volné otáčení" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Měním měřítko obrázku" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Počítám počet unikátních RGB pixelů" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Aplikuji efekt" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagaův filtr" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Zešikmit" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Prosím čekejte ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Procházet" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "S Gamma korekcí" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Škála šedi" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Indexovaná paleta" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Ze schránky" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Sejmout obrazovku" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nový obrázek" #: src/otherwindow.c:288 msgid "Width" msgstr "Šířka" #: src/otherwindow.c:289 msgid "Height" msgstr "Výška" #: src/otherwindow.c:290 msgid "Colours" msgstr "Barev" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Výběr vzoru" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Nastavit počet barev" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Provést" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Jas" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Jas" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Vzdálenost k A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Projekce do A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frekvence" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Seřadit barvy v paletě" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Od indexu" #: src/otherwindow.c:617 msgid "End Index" msgstr "Do indexu" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Opačné řazení" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Kontrast" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "bitů na barvu" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Transformace barev" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Zobrazit detaily" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Zachovat hodnoty" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paleta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Automatický náhled" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Reset" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Nové rozměry jsou stejné jako původní - nic se neprovede." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "Operační systém nemůže alokovat paměť pro tuto operaci." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "Pro tuto operaci jste nealokovali dostatek paměti v okně Volby." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Nejbližší okolí" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineární / mapování oblasti" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineární" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bikubické" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bikubické s hranami" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Lepší bikubické" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bikubické ostřejší" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Šířka " #: src/otherwindow.c:1168 msgid "Height " msgstr "Výška " #: src/otherwindow.c:1170 msgid "Original " msgstr "Originál " #: src/otherwindow.c:1176 msgid "New" msgstr "Nový" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Posun" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Vycentrovat" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Dodržet poměr stran" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Vyčistit" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Dlaždice" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Zrcadlová dlaždice" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Zrcadlově" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Nastavení" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Změna měřítka plátna" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Změna velikosti plátna" #: src/otherwindow.c:1963 msgid "From" msgstr "Od" #: src/otherwindow.c:1963 msgid "To" msgstr "Do" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Měřítko" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Editor barev" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Konfigurovat overlaye" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Editor barev" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Limit" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Koule" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Úhel" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Krychle" #: src/otherwindow.c:2110 msgid "Range" msgstr "Rozsah" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Inverze" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Režim výběru barvy" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Neprůhledné" #: src/otherwindow.c:2128 msgid "Border" msgstr "Okraj" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Průhledné" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Název " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Chytrá mřížka" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Mřížka dlaždice" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Rastr při zoomu alespoň" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Šířka mřížky" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Výška mřížky" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Nastavit mřížku" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Barevný prostor" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Největší (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Suma (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclidean (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Rozdíl měření" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Přesná konverze" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Použít aktuální paletu" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN kvantizace (pomalejší, ale kvalitnější)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu kvantizace (rychlá)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" "Max-Min kvantizace (nejlepší pro palety s malým počtem barev a dithering)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Žádný" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (rychlý)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Rozechvělý (efekt)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Rozptýlený (efekt)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamut" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Slabě" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Silně" #: src/otherwindow.c:2385 msgid "Off" msgstr "Vypnuto" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Separovat/Sečíst" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Separovat/Rozdělit" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Délka/Sečíst" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Délka/Rozdělit" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Vytvořit kvantované" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Převod na indexovaný" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Počet indexovaných barev" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Rozechvět" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Redukovat plýtvání barvami" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Serpentinový scan" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Chyba propagace, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Selektivní chyba propagace" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "Zpětný HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Konstantní" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Upravit gradient" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Bodů:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Obráceně" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Upravit Vlastní" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineární" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radiální" #: src/otherwindow.c:3018 msgid "Square" msgstr "Čtvercový" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Úhlové" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Kuželové" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Úroveň" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Opakovat" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A do B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A do B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A do B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A do B (zpětně HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Pouze A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Vlastní" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Aktuální do 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Pouze aktuální" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Nastavení gradientu" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Kanál" #: src/otherwindow.c:3047 msgid "Length" msgstr "Délka" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Délka opakování" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Typ gradientu" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Typ rozšíření" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Neprůhlednost náhledu" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "Ve vzdálenosti" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horizontální " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Vertikální" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Nepozměněno" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "Zdroj" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Původ" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Relativní měřítko" #: src/otherwindow.c:3337 msgid "Display" msgstr "Zobrazit" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Ukládám %s obrázek" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Nahrávám %s obrázek" #: src/png.c:850 msgid "Layer" msgstr "Vrstva" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d z %d snímků nemohly být uloženy jako %s - místo toho uloženy jako PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Tlak" #: src/prefs.c:154 msgid "Current Device" msgstr "Aktuální zařízení" #: src/prefs.c:431 msgid "Default System Language" msgstr "Výchozí jazyk systému" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Čínština (zjednodušená)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Čínsky (Taiwansky)" #: src/prefs.c:433 msgid "Czech" msgstr "Česky" #: src/prefs.c:433 msgid "Dutch" msgstr "Holandsky" #: src/prefs.c:433 msgid "English (UK)" msgstr "Anglicky (UK)" #: src/prefs.c:433 msgid "French" msgstr "Francouzsky" #: src/prefs.c:434 msgid "Galician" msgstr "Galicijsky" #: src/prefs.c:434 msgid "German" msgstr "Německy" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italsky" #: src/prefs.c:435 msgid "Japanese" msgstr "Japonsky" #: src/prefs.c:435 msgid "Polish" msgstr "Polsky" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugalsky" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugalsky (Brazílie)" #: src/prefs.c:436 msgid "Russian" msgstr "Rusky" #: src/prefs.c:436 msgid "Slovak" msgstr "Slovensky" #: src/prefs.c:437 msgid "Spanish" msgstr "Španělsky" #: src/prefs.c:437 msgid "Swedish" msgstr "Švédsky" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turecky" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X aktivní bod" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y aktivní bod" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Naposledy použité soubory" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Tichý limit ukazatele postupu" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometrie plátna" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Kurzor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Geometrie Výběru" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Zpět / Vpřed" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Bohatost" #: src/prefs.c:457 msgid "Preferences" msgstr "Volby" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Max paměti použité pro historii (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Maximální počet vracení zpět" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Použít gamma korekci jako výchozí" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Optimalizovat šachovnici alfa kanálu" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Vypnout průhlednost v okně zobrazení" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Vyberte váš oblíbený jazyk\n" "\n" "Aby se projevily všechny změny,\n" "je třeba mtPaint restartovat." #: src/prefs.c:524 msgid "Language" msgstr "Jazyk" #: src/prefs.c:529 msgid "Interface" msgstr "Rozhraní" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Odstín šedivého pozadí" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Posun pixelů výběru" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Velikost přehledového okna" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Zobrazovat schránku při vkládání" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Kurzor myši = Nástroj" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Potvrdit konec" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Klávesa Q ukončí mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Změna nástroje potvrdí vložení" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Centrovat dialogy nastavení nástrojů" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Nový obrázek nastaví zoom na 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Kolečko na myši = Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Použít ikony menu" #: src/prefs.c:564 msgid "Files" msgstr "Soubory" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Načíst 16-bitové obrázky TGA jako 5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Zapsat TGA s řádkováním odspoda nahoru" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "Cesty" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Soubory schránky" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Výběr souboru schránky" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML Prohlížeč" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Vyberte webový prohlížeč" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Umístění indexu příručky" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Vyberte Index soubor příručky" #: src/prefs.c:605 msgid "Default Palette" msgstr "Výchozí paleta" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Vybrat výchozí paletu" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Výchozí vzory" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Stavová lišta" #: src/prefs.c:633 msgid "Tablet" msgstr "Tablet" #: src/prefs.c:637 msgid "Device Settings" msgstr "Nastavení zařízení" #: src/prefs.c:645 msgid "Configure Device" msgstr "Konfigurace zařízení" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Variabilita nástroje" #: src/prefs.c:654 msgid "Factor" msgstr "Faktor" #: src/prefs.c:680 msgid "Test Area" msgstr "Testovací plocha" #: src/shifter.c:205 msgid "Frames" msgstr "Snímků" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Posunovač palety" #: src/shifter.c:279 msgid "Start" msgstr "Start" #: src/shifter.c:281 msgid "Finish" msgstr "Konec" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Upravit paletu" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Akce" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Příkaz" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "Spustit" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Nastala chyba %i při pokusu o spuštění %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Nelze nalézt dokumentaci. Buď potřebujete stáhnout příručku mtPaintu z webu " "a nainstalovat ji, nebo musíte nastavit správnou cestu v okně voleb." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Objevil se problém se spuštěním HTML prohlížeče. Musíte nastavit správný " "název programu v okně voleb." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB krychle" #: src/toolbar.c:234 msgid "By image channel" msgstr "Kanálem obrázku" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Gradientem" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Nastavení výplně" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Respektovat režim neprůhlednosti" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Nastavení rozmazání" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Normální" #: src/toolbar.c:299 msgid "Colour" msgstr "Barva" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Více nasytit" #: src/toolbar.c:300 msgid "Multiply" msgstr "Násobení" #: src/toolbar.c:300 msgid "Divide" msgstr "Dělení" #: src/toolbar.c:300 msgid "Screen" msgstr "Závoj" #: src/toolbar.c:300 msgid "Dodge" msgstr "Zesvětlení" #: src/toolbar.c:301 msgid "Burn" msgstr "Ztmavení" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Tvrdé světlo" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Měkké světlo" #: src/toolbar.c:301 msgid "Difference" msgstr "Rozdíl" #: src/toolbar.c:302 msgid "Darken" msgstr "Ztmavit" #: src/toolbar.c:302 msgid "Lighten" msgstr "Zesvětlit" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extrakce zrnitosti" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Sloučení zrnitosti" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Režim míchání" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Spojitý režim" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Režim neprůsvitnosti" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Režim kolorování" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Kolorování +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Režim míchání" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Vypnout všechny masky" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Režim Gradientu" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Lišta nastavení" #: src/toolbar.c:1041 msgid "Cut" msgstr "Vyjmout" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopírovat" #: src/toolbar.c:1043 msgid "Paste" msgstr "Vložit" #: src/toolbar.c:1045 msgid "Undo" msgstr "Zpět" #: src/toolbar.c:1046 msgid "Redo" msgstr "Vpřed" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Přehledové okno" #: src/toolbar.c:1053 msgid "Paint" msgstr "Malování" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Přeházení" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Vyplnění" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Rovná čára" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Rozmazat" #: src/toolbar.c:1058 msgid "Clone" msgstr "Klonovat" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Označit výběr" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Výběr polygonem" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Vložit Gradient" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Výběr lasem" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Prázdná elipsa" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Vyplněná elipsa" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Orámovat výběr" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Vyplnit výběr" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Otočit výběr vertikálně" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Otočit výběr horizontálně" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Otočit výběr po směru ručiček" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Otočit výběr proti směru ručiček" #: src/viewer.c:132 msgid "About" msgstr "O aplikaci" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Soubor: %s je neplatný - paleta nebyla aktualizována" #~ msgid "Distance to A+B" #~ msgstr "Vzdálenost k A+B" #~ msgid "Edit Frames" #~ msgstr "Upravit snímky" mtpaint-3.40/po/tr.po0000644000175000000620000021260211647046423014050 0ustar muammarstaff# Turkish translation for mtpaint # Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2006. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2008-06-19 21:36+0000\n" "Last-Translator: Tutku Dalmaz \n" "Language-Team: Turkish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-01-18 12:36+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Animasyon Önizleme" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Yürüt" #: src/ani.c:695 msgid "Fix" msgstr "Onar" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Kapat" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Hata" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Çıktı dizini oluşturulamıyor" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Animasyon Çerçeveleri Oluşturuluyor" #: src/ani.c:857 msgid "Unable to save image" msgstr "Resim kaydedilemedi" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Uyarı" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Tüm katmanlara ait konumları ve çevrim verilerini gerçekten temizlemek " "istiyor musunuz?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Hayır" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Evet" #: src/ani.c:993 msgid "Set Key Frame" msgstr "" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Bir animasyon oluşturmak için en az 2 katman gerekir." #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Animasyon yaratmadan önce tüm katman dosyalarınızı kaydetmelisiniz" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Animasyonu Yapıladır" #: src/ani.c:1064 msgid "Output Files" msgstr "Çıktı Dosyaları" #: src/ani.c:1067 msgid "Start frame" msgstr "" #: src/ani.c:1068 msgid "End frame" msgstr "" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Gecikme" #: src/ani.c:1071 msgid "Output path" msgstr "Çıktı dizini" #: src/ani.c:1072 msgid "File prefix" msgstr "Dosya öneki" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "GIF çerçeveleri oluştur" #: src/ani.c:1098 msgid "Positions" msgstr "Konumlar" #: src/ani.c:1135 msgid "Cycling" msgstr "Çevrim" #: src/ani.c:1148 msgid "Save" msgstr "Kaydet" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Ön İzleme" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Çerçeveleri Oluştur" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Resim dönüştürmek için çok büyük." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "" #: src/canvas.c:429 msgid "Edge Soften" msgstr "" #: src/canvas.c:481 msgid "Different X/Y" msgstr "" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Gauss Bulanıklaştırması" #: src/canvas.c:523 msgid "Radius" msgstr "Yarıçap" #: src/canvas.c:524 msgid "Amount" msgstr "Miktar" #: src/canvas.c:525 msgid "Threshold " msgstr "" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "" #: src/canvas.c:563 msgid "Outer radius" msgstr "" #: src/canvas.c:564 msgid "Inner radius" msgstr "" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalleştir" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Resim bu çevrim için çok büyük" #: src/canvas.c:668 msgid "Smooth" msgstr "Pürüzsüz" #: src/canvas.c:670 msgid "Free Rotate" msgstr "" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Pano yaratmak için yeterli bellek yok" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Geçersiz kanal dosyası." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Animasyonu Göster" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Bu bir animasyonlu %s dosyasıdır." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Dosya yüklenemedi" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Dosya açılamıyor" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Desteklenmeyen dosya biçimi" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "%s zaten var. Üzerine yazmak ister misiniz?" #: src/canvas.c:1524 msgid "File Found" msgstr "Dosya Bulundu" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "HAYIR" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "EVET" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Şeffalık Dizini" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Dosya Biçimi" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Animasyon gecikmesi" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "ASCII dosyası dışa aktarılamıyor" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Dosya kaydedilemedi: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Resim Dosyası Yükle" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Resim Dosyasını Kaydet" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Palet Dosyası Yükle" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Palet Dosyasını Kaydet" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "ASCII resmini içe aktarmak için 16 ya da daha az renk paletine gerek " "duyuluyor." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Katman Dosyalarını Kaydet" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "GIF animasyonu oluşturmak için en az bir çerçeveye gerek duyuluyor." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "GIF animasyonunu dışa aktar" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Kanal Yükle" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Kanalı Kaydet" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "" #: src/channels.c:236 msgid "Cleared" msgstr "Temizlendi" #: src/channels.c:237 msgid "Set" msgstr "Ayarla" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "" #: src/channels.c:239 msgid "Set blend A to B" msgstr "" #: src/channels.c:240 msgid "Image Red" msgstr "" #: src/channels.c:241 msgid "Image Green" msgstr "" #: src/channels.c:242 msgid "Image Blue" msgstr "" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Seçim" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maske" #: src/channels.c:256 msgid "Create Channel" msgstr "Kanal Oluştur" #: src/channels.c:262 msgid "Channel Type" msgstr "Kanal Tipi" #: src/channels.c:269 msgid "Initial Channel State" msgstr "" #: src/channels.c:273 msgid "Inverted" msgstr "" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "TAMAM" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "İptal" #: src/channels.c:316 msgid "Delete Channels" msgstr "Kanalları Sil" #: src/channels.c:373 msgid "Threshold Channel" msgstr "" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Kırmızı" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Yeşil" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Mavi" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Doygunluk" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Donukluk" #: src/font.c:939 msgid "Creating Font Index" msgstr "" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" #: src/font.c:1468 msgid "Font" msgstr "" #: src/font.c:1469 msgid "Style" msgstr "" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Boyut" #: src/font.c:1471 msgid "Filename" msgstr "" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Metni Yapıştır" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Metni Buraya Girin" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "ArkaPlan rengi=" #: src/font.c:1805 msgid "Oblique" msgstr "" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Çevirme açısı=" #: src/font.c:1831 msgid "Font Directories" msgstr "" #: src/font.c:1836 msgid "New Directory" msgstr "" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "" #: src/font.c:1848 msgid "Add" msgstr "" #: src/font.c:1852 msgid "Remove" msgstr "" #: src/font.c:1856 msgid "Create Index" msgstr "" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "" #: src/fpick.c:771 msgid "Create Directory" msgstr "" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Yarat" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "" #: src/fpick.c:838 msgid "Unable to delete" msgstr "" #: src/fpick.c:843 msgid "Unable to rename" msgstr "" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "" #: src/fpick.c:939 msgid "Up" msgstr "" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "" #: src/fpick.c:1044 msgid "Name" msgstr "" #: src/fpick.c:1046 msgid "Type" msgstr "" #: src/fpick.c:1047 msgid "Modified" msgstr "" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Genel" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Klavye Kısayolları" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Fare kısayolları" #: src/help.c:28 msgid "Credits" msgstr "Katkıda Bulunanlar" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr "" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr "" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr "" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr "" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr "" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr "" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr "" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr "" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr "" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr "" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr "" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr "" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr "" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr "" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr "" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr "" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr "" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr "" #: src/help.c:85 msgid " L Layers Window\n" msgstr "" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr "" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr "" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr "" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr "" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr "" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr "" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr "" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr "" #: src/help.c:110 msgid " F1 Help" msgstr "" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr "" #: src/help.c:112 msgid " F3 Choose Brush" msgstr "" #: src/help.c:113 msgid " F4 Paint Tool" msgstr "" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr "" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr "" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr "" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr "" #: src/help.c:118 msgid " F9 Selection Tool" msgstr "" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr "" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr "" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr "" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" #: src/help.c:126 msgid " Page Up Scale Image" msgstr "" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr "" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr "" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" #: src/help.c:150 msgid "Authors\n" msgstr "" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "" #: src/info.c:281 msgid "Information" msgstr "Bilgi" #: src/info.c:290 msgid "Memory" msgstr "Bellek" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Pano" #: src/info.c:311 msgid "Unused" msgstr "Kullanılmamış" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Pano= %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Pano = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Katmanlar" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Toplam katman bellek kullanımı" #: src/info.c:350 msgid "Colour Histogram" msgstr "" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "" #: src/info.c:391 msgid "Index" msgstr "Dizin" #: src/info.c:392 msgid "Canvas pixels" msgstr "" #: src/info.c:407 msgid "Orphans" msgstr "" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "Ev dizini bulunamıyor. Şuanki dizin ev dizini olarak kullanılıyor." #: src/layer.c:70 msgid "Background" msgstr "Arkaplan" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Değiştirildi)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Adsız" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Katmanı %i(%s) gerçekten silmek istiyor musunuz?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Bir veya daha fazla katmanın içerdiği değişiklikler kaydedilmemiş. Bu " "değişiklikleri kaybetmek istiyor musunuz?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Çalışmayı İptal Et" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Değişiklikleri Kaybet" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d katmanının yüklenmesi başarısız oldu" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Tüm katmanları silmek istiyor musunuz?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Daha fazla katman ekleyemezsiniz" #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Yeni Katman" #: src/layer.c:1160 msgid "Raise" msgstr "Yükselt" #: src/layer.c:1161 msgid "Lower" msgstr "" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Kamanı Çoğalt" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Katmanı Sil" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Katmanlar Penceresini Kapat" #: src/layer.c:1268 msgid "Layer Name" msgstr "Katman Adı" #: src/layer.c:1269 msgid "Position" msgstr "Konum" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Şeffaf Renk" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Tüm katmanları ana pencerede göster" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Kaldırılacak kullanılmayan renk yok!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Pano yüklenemiyor" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Pano kaydedilemiyor" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Bu tuval/palet kaydedilmemiş değişiklikler içeriyor. Bu değişiklikleri " "kaybetmek iştiyor musunuz?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Resim" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Gerçekten çıkmak istiyor musunuz?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Dosya" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Yeni" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Aç ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Kaydet" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Farklı Kaydet ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "" #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Çıkış" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Düzenle" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Geri al" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Yinele" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Kes" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopyala" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Merkeze Yapıştır" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Yeni Katmana Yapıştır" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Yapıştır" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Metni Yapıştır" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Panoyu Yükle" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Panoyu Kaydet" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "" #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Fırça Seç ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Görünüm" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Resim" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "" #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Tuvali Ölçekle ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Tuvali Yeniden Boyutlandır ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Kırp" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Saat Yönünde Döndür" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Saat Yönünün Tersine Döndür" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "" #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Bilgi ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "" #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Seçim" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Tümünü Seç" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Seçimi Doldur" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//İçi Dolu Elips" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Palet" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Yükle ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Varsayılanı Yükle" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Renk Düzenle A & B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Palet Boyutunu Ayarla ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Çoklu Renkleri Birleştir" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Kullanılmayan Renkleri Kaldır" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Renkleri Sırala ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Efektler" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "" #: src/mainwindow.c:4868 msgid "//Invert" msgstr "" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "" #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Ka_nallar" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Yeni ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Sil ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Resmi Düzenle" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Seçimi Düzenle" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Maskeyi Düzenle" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Resmi Gizle" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Alfayı Etkisiz Kıl" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Seçimi Etkisiz Kıl" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Maskeyi Etkisiz Kıl" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/Katmanlar" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Animasyonu Yapılandır ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Animasyonu Önizle ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "" #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Yardım" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Hakkında" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "" #: src/memory.c:4744 msgid "Rotating" msgstr "Dördürme" #: src/memory.c:5096 msgid "Free Rotation" msgstr "" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Resmi Boyutlandırma" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "" #: src/memory.c:6950 msgid "Applying Effect" msgstr "" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Lütfen Bekleyiniz ..." #: src/mygtk.c:189 msgid "STOP" msgstr "DUR" #: src/mygtk.c:816 msgid "Browse" msgstr "Göz At" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Gri tonlama" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "İndisli Palet" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Yeni Resim" #: src/otherwindow.c:288 msgid "Width" msgstr "Genişlik" #: src/otherwindow.c:289 msgid "Height" msgstr "Yükseklik" #: src/otherwindow.c:290 msgid "Colours" msgstr "Renkler" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Desen Seçici" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Palet Boyutunu Ayarla" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Uygula" #: src/otherwindow.c:599 msgid "Luminance" msgstr "" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Parlaklık" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "A'ya uzaklık" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Sıklık" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Palet Renklerini Sırala" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Dizini Başlat" #: src/otherwindow.c:617 msgid "End Index" msgstr "Dizini Sonlandır" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Parlaklık" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "" #: src/otherwindow.c:869 msgid "Gamma" msgstr "" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Ayrıntı Göster" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palet" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Otomatik-Ön İzleme" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Sıfırla" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "İşletim sistemi bu çalışma için belleği paylaştıramadı." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Bu çalışma için Tercihler penceresine yeteri kadar bellek " "paylaştırmamışsınız." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "İkili doğrusal" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "" #: src/otherwindow.c:1167 msgid "Width " msgstr "Genişlik " #: src/otherwindow.c:1168 msgid "Height " msgstr "Yükseklik " #: src/otherwindow.c:1170 msgid "Original " msgstr "Özgün " #: src/otherwindow.c:1176 msgid "New" msgstr "Yeni" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Başlangıç Noktası" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Merkez" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Temizle" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Döşe" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Ayarlar" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Tuvali Ölçeklendir" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Tuvali Yeniden Boyutlandır" #: src/otherwindow.c:1963 msgid "From" msgstr "Başlangıç" #: src/otherwindow.c:1963 msgid "To" msgstr "" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Ölçeklendirme" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Palet Düzenleyici" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Renk Editörü" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Sınır" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Küre" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Açı" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Küp" #: src/otherwindow.c:2110 msgid "Range" msgstr "" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "En az ızgara yakınlaştırması" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Şuanki Paleti Kullan" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Zayıfca" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "" #: src/otherwindow.c:2385 msgid "Off" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Sabit" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Nokta" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Çizgisel" #: src/otherwindow.c:3018 msgid "Radial" msgstr "" #: src/otherwindow.c:3018 msgid "Square" msgstr "" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Seviye" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Yinele" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A'dan B'ye" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A only" msgstr "Sadece A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Özel tanımlı" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "" #: src/otherwindow.c:3024 msgid "Current only" msgstr "" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Kanal" #: src/otherwindow.c:3047 msgid "Length" msgstr "Uzunluk" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Tekrar uzunluğu" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "" #: src/otherwindow.c:3325 msgid "Origin" msgstr "" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "Katman" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Basınç" #: src/prefs.c:154 msgid "Current Device" msgstr "Şuanli Aygıt" #: src/prefs.c:431 msgid "Default System Language" msgstr "Varsayılan Sistem Dili" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "" #: src/prefs.c:433 msgid "Czech" msgstr "Çekçe" #: src/prefs.c:433 msgid "Dutch" msgstr "" #: src/prefs.c:433 msgid "English (UK)" msgstr "İngilizce (UK)" #: src/prefs.c:433 msgid "French" msgstr "Fransızca" #: src/prefs.c:434 msgid "Galician" msgstr "" #: src/prefs.c:434 msgid "German" msgstr "Almanca" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "" #: src/prefs.c:435 msgid "Polish" msgstr "Polonya dili" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portekizce" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portekizce (Brezilya)" #: src/prefs.c:436 msgid "Russian" msgstr "" #: src/prefs.c:436 msgid "Slovak" msgstr "Slovakça" #: src/prefs.c:437 msgid "Spanish" msgstr "İspanyolca" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Türkçe" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Son kullanılan Dosyalar" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Tuval Geometrisi" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "İmleç X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Geri al / Yinele" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Akış" #: src/prefs.c:457 msgid "Preferences" msgstr "Tercihler" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Tercih ettiğiniz dil çevirisini seçin\n" "\n" "mtPaint'i yeniden başlatmanız gerekir\n" "tam etkisini göstermesi için" #: src/prefs.c:524 msgid "Language" msgstr "Dil" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Yapıştırma boyunca panoyu göster" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Fare imleci = Araç" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Çıkışı Onayla" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q tuşu mtPaint'i sonlandırır" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Dosyalar" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Pano Dosyaları" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Pano Dosyasını Seçin" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML Tarayıcı Programı" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Tarayıcı Programı Seç" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Elkitabı Dizini konumu" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Elkitabı Dizin Dosyası Seç" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Durum Çubuğu" #: src/prefs.c:633 msgid "Tablet" msgstr "Tablet" #: src/prefs.c:637 msgid "Device Settings" msgstr "Aygıt Ayarları" #: src/prefs.c:645 msgid "Configure Device" msgstr "Aygıtı Ayarla" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Araç Değişkeni" #: src/prefs.c:654 msgid "Factor" msgstr "Etken" #: src/prefs.c:680 msgid "Test Area" msgstr "Test Alanı" #: src/shifter.c:205 msgid "Frames" msgstr "Çerçeveler" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "" #: src/shifter.c:279 msgid "Start" msgstr "Başlat" #: src/shifter.c:281 msgid "Finish" msgstr "Bitir" #: src/shifter.c:330 msgid "Fix Palette" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "HTML taracıyısını çalıştırmada problem var. Tercihler penceresinde doğru " "program adını ayarlamaya ihtiyaç var." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "" #: src/toolbar.c:234 msgid "By image channel" msgstr "Resim kanalı tarafından" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Doldurma ayarları" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "" #: src/toolbar.c:299 msgid "Colour" msgstr "" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "" #: src/toolbar.c:300 msgid "Divide" msgstr "" #: src/toolbar.c:300 msgid "Screen" msgstr "" #: src/toolbar.c:300 msgid "Dodge" msgstr "" #: src/toolbar.c:301 msgid "Burn" msgstr "" #: src/toolbar.c:301 msgid "Hard Light" msgstr "" #: src/toolbar.c:301 msgid "Soft Light" msgstr "" #: src/toolbar.c:301 msgid "Difference" msgstr "" #: src/toolbar.c:302 msgid "Darken" msgstr "" #: src/toolbar.c:302 msgid "Lighten" msgstr "" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "" #: src/toolbar.c:889 msgid "Tint +-" msgstr "" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Tüm Maskeleri Etkisiz Kıl" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Ayar Araç Çubuğu" #: src/toolbar.c:1041 msgid "Cut" msgstr "Kes" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopyala" #: src/toolbar.c:1043 msgid "Paste" msgstr "Yapıştır" #: src/toolbar.c:1045 msgid "Undo" msgstr "Geri Al" #: src/toolbar.c:1046 msgid "Redo" msgstr "Yinele" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "" #: src/toolbar.c:1053 msgid "Paint" msgstr "Boya" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Karışık" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Su Dolgusu" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Düz Çizgi" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Lekeleme" #: src/toolbar.c:1058 msgid "Clone" msgstr "Kopyala" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Seçim Yap" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Çokgen Seçimi" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "İçi Dolu Elips" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Dış Çeper Seçimi" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Seçimi Doldur" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Seçimi Dikey Olarak Döndür" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Seçimi Saat Yönünde Çevir" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Seçimi Saat Yönünün Tersine Çevir" #: src/viewer.c:132 msgid "About" msgstr "Hakkında" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "%s dosyası geçersiz- palet güncellenmedi" #~ msgid "Distance to A+B" #~ msgstr "A+B'ye uzaklık" #~ msgid "Edit Frames" #~ msgstr "Çerçeveleri Düzenle" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "Palet, birleştirmek için yeterli renkleri içermiyor." #~ msgid "/View/Command Line Window" #~ msgstr "/Görünüm/Komut Satırı Penceresi" #~ msgid "Zoom" #~ msgstr "Yakınlaştır" #~ msgid "Not enough memory to rotate image" #~ msgstr "Resmi çevirecek için yeterli bellek yok" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "Panoyu çevirmek için yeterli bellek yok." #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patterns_user.c şuanki dizinde açılamadı" #~ msgid "Done" #~ msgstr "Bitti" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patterns_user.c şuanki dizinde yaratıldı" #~ msgid "/File/Actions/sep2" #~ msgstr "/Dosya/Actions/sep2" #~ msgid "/Edit/Create Patterns" #~ msgstr "/Düzenle/Create Patterns" #~ msgid "/Image/Convert To Indexed" #~ msgstr "/Resim/Convert To Indexed" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Palet/Create Quantized (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Palet/Create Quantized (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Palet/Create Quantized (Wu)" #~ msgid "/File/%i" #~ msgstr "/Dosya/%i" #~ msgid "/File/Actions/%i" #~ msgstr "/Dosya/Actions/%i" #~ msgid "Loading PNG image" #~ msgstr "PNG resmi yükleniyor" #~ msgid "Loading clipboard image" #~ msgstr "Pano resmi yükleniyor" #~ msgid "Saving PNG image" #~ msgstr "PNG resmi kaydediliyor" #~ msgid "Saving Clipboard image" #~ msgstr "Pano resmi kaydediliyor" #~ msgid "Saving Layer image" #~ msgstr "Katman resmi kaydediliyor" #~ msgid "Loading GIF image" #~ msgstr "GIF resmi yükleniyor" #~ msgid "Saving GIF image" #~ msgstr "GIF resmi kaydediliyor" #~ msgid "Loading JPEG image" #~ msgstr "JPEG resmi yükleniyor" #~ msgid "Saving JPEG image" #~ msgstr "JPEG resmi kaydediliyor" #~ msgid "Loading TIFF image" #~ msgstr "TIFF resmi yükleniyor" #~ msgid "Saving TIFF image" #~ msgstr "TIFF resmi kaydediliyor" #~ msgid "Loading BMP image" #~ msgstr "BMP resmi yükleniyor" #~ msgid "Saving BMP image" #~ msgstr "BMP resmi kaydediliyor" #~ msgid "Loading XPM image" #~ msgstr "XPM resmi yükleniyor" #~ msgid "Saving XPM image" #~ msgstr "XPM resmi kaydediliyor" #~ msgid "Loading XBM image" #~ msgstr "XBM resmi yükleniyor" #~ msgid "Saving XBM image" #~ msgstr "XBM resmi kaydediliyor" #~ msgid "Loading LSS16 image" #~ msgstr "LSS16 resmi yükleniyor" #~ msgid "Saving LSS16 image" #~ msgstr "LSS16 resmi kaydediliyor" mtpaint-3.40/po/pl.po0000644000175000000620000023724011647046422014042 0ustar muammarstaff# Polish translation for mtpaint # Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2006. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2006-08-07 15:46+0000\n" "Last-Translator: LucaS \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "First-Translator: Simek \n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Podgląd" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Odtwórz" #: src/ani.c:695 msgid "Fix" msgstr "Napraw" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Zamknij" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Błąd" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Nie można utworzyć folderu" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Utwórz ramki animacji" #: src/ani.c:857 msgid "Unable to save image" msgstr "Nie można zapisac obrazu" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Ostrzeżenie" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Czy na pewno chcesz wyczyścić wszystkie pozycje i dane dla każdej warstwy ?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Nie" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Tak" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Ustaw ramkę kluczową" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Potrzebne są co najmniej 2 warstwy aby utworzyć animację" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Należy zapisać plik przed utworzeniem animacji" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Konfiguruj animację" #: src/ani.c:1064 msgid "Output Files" msgstr "Pliki utworzone" #: src/ani.c:1067 msgid "Start frame" msgstr "Początek ramki" #: src/ani.c:1068 msgid "End frame" msgstr "Koniec ramki" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Opóźnienie" #: src/ani.c:1071 msgid "Output path" msgstr "Ścieżka wyjściowa" #: src/ani.c:1072 msgid "File prefix" msgstr "Przedrostek pliku" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Utwórz ramki GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Pozycje" #: src/ani.c:1135 msgid "Cycling" msgstr "Cycling" #: src/ani.c:1148 msgid "Save" msgstr "Zapisz" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Podgląd" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Utwórz ramki" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Ten obrazek jest za duży, aby dokonać transformacji." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Gradient" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Wyostrzanie krawędzi" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Wygładzanie krawędzi" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Różne X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Rozmycie Gaussa" #: src/canvas.c:523 msgid "Radius" msgstr "Promień" #: src/canvas.c:524 msgid "Amount" msgstr "Ilość" #: src/canvas.c:525 msgid "Threshold " msgstr "Próg " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Wzmocnienie" #: src/canvas.c:563 msgid "Outer radius" msgstr "" #: src/canvas.c:564 msgid "Inner radius" msgstr "" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizuj" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Obraz jest zbyt duży aby go obrócić" #: src/canvas.c:668 msgid "Smooth" msgstr "Wygładź" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Dowolna rotacja" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Za mało pamięci, aby przenieść obraz do schowka" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Nieprawidłowy plik kanału" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Wyświetl animację" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "To jest animowany plik %s." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Nie można otworzyć pliku" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Importowana biblioteka powoduje problem z plikiem (uszkodzony obraz lub " "obcięty plik). Proponowane jest zapisanie tego obrazu do nowego pliku aby " "problem nie pojawił sie ponownie." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Nie można otworzyć pliku" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Nieobsługiwany format pliku" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Plik: %s już istnieje. Czy chcesz go nadpisać?" #: src/canvas.c:1524 msgid "File Found" msgstr "Plik znaleziony" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "Nie" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "Tak" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Indeks niewidoczny" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Jakość zapisu JPEG (100=Wysoka)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Hotspot w X=" #: src/canvas.c:1565 msgid "Y =" msgstr "Y=" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Format pliku" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Opóźnienie animacji" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Niemożliwy eksport cofniętych obrazów" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Nie mozna eksportować pliku ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Nie można zapisać pliku: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Otwórz Obrazek" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Zapisz Obrazek" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Załaduj Paletę" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Zapisz Paletę" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Eksportuj cofnięte obrazy" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Eksportuj cofnięte obrazy (odwrócone)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Potrzeba co najwyżej 16 kolrów aby eksportować grafikę ASCII" #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Eksportuj jako obrazek ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Zapisz pliki warstw" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Wybierz folder ramki" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Potrzeba zapisać co najmniej jedną ramkę aby utworzyć GIF" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Eksportuj animację GIF" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Ładuj kanał" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Zapisz kanał" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Zapisz obrazek złożony" #: src/channels.c:236 msgid "Cleared" msgstr "Wyczyszczony" #: src/channels.c:237 msgid "Set" msgstr "Ustaw" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Ustaw kolor A promień B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Ustaw przejśćie z A do B" #: src/channels.c:240 msgid "Image Red" msgstr "Czerwony" #: src/channels.c:241 msgid "Image Green" msgstr "Zielony" #: src/channels.c:242 msgid "Image Blue" msgstr "Niebieski" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Zaznaczenie" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maska" #: src/channels.c:256 msgid "Create Channel" msgstr "Utwórz kanał" #: src/channels.c:262 msgid "Channel Type" msgstr "Typ kanału" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Inicjuj stan kanału" #: src/channels.c:273 msgid "Inverted" msgstr "Odwrócone" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Anuluj" #: src/channels.c:316 msgid "Delete Channels" msgstr "Usuń kanały" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Kanał progu" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Czerwony" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Zielony" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Niebieski" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Odcień" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Nasycenie" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Wartość" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Przeźroczystość" #: src/font.c:939 msgid "Creating Font Index" msgstr "" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" #: src/font.c:1468 msgid "Font" msgstr "" #: src/font.c:1469 msgid "Style" msgstr "" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Rozmiar" #: src/font.c:1471 msgid "Filename" msgstr "" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Wklej tekst" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Wpisz tutaj tekst" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Antialias" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Negatyw" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Kolor tła =" #: src/font.c:1805 msgid "Oblique" msgstr "" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Kąt obrotu=" #: src/font.c:1831 msgid "Font Directories" msgstr "" #: src/font.c:1836 msgid "New Directory" msgstr "" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "" #: src/font.c:1848 msgid "Add" msgstr "" #: src/font.c:1852 msgid "Remove" msgstr "" #: src/font.c:1856 msgid "Create Index" msgstr "" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "" #: src/fpick.c:771 msgid "Create Directory" msgstr "" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Utwórz" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "" #: src/fpick.c:838 msgid "Unable to delete" msgstr "" #: src/fpick.c:843 msgid "Unable to rename" msgstr "" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "" #: src/fpick.c:939 msgid "Up" msgstr "" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "" #: src/fpick.c:1044 msgid "Name" msgstr "" #: src/fpick.c:1046 msgid "Type" msgstr "" #: src/fpick.c:1047 msgid "Modified" msgstr "" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Ogólne" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Skróty klawiszowe" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Skróty myszki" #: src/help.c:28 msgid "Credits" msgstr "Autorzy" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Utwórz Nowy Obraz" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Otwórz obraz" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Zapisz obraz" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Zamknij program\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Zaznacz cały obraz" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Odznacz wszystko, anuluj wklejanie" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Kopiuj zaznaczenie do schowka" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Kopiuj zaznaczenie do schowka, rysuj bieżący wzór na " "zaznaczonym obszarze" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Wklej zawartość schowka w środek aktualnego widoku" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K Wklej obrazek schowka tam, skąd został skopiowany" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return Wklej na płótno" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Arrow keys Tryb rysowania - Ruszaj myszką" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Arrow keys Tryb zaznaczania - Nudge selection box or paste box by " "one pixel" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Arrows Przenieś warstwę lub zmień rozm. zaznaczenia" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr " [ or ] Zmien kolor A na następny w palecie" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr " Shift+[ or ] Zmien kolor B na następny w palecie\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Obcinaj obraz do zaznaczenia" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Przekształć kolory np:Jasność, kontrast, Nasycenie, Gamma" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Skala szarości" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G Skala szarość (Gamma corrected)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Rysuj prostokąt dookoła zaznaczenia akutalnum wypełnieniem" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Wypełnij zaznaczony obszar aktualnym wypełnieniem" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Rysuj elipsę wewnątrz zaznaczonego obsaru" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" " Ctrl-Shift-L Rysuj wypełnioną elipsę wewnątrz zaznaczonego obsaru\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Edytuj wartości RGB dla kolorów A & B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Edytuj kolory\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Ustawienia" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Informacje\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Wycofaj ostatnią akcję" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Ponów niewykonane akcje\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Okno pokazu" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Okno warstw\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Main edit window - Powiększ" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Main edit window - Zmniejsz" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= View window - Powiększ" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - View window - Zmniejsz\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Edytuj kanał obrazka" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Edytuj kanał alfa" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Edytuj kanał zaznaczenia" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Edytuj kanał maski\n" #: src/help.c:110 msgid " F1 Help" msgstr "" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Wybierz wzór" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Wybierz pedziel" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Narzędzie rysowania" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Przełącz główny pasek" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Przełącz pasek narzędzi" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Przełącz pasek ustawień" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Przełącz paletę" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Narzędzie zaznaczenia" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Zapisz bieżący obrazek ze schowka do pliku 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Ładuj obrazek do schowka z pliku 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Ustaw nieprzeźroczystość na 10%, 20%, ... , 100% " "(główne lub numeryczne klawisze liczbowe)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Zwiększ nieprzeźroczystość o 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Zmniejsz przźroczystość o 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Pokaż lub ukryj główne okon/paski narzędzi/pasek statusu/" "palette" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up Skaluj obraz" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down Zmień rozmiar obrazu na płótnie" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Lewy przycisk myszki Rysuj u użyciem bieżącego narzędzia" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Środkowy przycisk myszki Wybierz punkt, który będzie w środku " "obrazu po zmianie powiększenia" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Prawy przycisk myszki Wklej na płótno / Zakończ rysowanie lini / " "Cancel selection\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Kółko myszki In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+ Lewy myszki Wybierz kolor A" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Prawy myszki Wybierz kolor B" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr " Ctrl+Kółko myszki Przewiń zawartość okna w prawo/lewo\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Prawy myszki Wybierz punkt który będzie w środku obrazu po " "kolejnym powiększeniu\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift Ogranicz ruch myszki do lini poziomych" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl Ogranicz ruch myszki do lini pionowych" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" #: src/help.c:150 msgid "Authors\n" msgstr "" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "" #: src/info.c:281 msgid "Information" msgstr "Informacja" #: src/info.c:290 msgid "Memory" msgstr "Pamięć" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Całkowita ilość pamięci + pamięć dla cofniętych zmian" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Cofnij / Ponów / Maksymalna liczba wyczerpana" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Schowek" #: src/info.c:311 msgid "Unused" msgstr "Nieużywany" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Schowek = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Schowek = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Unikalne piksele RGB" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Warstwy" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Całkowite zużycie pamięci przez warstwy" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histogram kolorów" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "" #: src/info.c:391 msgid "Index" msgstr "Indeks" #: src/info.c:392 msgid "Canvas pixels" msgstr "Punkty płótna" #: src/info.c:407 msgid "Orphans" msgstr "Sieroty" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "Nie można odnaleźć folderu domowego. Użyj folderu bieżącego." #: src/layer.c:70 msgid "Background" msgstr "Tło" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Zmodyfikowano)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Bez nazwy" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Czy na pewno chcesz usunąć warstwę %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Jedna lub więcej warstw, która została zmieniona nie może zostać zapisanaCzy " "na pewno chcesz utracić zmiany?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Anuluj operację" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Nie zapisuj zmian" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d warstwy niemożliwe do załadowania" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Jedna lub więcej warstw nie została zapisana. Należy zapisać każdą osobno." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Czy na pewno chcesz usunąć wszystkie warstwy?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Nie możesz dodać więcej warstw." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nowa warstwa" #: src/layer.c:1160 msgid "Raise" msgstr "Zwiększ" #: src/layer.c:1161 msgid "Lower" msgstr "Zmniejsz" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplikuj warstwę" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Wyśrodkuj warstwę" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Usuń warstwę" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Zamknij okno warstw" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nazwa warstwy" #: src/layer.c:1269 msgid "Position" msgstr "Pozycja" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Kolor przezroczysty" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Pokaż wszystkie warstwy w głównym oknie" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Nie ma nieużywanych kolorów do usnięcia!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Paleta nie zawiera dwóch kolorów o identycznych wartościach RGB" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Nie można załadować obrazu ze schowka" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Nie można zapisać obrazu do schowka" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Obraz został zmieniony i nie zapisano zmian. Czy na pewno chcesz utracić " "zmiany?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Obrazek" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Czy na pewno chcesz zamknąć program?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Plik" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nowy" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Otwórz ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Zapisz" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Zapisz jako ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "" #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Wyjdź" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Edycja" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Cofnij" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Ponów" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Wytnij" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopiuj" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Wklej na środku" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Wklej w nowej warstwie" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Wklej" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Wklej tekst" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Zapisz obraz" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Wybierz wzór ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Wybierz pędzel ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Widok" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Pokazuj główny pasek narzędzi" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Pokaż siatkę" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Okno warstw" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Obrazek" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Przekształć do RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Konwertuj do indeksowanych ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Przytnij" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Obróć w pionie" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Obróć w poziomie" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Obróć w prawo" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Obróć w lewo" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Dodolna rotacja ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Informacje ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Ustawienia ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Zaznaczenie" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Zaznacz wszystko" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Brak zaznaczenia" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Zaznaczenie Lasso" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Wytnij Zaznaczenie Lasso" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Zaznaczenie krawędzi" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Krawedzie elipsy" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Wypełnij elipsę" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Przesuń alfa do maski" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Kolor maski A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Odmaskuj kolor A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Maskuj wszystkie kolory" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Wyczyść maskę" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/P_aleta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Otwórz ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Domyślne ustawienia" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Maskuj wszystko" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Nie maskuj niczego" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Zamień A & B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Edytuj kolor A & B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Edytor palety ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Ustaw rozmiar palety ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Scal duplikujące się kolory" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Usuń nieużywane kolory" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Utwórz Kwantyzator ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Sortuj kolory ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Edytor palety ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/_Efekty" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformacja kolorów ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Odwróć" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Skala szarości" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Skala szarości (Gamma poprawne)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Transformacja izometryczna" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///W lewy dół" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///W prawy dół" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///W górny prawy" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///W dolny prawy" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Wyszukiwanie krawędzi ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Wyostrzanie ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Wzmocnienie ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Wygładzanie ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Rozmycie Gaussa ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Wytłoczenie" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Bakteria ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Ka_nały" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nowy ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Usuń ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Edytuj obraz" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Edytuj alfe" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Edytuj zaznaczenie" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Edytuj maskę" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Ukryj obraz" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Wyłącz alfę" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Wyłącz zaznaczenie" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Wyłącz maskę" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Operacje RGBA" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Próg ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Pokaż alfę jako powłokę" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Konfiguruj powłoki ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/Wa_rstwy" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Zapisz obraz złożony ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Usuń wszystkie warstwy" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Konfiguruj animację ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Podgląd animacji ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Ustaw klucz ramki ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Usuń wszystkie klucze ramki ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/Po_moc" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Dokumentacja" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Informacje o..." #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Zmień skróty klawiaturowe" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Konwertuj do palety indeksowanej" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Efekt Bakterii" #: src/memory.c:4744 msgid "Rotating" msgstr "Obracanie" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Dowolna rotacja" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Skalowanie obrazka" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Obliczanie unikalnych pikseli RGB" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Zastosuj efekt" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Proszę czekać ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Przeglądaj" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gamma poprawna" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Skala szarości" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Paleta indeksowana" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Zrzut ekranu" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nowy obrazek" #: src/otherwindow.c:288 msgid "Width" msgstr "Szerokość" #: src/otherwindow.c:289 msgid "Height" msgstr "Wysokość" #: src/otherwindow.c:290 msgid "Colours" msgstr "Kolory" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Wybór wzoru" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Ustaw rozmiar palety" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Zastosuj" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Jasność" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Rozjaśnianie" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Odległość do A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Wyświetlanie A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Częstotliwość" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Sortuj Kolory palety" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Rozpocznij indeksowanie" #: src/otherwindow.c:617 msgid "End Index" msgstr "Zakończ indeksowanie" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Odwrócony porządek" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Kontrast" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Redukcja liczby kolorów" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Transformacja kolorów" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Pokaż szczegóły" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paleta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto podgląd" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Resetuj" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Nowa geomteria jest taka sama - nic nie rób" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "System operacyjny nie dysponuje wystarczającą ilością pamięci" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "W oknie Ustawienia nie ma ustawionej wystarczającej ilości pamięciaby " "wykonać tę operację" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Najbliższy sąsiad" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilinear / Area Mapping" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilinear" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bicubic" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bicubic edged" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bicubic lepszy" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bicubic ostrzejszy" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Szerokość " #: src/otherwindow.c:1168 msgid "Height " msgstr "Wysokość " #: src/otherwindow.c:1170 msgid "Original " msgstr "Oryginalny " #: src/otherwindow.c:1176 msgid "New" msgstr "Nowy" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Przesunięcie" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Środek" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Napraw Aspect Ratio" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Wyczyść" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Tytuł" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Tytuł mirror'a" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Ustawienia" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Skala płótna" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Zmień rozmiar płótna" #: src/otherwindow.c:1963 msgid "From" msgstr "Od" #: src/otherwindow.c:1963 msgid "To" msgstr "Do" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Skala" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Edytor palety" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Konfiguruj Nakładki" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Edytor Kolorów" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Limit" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Sfera" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Kąt" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Sześcian" #: src/otherwindow.c:2110 msgid "Range" msgstr "Ranga" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Odwróć" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Tryb wyboru koloru" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Minimalne powiększenie siatki" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Kolor przestrzeni" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Większy (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Suma (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euklides (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Różnice pomiarów" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Konwersja dokładna" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Użyj aktualnej palety" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Żaden" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (szybki)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Kolor Symulowany (efekt)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Rozproszenie (efekt)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamut" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Słabszy" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Mocniejszy" #: src/otherwindow.c:2385 msgid "Off" msgstr "Wył." #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Oddziel/Łącz" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Dziel" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Długość/Suma" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Długość/Dziel" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Utwórz Kwantyzator" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Konwertuj do indeksowanych" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Indeksowane kolory do używania" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Drżenie" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Redukuj kolor zabarwienia" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Skanowanie wężowe" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Błąd propagacji, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Krytyczny błąd propagacji" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "Wsteczny HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Stałe" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Edytuj gradient" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Punkty" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Odwróc" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Edytuj niestandardowe" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Linear" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Promień" #: src/otherwindow.c:3018 msgid "Square" msgstr "Kwadrat" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Poziom" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Powtórz" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A do B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A do B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A do B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A do B (wsteczny HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Tylko A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Własne" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Aktualny do 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Tylko aktualny" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Konfiguruj gradient" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Kanał" #: src/otherwindow.c:3047 msgid "Length" msgstr "Długość" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Powtórz długość" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Rodzaj gradientu" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Typ rozszerzeń" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Podgląd nieprzeźroczystości" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "" #: src/otherwindow.c:3325 msgid "Origin" msgstr "" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "Warstwa" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "%d koniec %d ramki nie może zostać zapisany jako %s- zapisz jako PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Nacisk" #: src/prefs.c:154 msgid "Current Device" msgstr "Bieżące urządzenie" #: src/prefs.c:431 msgid "Default System Language" msgstr "Domyślny język systemowy" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Chiński (Tajwański)" #: src/prefs.c:433 msgid "Czech" msgstr "Czeski" #: src/prefs.c:433 msgid "Dutch" msgstr "" #: src/prefs.c:433 msgid "English (UK)" msgstr "Angielski" #: src/prefs.c:433 msgid "French" msgstr "Francuski" #: src/prefs.c:434 msgid "Galician" msgstr "" #: src/prefs.c:434 msgid "German" msgstr "Niemiecki" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "" #: src/prefs.c:435 msgid "Polish" msgstr "Polski" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugalski" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugalski (Brazylijski)" #: src/prefs.c:436 msgid "Russian" msgstr "" #: src/prefs.c:436 msgid "Slovak" msgstr "Słowacki" #: src/prefs.c:437 msgid "Spanish" msgstr "Hiszpański" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turecki" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Ostatnio otwierane pliki" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Pasek postępu" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Płótno geometrii" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Kursor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Piksel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Zaznaczenie geometrii" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Cofnij / Ponów" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Przepływ" #: src/prefs.c:457 msgid "Preferences" msgstr "Ustawienia" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Maksymalny rozmiar pamięci na operację -Cofanie (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Ustaw korekcję gamma jako domyślne" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Optymalizuj 'alpha chequers'" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Wyłącz przezroczystosc okna" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Wybierz odpowiedni język\n" "\n" "Będziesz musiał zrestartować mtPaint,\n" "aby język w pełni się załadował" #: src/prefs.c:524 msgid "Language" msgstr "Język" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Wyświetl schowek podczas wklejania" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Kursor myszki = Narzędzia" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Potwierdz zamykanie" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q zamyka mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Zmiana narzędzia potwierdzania wklejania" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Wyśrodkowuj okna dialogowe" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Ustaw powiększenie nowego obrazu na 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Rolka myszki = Powiększanie" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Pliki" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Pliki schowka" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Wybierz plik schowka" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Przeglądarka HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Wybierz program przeglądający" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Ścieżka do indeksu pomocy" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Wybierz plik Handbook Index" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Pasek stanu" #: src/prefs.c:633 msgid "Tablet" msgstr "Tablet" #: src/prefs.c:637 msgid "Device Settings" msgstr "Ustawienia urządzenia" #: src/prefs.c:645 msgid "Configure Device" msgstr "Konfiguruj urządzenie" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Narzędzia zmienne" #: src/prefs.c:654 msgid "Factor" msgstr "Współczynnik" #: src/prefs.c:680 msgid "Test Area" msgstr "Pole testowe" #: src/shifter.c:205 msgid "Frames" msgstr "Ramki" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Edytor palety" #: src/shifter.c:279 msgid "Start" msgstr "Rozpocznij" #: src/shifter.c:281 msgid "Finish" msgstr "Zakończ" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Napraw paletę" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Błąd %i podczas uruchamiania %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Nie można odnaleźć dokumentacji. Jeśli chcesz pobrać mtPaint Handbook z " "Internetu i zainstalować go, ustaw odpowiednią ścieżke w oknie Ustawienia" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Pojawił się problem podczas uruchamiania przeglądarki HTML.Podaj prawidłowy " "program do otwierania HTML w oknie Ustawienia" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "Sześcian RGB" #: src/toolbar.c:234 msgid "By image channel" msgstr "Przez kanał obrazu" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Gradient- sterowanie" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Ustawienia wypełniania" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Tryb włączonej przezroczystości" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Ustawienia smużenia" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Zwykły" #: src/toolbar.c:299 msgid "Colour" msgstr "Kolor" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Mnożenie" #: src/toolbar.c:300 msgid "Divide" msgstr "Dzielenie" #: src/toolbar.c:300 msgid "Screen" msgstr "Przesiewanie" #: src/toolbar.c:300 msgid "Dodge" msgstr "Rozjaśnianie" #: src/toolbar.c:301 msgid "Burn" msgstr "Wypalanie" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Twarde światło" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Miękkie światło" #: src/toolbar.c:301 msgid "Difference" msgstr "Różnica" #: src/toolbar.c:302 msgid "Darken" msgstr "Ciemniejsze" #: src/toolbar.c:302 msgid "Lighten" msgstr "Jaśniejsze" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Wydobycie ziarna" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Połączenie ziarna" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Tryb kontynuacji" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Tryb przezroczystosci" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Tryb zabarwnienia" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Zabarwienie +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Wyłącz wszystkie maski" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Tryb gradient" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Pasek Ustawienia" #: src/toolbar.c:1041 msgid "Cut" msgstr "Wytnij" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopiuj" #: src/toolbar.c:1043 msgid "Paste" msgstr "Wklej" #: src/toolbar.c:1045 msgid "Undo" msgstr "Cofnij" #: src/toolbar.c:1046 msgid "Redo" msgstr "Ponów" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Rozszerz okno" #: src/toolbar.c:1053 msgid "Paint" msgstr "Rysuj" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Tasuj" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Wypełnienie" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Linia prosta" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Smużenie" #: src/toolbar.c:1058 msgid "Clone" msgstr "Klonuj" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Zrób zaznaczenie" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Zaznaczenie - Wielokąt" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Umieść gradient" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Zaznaczenie lasso" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Obwódka elipsy" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Wypełniona elipsa" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Zaznaczanie krawędzi" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Wypełnij zaznaczenie" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Odwróć zaznaczenie w pionie" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Odwróć zaznaczenie w poziomie" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Obróć zaznaczenie w prawo" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Obróć zaznaczenie w lewo" #: src/viewer.c:132 msgid "About" msgstr "O..." #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Plik: %s nieprawidłowy - paleta nieodświeżona" #~ msgid "Distance to A+B" #~ msgstr "Odległość do A+B" #~ msgid "Edit Frames" #~ msgstr "Edytuj ramki" #~ msgid " C Command Line Window" #~ msgstr " C Okno linii komend" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "Paleta nie zawiera wystaraczającej liczby kolorów do złączenia" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Jest zbyt wiele identycznych składników palety " #~ msgid "/View/Command Line Window" #~ msgstr "/Widok/Command Line Window" #~ msgid "Grid colour RGB" #~ msgstr "Siatka kolorów RGB" #~ msgid "Zoom" #~ msgstr "Powiększenie" #~ msgid "%i Files on Command Line" #~ msgstr "%i Pliki w lini komend" #~ msgid "Not enough memory to rotate image" #~ msgstr "Za mało pamięci, aby obrócić obrazek" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "Za mało pamięci, aby obrócić obrazek ze schowka" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "" #~ "Plik jest zbyt duży, powinien mieć <= to Szerokość=%i Wysokość=%i : %s" #~ msgid "Could not open %s: %s" #~ msgstr "Nie można otworzyć pliku %s: %s" #~ msgid "Error closing %s: %s" #~ msgstr "Bląd przy zamykaniu %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Nie można zapisać do %s: %s" #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "wzór _user.c nie może zostać otwarty w bieżącym folderze" #~ msgid "Done" #~ msgstr "Ukończono" #~ msgid "patterns_user.c created in current directory" #~ msgstr "wzór _user.c utworzony w bieżącym folderze" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "Wymiary obrazka nie są równe (94x94)x3- nie można utworzyć wzoru _user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Próbujesz zapisać obraz RGB jako plik XPM, a to nie jest możliwe.Zaleca " #~ "się zapisanie pliku jako PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Próbujesz zapisać obraz RGB jako GIF, a to nie jest możliwe.Zaleca się " #~ "zapisanie pliku jako PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Próbujesz zapisać obraz do pliku XBM z więcej niż dwoma kolorami.Użyj " #~ "innego formatu albo zredukuj liczbę kolorów do dwóch" #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Próbujesz zapisać obraz do formatu JPEG a to nie jest możliwe.Użyj " #~ "zamiast tego formatu PNG." #~ msgid "" #~ "You are trying to save an LSS16 file with a palette of more than 16 " #~ "colours. Either use another format or reduce the palette to 16 colours." #~ msgstr "" #~ "Próbujesz zapisać plik LSS16 z paletą która zawiera więcej niż 16 kolorów." #~ "Użyj innego formatu albo zredukuj liczbę kolorów do 16." #~ msgid "/Edit/Create Patterns" #~ msgstr "/Edycja/Stwórz wzór" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Paleta/Utwórz Kwantyzator(DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Paleta/Utwórz Kwnatyzator (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Paleta/Utwórz Kwantyzator (Wu)" #~ msgid "/File/%i" #~ msgstr "/Plik/%i" #~ msgid "Lanczos3" #~ msgstr "Lanczos3" #~ msgid "DL1 Quantize (fastest)" #~ msgstr "DL1 Quantize (szybkie)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "DL3 Quantize (wolne, lepsza jakość)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Wu Quantize (lepsza metoda dla małych palet)" #~ msgid "Loading PNG image" #~ msgstr "Ładowanie obrazku PNG" #~ msgid "Loading clipboard image" #~ msgstr "Ładuj obraz schowka" #~ msgid "Saving PNG image" #~ msgstr "Zapisywanie obrazku PNG" #~ msgid "Saving Clipboard image" #~ msgstr "Zapisaywanie obrazu schowka" #~ msgid "Saving Layer image" #~ msgstr "Zapisywanie warstwy" #~ msgid "Saving Channel image" #~ msgstr "Zapisywanie kanału" #~ msgid "Loading GIF image" #~ msgstr "Otwieranie obrazku GIF" #~ msgid "Saving GIF image" #~ msgstr "Zapisywanie obrazku GIF" #~ msgid "Loading JPEG image" #~ msgstr "Otwieranie obrazku JPEG" #~ msgid "Saving JPEG image" #~ msgstr "Zapisywanie obrazku JPEG" #~ msgid "Loading TIFF image" #~ msgstr "Otwieranie obrazku TIFF" #~ msgid "Saving TIFF image" #~ msgstr "Zapisywanie obrazku TIFF" #~ msgid "Loading BMP image" #~ msgstr "Otwieranie obrazku BMP" #~ msgid "Saving BMP image" #~ msgstr "Zapisywanie obrazku BMP" #~ msgid "Loading XPM image" #~ msgstr "Otwieranie obrazku XPM" #~ msgid "Saving XPM image" #~ msgstr "Zapisywanie obrazku XPM" #~ msgid "Loading XBM image" #~ msgstr "Otwieranie obrazku XBM" #~ msgid "Saving XBM image" #~ msgstr "Zapisywanie obrazku XBM" #~ msgid "Loading LSS16 image" #~ msgstr "Otwieranie obrazku LSS16" #~ msgid "Saving LSS16 image" #~ msgstr "Zapisywanie obrazku LSS16" #~ msgid "Saving UNDO images" #~ msgstr "Zapisywanie Cofniętych zmian" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "Jakość zapisu JPEG (100=Wysoka) " mtpaint-3.40/po/pt.po0000644000175000000620000021064511647046423014053 0ustar muammarstaff# Portuguese translation for mtpaint # Copyright (c) (c) 2005 Canonical Ltd, and Rosetta Contributors 2005 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2005. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2008-06-19 18:04+0000\n" "Last-Translator: Tiago Silva \n" "Language-Team: Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-01-18 12:36+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Reproduzir" #: src/ani.c:695 msgid "Fix" msgstr "Corrigir" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Fechar" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Erro" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "" #: src/ani.c:857 msgid "Unable to save image" msgstr "Impossível gravar imagem" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Aviso" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Não" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Sim" #: src/ani.c:993 msgid "Set Key Frame" msgstr "" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Configurar Animação" #: src/ani.c:1064 msgid "Output Files" msgstr "" #: src/ani.c:1067 msgid "Start frame" msgstr "" #: src/ani.c:1068 msgid "End frame" msgstr "" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "" #: src/ani.c:1071 msgid "Output path" msgstr "" #: src/ani.c:1072 msgid "File prefix" msgstr "" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "" #: src/ani.c:1098 msgid "Positions" msgstr "Posições" #: src/ani.c:1135 msgid "Cycling" msgstr "" #: src/ani.c:1148 msgid "Save" msgstr "Guardar" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Previsualizar" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "A imagem é demasiado grande para transformar." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "" #: src/canvas.c:429 msgid "Edge Soften" msgstr "" #: src/canvas.c:481 msgid "Different X/Y" msgstr "" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "" #: src/canvas.c:523 msgid "Radius" msgstr "" #: src/canvas.c:524 msgid "Amount" msgstr "" #: src/canvas.c:525 msgid "Threshold " msgstr "" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "" #: src/canvas.c:563 msgid "Outer radius" msgstr "" #: src/canvas.c:564 msgid "Inner radius" msgstr "" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizar" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "A imagem é demasiado grande para esta rotação." #: src/canvas.c:668 msgid "Smooth" msgstr "" #: src/canvas.c:670 msgid "Free Rotate" msgstr "" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Memória insuficiente para criar a área de transferência" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Não se consegue carregar o ficheiro" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "A libraría de importação teve de terminar devido a um problema com o " "ficheiro (dados de imagem possivelmente corruptos ou ficheiro truncado). Eu " "consegui carregar alguns dados uma vez que o cabeçalho aparentava estar bem, " "mas sugeria que grave esta imagem para um novo ficheiro para garantir que " "isto não volte a acontecer." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "O ficheiro %s já existe. Deseja sobreescrevê-lo?" #: src/canvas.c:1524 msgid "File Found" msgstr "Ficheiro Encontrado" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NÃO" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "SIM" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Qualidade de Gravação JPEG (100=Alta)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "" #: src/canvas.c:1565 msgid "Y =" msgstr "" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Formato de Ficheiro" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Não se consegue exportar o ficheiro ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Não se consegue gravar o ficheiro: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Carregar Ficheiro de Imagem" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Gravar Ficheiro de Imagem" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Carregar Ficheiro de Paleta" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Gravar Ficheiro de Paleta" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Deve ter 16 cores de paleta ou menos para exportar arte ASCII." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportar Arte ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Gravar Ficheiros de Camadas" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Carregar Canal" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Guardar Canal" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "" #: src/channels.c:236 msgid "Cleared" msgstr "" #: src/channels.c:237 msgid "Set" msgstr "" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "" #: src/channels.c:239 msgid "Set blend A to B" msgstr "" #: src/channels.c:240 msgid "Image Red" msgstr "" #: src/channels.c:241 msgid "Image Green" msgstr "" #: src/channels.c:242 msgid "Image Blue" msgstr "" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Selecção" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "" #: src/channels.c:256 msgid "Create Channel" msgstr "Criar Canal" #: src/channels.c:262 msgid "Channel Type" msgstr "Tipo de Canal" #: src/channels.c:269 msgid "Initial Channel State" msgstr "" #: src/channels.c:273 msgid "Inverted" msgstr "" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Cancelar" #: src/channels.c:316 msgid "Delete Channels" msgstr "Eliminar Canais" #: src/channels.c:373 msgid "Threshold Channel" msgstr "" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Vermelho" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Verde" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Azul" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Tonalidade" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturação" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Valor" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacidade" #: src/font.c:939 msgid "Creating Font Index" msgstr "" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" #: src/font.c:1468 msgid "Font" msgstr "" #: src/font.c:1469 msgid "Style" msgstr "" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Tamanho" #: src/font.c:1471 msgid "Filename" msgstr "" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Colar Texto" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Introduzir Texto Aqui" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Antialias" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Inverter" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Cor de fundo =" #: src/font.c:1805 msgid "Oblique" msgstr "" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Ângulo de rotação =" #: src/font.c:1831 msgid "Font Directories" msgstr "" #: src/font.c:1836 msgid "New Directory" msgstr "" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "" #: src/font.c:1848 msgid "Add" msgstr "" #: src/font.c:1852 msgid "Remove" msgstr "" #: src/font.c:1856 msgid "Create Index" msgstr "" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "" #: src/fpick.c:771 msgid "Create Directory" msgstr "" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Criar" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "" #: src/fpick.c:838 msgid "Unable to delete" msgstr "" #: src/fpick.c:843 msgid "Unable to rename" msgstr "" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "" #: src/fpick.c:939 msgid "Up" msgstr "" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "" #: src/fpick.c:1044 msgid "Name" msgstr "" #: src/fpick.c:1046 msgid "Type" msgstr "" #: src/fpick.c:1047 msgid "Modified" msgstr "" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Geral" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Atalhos de teclado" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Atalhos de mouse" #: src/help.c:28 msgid "Credits" msgstr "Créditos" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr "" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr "" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr "" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr "" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr "" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr "" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr "" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr "" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr "" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr "" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr "" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr "" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr "" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr "" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr "" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr "" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr "" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr "" #: src/help.c:85 msgid " L Layers Window\n" msgstr "" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr "" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr "" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr "" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr "" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr "" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr "" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr "" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr "" #: src/help.c:110 msgid " F1 Help" msgstr "" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr "" #: src/help.c:112 msgid " F3 Choose Brush" msgstr "" #: src/help.c:113 msgid " F4 Paint Tool" msgstr "" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr "" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr "" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr "" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr "" #: src/help.c:118 msgid " F9 Selection Tool" msgstr "" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr "" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr "" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr "" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" #: src/help.c:126 msgid " Page Up Scale Image" msgstr "" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr "" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr "" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" #: src/help.c:150 msgid "Authors\n" msgstr "" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "" #: src/info.c:281 msgid "Information" msgstr "Informação" #: src/info.c:290 msgid "Memory" msgstr "Memória" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Memória total para imagens principal e de desfazer" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Área de Transferência" #: src/info.c:311 msgid "Unused" msgstr "Não Utilizado" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Píxeis RGB únicos" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Camadas" #: src/info.c:343 msgid "Total layer memory usage" msgstr "" #: src/info.c:350 msgid "Colour Histogram" msgstr "" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "" #: src/info.c:391 msgid "Index" msgstr "" #: src/info.c:392 msgid "Canvas pixels" msgstr "" #: src/info.c:407 msgid "Orphans" msgstr "Órfãos" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Não se conseguiu encontrar a directoria \"home\". A usar a directoria actual " "como directoria \"home\"." #: src/layer.c:70 msgid "Background" msgstr "Fundo" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Modificado)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Sem título" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Deseja mesmo apagar a camada %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Uma ou mais das camadas contêm alterações que ainda não foram gravadas. " "Deseja mesmo perder essas alterações?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Cancelar Operação" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Perder Alterações" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Deseja mesmo apagar todas as camadas?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Não pode acrescentar mais camadas." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nova Camada" #: src/layer.c:1160 msgid "Raise" msgstr "Aumentar" #: src/layer.c:1161 msgid "Lower" msgstr "Diminuir" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplicar Camada" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centrar Camada" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Apagar Camada" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Fechar Janela de Camadas" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nome da Camada" #: src/layer.c:1269 msgid "Position" msgstr "Posição" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Cor Transparente" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Mostrar todas as camadas na janela principal" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Não havia cores não usadas para remover!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "A paleta não contém 2 cores que tenham valores RGB idênticos" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Imagem" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Deseja mesmo sair?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Ficheiro" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Novo" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Abrir ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Gravar" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Gravar Como ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportar Arte ASCII ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Sair" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Editar" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Colar Em Nova Camada" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Colar" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Colar Texto" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "" #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "" #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "" #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "" #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "" #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "" #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "" #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "" #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "" #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "" #: src/mainwindow.c:4868 msgid "//Invert" msgstr "" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "" #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "" #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "" #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "" #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "" #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "" #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Ajuda" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "" #: src/mainwindow.c:4933 msgid "//About" msgstr "" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "A converter para Paleta Indexada" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "" #: src/memory.c:4744 msgid "Rotating" msgstr "" #: src/memory.c:5096 msgid "Free Rotation" msgstr "" #: src/memory.c:5682 msgid "Scaling Image" msgstr "" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "" #: src/memory.c:6950 msgid "Applying Effect" msgstr "A Aplicar Efeito" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Por Favor Espere ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Escala de Cinzentos" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Paleta Indexada" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nova Imagem" #: src/otherwindow.c:288 msgid "Width" msgstr "Largura" #: src/otherwindow.c:289 msgid "Height" msgstr "Altura" #: src/otherwindow.c:290 msgid "Colours" msgstr "Cores" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Selector de Padrões" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Ajustar Tamanho da Paleta" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Aplicar" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminância" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Luminosidade" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frequência" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Ordenar Cores da Paleta" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Índice Inicial" #: src/otherwindow.c:617 msgid "End Index" msgstr "Índice Final" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Ordem Inversa" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contraste" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "" #: src/otherwindow.c:869 msgid "Gamma" msgstr "" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Transformar Cor" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palete" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto-Previsualização" #: src/otherwindow.c:1006 msgid "Reset" msgstr "" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "" #: src/otherwindow.c:1167 msgid "Width " msgstr "Largura " #: src/otherwindow.c:1168 msgid "Height " msgstr "Altura " #: src/otherwindow.c:1170 msgid "Original " msgstr "Original " #: src/otherwindow.c:1176 msgid "New" msgstr "Novo" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Deslocamento" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centro" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Redimensionar Tela" #: src/otherwindow.c:1963 msgid "From" msgstr "" #: src/otherwindow.c:1963 msgid "To" msgstr "" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "" #: src/otherwindow.c:2079 msgid "Limit" msgstr "" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "" #: src/otherwindow.c:2080 msgid "Cube" msgstr "" #: src/otherwindow.c:2110 msgid "Range" msgstr "" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Conversão Exacta" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "" #: src/otherwindow.c:2385 msgid "Off" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Converter Para Indexado" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Cores Indexadas A Usar" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "" #: src/otherwindow.c:2837 msgid "Points:" msgstr "" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "" #: src/otherwindow.c:3018 msgid "Linear" msgstr "" #: src/otherwindow.c:3018 msgid "Radial" msgstr "" #: src/otherwindow.c:3018 msgid "Square" msgstr "" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "" #: src/otherwindow.c:3021 msgid "A to B" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A only" msgstr "" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "" #: src/otherwindow.c:3024 msgid "Current only" msgstr "" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "" #: src/otherwindow.c:3047 msgid "Length" msgstr "" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "" #: src/otherwindow.c:3325 msgid "Origin" msgstr "" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "Camada" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "" #: src/prefs.c:154 msgid "Current Device" msgstr "" #: src/prefs.c:431 msgid "Default System Language" msgstr "Linguagem por Omissão do Sistema" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "" #: src/prefs.c:433 msgid "Czech" msgstr "Checo" #: src/prefs.c:433 msgid "Dutch" msgstr "" #: src/prefs.c:433 msgid "English (UK)" msgstr "Inglês (UK)" #: src/prefs.c:433 msgid "French" msgstr "Francês" #: src/prefs.c:434 msgid "Galician" msgstr "" #: src/prefs.c:434 msgid "German" msgstr "" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "" #: src/prefs.c:435 msgid "Polish" msgstr "" #: src/prefs.c:435 msgid "Portuguese" msgstr "Português" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Português (Brasileiro)" #: src/prefs.c:436 msgid "Russian" msgstr "" #: src/prefs.c:436 msgid "Slovak" msgstr "" #: src/prefs.c:437 msgid "Spanish" msgstr "Espanhol" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Ficheiros Usados Recentemente" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Desfazer / Refazer" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "" #: src/prefs.c:457 msgid "Preferences" msgstr "Preferências" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Seleccionar língua de tradução preferida\n" "\n" "Terá de reiniciar o mtPaint\n" "para que tome efeito" #: src/prefs.c:524 msgid "Language" msgstr "Língua" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Comfirmar Saída" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Ficheiros" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Seleccionar Ficheiro de Clipboard" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Barra de Estado" #: src/prefs.c:633 msgid "Tablet" msgstr "" #: src/prefs.c:637 msgid "Device Settings" msgstr "" #: src/prefs.c:645 msgid "Configure Device" msgstr "" #: src/prefs.c:652 msgid "Tool Variable" msgstr "" #: src/prefs.c:654 msgid "Factor" msgstr "Factor" #: src/prefs.c:680 msgid "Test Area" msgstr "Área de Teste" #: src/shifter.c:205 msgid "Frames" msgstr "" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "" #: src/shifter.c:279 msgid "Start" msgstr "Começar" #: src/shifter.c:281 msgid "Finish" msgstr "Finalizar" #: src/shifter.c:330 msgid "Fix Palette" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "" #: src/toolbar.c:234 msgid "By image channel" msgstr "" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "" #: src/toolbar.c:236 msgid "Fill settings" msgstr "" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "" #: src/toolbar.c:299 msgid "Colour" msgstr "Cor" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplicar" #: src/toolbar.c:300 msgid "Divide" msgstr "Dividir" #: src/toolbar.c:300 msgid "Screen" msgstr "Ecrã" #: src/toolbar.c:300 msgid "Dodge" msgstr "Sub-Exposição" #: src/toolbar.c:301 msgid "Burn" msgstr "Super-Exposição" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Luz Sólida" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Luz Suave" #: src/toolbar.c:301 msgid "Difference" msgstr "Diferença" #: src/toolbar.c:302 msgid "Darken" msgstr "Escurecer" #: src/toolbar.c:302 msgid "Lighten" msgstr "Clarear" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extractor Grão" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Misturar Grão" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "" #: src/toolbar.c:889 msgid "Tint +-" msgstr "" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "" #: src/toolbar.c:1041 msgid "Cut" msgstr "Cortar" #: src/toolbar.c:1042 msgid "Copy" msgstr "Copiar" #: src/toolbar.c:1043 msgid "Paste" msgstr "Colar" #: src/toolbar.c:1045 msgid "Undo" msgstr "Desfazer" #: src/toolbar.c:1046 msgid "Redo" msgstr "Refazer" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "" #: src/toolbar.c:1053 msgid "Paint" msgstr "Pintar" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Baralhar" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Preencher" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Linha Recta" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Esborratar" #: src/toolbar.c:1058 msgid "Clone" msgstr "Clonar" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Seleccionar" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Selecção de Polígono" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Selecção de Contorno" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Preencher Selecção" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "" #: src/viewer.c:132 msgid "About" msgstr "" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Ficheiro %s inválido - paleta não actualizada" #~ msgid "%i Files on Command Line" #~ msgstr "%i Ficheiros na Linha de Comandos" #~ msgid "Not enough memory to rotate image" #~ msgstr "Memória insuficiente para rotar a imagem." #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "Memória insuficiente para rotar a área de transferência" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "" #~ "O ficheiro é demasiado grande, deve ser <= a largura=%i altura=%i : %s" #~ msgid "Could not open %s: %s" #~ msgstr "Não se conseguiu abrir %s: %s" #~ msgid "Error closing %s: %s" #~ msgstr "Erro ao fechar %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Não se conseguiu escrever em %s: %s" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patters_user.c criado na directoria actual" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "A imagem actual não é 94x94x3 portanto não posso criar patterns_user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está a tentar gravar uma imagem RGB num ficheiro XPM, o qual não é " #~ "possível. Sugiro que grave com uma extensão PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está a tentar gravar uma imagem RGB num ficheiro GIF, o qual não é " #~ "possível. Sugiro que grave com uma extensão PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Está a tentar gravar um ficheiro XBM com uma paleta de mais de 2 cores. " #~ "Use outro formato ou reduza a paleta a 2 cores." #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está a tentar gravar uma tela indexada num ficheiro JPEG, o qual não é " #~ "possível. Sugiro que grave com uma extensão PNG." #~ msgid "" #~ "You are trying to save an LSS16 file with a palette of more than 16 " #~ "colours. Either use another format or reduce the palette to 16 colours." #~ msgstr "" #~ "Está a tentar gravar um ficheiro LSS16 com uma paleta de mais de 16 " #~ "cores. Use outro formato ou reduza a paleta a 16 cores." #~ msgid "/Edit/Create Patterns" #~ msgstr "/Editar/Create Patterns" #~ msgid "/File/%i" #~ msgstr "/Ficheiro/%i" #~ msgid "Loading PNG image" #~ msgstr "A Carregar Imagem PNG" #~ msgid "Saving PNG image" #~ msgstr "A Gravar Imagem PNG" #~ msgid "Loading GIF image" #~ msgstr "A Carregar Imagem GIF" #~ msgid "Saving GIF image" #~ msgstr "A Gravar Imagem GIF" #~ msgid "Loading JPEG image" #~ msgstr "A Carregar Imagem JPEG" #~ msgid "Saving JPEG image" #~ msgstr "A guardar imagem JPEG" #~ msgid "Loading TIFF image" #~ msgstr "A carregar imagem TIFF" #~ msgid "Saving TIFF image" #~ msgstr "A guardar imagem TIFF" #~ msgid "Loading BMP image" #~ msgstr "A carregar imagem BMP" #~ msgid "Saving BMP image" #~ msgstr "A guardar imagem BMP" #~ msgid "Loading XPM image" #~ msgstr "A carregar imagem XPM" #~ msgid "Saving XPM image" #~ msgstr "A guardar imagem XPM" #~ msgid "Loading XBM image" #~ msgstr "A Carregar Imagem XPM" #~ msgid "Saving XBM image" #~ msgstr "A Gravar Imagem XBM" #~ msgid "Loading LSS16 image" #~ msgstr "A Carregar Imagem LSS16" #~ msgid "Saving LSS16 image" #~ msgstr "A Gravar Imagem LSS16" mtpaint-3.40/po/ja.po0000644000175000000620000027230711647046422014024 0ustar muammarstaff# Japanese translation for mtpaint # This file is distributed under the same license as the mtpaint package. # Norihiro YONEDA , 2007. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-06-09 12:48+0900\n" "Last-Translator: YoN \n" "Language-Team: Puppy Linux Japanese\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "アニメーションプレビュー" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "再生" #: src/ani.c:695 msgid "Fix" msgstr "固定" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "閉じる" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "エラー" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "出力ディレクトリを作成できません" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "アニメーションフレームを作成中" #: src/ani.c:857 msgid "Unable to save image" msgstr "イメージを保存できません" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "警告" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "本当に、全レイヤの位置とサイクルデータをすべてクリアしますか?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "いいえ" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "はい" #: src/ani.c:993 msgid "Set Key Frame" msgstr "キーフレームの設定" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "アニメーションを作るには2つ以上のレイヤが必要です" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "アニメーションを作る前にレイヤを保存して下さい" #: src/ani.c:1054 msgid "Configure Animation" msgstr "アニメーション設定" #: src/ani.c:1064 msgid "Output Files" msgstr "出力ファイル" #: src/ani.c:1067 msgid "Start frame" msgstr "フレームの開始" #: src/ani.c:1068 msgid "End frame" msgstr "フレームの終了" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "遅延" #: src/ani.c:1071 msgid "Output path" msgstr "出力パス" #: src/ani.c:1072 msgid "File prefix" msgstr "ファイル プレフィックス" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "GIFフレームを作成" #: src/ani.c:1098 msgid "Positions" msgstr "位置" #: src/ani.c:1135 msgid "Cycling" msgstr "循環" #: src/ani.c:1148 msgid "Save" msgstr "保存" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "プレビュー" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "フレームの作成" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "イメージは変換するには大きすぎます。" #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "グラデーション" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "形態学的" #: src/canvas.c:405 msgid "Edge Detect" msgstr "境界検出" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "縁をシャープにする" #: src/canvas.c:429 msgid "Edge Soften" msgstr "縁をぼかす" #: src/canvas.c:481 msgid "Different X/Y" msgstr "X/Yの違い" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "ガウスぼかし" #: src/canvas.c:523 msgid "Radius" msgstr "放射状" #: src/canvas.c:524 msgid "Amount" msgstr "量" #: src/canvas.c:525 msgid "Threshold " msgstr "しきい値" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "アンシャープマスク" #: src/canvas.c:563 msgid "Outer radius" msgstr "外半径" #: src/canvas.c:564 msgid "Inner radius" msgstr "内半径" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "標準化" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "ガウスの差異" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Kuwahara-Nagaoぼかし" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "イメージはこの回転には大きすぎます。" #: src/canvas.c:668 msgid "Smooth" msgstr "平滑" #: src/canvas.c:670 msgid "Free Rotate" msgstr "自由回転" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "クリップボードを作成するにメモリが足りません" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "無効なチャンネルファイルです。" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "アニメーションを表示" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "これは%sアニメファイルです。" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "フィルが大きすぎます。幅=%i 高さ=%i 以下にして下さい" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "ファイルを読み込めません" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "ファイルに問題があるのでファイルインポートライブラリは終了します(たぶん不正" "な画像データまたは不完全なファイルです)。ヘッダが間違いないようでしたので、" "いくつかのデータをロードできました。しかし二度と起こらないように、このイメー" "ジを新しいファイルに保存して下さい。" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "ファイルを開けません" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "サポートされていないファイルフォーマットです" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "ファイル:%s はすでに存在します。上書きしますか?" #: src/canvas.c:1524 msgid "File Found" msgstr "ファイルが見つかりました" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "いいえ" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "はい" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "透明度指数" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG 保存品質 (100=高い)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG 圧縮 (0=なし)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE 圧縮" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000 圧縮 (0=可逆)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "X = のホットスポット" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "ファイル フォーマット" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "取り消し可能" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "アニメーション遅延" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "アンドゥイメージをエクスポートできません" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "ASCIIファイルをエクスポートできません" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "ファイルを保存できません:%s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "イメージファイルをロード" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "イメージファイルを保存" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "パレットをロード" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "パレットファイルを保存" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "アンドゥイメージのエクスポート" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "アンドゥイメージを(反転して)エクスポート" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "ASCIIアートにエクスポートするには16色以下のパレット色が必要です。" #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "ASCIIアートをエクスポート" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "レイヤファイルを保存" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "フレームディレクトリを選択" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "アニメGIFを作るには少なくとも1つのフレームを保存して下さい。" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "GIFアニメをエクスポート" #: src/canvas.c:2136 msgid "Load Channel" msgstr "チャンネルをロード" #: src/canvas.c:2140 msgid "Save Channel" msgstr "チャンネルを保存" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "合成イメージを保存" #: src/channels.c:236 msgid "Cleared" msgstr "クリア" #: src/channels.c:237 msgid "Set" msgstr "設定" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "色 A 半径 B で設定" #: src/channels.c:239 msgid "Set blend A to B" msgstr "A を B にブレンド" #: src/channels.c:240 msgid "Image Red" msgstr "赤色イメージ" #: src/channels.c:241 msgid "Image Green" msgstr "綠色イメージ" #: src/channels.c:242 msgid "Image Blue" msgstr "青色イメージ" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "アルファ" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "選択" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "マスク" #: src/channels.c:256 msgid "Create Channel" msgstr "チャンネルを作成" #: src/channels.c:262 msgid "Channel Type" msgstr "チャンネルタイプ" #: src/channels.c:269 msgid "Initial Channel State" msgstr "初期チャンネル状況" #: src/channels.c:273 msgid "Inverted" msgstr "反転" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "キャンセル" #: src/channels.c:316 msgid "Delete Channels" msgstr "チャンネルを削除" #: src/channels.c:373 msgid "Threshold Channel" msgstr "しきいチャンネル" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "赤色" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "綠色" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "青色" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "色相" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "彩度" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "値" #: src/cpick.c:902 msgid "Hex" msgstr "Hex" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "不透明度" #: src/font.c:939 msgid "Creating Font Index" msgstr "フォントインデックスを作成" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "フォントの検索には少なくとも1つのディレクトリを選択して下さい。" #: src/font.c:1468 msgid "Font" msgstr "フォント" #: src/font.c:1469 msgid "Style" msgstr "スタイル" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "サイズ" #: src/font.c:1471 msgid "Filename" msgstr "ファイル名" #: src/font.c:1471 msgid "Face" msgstr "書体" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "辞書" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "テキストを貼り付け" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "テキスト" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "ここにテキストを入力" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "アンチエイリアス" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "反転" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "背景色 =" #: src/font.c:1805 msgid "Oblique" msgstr "斜体" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "回転角度 =" #: src/font.c:1831 msgid "Font Directories" msgstr "フォントディレクトリ" #: src/font.c:1836 msgid "New Directory" msgstr "新規ディレクトリ" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "辞書を選択" #: src/font.c:1848 msgid "Add" msgstr "追加" #: src/font.c:1852 msgid "Remove" msgstr "削除" #: src/font.c:1856 msgid "Create Index" msgstr "インデックスを作成" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "ディレクトリ %s にアクセスできません" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "削除" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "リネーム" #: src/fpick.c:771 msgid "Create Directory" msgstr "ディレクトリを作成" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "新規ファイル名を入力" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "新規ディレクトリ名を入力" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "作成" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "本当に \"%s\" を削除しますか?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "削除できません" #: src/fpick.c:843 msgid "Unable to rename" msgstr "リネームできません" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "ディレクトリを作成できません" #: src/fpick.c:939 msgid "Up" msgstr "上" #: src/fpick.c:940 msgid "Home" msgstr "ホーム" #: src/fpick.c:941 msgid "Create New Directory" msgstr "新規ディレクトリを作成" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "隠しファイルを表示" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "大文字小文字を区別して並び替え" #: src/fpick.c:1044 msgid "Name" msgstr "名前" #: src/fpick.c:1046 msgid "Type" msgstr "タイプ" #: src/fpick.c:1047 msgid "Modified" msgstr "修正" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "一般" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "キーボードショートカット" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "マウスショートカット" #: src/help.c:28 msgid "Credits" msgstr "クレジット" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - 著作権 (C) 2004-2011 作者たち\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "作者リストは「クレジット」をご覧下さい。\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaintは、無料ソフトです; フリーソフトウェア財団によって発表されたGNU一般公" "有使用許諾(GPL)の条件の下で、あなたはそれを再配布する事も、それを修正する事も" "できます; バージョン3のライセンス、または(あなたのオプションで)どの最新" "バージョンでも。\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaintは、役に立つ事を希望して配布されますが「無保証」です;商品適格性または" "特定目的への適合性の黙示保証もありません。詳細はGNU一般公有使用許諾を見て下さ" "い。\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaintはアイコンとピクセルベースのアートワークを作成するために設計されたシン" "プルなGTK+1/2ペイントプログラムです。それはインデックスを付けられたパレットま" "たは24ビットのRGBイメージを編集でき、基本的な絵とパレット操作ツールを提供しま" "す。また、いくつかの強力な特徴、例えばチャンネル、レイヤ、アニメーションもあ" "ります。その単純さと依存性がないため、GNU/Linux、Windowsと古いPCハードウェア" "でも動きます。\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "ハンドブックに含まれるmtPaintの特徴の完全なドキュメントがあります。あなたがま" "だ持っていないならば、mtPaintのウェブサイトからダウンロードできます。\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "あなたがmtPaintが好きで、新しいリリースをアップデートしていたい、あるいは" "フィードバックをしたいなら、メーリングリストが興味深いかも知れません:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N 新規イメージを作成" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O イメージを開く" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S イメージを保存" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q プログラムを終了\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A イメージ全体を選択" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape 何も選択せず、貼り付けをキャンセル" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C 選択範囲をクリップボードへコピー" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X 選択範囲をクリップボードへコピーして、現在のパターンで選択領" "域を塗りつぶす" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V クリップボードを現在の表示の中央へ貼り付け" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K クリップボードをコピーした位置へ貼り付け" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return キャンバスに貼り付け" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " 矢印キー 塗りつぶしモード - マウスカーソルを移動" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " 矢印キー 選択モード - 選択ボックス、貼り付けボックスを1ピクセル単位" "で移動" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+矢印キー マウスポインタ、選択ボックス、貼り付けボックスを x ピクセル" "単位で移動 - x は設定ウィンドウで決められます" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+矢印キー レイヤの移動、選択ボックスのリサイズ" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr " [ か ] 色A を次の、または前のパレットアイテムに変更" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr " Shift+[ か ] 色B を次の、または前のパレットアイテムに変更\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete イメージを選択範囲にトリミング" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert 色を変換 - すなわち、明るさ、コントラスト、彩度、ポスタライ" "ズ、ガンマ" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G イメージをグレースケール" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G イメージをグレースケール(ガンマ補正)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr " Ctrl-T 選択領域に現在の色で長方形を描く" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T 選択領域を現在の色で塗りつぶす" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L 楕円の選択領域を描く" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L 選択領域内に楕円を描く\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E 色A と 色B のRGB値を編集" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W 全パレット色を編集\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P 設定" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I 情報\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z 最後の操作を元に戻す" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R 未完成の操作をやり直す\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V 表示ウィンドウ" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L レイヤウィンドウ\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A 線引きツールを使う時、開いた矢印を描く (フロー設定でサイ" "ズを設定)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S 線引きツールを使う時、閉じた矢印を描く (フロー設定でサイ" "ズを設定)\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= メイン編集ウィンドウ - 拡大" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - メイン編集ウィンド - 縮小" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= 表示ウィンドウ - 拡大" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - 表示ウィンドウ - 縮小\n" #: src/help.c:97 #, fuzzy, c-format msgid " 1 10% zoom" msgstr " 1 10% ズーム" #: src/help.c:98 #, fuzzy, c-format msgid " 2 25% zoom" msgstr " 2 25% ズーム" #: src/help.c:99 #, fuzzy, c-format msgid " 3 50% zoom" msgstr " 3 50% ズーム" #: src/help.c:100 #, fuzzy, c-format msgid " 4 100% zoom" msgstr " 4 100% ズーム" #: src/help.c:101 #, fuzzy, c-format msgid " 5 400% zoom" msgstr " 5 400% ズーム" #: src/help.c:102 #, fuzzy, c-format msgid " 6 800% zoom" msgstr " 6 800% ズーム" #: src/help.c:103 #, fuzzy, c-format msgid " 7 1200% zoom" msgstr " 7 1200% ズーム" #: src/help.c:104 #, fuzzy, c-format msgid " 8 1600% zoom" msgstr " 8 1600% ズーム" #: src/help.c:105 #, fuzzy, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% ズーム\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 イメージチャンネルを編集" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 アルファチャンネルを編集" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 選択チャンネルを編集" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 マスクチャンネルを編集\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 ヘルプ" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 パターンを選択" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 ブラシを選択" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 ペイントツール" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 メインツールバーを切り替え" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 ツールのツールバーを切り替え" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 設定ツールバーを切り替え" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 パレットを切り替え" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 ツールの選択" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 ドックエリアを切り替え\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 現在のクリップボードをファイル 1-12 に保存" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 ファイル 1-12 からクリップボードを読み込み\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 不透明度を 10%、20%、... , 100%に設定(メインあるいは" "キーパッドの番号)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = 不透明度を 1 づつ増やす" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - 不透明度を 1 づつ減らす\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home メインウィンドウのメニュー/ツールバー/ステータスバー/パレットの" "表示・非表示" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up イメージを縮小拡大" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down イメージキャンバスのサイズを変更" #: src/help.c:128 msgid " End Pan Window" msgstr " End ウィンドウをパンする" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " 左ボタン 現在使用中のツールでキャンバスを塗る" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr " 中央ボタン 次のズーム後、イメージの中央になるポイントを選択" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " 右ボタン キャンバスに貼り付ける / 現在の線の描画を中止 / 選択をキャ" "ンセル\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " スクロールボタン GTK+2 では設定ウィンドウからスクロールボタン" "でズームの + - を使えるようにできます\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+左ボタン マウスポインタ上の色 A を選択" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+中央ボタン A/B 色を作成して A の RGB 色ベースでパターン化する(RGB イ" "メージのみ)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+右ボタン マウスポインタ上の色Bを選択" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+スクロールボタン メイン編集ウィンドウを左から右へスクロール\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctrl+ダブルクリック 色A または Bをブラシ四角か選択マーキーで平均色にす" "る (RGB のみ)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+右ボタン 次のズーム後ポイントがイメージの中央になるように選択\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "X/Y 座標をマウスの移動している間、固定できます:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift マウスの垂直移動を抑制" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl マウスの水平移動を抑制" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint は Dmitry Groshev によってメンテナンスされています。\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "以下の方々(アルファベット順)がプロジェクトに直接、貢献しました。従って、そ" "の方々の寛大さときつい仕事に対して丁重なお礼をするに値します。:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "作者たち\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - バージョン 2.30の貢献開発者。バージョン 3.00 から今までにい" "たる指導的開発者でありメンテナー。" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - バージョン 3.00 までのオリジナル作者でメンテナー。その後は時折の" "貢献者。" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Wu 量子化方法を書いた - 詳細は wu.c をご覧下さい。\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "一般貢献(その他記載されていない改良のためのアイデアとフィードバック)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - 2005年4月にウェブサイトのリデザイン" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - アニメGIFファイルの作成と表示に必要な Gifsicle の作成 http://" "www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - マニュアルページ、Launchpad/Rosetta の" "登録" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "翻訳\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "ブラジル ポルトガル語 - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "チェコ語 - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "オランダ語 - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "フランス語 - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "ガリシア語 - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "ドイツ語 - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "イタリア語 - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "日本語 - 米田 憲弘" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "ポーランド語 - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "ポルトガル語 - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "ロシア語 - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "簡体字中国語 - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "スロバキア語 - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "スペイン語 - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "スウェーデン語 - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "台湾中国語 - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "トルコ語 - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "情報" #: src/info.c:290 msgid "Memory" msgstr "メモリ" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "メイン + イメージを元に戻すための合計メモリ" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "元に戻す / やり直し / 最高レベルを使用" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "クリップボード" #: src/info.c:311 msgid "Unused" msgstr "未使用" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "クリップボード = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "クリップボード = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "一意 RGB ピクセル" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "レイヤ" #: src/info.c:343 msgid "Total layer memory usage" msgstr "レイヤメモリ使用量合計" #: src/info.c:350 msgid "Colour Histogram" msgstr "カラーヒストグラム" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "カラーインデックス合計 - %i の内 %i 使用" #: src/info.c:391 msgid "Index" msgstr "インデックス" #: src/info.c:392 msgid "Canvas pixels" msgstr "キャンバス ピクセル" #: src/info.c:407 msgid "Orphans" msgstr "最初の行" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "ホームディレクトリが見つかりません。現在のディレクトリをホームとして使いま" "す。" #: src/layer.c:70 msgid "Background" msgstr "背景" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(変更済み)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "無題" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "本当にレイヤ %i (%s) を削除してもいいですか?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "1つ以上のレイヤに保存されていない変更があります。本当に変更を破棄しますか?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "キャンセル" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "変更を破棄" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d レイヤの読み込みに失敗" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "一つ以上のレイヤが保存されていません。将来この合成イメージを読み込むために、" "レイヤテキストを保存する前にイメージを個々に保存して下さい。" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "本当にすべてのレイヤを削除しますか?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "これ以上レイヤを追加できません。" #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "新規レイヤ" #: src/layer.c:1160 msgid "Raise" msgstr "上げる" #: src/layer.c:1161 msgid "Lower" msgstr "下げる" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "レイヤを複製" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "レイヤを中央へ" #: src/layer.c:1164 msgid "Delete Layer" msgstr "レイヤを削除" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "レイヤウィンドウを閉じる" #: src/layer.c:1268 msgid "Layer Name" msgstr "レイヤ名" #: src/layer.c:1269 msgid "Position" msgstr "位置" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "透過色" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "メインウィンドウに全レイヤを表示" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "削除する未使用の色はありません!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "パレットは同じRGB値の2つの色がありません" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "パレットは同じRGB値の色 %i を含みます。本当に1つのインデックスにマージして" "キャンバスを再構成しますか?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "インデックス済み" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "%s イメージを %s ファイルで保存できません。PNG拡張子で保存して下さい。" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "ファイル %s を %d 色以上のパレットで保存しようとしています。別のフォーマット" "を使うか、パレットを %d 色に減色して下さい。" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "XPM ファイルを4096色以上で保存しようとしています。別のフォーマットを使うかイ" "メージを4ビットにポスタリゼーションするか、色数を減色して下さい。" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "クリップボードを読み込めません" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "クリップボードを保存できません" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "このキャンバス/パレットには未保存の変更があります。この変更を破棄しますか?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "イメージ" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "本当に終了しますか?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/ファイル(_F)" #: src/mainwindow.c:4665 msgid "//New" msgstr "//新規" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//開く …" #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//保存" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//名前を付けて保存…" #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//アンドゥイメージをエクスポート…" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//アンドゥイメージをエクスポート(反転)…" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//ASCIIアートをエクスポート…" #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//GIFアニメをエクスポート…" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//アクション" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///設定" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//終了" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/編集(_E)" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//元に戻す" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//やり直し" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//切取り" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//コピー" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//パレットにコピー" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//中央に貼り付け" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//新しいレイヤとして貼り付け" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//貼り付け" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//文字を貼り付け" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//文字を貼り付け (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//パレットを貼り付け" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//クリップボードをロード" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//クリップボードを保存" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//クリップボードをシステムからインポート" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//クリップボードをシステムにエクスポート" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//パターンを選択…" #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//ブラシを選択…" #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/表示(_V)" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//メインツールバーを表示" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//ツールのツールバーを表示" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//ツールバーの設定を表示" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//ドックを表示" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//パレットを表示" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//ステータスバーを表示" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//イメージ表示を切換" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//イメージを中央に置く" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//ズームグリッドを表示" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//グリッドを設定…" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//イメージをトレース…" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//ウィンドウを表示" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//水平分割" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//表示ウィンドウをフォーカス" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//ウィンドウをパンする" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//レイヤウィンドウ" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/イメージ(_I)" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//RGBに変換" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//インデックスに変換…" #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//キャンバスのサイズを拡大縮小…" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//キャンバスのサイズを変更…" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//トリミング" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//垂直に反転" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//水平に反転" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//時計方向に回転" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//反時計方向に回転" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//自由に回転…" #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//歪み…" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//情報…" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//設定…" #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/選択(_S)" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//全選択" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//選択しない (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//投げ縄ツールで選択" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//投げ縄ツールで切取り" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//アウトライン選択" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//選択範囲の塗りつぶし" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//楕円の輪郭" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//楕円の塗りつぶし" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//水平色勾配" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//垂直色勾配" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//アルファチャンネルA、Bを混ぜる" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//アルファチャンネルをマスクに移動" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//色A、Bをマスクする" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//色A、Bをアンマスクする" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//すべての色をマスクする" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//マスクをクリア" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/パレット(_P)" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//ロード…" #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//デフォルトをロード" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//すべてマスク" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//マスクしない" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//AとBを入れ換える" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//色AとBを編集…" #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "//Aをディザ" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//パレット編集…" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//パレットサイズを設定…" #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//複製した色を結合" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//未使用の色を削除" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//量子化の作成…" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//色の並び替え…" #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//パレットシフタ…" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/効果(_C)" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//色の変換…" #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//反転" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//グレースケール" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//グレースケール(ガンマ補正)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//等量変換" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///左側下" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///右側下" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///上右" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///下右" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//縁を検出…" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//ガウスの差異…" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//シャープにする…" #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//マスクをぼかす…" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//ぼかし…" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//ガウスぼかし…" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Kuwahara-Nagaoぼかし…" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//エンボス" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//拡張" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//腐食" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//バクテリア…" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/チャンネル(_N)" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//新規…" #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//削除…" #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//イメージを編集" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//アルファチャンネルを編集" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//選択を編集" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//マスクを編集" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//イメージを隠す" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//アルファチャンネルを無効にする" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//選択を無効にする" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//マスクを無効にする" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//RGBA操作を結合" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//しきい値…" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//アルファチャンネルを結合しない" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//アルファチャンネルをオーバーレイとして表示" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//オーバーレイを設定…" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/レイヤ(_L)" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//新規レイヤ" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//合成イメージを保存…" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//新規レイヤに合成" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//全レイヤを削除" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//アニメを設定…" #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//アニメをプレビュー…" #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//キーフレームを設定…" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//全キーフレームを削除…" #: src/mainwindow.c:4929 msgid "/More..." msgstr "/さらに..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/ヘルプ(_H)" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//文書" #: src/mainwindow.c:4933 msgid "//About" msgstr "//mtPaintについて" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//ショートカットキーコードのやり直し" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "インデックスパレットに変換" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "バクテリア効果" #: src/memory.c:4744 msgid "Rotating" msgstr "回転" #: src/memory.c:5096 msgid "Free Rotation" msgstr "自由回転" #: src/memory.c:5682 msgid "Scaling Image" msgstr "イメージを縮小拡大" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "一意RGBピクセルを計算" #: src/memory.c:6950 msgid "Applying Effect" msgstr "効果を適用" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagaoフィルタ" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "歪み" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "お待ち下さい…" #: src/mygtk.c:189 msgid "STOP" msgstr "停止" #: src/mygtk.c:816 msgid "Browse" msgstr "ブラウズ" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "ガンマ補正" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24ビット RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "グレースケール" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "インデックスパレット" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "クリップボードから" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "スクリーンショットをとる" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "新規イメージ" #: src/otherwindow.c:288 msgid "Width" msgstr "幅" #: src/otherwindow.c:289 msgid "Height" msgstr "高さ" #: src/otherwindow.c:290 msgid "Colours" msgstr "色" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "パターン選択" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "パレットサイズを設定" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "適用" #: src/otherwindow.c:599 msgid "Luminance" msgstr "輝度" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "明るさ" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Aまでの距離" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "A->Bへの投影" #: src/otherwindow.c:602 msgid "Frequency" msgstr "頻度" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "パレット色を並び替え" #: src/otherwindow.c:616 msgid "Start Index" msgstr "インデックスを開始" #: src/otherwindow.c:617 msgid "End Index" msgstr "インデックスを終了" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "逆順" #: src/otherwindow.c:868 msgid "Contrast" msgstr "コントラスト" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "ポスタリゼーション" #: src/otherwindow.c:869 msgid "Gamma" msgstr "ガンマ" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "色の変換" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "詳細表示" #: src/otherwindow.c:927 msgid "Store Values" msgstr "値を格納" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "パレット" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "自動プレビュー" #: src/otherwindow.c:1006 msgid "Reset" msgstr "リセット" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "新しい配位は現在と同じです - する事はありません。" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "OSはこの操作にメモリを割り当てる事ができません。" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "この操作の設定ウィンドウに必要なメモリを割り当てる事ができません。" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "最近隣法" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "双線形/エリアマッピング" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "二本線" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "双三次" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "双三次境界" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "バイキュービック(良)" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "バイキュービック(鮮明)" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "幅 " #: src/otherwindow.c:1168 msgid "Height " msgstr "高さ " #: src/otherwindow.c:1170 msgid "Original " msgstr "元 " #: src/otherwindow.c:1176 msgid "New" msgstr "新規" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "オフセット" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "中央" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "アスペクトレシオを固定" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "クリア" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "タイル" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "ミラー タイル" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "ミラー" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "設定" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "シャープ化イメージの縮小" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "キャンバスの縮小拡大" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "キャンバスのサイズ変更" #: src/otherwindow.c:1963 msgid "From" msgstr "から" #: src/otherwindow.c:1963 msgid "To" msgstr "へ" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "スケール" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "パレット編集" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "オーバーレイの設定" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "色編集" #: src/otherwindow.c:2079 msgid "Limit" msgstr "限界" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "球" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "角度" #: src/otherwindow.c:2080 msgid "Cube" msgstr "立方体" #: src/otherwindow.c:2110 msgid "Range" msgstr "範囲" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "反転" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "色選択モード" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "不透明" #: src/otherwindow.c:2128 msgid "Border" msgstr "縁" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "透過" #: src/otherwindow.c:2129 msgid "Tile " msgstr "タイル" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "スマートグリッド" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "タイルグリッド" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "最小グリッドズーム" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "タイル幅" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "タイル高さ" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "グリッドを設定" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "色空間" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "最大(Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "合計(L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "ユークリッド(L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "差異測定" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "正確な変換" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "現在のパレットを使用" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN 量子化 (遅いが良い画質)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu 量子化 (速い)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "最大最小量子化 (小さなパレットとディザに最適)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "なし" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (速い)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "ディザ(効果)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "拡散(効果)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "色域" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "弱く" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "強く" #: src/otherwindow.c:2385 msgid "Off" msgstr "オフ" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "分離/合計" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "分離/分割" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "長さ/合計" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "長さ/分割" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "量子化の作成" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "インデックスに変換" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "使用するインデックスカラー" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "切り取りパレット" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "ロード量に基づく直径" #: src/otherwindow.c:2442 msgid "Dither" msgstr "ディザ" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "色のにじみを減らす" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "蛇行スキャン" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "エラー伝搬、 %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "選択できるエラー伝達" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "全エラー予測" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "HSVを逆に" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "定数" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "グラデーションを編集" #: src/otherwindow.c:2837 msgid "Points:" msgstr "点:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "逆" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "カスタムを編集" #: src/otherwindow.c:3018 msgid "Linear" msgstr "線形" #: src/otherwindow.c:3018 msgid "Radial" msgstr "放射状" #: src/otherwindow.c:3018 msgid "Square" msgstr "四角" #: src/otherwindow.c:3019 msgid "Angular" msgstr "角度" #: src/otherwindow.c:3019 msgid "Conical" msgstr "円錐" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "水平" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "繰返し" #: src/otherwindow.c:3021 msgid "A to B" msgstr "AをBへ" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "AをBへ(RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "AをBへ(HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "AをBへ(HSVを逆に)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Aだけ" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "カスタム" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "現在を 0 に" #: src/otherwindow.c:3024 msgid "Current only" msgstr "現在だけ" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "グラデーションを設定" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "チャンネル" #: src/otherwindow.c:3047 msgid "Length" msgstr "長さ" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "長さを繰り返す" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "グラデーション形式" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "拡張子形式" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "不透明度をプレビュー" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "離れて" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "水平" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "垂直" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "変更しない" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "イメージをトレース" #: src/otherwindow.c:3323 msgid "Source" msgstr "ソース" #: src/otherwindow.c:3325 msgid "Origin" msgstr "起点" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "相対スケール" #: src/otherwindow.c:3337 msgid "Display" msgstr "表示" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "%s イメージを保存中" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "%s イメージを読み込み中" #: src/png.c:850 msgid "Layer" msgstr "レイヤ" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d フレームのうち %d は %s として保存できませんでした - かわりにPNGで保存しま" "した" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "圧力" #: src/prefs.c:154 msgid "Current Device" msgstr "現在のデバイス" #: src/prefs.c:431 msgid "Default System Language" msgstr "デフォルトシステム言語" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "簡体字中国語" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "中国語(台湾)" #: src/prefs.c:433 msgid "Czech" msgstr "チェコ語" #: src/prefs.c:433 msgid "Dutch" msgstr "オランダ語" #: src/prefs.c:433 msgid "English (UK)" msgstr "英語 (英国)" #: src/prefs.c:433 msgid "French" msgstr "フランス語" #: src/prefs.c:434 msgid "Galician" msgstr "ガリシア語" #: src/prefs.c:434 msgid "German" msgstr "ドイツ語" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "イタリア語" #: src/prefs.c:435 msgid "Japanese" msgstr "日本語" #: src/prefs.c:435 msgid "Polish" msgstr "ポーランド語" #: src/prefs.c:435 msgid "Portuguese" msgstr "ポルトガル語" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "ポルトガル語 (ブラジル)" #: src/prefs.c:436 msgid "Russian" msgstr "ロシア語" #: src/prefs.c:436 msgid "Slovak" msgstr "スロバキア語" #: src/prefs.c:437 msgid "Spanish" msgstr "スペイン語" #: src/prefs.c:437 msgid "Swedish" msgstr "スウェーデン語" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "トルコ語" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X ホットスポット" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y ホットスポット" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "最近使ったファイル" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "プログレスバー サイレンス 制限" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "キャンバス座標" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "カーソル X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "ピクセル [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "座標を選択" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "元に戻す / やり直し" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "フロー" #: src/prefs.c:457 msgid "Preferences" msgstr "設定" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "元に戻すために使用される最大メモリ(MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "元に戻す最高回数" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "共有レイヤ アンドゥ スペース (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "ガンマ補正をデフォルトで使用" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "アルファチェックを最適化" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "表示ウィンドウの透明度を無効にする" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "翻訳された適切な言語を選択して下さい\n" "\n" "設定を有効にするには mtPaint を\n" "リスタートする必要があります" #: src/prefs.c:524 msgid "Language" msgstr "言語" #: src/prefs.c:529 msgid "Interface" msgstr "インターフェース" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "グレースケール背景" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "微調整ピクセルを選択" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "パンする最大ウィンドウサイズ" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "貼り付け時にクリップボードを表示" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "マウスカーソル = ツール" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "終了を確認" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "QキーでmtPaintを終了" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "貼り付けツールを変更" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "ツール設定ダイアログを中央に" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "新しいイメージを100%ズームに設定" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "マウススクロールボタン = ズーム" #: src/prefs.c:559 msgid "Use menu icons" msgstr "メニューアイコンを使う" #: src/prefs.c:564 msgid "Files" msgstr "ファイル" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "16ビットTGAを 5:6:5 BGRとして読み込む" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "TGAを下から上への行順序で書く" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "元に戻せるイメージをロード中" #: src/prefs.c:588 msgid "Paths" msgstr "パス" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "クリップボードファイル" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "クリップボードファイルを選択" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTMLブラウザ" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "ブラウザの選択" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "ハンドブックインデックスの場所" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "ハンドブックインデックスファイルの選択" #: src/prefs.c:605 msgid "Default Palette" msgstr "デフォルトパレット" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "デフォルトパレットを選択" #: src/prefs.c:610 msgid "Default Patterns" msgstr "デフォルトパターン" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "デフォルトパターンファイルを選択" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "ステータスバー" #: src/prefs.c:633 msgid "Tablet" msgstr "タブレット" #: src/prefs.c:637 msgid "Device Settings" msgstr "デバイスの設定" #: src/prefs.c:645 msgid "Configure Device" msgstr "デバイスを設定" #: src/prefs.c:652 msgid "Tool Variable" msgstr "ツール変数" #: src/prefs.c:654 msgid "Factor" msgstr "係数" #: src/prefs.c:680 msgid "Test Area" msgstr "テスト領域" #: src/shifter.c:205 msgid "Frames" msgstr "フレーム" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "パレットシフタ" #: src/shifter.c:279 msgid "Start" msgstr "開始" #: src/shifter.c:281 msgid "Finish" msgstr "完了" #: src/shifter.c:330 msgid "Fix Palette" msgstr "パレットを固定" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "アクション" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "コマンド" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "ファイルアクションを設定" #: src/spawn.c:515 msgid "Execute" msgstr "実行" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "エラー %i が報告されました (%s を実行しようとして)" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "ドキュメントが見つかりません。インターネットからmtPaintハンドブックをダウン" "ロードしてインストールするか、設定ウィンドウで正しいロケーションを設定する必" "要があります。" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "HTMLブラウザを実行中に問題が発生しました。設定ウィンドウでプログラム名を正し" "く設定する必要があります。" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB 立方体" #: src/toolbar.c:234 msgid "By image channel" msgstr "イメージチャンネルによる" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "グラデーション指向" #: src/toolbar.c:236 msgid "Fill settings" msgstr "塗りつぶし設定" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "不透明度モードを重視" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "にじみ設定" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "ブラシ間隔" #: src/toolbar.c:298 msgid "Normal" msgstr "標準" #: src/toolbar.c:299 msgid "Colour" msgstr "色" #: src/toolbar.c:299 msgid "Saturate More" msgstr "もっと染み込ませる" #: src/toolbar.c:300 msgid "Multiply" msgstr "掛け算" #: src/toolbar.c:300 msgid "Divide" msgstr "わり算" #: src/toolbar.c:300 msgid "Screen" msgstr "スクリーン" #: src/toolbar.c:300 msgid "Dodge" msgstr "覆い焼き" #: src/toolbar.c:301 msgid "Burn" msgstr "焼き込み" #: src/toolbar.c:301 msgid "Hard Light" msgstr "強い光" #: src/toolbar.c:301 msgid "Soft Light" msgstr "柔らかな光" #: src/toolbar.c:301 msgid "Difference" msgstr "相違" #: src/toolbar.c:302 msgid "Darken" msgstr "暗く" #: src/toolbar.c:302 msgid "Lighten" msgstr "明るくする" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "粒子抽出" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "粒子結合" #: src/toolbar.c:323 msgid "Blend mode" msgstr "ブレンドモード" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "連続モード" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "不透明度モード" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "色調モード" #: src/toolbar.c:889 msgid "Tint +-" msgstr "色調 +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "ブレンドモード" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "全マスクを無効にする" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "グラデーションモード" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "ツールバーを設定" #: src/toolbar.c:1041 msgid "Cut" msgstr "切り取り" #: src/toolbar.c:1042 msgid "Copy" msgstr "コピー" #: src/toolbar.c:1043 msgid "Paste" msgstr "貼り付け" #: src/toolbar.c:1045 msgid "Undo" msgstr "元に戻す" #: src/toolbar.c:1046 msgid "Redo" msgstr "やり直し" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "ウィンドウをパンする" #: src/toolbar.c:1053 msgid "Paint" msgstr "塗る" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "混ぜる" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "塗りつぶす" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "直線" #: src/toolbar.c:1057 msgid "Smudge" msgstr "にじみ" #: src/toolbar.c:1058 msgid "Clone" msgstr "クローン" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "選択" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "ポリゴン選択" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "グラデーションを置く" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "投げ縄ツール選択" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "楕円アウトライン" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "楕円を塗りつぶし" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "アウトライン選択" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "選択を塗りつぶす" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "選択を垂直に反転" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "選択を水平に反転" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "選択を時計方向に回転" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "選択を反時計方向に回転" #: src/viewer.c:132 msgid "About" msgstr "mtPaintについて" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "ファイル:%s は無効です - パレットは更新されません" #~ msgid "Distance to A+B" #~ msgstr "A+Bまでの距離" #~ msgid "Edit Frames" #~ msgstr "フレームを編集" #~ msgid " C Command Line Window" #~ msgstr " C コマンドラインウィンドウ" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "パレットは結合するに十分な色がありません。" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "減らす同じパレットアイテムが多すぎます。" #~ msgid "/View/Command Line Window" #~ msgstr "/表示(V)/コマンドラインウィンドウ" #~ msgid "Grid colour RGB" #~ msgstr "グリッドカラーRGB" #~ msgid "Zoom" #~ msgstr "ズーム" #~ msgid "%i Files on Command Line" #~ msgstr "コマンドラインの %i ファイル" #~ msgid "" #~ "Dennis Lee - Wrote the two quantizing methods DL1 & 3 - see quantizer.c " #~ "for more information." #~ msgstr "" #~ "Dennis Lee - DL1 と 3 の2つの量子化方法を書きました - 詳細はquantizer.c " #~ "をご覧下さい。" #~ msgid "Magnus Hjorth - Wrote inifile.c/h, from mhWaveEdit 1.3.0." #~ msgstr "Magnus Hjorth - mhWaveEdit 1.3.0 から inifile.c/h を書いた。" #~ msgid "DL1 Quantize (fastest)" #~ msgstr "DL1 量子化(最速)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "DL3 量子化 (とても遅いが高品質)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Wu 量子化 (小さいパレット向きの方法)" #~ msgid "Max-Min Quantize (best with dithering)" #~ msgstr "Max-Min 量子化 (ディザリングに最高)" #~ msgid "Not enough memory to rotate image" #~ msgstr "イメージを回転するにはメモリが足りません" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "クリップボードを回転するにはメモリが足りません" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "ファイルが大きすぎます。これ以下にして下さい<= 幅=%i 高さ=%i:%s" #~ msgid "Could not open %s: %s" #~ msgstr "%s を開けません:%s" #~ msgid "Error closing %s: %s" #~ msgstr "%s を閉じる時にエラーが発生しました:%s" #~ msgid "Could not write to %s: %s" #~ msgstr "%s に書き込めません:%s" #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patterns_user.c は現在のディレクトリに開けません" #~ msgid "Done" #~ msgstr "完了" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patterns_user.c は現在のディレクトリに作成されました" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "現在のイメージは 94x94x3 ではありません。patterns_user.c を作成できません" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "RGBイメージを不可能なXPMファイルに保存しようとしています。PNG拡張子で保存" #~ "して下さい。" #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "RGBイメージを不可能なGIFファイルに保存しようとしています。PNG拡張子で保存" #~ "して下さい。" #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "XBMファイルを2色以上のパレットで保存しようとしています。他のフォーマットに" #~ "するか、パレットを2色に減らして下さい。" #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "インデックスキャンバスを不可能なJPEGファイルで保存しようとしています。PNG" #~ "拡張子で保存して下さい。" #~ msgid "/File/Actions/sep2" #~ msgstr "/ファイル(F)/アクション/sep2" #~ msgid "/Edit/Create Patterns" #~ msgstr "/編集(E)/パターンを作成" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/パレット(P)/量子化の作成 (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/パレット(P)/量子化の作成 (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/パレット(P)/量子化の作成 (Wu)" #~ msgid "/Frames" #~ msgstr "/フレーム" #~ msgid "/File/%i" #~ msgstr "/ファイル(F)/%i" #~ msgid "/File/Actions/%i" #~ msgstr "/ファイル(F)/アクション/%i" #~ msgid "Loading PNG image" #~ msgstr "PNGイメージをロード" #~ msgid "Loading clipboard image" #~ msgstr "クリップボードイメージをロード" #~ msgid "Saving PNG image" #~ msgstr "PNGイメージを保存" #~ msgid "Saving Clipboard image" #~ msgstr "クリップボードイメージを保存" #~ msgid "Saving Layer image" #~ msgstr "レイヤイメージを保存" #~ msgid "Saving Channel image" #~ msgstr "チャンネルイメージを保存" #~ msgid "Loading GIF image" #~ msgstr "GIFイメージをロード" #~ msgid "Saving GIF image" #~ msgstr "GIFイメージを保存" #~ msgid "Loading JPEG image" #~ msgstr "JPEGイメージをロード" #~ msgid "Saving JPEG image" #~ msgstr "JPEGイメージを保存" #~ msgid "Loading TIFF image" #~ msgstr "TIFFイメージをロード" #~ msgid "Saving TIFF image" #~ msgstr "TIFFイメージを保存" #~ msgid "Loading BMP image" #~ msgstr "BMPイメージをロード" #~ msgid "Saving BMP image" #~ msgstr "BMPイメージを保存" #~ msgid "Loading XPM image" #~ msgstr "XPMイメージをロード" #~ msgid "Saving XPM image" #~ msgstr "XPMイメージを保存" #~ msgid "Loading XBM image" #~ msgstr "XBMイメージをロード" #~ msgid "Saving XBM image" #~ msgstr "XBMイメージを保存" #~ msgid "Loading LSS16 image" #~ msgstr "LSS16イメージをロード" #~ msgid "Saving LSS16 image" #~ msgstr "LSS16イメージを保存" #~ msgid "Saving UNDO images" #~ msgstr "アンドゥイメージを保存" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "JPEGの保存品質 (100=高い) " mtpaint-3.40/po/sk.po0000644000175000000620000025171611647046423014051 0ustar muammarstaff# translation of sk.po to Slovak # Slovak translations for mtpaint package. # Copyright (C) 2005 THE mtpaint'S COPYRIGHT HOLDER # This file is distributed under the same license as the mtpaint package. # # Jozef Riha , 2007. msgid "" msgstr "" "Project-Id-Version: sk\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2007-04-03 20:52+0200\n" "Last-Translator: Jozef Riha \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: KBabel 1.11.4\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Náhľad animácie" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Prehrať" #: src/ani.c:695 msgid "Fix" msgstr "Fixovať" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Zavrieť" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Chyba" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Nepodarilo sa vytvoriť výstupný adresár" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Vytváram snímky animácie" #: src/ani.c:857 msgid "Unable to save image" msgstr "Nie je možné uložiť obrázok" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Varovanie" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Skutočne chcete vymazať všetky pozičné a cyklové dáta pre všetky vrstvy?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Nie" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Áno" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Nastaviť kľúčový snímok" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Pre vytvorenie animácie musíte mať aspoň 2 vrstvy" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Pred vytvorením animácie musíte najprv uložiť súbor vrstiev" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Nastaviť animáciu" #: src/ani.c:1064 msgid "Output Files" msgstr "Výstupné súbory" #: src/ani.c:1067 msgid "Start frame" msgstr "Prvý snímok" #: src/ani.c:1068 msgid "End frame" msgstr "Posledný snímok" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Oneskorenie" #: src/ani.c:1071 msgid "Output path" msgstr "Výstupná cesta" #: src/ani.c:1072 msgid "File prefix" msgstr "Predpona súboru" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Vytvoriť snímky GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Pozície" #: src/ani.c:1135 msgid "Cycling" msgstr "Cyklus" #: src/ani.c:1148 msgid "Save" msgstr "Uložiť" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Náhľad" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Vytvoriť snímky" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "Obrázok je pre transformáciu príliš veľký." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Prechod" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Zaostrenie hrán" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Zjemnenie hrán" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Rozdielne X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Gaussove rozmazanie" #: src/canvas.c:523 msgid "Radius" msgstr "Polomer" #: src/canvas.c:524 msgid "Amount" msgstr "Množstvo" #: src/canvas.c:525 msgid "Threshold " msgstr "Prah " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Zaostrovacia maska" #: src/canvas.c:563 msgid "Outer radius" msgstr "" #: src/canvas.c:564 msgid "Inner radius" msgstr "" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizovať" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "Obrázok je príliš veľký pre túto rotáciu." #: src/canvas.c:668 msgid "Smooth" msgstr "Vyhladiť" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Ľubovoľná rotácia" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Nedostatok pamäte pre vytvorenie schránky" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Neplatný súbor kanálov." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Zobraziť animáciu" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Toto je animovaný %s." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Nie je možné načítať súbor" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Knižnica pre import súborov skončila z dôvodu problémov so súborom (možno " "poškodené obrazové dáta alebo skrátený súbor). Podarilo sa načítať nejaké " "dáta, pretože hlavička vyzerá byť v poriadku, ale doporučujem uložiť tento " "obrázok do nového súboru, aby sa situácia neopakovala." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Nie je možné otvoriť súbor" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Nepodporovaný typ súboru" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Súbor: %s už existuje. Chcete ho prepísať?" #: src/canvas.c:1524 msgid "File Found" msgstr "Súbor nájdený" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NIE" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "ÁNO" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Index priehľadnosti" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Kvalita ukladania JPEGu (100=Vysoká)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Aktívny bod na X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Typ súboru" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Oneskorenie animácie" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Nepodarilo sa exportovať obrázky histórie" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Nepodarilo sa exportovať do ASCII súboru" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Nepodarilo sa uložiť súbor: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Načítanie súboru s obrázkom" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Uloženie súboru s obrázkom" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Načítanie súboru s paletou" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Uloženie súboru s paletou" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Export obrázkov histórie" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Export obrázkov hisóorie (reverzne)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Ak chcete exportovať ASCII kresbu, musíte mať maximálne 16 farieb." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportovať ako ASCII kresbu" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Uloženie súboru vrstiev" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Vyberte adresár snímkov" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Aby ste vytvorili animovaný GIF, musíte uložiť aspoň jeden snímok." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exportovať GIF animáciu" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Otvoriť kanálový súbor" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Uložiť kanálový súbor" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Uložiť kompozitný obrázok" #: src/channels.c:236 msgid "Cleared" msgstr "Vynulovaný" #: src/channels.c:237 msgid "Set" msgstr "Nastavený" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Nastavená farba A polomer B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Nastavené miešanie A do B" #: src/channels.c:240 msgid "Image Red" msgstr "Červená obrázku" #: src/channels.c:241 msgid "Image Green" msgstr "Zelená obrázku" #: src/channels.c:242 msgid "Image Blue" msgstr "Modrá obrázku" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Výber" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maska" #: src/channels.c:256 msgid "Create Channel" msgstr "Vytvoriť kanál" #: src/channels.c:262 msgid "Channel Type" msgstr "Typ kanála" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Počiatočný stav kanála" #: src/channels.c:273 msgid "Inverted" msgstr "Invertovaný" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Zrušiť" #: src/channels.c:316 msgid "Delete Channels" msgstr "Vymazať kanály" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Prah kanála" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Červená" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Zelená" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Modrá" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Odtieň" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturácia" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Jas" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Nepriehľadnosť" #: src/font.c:939 msgid "Creating Font Index" msgstr "" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" #: src/font.c:1468 msgid "Font" msgstr "" #: src/font.c:1469 msgid "Style" msgstr "" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Veľkosť" #: src/font.c:1471 msgid "Filename" msgstr "" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Vložiť text" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Sem zadajte text" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Vyhladenie" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invertovať" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Farba pozadia =" #: src/font.c:1805 msgid "Oblique" msgstr "" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Uhol rotácie =" #: src/font.c:1831 msgid "Font Directories" msgstr "" #: src/font.c:1836 msgid "New Directory" msgstr "" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "" #: src/font.c:1848 msgid "Add" msgstr "" #: src/font.c:1852 msgid "Remove" msgstr "" #: src/font.c:1856 msgid "Create Index" msgstr "" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "" #: src/fpick.c:771 msgid "Create Directory" msgstr "" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Vytvoriť" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "" #: src/fpick.c:838 msgid "Unable to delete" msgstr "" #: src/fpick.c:843 msgid "Unable to rename" msgstr "" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "" #: src/fpick.c:939 msgid "Up" msgstr "" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "" #: src/fpick.c:1044 msgid "Name" msgstr "" #: src/fpick.c:1046 msgid "Type" msgstr "" #: src/fpick.c:1047 msgid "Modified" msgstr "" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Všeobecné" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Klávesové skratky" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Skratky myši" #: src/help.c:28 msgid "Credits" msgstr "Poďakovanie" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Autori\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Zoznam autorov nájdete v záložke Poďakovanie.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint je slobodný software; môžete ho šíriť a/alebo modifikovať v súlade s " "GNU General Public Licenciou tak, ako bola publikovaná Free Software " "Foundation: buď verziou 3 alebo (podľa vášho uváženia) akoukoľvek ďalšou " "verziou.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint je distribuovaný v nádeji, že bude používaný, ale BEZ AKEJKOĽVEK " "ZÁRUKY; a taktiež bez samozrejmej záruky PREDAJNOSTI alebo SCHOPNOSTI PLNIŤ " "ŠPECIÁLNE ÚČELY. Pre viac detailov si prečítajte GNU General Public " "Licenciu.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint je jednoduchý GTK+1/2 kresliaci program navrhnutý na vytváranie ikon " "a kresieb tvorených pixelmi. Vie upravovať obrázky s indexovanou alebo 24 " "bitovou RGB paletou a ponúknuť základné kresliace a manipulačné nástroje. Má " "tiež mnoho ďalších mocných nástrojov ako kanály, vrstvy a animácie. Vzhľadom " "ku svojej jednoduchosti a bez závislostí beží dobre na GNU/Linuxe, Windows a " "staršom PC hardware.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Kompletná dokumentácia funkcií mtPaintu je k dispozícii v príručke. Ak ju " "ešte nemáte, môžete si ju stiahnuť z webových stránok mtPaintu.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Ak sa vám mtPaint páči a chcete mať vždy najnovšiu verziu alebo chcete dať " "vedieť svoj názor, môže byť pre vás zaujímava táto mailová konferencia:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Vytvoriť nový obrázok" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Otvoriť obrázok" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Uložiť obrázok" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Ukončiť program\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Vybrať celý obrázok" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Zrušiť výber, vkladanie" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Skopírovať výber do schránky" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Skopírovať výber do schránky a potom vyplniť oblasť " "výberu aktuálnym vzorom" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Vložiť schránku do stredu obrázku" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K Vložiť schránku do miest, odkiaľ bola kopírovaná" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return Potvrdiť vloženie na plátno" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Klávesy šipiek Režim kreslenia - Zmena farby A nebo B" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Klávesy šipiek Režim výberu - Posun oblasti výberu alebo vkladania o " "jeden pixel" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+šípky Posun oblasti výberu, vkladanie o x pixelov - x je definované " "v okne volieb" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" " Ctrl+šípky Presunúť vrstvu alebo zmeniť veľkosť výberového boxu" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ or ] Zmeniť farbu A na ďalšiu alebo predchádzajúcu položku " "palety" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ or ] Zmeniť farbu B na ďalšiu alebo predchádzajúcu položku " "palety\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Orezať obrázok podľa výberu" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Transformovať farby - ako Jas, Kontrast, Saturácia, bity " "na farbu, Gamma" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Previesť do šedej škály" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G Prevést do šedej škály (S Gamma korekciou)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Nakresliť obdĺžnik okolo oblasti výberu aktuálnou výplňou" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Vyplniť oblasť výberu aktuálnou výplňou" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Nakresliť elipsu vnútri oblasti výberu" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L Nakresliť vyplnenú elipsu vnútri oblasti výberu\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Upraviť RGB hodnoty pre farby A a B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Upraviť všetky farby palety\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Voľby" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Informácie\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Vrátiť poslednú akciu" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Znovu uskutočniť vrátenú akciu\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Okno zobrazenia" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Okno vrstiev\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Hlavné editačné okno - Priblížiť" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Hlavné editačné okno - Oddialiť" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Okno zobrazenia - Priblížiť" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Okno zobrazenía - Oddialiť\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Upraviť kanál obrázku" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Upraviť alfa kanál" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Upraviť kanál výberu" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Upraviť kanál masky\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Pomoc" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Vybrať vzor" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Vybrať štetec" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Nástroj maľovania" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Hlavná lišta" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Nástrojová lišta" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Lišta nastavení" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Paleta" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Nástroj výberu" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Uloží aktuálnu schránku do súboru 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Načíta súbor 1-12 do schránky\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Nastaví nepriesvitnosť na 10%, 20%, ... , 100% " "(hlavná i numerická klávesnica)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Zvýší nepriesvitnosť o 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Zníži nepriesvitnosť o 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Zobrazí alebo skryje hlavnú ponuku, panely, nástroje a " "paletu" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up Zmena meradla plátna" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down Zmena veľkosti plátna" #: src/help.c:128 msgid " End Pan Window" msgstr " End Prehľadové okno" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Ľavé tlačidlo Maľuje na plátno pomocou vybraného nástroja" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Stredné tlačidlo Nastaví bod, ktorý bude stredom obrázku pri ďalšej " "zmene zoomu" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Pravé tlačidlo Potvrdí vloženie na plátno / Preruší kreslenie " "čiary / Zruší výber oblasti\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Koliečko myši V GTK+2 môže užívateľ použiť koliečko na zmenu " "priblíženia nastavením v okne volieb\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+Ľavé tlačidlo Výber barvy A z pod kurzora myši" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Pravé tlačidlo Výber barvy B z pod kurzora myši" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+koliečko Posúva hlavné editačné okno doľava alebo doprava\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Pravé tlačidlo Nastaví bod, ktorý bude stredom obrázku pri ďalšej " "zmene zoomu\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "Pri posúvaní myši môžete zablokovať osi X/Y takto:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift Obmedzí posuny myší na vertikálnu os" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl Obmedzí posuny myší na horizontálnu os" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint aktuálne spravuje Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Nasledujúci ľudia (v abecednom poradí) sa priamo podieľajú na projekte a " "preto im patrí veľká vďaka za ich veľkorysosť a ťažkú prácu:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Autori\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - Prispievajúci vývojár pre verziu 2.30. Vedúci vývojár a " "správca od verze 3.00 do dneška." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Pôvodný autor a správca do verzie 3.00 a od tej doby občasný " "prispievateľ." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Napísal Wu quantovaciu metódu - viac informácií v súbore wu.c\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Základní prispievatelia (Spätná väzba a nápady na vylepšenie, ak nie je " "uvedené inak)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Redesign stránok - apríl 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Vytvoril Gifsicle, který je potreba pro vytvorení a " "prohlížení animovaných GIFů http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - manuálová stránka, Launchpad/ Rosetta " "registrace" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "Preklady\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brazílska Portugalčina - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Čeština - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Francúzština - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Nemčina - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Poľština - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugalčina - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Španielčina - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwanská Čínština - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turečtina - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Informácie" #: src/info.c:290 msgid "Memory" msgstr "Pamäť" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Celková pamäť pre hlavné obrázky a históriu" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Späť / Vpred / Max počet úrovní" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Schránka" #: src/info.c:311 msgid "Unused" msgstr "Nepoužité" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Schránka = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Schránka = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Unikátnych RGB pixelov" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Vrstvy" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Spotreba pamäte všetkých vrstiev" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histogram farieb" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Farebný index celkom - použité %i z %i" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "Pixelov na plátne" #: src/info.c:407 msgid "Orphans" msgstr "Sirôt" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Nepodarilo sa nájsť domovský adresár. Použijem aktuálny adresár ako domovský." #: src/layer.c:70 msgid "Background" msgstr "Pozadie" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Zmenené)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Bez názvu" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Skutočne chcete vymazať vrstvu %i (%s)?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Jedna alebo viacero vrstiev obsahuje zmeny, ktoré neboli uložené. Skutočne " "ich chcete stratiť?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Zrušiť akciu" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Stratiť zmeny" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d vrstiev sa nepodarilo načítať" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Jedna alebo viacero vrstiev nebylo uložených. Musíte uložiť každý obrázok " "samostatne predtým, než uložíte textový súbor s vrstvami, aby ste mohli v " "budúcnosti otvoriť tento kompozitný obrázok." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Skutočne chcete vymazať všetky vrstvy?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Nemôžete už pridať žiadne ďalšie vrstvy." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nová vrstva" #: src/layer.c:1160 msgid "Raise" msgstr "Nahor" #: src/layer.c:1161 msgid "Lower" msgstr "Dole" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplikovať vrstvu" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Vycentrovať vrstvu" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Vymazať vrstvu" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Zavrieť okno vrstiev" #: src/layer.c:1268 msgid "Layer Name" msgstr "Názov vrstvy" #: src/layer.c:1269 msgid "Position" msgstr "Pozícia" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Priehľadná farba" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Zobraziť všetky vrstvy v hlavnom okne" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Nie sú žiadne nepoužité farby na odstránenie!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Paleta neobsahuje žiadne farby s identickými RGB hodnotami" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "Paleta obsahuje %i farieb s rovnakými RGB hodnotami. Skutočne ich chcete " "zlúčiť do jednej a upraviť plátno?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Nie je možné načítať schránku" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Nie je možné uložiť schránku" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "Plátno / paleta obsahuje neuložené zmeny. Skutočne ich chcete stratiť?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Obrázok" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Skutočne chcete skončiť?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Súbor" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nový" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Otvoriť ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Uložiť" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Uložiť ako ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Export obrázkov histórie ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Export obrázkov histórie (reverzne) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportovať ako ASCII kresbu ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportovať ako animovaný GIF ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Konec" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Upraviť" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Späť" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Vpred" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Vystrihnúť" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopírovať" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Vložiť do stredu" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Vložiť do novej vrstvy" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Vložiť" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Vložiť text" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Načítať schránku" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Uložiť schránku" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Vybrať vzor ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Vybrať štetec ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Zobraziť" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Hlavná lišta" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Nástrojová lišta" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Lišta nastavení" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Paleta" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Stavová lišta" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Prepnúť zobrazenie" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Vycentrovať obrázok" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Raster pri zväčšení" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Okno zobrazenia" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Horizontálne delenie" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Okno priblíženia" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Prehľadové okno" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Okno vrstiev" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Obrázok" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Previesť na RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Previesť na indexovaný ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Zmeniť meradlo plátna ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Zmeniť veľkosť plátna ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Orezať" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Otočiť vertikálne" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Otočiť horizontálne" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Otočiť v smere ručičiek" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Otočiť proti smeru ručičiek" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Otočiť ľubovoľne ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Informácie ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Voľby ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Výber" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Vybrať všetko" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Zrušiť výber (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Výber lasom" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Vystrihnúť lasom" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Orámovať výber" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Vyplniť výber" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Orámovať elipsu" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Vyplniť elipsu" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Alfa prechod medzi A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Presun Alfa do masky" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Maskovať farby A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Odmaskovať farby A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Maskovať všetky farby" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Zrušiť masku" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Paleta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Otvoriť ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Načítať východziu" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Maskovať všetky farby" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Nemaskovať žiadnu farbu" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Prehodiť A a B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Upraviť farby A a B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Editor farieb ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Nastaviť počet farieb ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Zlúčiť duplicitné farby" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Odstrániť nepoužité farby" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Vytvoriť kvantované ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Usporiadať farby ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Posunovač palety ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/_Efekty" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformovať farby ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invertovať" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Šedá škála" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Šedá škála (s Gamma korekciou)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Izometrická transformácia" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Ľavá strana dole" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Pravá strana dole" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Vrchná strana vpravo" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Spodná strana vpravo" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Detekcia hrán ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Zaostriť ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Zaostrovacia maska ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Zjemniť ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Gaussove rozmazanie ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Reliéfy" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Baktérie ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Kanály" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nový ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Vymazať ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Upraviť obrázok" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Upraviť alfakanál" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Upraviť výber" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Upraviť masku" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Skryť obrázok" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Vypnúť alfakanál" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Vypnúť výber" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Vypnúť masku" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Párovať RGBA operácie" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Prah ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Zobraziť alfakanál ako overlay" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Konfigurovať overlaye ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/Vrstvy" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Uložiť kompozitný obrázok ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Odstrániť všetky vrstvy" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Nastaviť animáciu ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Náhľad animácie ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Nastaviť kľúčový snímok ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Odstrániť všetky kľúčové snímky ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/Po_moc" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Dokumentácia" #: src/mainwindow.c:4933 msgid "//About" msgstr "//O aplikácii" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Previazať klávesové skratky" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Prevádzam na indexovanú paletu" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Efekt baktérie" #: src/memory.c:4744 msgid "Rotating" msgstr "Otáčam" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Voľné otáčanie" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Mením meradlo obrázku" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Počítam počet unikátnych RGB pixelov" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Aplikujem efekt" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Prosím čakajte ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Listovať" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "S Gamma korekciou" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Šedá škála" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Indexovaná paleta" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Urobiť snímok obrazovky" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nový obrázok" #: src/otherwindow.c:288 msgid "Width" msgstr "Šírka" #: src/otherwindow.c:289 msgid "Height" msgstr "Výška" #: src/otherwindow.c:290 msgid "Colours" msgstr "Farieb" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Výber vzoru" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Nastaviť počet farieb" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Použiť" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Jas" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Jas" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Vzdialenosť k A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Projekcia do A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frekvencia" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Zoradiť farby v palete" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Od indexu" #: src/otherwindow.c:617 msgid "End Index" msgstr "Do indexu" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Opačné radenie" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Kontrast" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterizovať" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Transformovať farby" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Zobraziť detaily" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paleta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Automatický náhľad" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Reset" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Nové rozmery sú rovnaké ako pôvodné - nič sa neudeje." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "Operačný systém nemôže alokovať pamäť pre túto operáciu." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "Pre túto operáciu ste nealokovali dostatok pamäte v okne Voľby." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Najbližší sused" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineárne / mapovanie oblasti" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineárny" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bikubické" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bikubické s hranami" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Lepšie bikubické" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bikubické ostrejšie" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Šírka " #: src/otherwindow.c:1168 msgid "Height " msgstr "Výška " #: src/otherwindow.c:1170 msgid "Original " msgstr "Originál " #: src/otherwindow.c:1176 msgid "New" msgstr "Nový" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Posun" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Vycentrovať" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Dodržať pomer strán" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Vyčistiť" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Dlaždice" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Zrkadlové dlaždice" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Zrkadlovo" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Nastavenia" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Zmena meradla plátna" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Zmena veľkosti plátna" #: src/otherwindow.c:1963 msgid "From" msgstr "Od" #: src/otherwindow.c:1963 msgid "To" msgstr "Do" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Meradlo" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Editor farieb" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Konfigurovať overlaye" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Editor farieb" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Limit" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Guľa" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Uhol" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Kocka" #: src/otherwindow.c:2110 msgid "Range" msgstr "Rozsah" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Inverzia" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Režim výberu farby" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Raster pri zoomu aspoň" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Farebný priestor" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Najväčší (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Suma (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclidean (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Rozdiel merania" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Presná konverzia" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Použiť aktuálnu paletu" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Žiadny" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (rýchly)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Rozmazaný (efekt)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Rozptýlený (efekt)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamut" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Slabo" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Silno" #: src/otherwindow.c:2385 msgid "Off" msgstr "Vypnuté" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Separovať/Sčítať" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Separovať/Rozdeliť" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Dĺžka/Sčítať" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Dĺžka/Rozdeliť" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Vytvoriť kvantované" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Prevod na indexovaný" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Počet indexovaných farieb" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Rozmazať" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Redukovať plytvanie farbami" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Serpentínový scan" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Chyba propagácie, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Selektívna chyba propagácie" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "Spätný HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Konštantný" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Upraviť prechod" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Bodov:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Obrátene" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Upraviť Vlastný" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineárny" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radiálny" #: src/otherwindow.c:3018 msgid "Square" msgstr "Štvorcový" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Úroveň" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Opakovať" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A do B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A do B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A do B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A do B (spätne HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Iba A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Vlastný" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Aktuálny do 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Iba aktuálny" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Nastavenie prechodu" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Kanál" #: src/otherwindow.c:3047 msgid "Length" msgstr "Dĺžka" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Dĺžka opakovania" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Typ prechodu" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Typ rozšírenia" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Nepriehľadnosť náhľadu" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "" #: src/otherwindow.c:3325 msgid "Origin" msgstr "" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d z %d snímkov nemohli byť uložené ako %s - miesto toho ukladám ako PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Tlak" #: src/prefs.c:154 msgid "Current Device" msgstr "Aktuálne zariadenie" #: src/prefs.c:431 msgid "Default System Language" msgstr "Východzí jazyk systému" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Čínsky (Taiwansky)" #: src/prefs.c:433 msgid "Czech" msgstr "Česky" #: src/prefs.c:433 msgid "Dutch" msgstr "" #: src/prefs.c:433 msgid "English (UK)" msgstr "Anglicky (UK)" #: src/prefs.c:433 msgid "French" msgstr "Francúzsky" #: src/prefs.c:434 msgid "Galician" msgstr "" #: src/prefs.c:434 msgid "German" msgstr "Nemecky" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "" #: src/prefs.c:435 msgid "Polish" msgstr "Poľsky" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugalsky" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugalsky (Brazília)" #: src/prefs.c:436 msgid "Russian" msgstr "" #: src/prefs.c:436 msgid "Slovak" msgstr "Slovensky" #: src/prefs.c:437 msgid "Spanish" msgstr "Španielsky" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turecky" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X aktívny bod" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y aktívny bod" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Naposledy použité súbory" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Tichý limit ukazateľa priebehu" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometria plátna" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Kurzor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Geometria Výberu" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Späť / Vpred" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Tok" #: src/prefs.c:457 msgid "Preferences" msgstr "Voľby" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Max pamäť použitá pre históriu (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Použiť gamma korekciu ako východziu" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Optimalizovať šachovnicu alfa kanálu" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Vypnúť priehľadnosť v okne zobrazenia" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Vyberte váš obľúbený jazyk\n" "\n" "Aby se prejavili všetky zmeny,\n" "je treba mtPaint reštartovať." #: src/prefs.c:524 msgid "Language" msgstr "Jazyk" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Odtieň šedého pozadia" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Posun pixelov výberu" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Veľkosť prehľadového okna" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Zobrazovať schránku pri vkladaní" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Kurzor myši = Nástroj" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Potvrdiť koniec" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Kláves Q ukončí mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Zmena nástroja potvrdí vloženie" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Centrovať dialógy nastavenia nástrojov" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Nový obrázok nastaví zoom na 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Koliečko myši = Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Súbory" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Súbory schránky" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Výber súboru schránky" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML Prehliadač" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Vyberte webový prehliadač" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Umiestnenie indexu príručky" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Vyberte index súboru príručky" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Stavová lišta" #: src/prefs.c:633 msgid "Tablet" msgstr "Tablet" #: src/prefs.c:637 msgid "Device Settings" msgstr "Nastavenia zariadenia" #: src/prefs.c:645 msgid "Configure Device" msgstr "Konfigurácia zariadenia" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Variabilita nástroja" #: src/prefs.c:654 msgid "Factor" msgstr "Faktor" #: src/prefs.c:680 msgid "Test Area" msgstr "Testovacia plocha" #: src/shifter.c:205 msgid "Frames" msgstr "Snímkov" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Posunovač palety" #: src/shifter.c:279 msgid "Start" msgstr "Štart" #: src/shifter.c:281 msgid "Finish" msgstr "Koniec" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Upraviť paletu" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Nastala chyba %i pri pokusu o spustenie %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Nie je možné nájsť dokumentáciu. Buď potrebujete stiahnuť príručku mtPaintu " "z webu a nainštalovať ju alebo musíte nastaviť správnu cestu v okne volieb." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Objavil sa problém so spustením HTML prehliadača. Musíte nastaviť správny " "názov programu v okne volieb." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB kocka" #: src/toolbar.c:234 msgid "By image channel" msgstr "Kanálom obrázku" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Prechodom" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Nastavenie výplne" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Rešpektovať režim nepriehľadnosti" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Nastavenie rozmazania" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Normálne" #: src/toolbar.c:299 msgid "Colour" msgstr "Farba" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Násobenie" #: src/toolbar.c:300 msgid "Divide" msgstr "Delenie" #: src/toolbar.c:300 msgid "Screen" msgstr "Obraz" #: src/toolbar.c:300 msgid "Dodge" msgstr "Zosvetliť" #: src/toolbar.c:301 msgid "Burn" msgstr "Stmaviť" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Ostré svetlo" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Mierne svetlo" #: src/toolbar.c:301 msgid "Difference" msgstr "Rozdiely" #: src/toolbar.c:302 msgid "Darken" msgstr "Len stmavenie" #: src/toolbar.c:302 msgid "Lighten" msgstr "Len zosvetlenie" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extrakcia zrnitosti" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Zlúčenie zrnitosti" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Spojitý režim" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Režim nepriesvitnosti" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Režim kolorovania" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Kolorovanie +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Vypnúť všetky masky" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Režim Prechodu" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Lišta nastavení" #: src/toolbar.c:1041 msgid "Cut" msgstr "Vystrihnúť" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopírovať" #: src/toolbar.c:1043 msgid "Paste" msgstr "Vložiť" #: src/toolbar.c:1045 msgid "Undo" msgstr "Späť" #: src/toolbar.c:1046 msgid "Redo" msgstr "Vpred" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Prehľadové okno" #: src/toolbar.c:1053 msgid "Paint" msgstr "Maľovanie" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Poprehadzovanie" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Vyplnenie" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Rovná čiara" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Rozmazať" #: src/toolbar.c:1058 msgid "Clone" msgstr "Klonovať" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Označiť výber" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Výber polygónom" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Vložiť Prechod" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Výber lasom" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Prázdna elipsa" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Vyplnená elipsa" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Orámovať výber" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Vyplniť výber" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Otočiť výber vertikálne" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Otočiť výber horizontálne" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Otočiť výber v smere ručičiek" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Otočiť výber proti smeru ručičiek" #: src/viewer.c:132 msgid "About" msgstr "O aplikácii" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Súbor: %s je neplatný - paleta nebola aktualizovaná" #~ msgid "Distance to A+B" #~ msgstr "Vzdialenosť k A+B" #~ msgid "Edit Frames" #~ msgstr "Upraviť snímky" #~ msgid " C Command Line Window" #~ msgstr " C Okno príkazového riadka" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "Paleta neobsahuje dostatok farieb pre uskutočnenie zlúčenia" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Príliš mnoho identických položiek palety k redukcii." #~ msgid "/View/Command Line Window" #~ msgstr "/Zobraziť/Okno príkazového riadku" #~ msgid "Grid colour RGB" #~ msgstr "RGB farba rastra" #~ msgid "Zoom" #~ msgstr "Zoom" #~ msgid "%i Files on Command Line" #~ msgstr "%i súborov na príkazovom riadku" #~ msgid "Not enough memory to rotate image" #~ msgstr "Nedostatok pamäte pre rotáciu obrázku" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "Nedostatok pamäte pre rotáciu schránky" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "Súbor je príliš veľký, musí byť <= šírka=%i výška=%i : %s" #~ msgid "" #~ "Dennis Lee - Wrote the two quantizing methods DL1 & 3 - see quantizer.c " #~ "for more information." #~ msgstr "" #~ "Dennis Lee - napísal dve kvantovacie metódy DL1 & 3 - Pre viac informácii " #~ "sa pozrite do quantizer.c" #~ msgid "Magnus Hjorth - Wrote inifile.c/h, from mhWaveEdit 1.3.0." #~ msgstr "Magnus Hjorth - Napísal inifile.c/h, v programe mhWaveEdit 1.3.0." #~ msgid "Could not open %s: %s" #~ msgstr "Nepodarilo sa otvoriť %s: %s" #~ msgid "Error closing %s: %s" #~ msgstr "Chyba pri zatváraní %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Nepodarilo sa zapísať do %s: %s" #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patterns_user.c sa nepodarilo otvoriť v aktuálnom adresári" #~ msgid "Done" #~ msgstr "Hotovo" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patterns_user.c vytvorené v aktuálnom adresári" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "Aktuálny obrázok nie je 94x94x3, takže nie je možné vytvoriť " #~ "patterns_user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Pokúšate sa uložiť RGB obrázok do XPM súboru, čo nie je možné. " #~ "Doporučujem uložiť s príponou PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Pokúšate sa uložiť RGB obrázok do GIF souboru, čo nie je možné. " #~ "Doporučujem uložiť s príponou PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Pokúšate sa uložiť XBM súbor s paletou s viac než 2 farbami. Použite iný " #~ "formát alebo znížte počet farieb v palete na 2." #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Pokúšate sa uložiť indexované plátno do JPEG súboru, čo nie je možné. " #~ "Doporučujem uložiť s príponou PNG." #~ msgid "" #~ "You are trying to save an LSS16 file with a palette of more than 16 " #~ "colours. Either use another format or reduce the palette to 16 colours." #~ msgstr "" #~ "Pokúšate sa uložiť LSS16 súbor s paletou s viac než 16 farbami. Použite " #~ "iný formát alebo znížte počet farieb v palete na 16." #~ msgid "/Edit/Create Patterns" #~ msgstr "/Upraviť/Vytvoriť vzory" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Paleta/Vytvoriť kvantované (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Paleta/Vytvoriť kvantované (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Paleta/Vytvoriť kvantované (Wu)" #~ msgid "/File/%i" #~ msgstr "/Súbor/%i" #~ msgid "Lanczos3" #~ msgstr "Lanczos3" #~ msgid "DL1 Quantize (fastest)" #~ msgstr "DL1 Kvantovanie (najrýchlejšie)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "DL3 Kvantovanie (veľmi pomalé, lepšia kvalita)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Wu Kvantovanie (najlepšia metóda pre malé palety)" #~ msgid "Loading PNG image" #~ msgstr "Načítam PNG obrázok" #~ msgid "Loading clipboard image" #~ msgstr "Načítam obrázok zo schránky" #~ msgid "Saving PNG image" #~ msgstr "Ukladám PNG obrázok" #~ msgid "Saving Clipboard image" #~ msgstr "Ukladám obrázok zo schránky" #~ msgid "Saving Layer image" #~ msgstr "Uloženie obrázku vrstvy" #~ msgid "Saving Channel image" #~ msgstr "Ukladám kanálový obrázok" #~ msgid "Loading GIF image" #~ msgstr "Načítam GIF obrázok" #~ msgid "Saving GIF image" #~ msgstr "Ukladám GIF obrázok" #~ msgid "Loading JPEG image" #~ msgstr "Načítam JPEG obrázok" #~ msgid "Saving JPEG image" #~ msgstr "Ukladám JPEG obrázok" #~ msgid "Loading TIFF image" #~ msgstr "Načítam TIFF obrázok" #~ msgid "Saving TIFF image" #~ msgstr "Ukladám TIFF obrázok" #~ msgid "Loading BMP image" #~ msgstr "Načítam BMP obrázok" #~ msgid "Saving BMP image" #~ msgstr "Ukladám BMP obrázok" #~ msgid "Loading XPM image" #~ msgstr "Načítam XPM obrázok" #~ msgid "Saving XPM image" #~ msgstr "Ukladám XPM obrázok" #~ msgid "Loading XBM image" #~ msgstr "Načítam XBM obrázok" #~ msgid "Saving XBM image" #~ msgstr "Ukladám XBM obrázok" #~ msgid "Loading LSS16 image" #~ msgstr "Načítam LSS16 obrázok" #~ msgid "Saving LSS16 image" #~ msgstr "Ukladám LSS16 obrázok" #~ msgid "Saving UNDO images" #~ msgstr "Ukladám obrázky histórie" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "JPEG Kvalita ukladania (100=Najlepšia) " mtpaint-3.40/po/hu.po0000644000175000000620000023317111647046422014042 0ustar muammarstaff# Hungarian translation for mtpaint # This file is distributed under the same license as the mtpaint package. # Balázs Úr , 2011. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-09-26 16:34+0000\n" "Last-Translator: Balázs Úr \n" "Language-Team: Hungarian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-12-04 18:32+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Animáció előnézet" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Lejátszás" #: src/ani.c:695 msgid "Fix" msgstr "" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Bezárás" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Hiba" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Nem sikerült a kimeneti mappa létrehozása" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "" #: src/ani.c:857 msgid "Unable to save image" msgstr "Nem sikerült a kép mentése" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Figyelem" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Nem" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Igen" #: src/ani.c:993 msgid "Set Key Frame" msgstr "" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Legalább 2 réteg szükséges az animáció létrehozásához" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "A rétegeket el kell menteni az animáció létrehozása előtt" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Animáció beállítása" #: src/ani.c:1064 msgid "Output Files" msgstr "Kimeneti fájlok" #: src/ani.c:1067 msgid "Start frame" msgstr "" #: src/ani.c:1068 msgid "End frame" msgstr "" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Késleltetés" #: src/ani.c:1071 msgid "Output path" msgstr "Kimeneti elérési út" #: src/ani.c:1072 msgid "File prefix" msgstr "Fájl előtag" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "" #: src/ani.c:1098 msgid "Positions" msgstr "" #: src/ani.c:1135 msgid "Cycling" msgstr "" #: src/ani.c:1148 msgid "Save" msgstr "Mentés" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Előnézet" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "A kép túl nagy a transzformációhoz." #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Kontúrélesítés" #: src/canvas.c:429 msgid "Edge Soften" msgstr "" #: src/canvas.c:481 msgid "Different X/Y" msgstr "" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Gauss-elmosás" #: src/canvas.c:523 msgid "Radius" msgstr "Sugár" #: src/canvas.c:524 msgid "Amount" msgstr "Mennyiség" #: src/canvas.c:525 msgid "Threshold " msgstr "Küszöb" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "" #: src/canvas.c:563 msgid "Outer radius" msgstr "Külső sugár" #: src/canvas.c:564 msgid "Inner radius" msgstr "Belső sugár" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizálás" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Kuwahara-Nagao elmosás" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "A kép túl nagy ehhez a forgatáshoz." #: src/canvas.c:668 msgid "Smooth" msgstr "Simítás" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Szabad forgatás" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Nincs elég memória a vágólap létrehozásához" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Érvénytelen csatornafájl." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Animáció megtekintése" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Ez egy animált %s fájl." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "A fájl túl nagy, legyen <= szélesség=%i magasság=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Nem tölthető be a fájl" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Nem lehet megnyitni a fájlt" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Nem támogatott fájlformátum" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Fájl: %s már létezik. Szeretné felülírni?" #: src/canvas.c:1524 msgid "File Found" msgstr "" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NEM" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "IGEN" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Átlátszóság index" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG mentés minőség (100 = magas)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG tömörítés (0 = nincs)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE tömörítés" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000 tömörítés (0 = veszteségmentes)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Hotspot X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Fájlformátum" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Animáció késleltetés" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Nem lehet exportálni az ASCII fájlt" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Nem menthető a fájl: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Képfájl betöltése" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Képfájl mentése" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Palettafájl betöltése" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Palettafájl mentése" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "16 vagy kevesebb palettaszín szükséges az ASCII Art exporthoz." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "ASCII Art exportálása" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Rétegfájlok mentése" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Legalább egy keretet el kell mentenie az animált GIF létrehozásához." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "GIF animáció exportálása" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Csatorna betöltése" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Csatorna mentése" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "KOmpozitkép mentése" #: src/channels.c:236 msgid "Cleared" msgstr "" #: src/channels.c:237 msgid "Set" msgstr "" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "" #: src/channels.c:239 msgid "Set blend A to B" msgstr "" #: src/channels.c:240 msgid "Image Red" msgstr "Kép vörös" #: src/channels.c:241 msgid "Image Green" msgstr "Kép zöld" #: src/channels.c:242 msgid "Image Blue" msgstr "Kép kék" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Kijelölés" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maszk" #: src/channels.c:256 msgid "Create Channel" msgstr "Csatorna létrehozása" #: src/channels.c:262 msgid "Channel Type" msgstr "Csatornatípus" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Kezdeti csatornaállapot" #: src/channels.c:273 msgid "Inverted" msgstr "Invertált" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Mégse" #: src/channels.c:316 msgid "Delete Channels" msgstr "Csatornák törlése" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Küszöb csatorna" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Vörös" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Zöld" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Kék" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Árnyalat" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Telítettség" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Érték" #: src/cpick.c:902 msgid "Hex" msgstr "Hex" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Átlátszatlanság" #: src/font.c:939 msgid "Creating Font Index" msgstr "Betűindex létrehozása" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Legalább egy mappát ki kell választani a betűkereséshez." #: src/font.c:1468 msgid "Font" msgstr "Betűkészlet" #: src/font.c:1469 msgid "Style" msgstr "Stílus" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Méret" #: src/font.c:1471 msgid "Filename" msgstr "Fájlnév" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Mappa" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Szöveg beillesztése" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Szöveg" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Ide írja a szöveget" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Élsimítás" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Háttérszín =" #: src/font.c:1805 msgid "Oblique" msgstr "Kurzív" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Forgatás szöge =" #: src/font.c:1831 msgid "Font Directories" msgstr "Betűkészlet mappa" #: src/font.c:1836 msgid "New Directory" msgstr "Új mappa" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Válasszon mappát" #: src/font.c:1848 msgid "Add" msgstr "Hozzáadás" #: src/font.c:1852 msgid "Remove" msgstr "Eltávolítás" #: src/font.c:1856 msgid "Create Index" msgstr "Index létrehozása" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Nem lehet hozzáférni ehhez a mappához: %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Törlés" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Átnevezés" #: src/fpick.c:771 msgid "Create Directory" msgstr "Mappa létrehozása" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Adja meg az új fájlnevet" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Adja meg az új mappa nevét" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Létrehozás" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Biztosan törölni szeretné ezt: \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Nem lehet törölni" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Nem lehet átnevezni" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Nem lehet mappát létrehozni" #: src/fpick.c:939 msgid "Up" msgstr "Fel" #: src/fpick.c:940 msgid "Home" msgstr "Saját mappa" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Új mappa létrehozása" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Rejtett fájlok megjelenítése" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Kis- és nagybetű érzéketlen rendezés" #: src/fpick.c:1044 msgid "Name" msgstr "Név" #: src/fpick.c:1046 msgid "Type" msgstr "Típus" #: src/fpick.c:1047 msgid "Modified" msgstr "Módosítva" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Általános" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Gyorsbillentyűk" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Egér gyorsbillentyűk" #: src/help.c:28 msgid "Credits" msgstr "Köszönet" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 A szerzők\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Tekintse meg a 'Köszönet' részt a szerzők listájához.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "Az mtPaint szabad szoftver; terjeszthető illetve módosítható a Free Software " "Foundation által kiadott GNU General Public License dokumentumban leírtak, " "akár a licenc 3-as, akár (tetszőleges) későbbi változata szerint.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "Az mtPaint abban a reményben kerül közreadásra, hogy hasznos lesz, de minden " "egyéb GARANCIA NÉLKÜL, az ELADHATÓSÁGRA vagy VALAMELY CÉLRA VALÓ " "ALKALMAZHATÓSÁGRA való származtatott garanciát is beleértve. További " "részleteket a GNU Public License tartalmaz.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "A kézikönyvben az mtPaint minden funkciójáról teljes dokumentációt talál. " "Ha ez még nincs meg önnek, letöltheti azt az mtPaint weboldaláról.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Új kép létrehozása" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Kép megnyitása" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Kép mentése" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Kilépés a programból\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Az egész kép kijelölése" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Kijelölés megszüntetése, beillesztésdobox bezárása" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Kijelölés másolása a vágólapra" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V Beilleszti a vágólapot az aktuális nézet közepére" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr "" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Nyílbillentyűk Rajz mód - Mozgatja az egérmutatót" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Nyilak Réteg mozgatása vagy kijelölődoboz átméretezése" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ vagy ] Szín A megváltoztatása a következő vagy előző " "palettaelemre" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ vagy ] Szín B megváltoztatása a következő vagy előző " "palettaelemre\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Kép vágása a kijelölésre" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Színtranszformációk - azaz fényerő, kontraszt, " "telítettség, poszterizálás, gamma" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Szürkeárnyalatossá teszi a képet" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" " Shift-Ctrl-G Szürkeárnyalatossá teszi a képet (Gamma korrigáltan)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Téglalapot rajzol a kijelölt terület köré az aktuális " "kitöltőszínnel" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" " Ctrl-Shift-T Kitölti a kijelölt területet az aktuális kitöltőszínnel" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Ellipszist rajzol a kijelölt trületre" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L Kitöltött ellipszist rajzol a kijelölt trületre\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Szín A & B RGB értékeit szerkeszti" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Minden palettaszín szerkesztése\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Beállítások" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Információ\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Visszavonja a legutóbbi műveletet" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Ismétli a visszavont műveletet\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Nézet ablak" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Rétegek ablak\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Fő szerkesztőablak - Nagyítás" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Fő szerkesztőablak - Kicsinyítés" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Nézet ablak - Nagyítás" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Nézet ablak - Kicsinyítés\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% nagyítás" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% nagyítás" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% nagyítás" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% nagyítás" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% nagyítás" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% nagyítás" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% nagyítás" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% nagyítás" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% nagyítás\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Kép csatorna szerkesztése" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Alfa csatorna szerkesztésa" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Kijelölés csatorna szerkesztése" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Maszk csatorna szerkesztése\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Súgó" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Minta választása" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Ecset választása" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Festő eszköz" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Fő eszköztár ki/be kapcsolása" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Eszközök eszköztár ki/be kapcsolása" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Beállítások eszköztár ki/be kapcsolása" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Paletta ki/be kapcsolása" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Kijelölő eszköz" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Dokk terület ki/be kapcsolása\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Az aktuális vágólap mentése az 1-12 fájlba" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Vágólap betöltése az 1-12 fájlból\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Átlátszatlanság beállítása 10%, 20%, ... , 100% " "értékre (felső, vagy numerikus rész számai)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Átlátszatlanság növelése 1-gyel" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Átlátszatlanság csökkentése 1-gyel\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Főablak menü/eszköztár/állapotsor/paletta megjelenítése " "vagy elrejtése" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up Kép nyújtása" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down Képvászon átméretezése" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Bal egérgomb Rajzolás a vászora az aktuális eszközzel" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Középső egérgomb Annak a pontnak a kiválasztása, amelyik a " "következő nagyításkor a kép közepe legyen" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "Az mtPaint karbantartója Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "A következő személyek (ábécé sorrendben) járultak hozzá a projekthez " "közvetlenül, és ezért méltó köszönet jár a nagylelkűségükért és a kemény " "munkájukért:\n" #: src/help.c:150 msgid "Authors\n" msgstr "Szerzők\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - A 2.30 verzió közreműködő fejlesztője. Vezető fejlesztő és " "karbantartó a 3.00 verziótól egészen máig." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Eredeti szerző és karbantartó a 3.00 verzióig, ezt követően " "alkalmi közreműködő." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - A Wu kvantálás eljárás írója - tekintse meg a wu.c fájlt " "további információért.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Általános hozzájárulás (visszajelzések és ötletek a javításokhoz, hacsak " "másképp nem jelzik)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Website új dizájn 2005 április" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - A Gifsicle alkotója, amely szükséges az animált GIF fájlok " "létrehozásához és megtekintéséhez http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Csapat (Junta de Andalucia) - man page, Launchpad/Rosetta " "regisztráció" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Fordítások\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brazíliai portugál - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Cseh - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Holland - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Francia - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galíciai - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Német - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Olasz - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Japán - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Lengyel - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugál - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Orosz - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Egyszerűsített kínai - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Szlovák - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Spanyol - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Svéd - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwani kínai - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Török - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Információ" #: src/info.c:290 msgid "Memory" msgstr "Memória" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Teljes memória a fő + visszavont képekhez" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Visszavont / Ismételt / Max szint használat" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Vágólap" #: src/info.c:311 msgid "Unused" msgstr "Nem használt" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Vágólap = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Vágólap = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Egyedi RGB pixelek" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Rétegek" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Teljes réteg memória használat" #: src/info.c:350 msgid "Colour Histogram" msgstr "Színhisztogram" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "Vászon pixelek" #: src/info.c:407 msgid "Orphans" msgstr "Árvák" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "A saját mappa nem található. Az aktuális mappa lesz saját mappaként " "használva." #: src/layer.c:70 msgid "Background" msgstr "Háttér" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Módosítva)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Névtelen" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Egy vagy több réteg olyan módosításokat tartalmaz, amelyek még nincsenek " "elmentve. Biztosan elveti ezeket a módosításokat?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Művelet megszakítása" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Változások elvetése" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d réteg betöltése meghiúsult" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Biztosan törölni szeretné az összes réteget?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Nem adhat hozzá több réteget." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Új réteg" #: src/layer.c:1160 msgid "Raise" msgstr "Növel" #: src/layer.c:1161 msgid "Lower" msgstr "Csökkent" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Réteg kettőzése" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Réteg középre helyezése" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Réteg törlése" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Rétegek ablak bezárása" #: src/layer.c:1268 msgid "Layer Name" msgstr "Réteg neve" #: src/layer.c:1269 msgid "Position" msgstr "Pozíció" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Átlátszó szín" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Minden réteg mejelenítése a fő ablakban" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Nincsen eltávolítható használaton kívüli szín!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "" "A paletta nem tartalmaz 2 olyan színt, amelyeknek azonosak az RGB értékeik" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "A paletta %i olyan színt tartalmaz, amelyeknek azonosak az RGB értékeik. " "Biztosan egyesíteni szeretné őket egy indexbe és újraigazítani a vásznat?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "indexelt" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "A vególap nem tölthető be." #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "A vágólap nem menthető el." #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Ez a vászon/paletta el nem mentett módosításokat tartalmaz. Biztos benne, " "hogy elveti ezeket a módosításokat?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Kép" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Biztosan ki szeretne lépni?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Fájl" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Új" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Megnyitás ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Mentés" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Mentés másként ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportálás ASCII Art formátumba ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportálás animált GIF formátumba ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Műveletek" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Beállítás" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Kilépés" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/S_zerkesztés" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Visszavonás" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Újra" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Kivágás" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Másolás" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Másolás a palettára" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Beillesztés középre" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Beillesztés új rétegként" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Beillesztés" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Szöveg beillesztése" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Szöveg beillesztése (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Paletta beillesztésa" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Vágólap betöltése" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Vágólap mentése" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Vágólap importálása a rendszerből" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Vágólap exportálása a rendszerbe" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Minta kiválasztása ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Ecset kiválasztása ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Nézet" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Fő eszköztár megjelenítése" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Eszközök eszköztár megjelenítése" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Beállítások eszköztár megjelenítése" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Dokk megjelenítése" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Paletta megjelenítése" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Állapotsor megjelenítése" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Kép nézetre váltás" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Kép központosítása" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Nagyításrács megjelenítése" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Rács beállítása ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Nézet ablak" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Vízszintes felosztás" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Rétegek ablak" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Kép" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Konvertálás RGB-be" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Konvertálás indexeltbe ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Vászon nyújtása ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Vászon átméretezése ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Levágás" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Függőleges tökrözés" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Vízszintes tükrözés" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Forgatás jobbra" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Forgatás balra" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Forgatás szabadon ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Döntés ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Információ ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Beállítások ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/Ki_jelölés" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Mindent kijelöl" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Kijelölés megszüntetése (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Lasszókijelölés" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Maszk törlése" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Paletta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Betöltés ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Alapértelmezett betöltése" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Nincs maszkolás" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//A és B felcserélése" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Szín A & B szerkesztése" #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Palettaszerkesztő ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Palettaméret megadása ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Duplikált színek egyesítése" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Nem használt színek eltávolítása" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Színek rendezése ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Palettaváltó" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/_Hatások" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Színtranszformáció ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Negatív" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Szürkeárnyalatos" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Szürkeárnyalatos (Gamma korrigált)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Izometrikus transformáció" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Bal oldal lefelé" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Jobb oldal lefelé" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Felső rész jobbra" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Alsó rész jobbra" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Szélek keresése ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Élesítés ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Gauss-elmosás ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Kuwahara-Nagao elmosás ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Domborítás" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Erodál" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Baktérium ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/_Csatornák" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Új ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Törlés ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Kép szerkesztése" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Alfa szerkesztése" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Kijelölés szerkesztése" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Maszk szerkesztése" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Kép elrejtése" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Alfa tiltása" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Kijelölés tiltása" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Maszk tiltása" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Küszöb ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Rétegek" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Új réteg" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Kompozitkép mentése ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Kompozitot új réteggé" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Minden réteg eltávolítása" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Animáció beállítása ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Animáció előnézete ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Kulcskocka megadása ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Minden kulcskocka eltávolítása ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Továbbiak..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Súgó" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Dokumentáció" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Névjegy" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Gyorsbillentyűk újrakötése" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Konvertálás indexelt palettára" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Baktérium hatás" #: src/memory.c:4744 msgid "Rotating" msgstr "Forgatás" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Szabad forgatás" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Kép nyújtása" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Egyedi RGB képpontok megszámolása" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Hatás alkalmazása" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagao szűrő" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Döntés" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Kérem várjon ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Tallózás" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gamma korrigált" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bites RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Szürkeárnyalatos" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Indexelt paletta" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Vágólapról" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Képernyőkép rögzítése" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Új kép" #: src/otherwindow.c:288 msgid "Width" msgstr "Szélesség" #: src/otherwindow.c:289 msgid "Height" msgstr "Magasság" #: src/otherwindow.c:290 msgid "Colours" msgstr "Színek" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Mintaválasztó" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Palettaméret megadása" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Alkalmaz" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminancia" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Fényerő" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frekvencia" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Palettaszínek rendezése" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Kezdő index" #: src/otherwindow.c:617 msgid "End Index" msgstr "Vég index" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Fordított sorrend" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Kontraszt" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Poszterizálás" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Színtraszformáció" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Részletek megjelenítése" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paletta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Automatikus előnézet" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Visszaállítás" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Az új geometria megegyzik a mostanival - nincs mit tenni." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "" "Az operációs rendszer nem tudott memóriát lefoglalni ehhez a művelethez." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Nem foglalt le elég memóriát ehhez a művelethez a Beállítások ablakban." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Legközelebbi szomszéd" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineáris / Area Mapping" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineáris" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Szélesség " #: src/otherwindow.c:1168 msgid "Height " msgstr "Magasság " #: src/otherwindow.c:1170 msgid "Original " msgstr "Eredeti " #: src/otherwindow.c:1176 msgid "New" msgstr "Új" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Eltolás" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Közép" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Méretarány megtartása" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Csempe" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Tükrözés" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Beállítások" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Vászon nyújtása" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Vászon átméretezése" #: src/otherwindow.c:1963 msgid "From" msgstr "" #: src/otherwindow.c:1963 msgid "To" msgstr "" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Nyújtás" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Paletta szerkesztő" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Színszerkesztő" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Határ" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Gömb" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Fok" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Kocka" #: src/otherwindow.c:2110 msgid "Range" msgstr "" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Átlátszatlan" #: src/otherwindow.c:2128 msgid "Border" msgstr "Szegély" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Átlátszó" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Csempe " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Inteligens rács" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Csempe rács" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Minimális rács nagyítás" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Csempeszélesség" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Csempemagasság" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Rács beállítása" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Aktuális paletta használata" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN kvantálás (lassú, de jobb minőség)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu kvantálás (gyors)" # fuzzy #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Max-Min kvantálás (best for small palettes and dithering)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Nincs" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (gyors)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "" #: src/otherwindow.c:2385 msgid "Off" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Konstans" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Színátmenet szerkesztése" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Pont:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Fordított" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineáris" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Sugaras" #: src/otherwindow.c:3018 msgid "Square" msgstr "Négyzetes" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Szögletes" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Kúpos" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Szint" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Ismétlés" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A-ból B-be" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A-ból B-be (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A-ból B-be (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A-ból B-be (fordított HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Csak A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Egyéni" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Csak a jelenlegi" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Színátmenet beállítása" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Csatorna" #: src/otherwindow.c:3047 msgid "Length" msgstr "Hossz" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Átmenet típus" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Kiterjesztés típus" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Vízszintesi" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Függőleges" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "Forrás" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Kezdet" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "%s kép mentése" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "%s kép betöltése" #: src/png.c:850 msgid "Layer" msgstr "Réteg" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Nyomás" #: src/prefs.c:154 msgid "Current Device" msgstr "Aktuális eszköz" #: src/prefs.c:431 msgid "Default System Language" msgstr "Alapértelmezett rendszer nyelv" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Kínai (egyszerűsített)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Kínai (Taiwan)" #: src/prefs.c:433 msgid "Czech" msgstr "Cseh" #: src/prefs.c:433 msgid "Dutch" msgstr "Holland" #: src/prefs.c:433 msgid "English (UK)" msgstr "Angol (UK)" #: src/prefs.c:433 msgid "French" msgstr "Francia" #: src/prefs.c:434 msgid "Galician" msgstr "Galíciai" #: src/prefs.c:434 msgid "German" msgstr "Német" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Olasz" #: src/prefs.c:435 msgid "Japanese" msgstr "Japán" #: src/prefs.c:435 msgid "Polish" msgstr "Lengyel" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugál" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugál (Brazil)" #: src/prefs.c:436 msgid "Russian" msgstr "Orosz" #: src/prefs.c:436 msgid "Slovak" msgstr "Szlovák" #: src/prefs.c:437 msgid "Spanish" msgstr "Spanyol" #: src/prefs.c:437 msgid "Swedish" msgstr "Svéd" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Török" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X hotspot" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y hotspot" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Legutóbb használt fájlok" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Vászon geometria" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Kurzor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Kijelölés geometria" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Visszavonás / Újra" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "" #: src/prefs.c:457 msgid "Preferences" msgstr "Beállítások" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Max memóriahasználat visszavonáshoz (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Max visszavonás szint" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Gammakorrekció használat alapértelmezetten" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Válassza ki a kívánt nyelvi fordítást\n" "\n" "Az mtPaint újraindítása szükséges\n" "a teljes hatás elérése érdekében." #: src/prefs.c:524 msgid "Language" msgstr "Nyelv" #: src/prefs.c:529 msgid "Interface" msgstr "Felület" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Szürkeárnyalatos háttér" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Egérkurzor = Eszköz" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q billentyűvel kilép az mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Egérgörgő = Nagyítás" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Fájlok" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "16-bites TGA-k beolvasása 5:6:5 BGR-ként" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "TGA-k írása lentről-fel sorrendben" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "Utak" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Vágólap fájlok" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Vágólapfájl kiválasztása" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML böngésző program" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Böngésző program kiválasztása" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Kézikönyv index helye" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Kézikönyv index fájl kiválasztása" #: src/prefs.c:605 msgid "Default Palette" msgstr "Alapértelmezett paletta" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Alapértelmezett paletta kiválasztása" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Alapértelmezett minták" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Alapértelmezett mintafájlok kiválasztása" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Állapotsor" #: src/prefs.c:633 msgid "Tablet" msgstr "Tábla" #: src/prefs.c:637 msgid "Device Settings" msgstr "Eszközbeállítások" #: src/prefs.c:645 msgid "Configure Device" msgstr "Eszköz beállítása" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Eszközváltozó" #: src/prefs.c:654 msgid "Factor" msgstr "Faktor" #: src/prefs.c:680 msgid "Test Area" msgstr "Teszt terület" #: src/shifter.c:205 msgid "Frames" msgstr "Keretek" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Palettaváltó" #: src/shifter.c:279 msgid "Start" msgstr "Start" #: src/shifter.c:281 msgid "Finish" msgstr "Kész" #: src/shifter.c:330 msgid "Fix Palette" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Művelet" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Parancs" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "Végrehajtás" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Probléma történt a HTML böngésző futtatásakor. Állítsa be a megfelelő " "program nevét a Beállítások ablakban." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB kocka" #: src/toolbar.c:234 msgid "By image channel" msgstr "" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "" #: src/toolbar.c:236 msgid "Fill settings" msgstr "" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Normál" #: src/toolbar.c:299 msgid "Colour" msgstr "Szín" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "" #: src/toolbar.c:300 msgid "Divide" msgstr "" #: src/toolbar.c:300 msgid "Screen" msgstr "" #: src/toolbar.c:300 msgid "Dodge" msgstr "" #: src/toolbar.c:301 msgid "Burn" msgstr "" #: src/toolbar.c:301 msgid "Hard Light" msgstr "" #: src/toolbar.c:301 msgid "Soft Light" msgstr "" #: src/toolbar.c:301 msgid "Difference" msgstr "" #: src/toolbar.c:302 msgid "Darken" msgstr "" #: src/toolbar.c:302 msgid "Lighten" msgstr "" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "" #: src/toolbar.c:889 msgid "Tint +-" msgstr "" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Minden maszk tiltása" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "" #: src/toolbar.c:1041 msgid "Cut" msgstr "Kivágás" #: src/toolbar.c:1042 msgid "Copy" msgstr "Másolás" #: src/toolbar.c:1043 msgid "Paste" msgstr "Beillesztés" #: src/toolbar.c:1045 msgid "Undo" msgstr "Visszavonás" #: src/toolbar.c:1046 msgid "Redo" msgstr "Újra" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "" #: src/toolbar.c:1053 msgid "Paint" msgstr "Festés" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Keverés" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Kitöltés" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Egyenes vonal" #: src/toolbar.c:1057 msgid "Smudge" msgstr "" #: src/toolbar.c:1058 msgid "Clone" msgstr "Klón" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Kijelölés készítése" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Poligonkijelölés" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Színátmenet elhelyezése" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Lassszókijelölés" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Ellipszis körvonal" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Ellipszis kitöltés" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Kijelölés körberajzolása" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Kijelölés kitöltése" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Kijelölés tükrözése függőlegesen" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Kijelölés tükrözése vízszintesen" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Kijelölés forgatása jobbra" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Kijelőlés forgatása balra" #: src/viewer.c:132 msgid "About" msgstr "Névjegy" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Fájl: %s érvénytelen - a paletta nem lett frissítve" mtpaint-3.40/po/pt_BR.po0000644000175000000620000022745311647046423014443 0ustar muammarstaff# Portuguese (Brazil) translation for mtpaint # Copyright (c) (c) 2005 Canonical Ltd, and Rosetta Contributors 2005 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2005. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2011-09-09 18:26+0000\n" "Last-Translator: Valter Nazianzeno \n" "Language-Team: Portuguese (Brazil) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2011-09-22 21:02+0000\n" "X-Generator: Launchpad (build 13996)\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Pré-visualização da animação" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Reproduzir" #: src/ani.c:695 msgid "Fix" msgstr "" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Fechar" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Erro" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Não foi possível criar o diretório de saída" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Criando Quadros de Animação" #: src/ani.c:857 msgid "Unable to save image" msgstr "Não foi possível salvar a imagem" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Aviso" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Você quer mesmo limpar todos os dados das posições e de ciclo de todas as " "camadas?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Não" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Sim" #: src/ani.c:993 msgid "Set Key Frame" msgstr "" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Você deve ter pelo menos duas camadas para criar uma animação" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Você deve salvar as camadas antes de criar uma animação" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Configurar Animação" #: src/ani.c:1064 msgid "Output Files" msgstr "Arquivos de Saída" #: src/ani.c:1067 msgid "Start frame" msgstr "Quadro inicial" #: src/ani.c:1068 msgid "End frame" msgstr "Quadro final" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Atraso" #: src/ani.c:1071 msgid "Output path" msgstr "Diretório de saída" #: src/ani.c:1072 msgid "File prefix" msgstr "Prefixo do arquivo" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Criar Quadros do GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Posições" #: src/ani.c:1135 msgid "Cycling" msgstr "Circulação" #: src/ani.c:1148 msgid "Save" msgstr "Salvar" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Pré-visualizar" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Criar quadros" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "A imagem é muito grande para ser transformada." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Gradiente" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfológico" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Detecção de borda" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Aguçar Borda" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Suavizar Borda" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Diferentes X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Desfocagem gaussiana" #: src/canvas.c:523 msgid "Radius" msgstr "Raio" #: src/canvas.c:524 msgid "Amount" msgstr "Quantidade " #: src/canvas.c:525 msgid "Threshold " msgstr "Limite" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Máscara de desaguçar" #: src/canvas.c:563 msgid "Outer radius" msgstr "Raio externo" #: src/canvas.c:564 msgid "Inner radius" msgstr "Raio interno" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizar" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Diferença de Gaussianas" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Desfocagem Kuwahara-Nagao" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "A imagem é muito grande para essa rotação." #: src/canvas.c:668 msgid "Smooth" msgstr "Suavizar" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Rotação Livre" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Memória insuficiente para criar a área de transferência" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Arquivo de Canal Inválido" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "O arquivo é muito grande, deve ser <= a largura=%i altura=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Não é possivel carregar o arquivo" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Não foi possível abrir o arquivo" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Formato do arquivo não suportado" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Arquivo: %s já existe. Deseja sobrescrever o arquivo?" #: src/canvas.c:1524 msgid "File Found" msgstr "Arquivo encontrado" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "Não" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "Sim" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Índice de Transparência" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Qualidade JPEG (100=Alta)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "Compressão PNG (0=Nada)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "Compressão TGA RLE" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "Compressão JPEG2000 (0=Sem Perdas)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Ponto em X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Formato do Arquivo" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Reversível" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Intervalo de animação" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Impossível de exportar imagems desfeitas" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Não é possível exportar o arquivo ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Não é possível salvar o arquivo: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Abrir Arquivo de Imagem" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Salvar Arquivo de Imagem" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Carregar Paleta" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Salvar Paleta" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Exportar Imagem Desfeitas" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Exportar Imagens de Desfazer (invertidas)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "Você precisa ter 16 ou menos cores na paleta para exportar uma arte ASCII." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportar Arte ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Salvar Arquivos de Camada" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Você deve ter ao menos um quadro para criar um GIF animado." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exportar animação GIF" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Carregar Canal" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Salvar Canal" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Salvar imagem composta" #: src/channels.c:236 msgid "Cleared" msgstr "" #: src/channels.c:237 msgid "Set" msgstr "" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Mesclar A em B" #: src/channels.c:240 msgid "Image Red" msgstr "Imagem Vermelha" #: src/channels.c:241 msgid "Image Green" msgstr "Imagem Verde" #: src/channels.c:242 msgid "Image Blue" msgstr "Imagem Azul" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Seleção" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Máscara" #: src/channels.c:256 msgid "Create Channel" msgstr "Criar Canal" #: src/channels.c:262 msgid "Channel Type" msgstr "Tipo de Canal" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Estado inicial de canal" #: src/channels.c:273 msgid "Inverted" msgstr "Invertido" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Cancelar" #: src/channels.c:316 msgid "Delete Channels" msgstr "Excluir Canais" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Limite do Canal" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Vermelho" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Verde" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Azul" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Matiz" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturação" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Valor" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacidade" #: src/font.c:939 msgid "Creating Font Index" msgstr "Criando Índice de Fontes" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Você deve selecionar ao menos um diretório para procurar fontes." #: src/font.c:1468 msgid "Font" msgstr "Fonte" #: src/font.c:1469 msgid "Style" msgstr "Estilo" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Tamanho" #: src/font.c:1471 msgid "Filename" msgstr "Nome do arquivo" #: src/font.c:1471 msgid "Face" msgstr "Cara" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Diretório" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Colar Texto" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Texto" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Escreva Seu Texto Aqui" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Inverter" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Cor do Segundo Plano =" #: src/font.c:1805 msgid "Oblique" msgstr "Oblíquo" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Angulo de Rotação =" #: src/font.c:1831 msgid "Font Directories" msgstr "Diretório de Fontes" #: src/font.c:1836 msgid "New Directory" msgstr "Novo Diretório" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Selecionar Diretório" #: src/font.c:1848 msgid "Add" msgstr "Adicionar" #: src/font.c:1852 msgid "Remove" msgstr "Remover" #: src/font.c:1856 msgid "Create Index" msgstr "Criar índice" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Deletar" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Renomear" #: src/fpick.c:771 msgid "Create Directory" msgstr "Criar Diretório" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Digite o novo nome do arquivo" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Digite o nome do novo diretório" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Criar" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Você tem certeza que deseja apagar \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Não foi possível excluir" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Não foi possível renomear" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Não foi possível criar o diretório" #: src/fpick.c:939 msgid "Up" msgstr "Subir" #: src/fpick.c:940 msgid "Home" msgstr "Inicio" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Criar Diretório Novo" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Mostrar Arquivos Ocultos" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Ordenar por nome (ignorar min/maiúsculas)" #: src/fpick.c:1044 msgid "Name" msgstr "Nome" #: src/fpick.c:1046 msgid "Type" msgstr "Tipo" #: src/fpick.c:1047 msgid "Modified" msgstr "Modificado" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Geral" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Atalhos do teclado" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Atalhos do mouse" #: src/help.c:28 msgid "Credits" msgstr "Créditos" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Os Autores\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Para ver a lista de autores veja a sessão de \"Créditos\".\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint é um software livre: você pode redistribuí-lo e/ou modificá-lo sob " "os termos da Licença Pública Geral GNU conforme publicada pela Free Software " "Foundation, tanto a versão 3 da Licença, ou (na sua opção) qualquer versão " "posterior.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint é distribuído na esperança que será útil, mas SEM QUALQUER GARANTIA, " "sem mesmo a garantia implícita de COMERCIABILIDADE ou ADEQUAÇÃO A UM " "DETERMINADO PROPÓSITO. Veja a Licença Pública Geral GNU para mais detalhes.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint é um simples programa de pintura em GTK+1/2 projetado para a criação " "ícones e pixel art. Ele pode editar paletas indexadas ou imagem RGB de 24 " "bit ele também oferece ferramentas básicas de manipulação e pintura. Ele " "também tem várias outras caracteristicas poderosas como Canais, Camadas e " "Animação. Devido a sua simplicidade e sua falta de dependências ele funciona " "bem no GNU/Linux, Windows e em PCs com hardware antigo.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Existe a documentação completa dos recursos do mtPaint contida em um manual. " "Se você não tiver ele, você pode baixá-lo no site do mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Se você gosta do mtPaint e deseja manter-se atualizado sobre novas versões, " "ou se quiser dar algum feedback, então a lista de discussão pode ser de seu " "interesse:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Criar nova imagem" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Abrir Imagem" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Salvar Imagem" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Sair do programa\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Selecionar toda imagem" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr "" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Copiar área selecionada" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr "" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr "" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr "" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr "" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr "" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr "" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr "" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr "" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr "" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr "" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr "" #: src/help.c:85 msgid " L Layers Window\n" msgstr "" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr "" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr "" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr "" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr "" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr "" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr "" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr "" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr "" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Ajuda" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr "" #: src/help.c:112 msgid " F3 Choose Brush" msgstr "" #: src/help.c:113 msgid " F4 Paint Tool" msgstr "" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr "" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr "" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr "" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr "" #: src/help.c:118 msgid " F9 Selection Tool" msgstr "" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr "" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr "" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr "" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" #: src/help.c:126 msgid " Page Up Scale Image" msgstr "" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr "" #: src/help.c:128 msgid " End Pan Window" msgstr "" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr "" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint é mantido por Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" #: src/help.c:150 msgid "Authors\n" msgstr "" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "" #: src/info.c:281 msgid "Information" msgstr "Informação" #: src/info.c:290 msgid "Memory" msgstr "Memória" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Memória total para imagem principal e desfazer" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Desfazer / Refazer / Nível máximo usado" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Área de Transferência" #: src/info.c:311 msgid "Unused" msgstr "Não Usado" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Área de Transferência = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Área de Transferência = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Pixels RGB Únicos" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Camadas" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Total de memória usada pelas camadas" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histograma de Cores" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Índice de Cores - i% de %i usados" #: src/info.c:391 msgid "Index" msgstr "Índice" #: src/info.c:392 msgid "Canvas pixels" msgstr "" #: src/info.c:407 msgid "Orphans" msgstr "Órfãos" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Não foi possível achar o diretório principal. Usando o diretório atual como " "diretório principal." #: src/layer.c:70 msgid "Background" msgstr "Plano de fundo" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Modificado)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Sem Título" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Você realmente deseja deletar a camada %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Uma ou mais camadas contem mudanças que não foram salvas. Você realmente " "quer perder essas mudanças?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Cancelar Operação" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Perder Mudanças" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Você realmente deseja deletar todas as camadas?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Você não pode adicionar mais camadas." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nova Camada" #: src/layer.c:1160 msgid "Raise" msgstr "Aumentar" #: src/layer.c:1161 msgid "Lower" msgstr "Diminuir" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplicar Camada" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centralizar Camada" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Deletar Camada" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Fechar Janela de Camadas" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nome da Camada" #: src/layer.c:1269 msgid "Position" msgstr "Posição" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Cor Transparente" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Mostrar todas as camadas na janela principal" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Existe coress não usadas para remover!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "A paleta não contém 2 cores com valores RGB identicos" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Não é possível carregar a área de tranferência" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Não é possível salvar a área de transferência" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Essa tela/paleta contém mudanças que não foram salvas. Você realmente deseja " "perder essas mudanças?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Imagem" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Você realmente quer sair?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Arquivo" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Novo" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Abrir ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Salvar" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Salvar Como ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Exportar Imagem Desfeitas ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Exportar Imagem Desfeitas (reverter) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportar Arte ASCII ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportar GIF Animado ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Ações" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Configurar" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Sair" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Editar" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Desfazer" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Refazer" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Cortar" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Copiar" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Copiar Para o Centro" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Colar Como Nova Camada" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Colar" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Colar Texto" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Colar Texto (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Colar Paleta" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Carregar Área de Transferência" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Salvar Área de Transferência" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importar Área de Transferência do Sistema" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Exportar Área de Transferência para o Sistema" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Escolher Modelo ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Escolher Pincel ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Ver" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Mostrar Barra Principal" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Mostrar Barra de Ferramentas" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Mostrar Barra de Preferências" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Mostrar Paleta" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Mostrar Barra de Status" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Visualizar Imagem em Tela Cheia" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Centralizar Imagem" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Configurar Grade ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//Imagem de Rastreamento ..." #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Ver Janela" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Dividir na Horizontal" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Ver Janela em Foco" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Visão Reduzida" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Janela de Camadas" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Imagem" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Converter para RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Converter para Indexada ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Redimensionar Imagem ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Aparar" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Girar Verticalmente" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Girar Horizontalmente" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Rotacionar Sentido Horário" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Rotacionar Sentido Anti-Horário" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Rotação Livre ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Inclinar ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Informação ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Preferências ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Seleção" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Selecionar Todos" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Cancelar Seleção (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Seleção de Laço" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Seleção de Contorno" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Preencher Seleção" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Preencher Elipse" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Mascarar Cores A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Desmascarar Cores A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Mascarar Todas as Cores" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Limpar Máscara" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Paleta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Carregar ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Carregar Padrão" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Mascarar Todos" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Mascarar None" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Trocar A & B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Editar Cor A & B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Setar Tamaho da Paleta ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Unir Cores Duplicadas" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Remover Cores Não Usadas" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Ordenar Cores ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Efei_tos" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformar Cor ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Inverter" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Escala de Cinza" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Transformação Isométrica" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Detectar Margem ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//Diferença de Gaussianas ..." #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Aguçar ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Máscara de desaguçar ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Suavizar ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Desfocagem gaussiana ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Desfocagem Kuwahara-Nagao ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Salientar" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Bactéria ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Can_ais" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Novo ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Deletar ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Editar Imagem" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Editar Alpha" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Editar Seleção" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Editar Máscara" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Esconder Imagem" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Desabilitar Alpha" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Desabilitar Seleção" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Desabilitar Máscara" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Camadas" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nova Camada" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Remover Todas as Camadas" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Configurar Animação ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Pré-visualizar Animação ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "" #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Mais..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Ajuda" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Documentação" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Sobre" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Converter para Paleta Indexada" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Efeito Bactéria" #: src/memory.c:4744 msgid "Rotating" msgstr "Rotacionando" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Rotação Livre" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Escalonando Imagem" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Contar Pixels RGB Únicos" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Aplicando Efeito" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Por Favor Aguarde ..." #: src/mygtk.c:189 msgid "STOP" msgstr "PARE" #: src/mygtk.c:816 msgid "Browse" msgstr "Navegar" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Escala de Cinza" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Paleta Indexada" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Capturar Imagem" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nova Imagem" #: src/otherwindow.c:288 msgid "Width" msgstr "Largura" #: src/otherwindow.c:289 msgid "Height" msgstr "Altura" #: src/otherwindow.c:290 msgid "Colours" msgstr "Cores" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Escolher Textura" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Definir Tamanho da Paleta" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Aplicar" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminância" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Brilho" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frequência" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Ordenar Cores da Paleta" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Iniciar Índice" #: src/otherwindow.c:617 msgid "End Index" msgstr "Concluir Índice" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Ordem Reversa" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contraste" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterizar" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gama" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Transformar Cor" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paleta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto-Visualização" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Resetar" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "Nova geometria é a mesma que a atual - nada há fazer." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "O sistema operacional não pode alocar a memória para essa aplicação." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Você não alocou memória suficiente na janela de Preferências para essa " "operação." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "" #: src/otherwindow.c:1167 msgid "Width " msgstr "Largura " #: src/otherwindow.c:1168 msgid "Height " msgstr "Altura " #: src/otherwindow.c:1170 msgid "Original " msgstr "Original " #: src/otherwindow.c:1176 msgid "New" msgstr "Novo" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Deslocamento" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centro" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "" #: src/otherwindow.c:1963 msgid "From" msgstr "" #: src/otherwindow.c:1963 msgid "To" msgstr "" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Editor de Cores" #: src/otherwindow.c:2079 msgid "Limit" msgstr "" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "" #: src/otherwindow.c:2080 msgid "Cube" msgstr "" #: src/otherwindow.c:2110 msgid "Range" msgstr "" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Conversão Exata" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Usar Paleta Atual" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "" #: src/otherwindow.c:2385 msgid "Off" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Converter Para Indexado" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Cores Indexadas Para Usar" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "" #: src/otherwindow.c:2837 msgid "Points:" msgstr "" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "" #: src/otherwindow.c:3018 msgid "Linear" msgstr "" #: src/otherwindow.c:3018 msgid "Radial" msgstr "" #: src/otherwindow.c:3018 msgid "Square" msgstr "" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "" #: src/otherwindow.c:3021 msgid "A to B" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "" #: src/otherwindow.c:3022 msgid "A only" msgstr "" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "" #: src/otherwindow.c:3024 msgid "Current only" msgstr "" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "" #: src/otherwindow.c:3047 msgid "Length" msgstr "" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "" #: src/otherwindow.c:3325 msgid "Origin" msgstr "" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "Camada" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Pressionar" #: src/prefs.c:154 msgid "Current Device" msgstr "Ferramenta Atual" #: src/prefs.c:431 msgid "Default System Language" msgstr "Linguagem Padrão" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "" #: src/prefs.c:433 msgid "Czech" msgstr "Tcheco" #: src/prefs.c:433 msgid "Dutch" msgstr "" #: src/prefs.c:433 msgid "English (UK)" msgstr "Inglês (GB)" #: src/prefs.c:433 msgid "French" msgstr "Francês" #: src/prefs.c:434 msgid "Galician" msgstr "" #: src/prefs.c:434 msgid "German" msgstr "" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "" #: src/prefs.c:435 msgid "Polish" msgstr "" #: src/prefs.c:435 msgid "Portuguese" msgstr "Português" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Português (Brasileiro)" #: src/prefs.c:436 msgid "Russian" msgstr "" #: src/prefs.c:436 msgid "Slovak" msgstr "" #: src/prefs.c:437 msgid "Spanish" msgstr "Espanhol" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Arquivos Recentes" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometria da Tela" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Cursor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Geometria da Seleção" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Desfazer / Refazer" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "" #: src/prefs.c:457 msgid "Preferences" msgstr "Preferências" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Memória máxima usada para desfazer (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Selecione seu idioma preferido\n" "\n" "Você precisa reiniciar o mtPaint\n" "para ter efeito" #: src/prefs.c:524 msgid "Language" msgstr "Linguagem" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Fundo em Escala de Cinza" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Tamanho Máximo da Miniatura" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Mostrar área de tranferência enquanto copiar" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Cursor do Mouse = Ferramenta" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Confirmar Saída" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Tecla Q sai do mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Nova imagem seta o zoom para 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Mouse Scroll = Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "Arquivos" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Arquivos da Área de Transferência" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Selecionar Área de Transferência" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Barra de Status" #: src/prefs.c:633 msgid "Tablet" msgstr "" #: src/prefs.c:637 msgid "Device Settings" msgstr "Opções de Ferramentas" #: src/prefs.c:645 msgid "Configure Device" msgstr "Configurar Dispositivo" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Ferramenta Variável" #: src/prefs.c:654 msgid "Factor" msgstr "Fator" #: src/prefs.c:680 msgid "Test Area" msgstr "Área de Teste" #: src/shifter.c:205 msgid "Frames" msgstr "" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "" #: src/shifter.c:279 msgid "Start" msgstr "Iniciar" #: src/shifter.c:281 msgid "Finish" msgstr "Terminar" #: src/shifter.c:330 msgid "Fix Palette" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "" #: src/toolbar.c:234 msgid "By image channel" msgstr "" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "" #: src/toolbar.c:236 msgid "Fill settings" msgstr "" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "" #: src/toolbar.c:299 msgid "Colour" msgstr "Cor" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplicar" #: src/toolbar.c:300 msgid "Divide" msgstr "Dividir" #: src/toolbar.c:300 msgid "Screen" msgstr "Esconder" #: src/toolbar.c:300 msgid "Dodge" msgstr "Sub-exposição" #: src/toolbar.c:301 msgid "Burn" msgstr "Super-exposição" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Luz dura" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Luz suave" #: src/toolbar.c:301 msgid "Difference" msgstr "Diferença" #: src/toolbar.c:302 msgid "Darken" msgstr "Escurecer" #: src/toolbar.c:302 msgid "Lighten" msgstr "Clarear" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extrair grãos" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Mesclar grãos" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Modo Continuo" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Modo de Opacidade" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "" #: src/toolbar.c:889 msgid "Tint +-" msgstr "" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Desabilitar todas as máscaras" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Modo Degradê" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Barra de Preferências" #: src/toolbar.c:1041 msgid "Cut" msgstr "Cortar" #: src/toolbar.c:1042 msgid "Copy" msgstr "Copiar" #: src/toolbar.c:1043 msgid "Paste" msgstr "Colar" #: src/toolbar.c:1045 msgid "Undo" msgstr "Desfazer" #: src/toolbar.c:1046 msgid "Redo" msgstr "Refazer" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Miniatura" #: src/toolbar.c:1053 msgid "Paint" msgstr "Pintar" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Misturar" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Preencher" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Linha Reta" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Borrar" #: src/toolbar.c:1058 msgid "Clone" msgstr "Clonar" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Fazer Seleção" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Selecionar Polígono" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Seleção de Laço" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Elipse Preenchida" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Seleção de Contorno" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Preencher Seleção" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Girar Seleção Verticalmente" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Girar Seleção Horizontalmente" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Rotacionar Seleção Sentido Horário" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Rotacionar Seleção Sentido Anti-Horário" #: src/viewer.c:132 msgid "About" msgstr "Sobre" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Arquivo: %s inválido - paleta não está atualizada" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "A paleta não contém cores suficientes para ser mesclada" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Existe muitos itens identicos para serem reduzidos." #~ msgid "/View/Command Line Window" #~ msgstr "/Ver/Janela de Linhas de Comando" #~ msgid "Zoom" #~ msgstr "Zoom" #~ msgid "%i Files on Command Line" #~ msgstr "%i Arquivos na Linha de Comando" #~ msgid "Not enough memory to rotate image" #~ msgstr "Memória insuficiente para rotacionar imagem" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "" #~ "Memória insuficiente para rotacionar a área de transferênciaMemória " #~ "insuficiente para rotacionar a área de transferência" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "" #~ "Arquivo é muito grande, precisa ser <= %i de largura e %i de altura : %s" #~ msgid "Could not open %s: %s" #~ msgstr "Não é possível abrir %s: %s" #~ msgid "Error closing %s: %s" #~ msgstr "Erro fechando %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Não pode escrever para %s: %s" #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patterns_user.c não pode ser aberto no diretório atual" #~ msgid "Done" #~ msgstr "Pronto" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patterns_user.c criado no diretório atual" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "A imagem atual não é de 94x94x3, então não é possivel criar a " #~ "patterns_user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Você está tentando salvar uma imagem RGB em arquivo XPM, que é " #~ "impossível. Eu sugiro que você salve como PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Você está tentando salvar uma imagem RGB em arquivo GIF, que é " #~ "impossível. Eu sugiro que você salve como PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Você está tentando salvar um arquivo XBM com uma paleta com mais de 2 " #~ "cores. Tente um outro formato ou reduza a paleta para 2 cores." #~ msgid "/File/Actions/sep2" #~ msgstr "/Arquivo/Actions/sep2" #~ msgid "/Edit/Create Patterns" #~ msgstr "/Editar/Criar Modelo" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Paleta/Create Quantized (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Paleta/Create Quantized (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Paleta/Create Quantized (Wu)" #~ msgid "/File/%i" #~ msgstr "/Arquivo/%i" #~ msgid "/File/Actions/%i" #~ msgstr "/Arquivo/Actions/%i" #~ msgid "Loading PNG image" #~ msgstr "Carregando imagem PNG" #~ msgid "Loading clipboard image" #~ msgstr "Carregando imagem da área de transferência" #~ msgid "Saving PNG image" #~ msgstr "Salvando imagem PNG" #~ msgid "Saving Clipboard image" #~ msgstr "Salvando Imagem da Área de Transferência" #~ msgid "Saving Layer image" #~ msgstr "Salvando Imagem da Camada" #~ msgid "Loading GIF image" #~ msgstr "Carregando imagem GIF" #~ msgid "Saving GIF image" #~ msgstr "Salvando imagem GIF" #~ msgid "Loading JPEG image" #~ msgstr "Carregando imagem JPEG" #~ msgid "Saving JPEG image" #~ msgstr "Salvando imagem JPEG" #~ msgid "Loading TIFF image" #~ msgstr "Carregando imagem TIFF" #~ msgid "Saving TIFF image" #~ msgstr "Salvando imagem TIFF" #~ msgid "Loading BMP image" #~ msgstr "Carregando imagem BMP" #~ msgid "Saving BMP image" #~ msgstr "Salvando imagem BMP" #~ msgid "Loading XPM image" #~ msgstr "Carregando imagem XPM" #~ msgid "Saving XPM image" #~ msgstr "Salvando imagem XPM" #~ msgid "Loading XBM image" #~ msgstr "Carregando imagem XBM" #~ msgid "Saving XBM image" #~ msgstr "Salvando imagem XBM" #~ msgid "Loading LSS16 image" #~ msgstr "Carregando imagem LSS16" #~ msgid "Saving LSS16 image" #~ msgstr "Salvando imagem LSS16" #~ msgid "Saving UNDO images" #~ msgstr "Salvando Imagens Desfeitas" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "Qualidade JPEG (100=Alta) " mtpaint-3.40/po/fr.po0000644000175000000620000026454611647046422014047 0ustar muammarstaff# French translation for mtpaint # Copyright (c) (c) 2005 Canonical Ltd, and Rosetta Contributors 2005 # This file is distributed under the same license as the mtpaint package. # FIRST AUTHOR , 2005. # Sylvain Cresto , 2007. # msgid "" msgstr "" "Project-Id-Version: mtpaint\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-11-25 18:17+0000\n" "Last-Translator: wjaguar \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-11-25 18:32+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Rosetta-Version: 0.1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Aperçu de l'animation" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Jouer" #: src/ani.c:695 msgid "Fix" msgstr "Conserver" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Fermer" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Erreur" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Impossible de créer le répertoire de destination" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Création des trames de l'animation" #: src/ani.c:857 msgid "Unable to save image" msgstr "Impossible d'enregistrer l'image" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Avertissement" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Voulez-vous vraiment effacer toutes les données d'animation de tous les " "calques ?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Non" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Oui" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Définir le numéro de la trame" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Il doit y avoir au moins 2 calques pour créer une animation" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Vous devez d'abord sauver les calques avant de créer une animation" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Configurer l'animation" #: src/ani.c:1064 msgid "Output Files" msgstr "Fichiers destination" #: src/ani.c:1067 msgid "Start frame" msgstr "Trame de début" #: src/ani.c:1068 msgid "End frame" msgstr "Trame de fin" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Délais" #: src/ani.c:1071 msgid "Output path" msgstr "Répertoire de destination" #: src/ani.c:1072 msgid "File prefix" msgstr "Préfix des fichiers" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Sauver toutes les trames au format GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Positions" #: src/ani.c:1135 msgid "Cycling" msgstr "Cycle" #: src/ani.c:1148 msgid "Save" msgstr "Sauver" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Aperçu" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Créer des trames" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "L'image est trop grande pour être transformée." #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Dégradé" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morphologique" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Détecter les contours" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Accentuer les contours" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Adoucir les contours" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Différent X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Flou gaussien" #: src/canvas.c:523 msgid "Radius" msgstr "Rayon" #: src/canvas.c:524 msgid "Amount" msgstr "Quantité" #: src/canvas.c:525 msgid "Threshold " msgstr "Seuil " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Enlever les reliefs" #: src/canvas.c:563 msgid "Outer radius" msgstr "Rayon extérieur" #: src/canvas.c:564 msgid "Inner radius" msgstr "Rayon intérieur" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normaliser" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Différence de gaussiennes" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Flou Kuwahara-Nagao" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "L'image est trop grande pour cette rotation." #: src/canvas.c:668 msgid "Smooth" msgstr "Lisser" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Rotation" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Pas assez de mémoire pour créer le presse-papiers" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Fichier de canal invalide." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Aperçu de l'animation" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "C'est une image %s animée." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "" "La taille du fichier est trop importante, elle doit être <= largeur=%i " "hauteur=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Impossible de charger le fichier" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "La bibliothèque d'importation de fichier a dû terminer en raison d'un " "problème avec le fichier (probablement des données corrompues d'image ou un " "fichier tronqué). Je suis parvenu à charger quelques données comme l'en-tête " "qui semblait convenable, mais je suggérerais que vous enregistriez cette " "image dans un nouveau fichier pour vous assurer que ceci ne se produise pas " "de nouveau." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Ne peux pas ouvrir le fichier" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Format non supporté" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Le fichier %s existe déjà. Voulez-vous le remplacer ?" #: src/canvas.c:1524 msgid "File Found" msgstr "Fichier trouvé" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NON" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "OUI" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Numéro de la couleur transparente" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Qualité de l'image JPEG (100=Haute)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "Compression PNG (0=Aucune)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "Compression TGA RLE" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "Compression JPEG2000 (0= Sans perte)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Point X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Format de fichier" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Réversible" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Délais de l'animation" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Erreur lors de l'exportation des tampons d'annulation" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Erreur lors de l'exportation du fichier ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Impossible d'enregistrer le fichier : %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Ouvrir une image" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Enregistrer l'image" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Ouvrir une palette" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Enregistrer la palette" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Exporter les tampons d'annulation" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Exporter les tampons d'annulation (inversé)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "Vous devez avoir 16 couleurs de palette ou moins pour exporter de l'art " "d'ASCII." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exporter au format Art ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Enregistrer les Fichiers de calque" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Sélectionner le répertoire contenant les trames" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "" "Avant de pouvoir créer une animation GIF vous devez d'abord sauver au moins " "une trame." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exporter en tant qu'animation GIF" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Ouvrir un canal" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Enregistrer le canal" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Sauver l'image composée" #: src/channels.c:236 msgid "Cleared" msgstr "Effacé" #: src/channels.c:237 msgid "Set" msgstr "Définis" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Définir la couleur A rayon B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Définir le mélange de A et B" #: src/channels.c:240 msgid "Image Red" msgstr "Rouge" #: src/channels.c:241 msgid "Image Green" msgstr "Vert" #: src/channels.c:242 msgid "Image Blue" msgstr "Bleu" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alpha" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Sélection" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Protections" #: src/channels.c:256 msgid "Create Channel" msgstr "Créer un canal" #: src/channels.c:262 msgid "Channel Type" msgstr "Type de canal" #: src/channels.c:269 msgid "Initial Channel State" msgstr "État initial du canal" #: src/channels.c:273 msgid "Inverted" msgstr "Inversé" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Annuler" #: src/channels.c:316 msgid "Delete Channels" msgstr "Effacer les canaux" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Seuil du canal" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Rouge" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Vert" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Bleu" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Teinte" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturation" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Valeur" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacité" #: src/font.c:939 msgid "Creating Font Index" msgstr "Création des index des polices" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Vous devez selectionner au moins un répertoire où chercher des polices" #: src/font.c:1468 msgid "Font" msgstr "Polices de caractère" #: src/font.c:1469 msgid "Style" msgstr "Style" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Taille" #: src/font.c:1471 msgid "Filename" msgstr "Nom de fichier" #: src/font.c:1471 msgid "Face" msgstr "Dessin" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Répertoire" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Coller le texte" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Texte" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Écrivez le texte Ici" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Lissage" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Inverser" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Couleur d'arrière-plan =" #: src/font.c:1805 msgid "Oblique" msgstr "Oblique" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Angle de rotation =" #: src/font.c:1831 msgid "Font Directories" msgstr "Répertoire des Polices de caractères" #: src/font.c:1836 msgid "New Directory" msgstr "Nouveau répertoire" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Sélectionner le répertoire" #: src/font.c:1848 msgid "Add" msgstr "Ajouter" #: src/font.c:1852 msgid "Remove" msgstr "Supprimer" #: src/font.c:1856 msgid "Create Index" msgstr "Créer index" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Ne peut accéder au répertoire %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Supprimer" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Renommer" #: src/fpick.c:771 msgid "Create Directory" msgstr "Créer un répertoire" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Entrer un nouveau nom de fichier" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Entrer le nom du nouveau répertoire" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Créer" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Voulez-vous vraiment supprimer \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Impossible de supprimer" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Impossible de renommer" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Impossible de créer le répertoire" #: src/fpick.c:939 msgid "Up" msgstr "Haut" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Créer un nouveau répertoire" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Montrer les fichiers cachés" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Tri insensible à la casse" #: src/fpick.c:1044 msgid "Name" msgstr "Nom" #: src/fpick.c:1046 msgid "Type" msgstr "Type" #: src/fpick.c:1047 msgid "Modified" msgstr "Modifié" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Général" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Raccourcis clavier" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Raccourcis souris" #: src/help.c:28 msgid "Credits" msgstr "Crédits" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Les auteurs\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "La liste de tous les auteurs est présente dans la section 'Crédits'.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint est un logiciel libre; vous pouvez le redistribuer et/ou le modifier " "sous les conditions définies par la licence GNU General Public License " "publiée par la Free Software Foundation; sous sa version 3 ou (si vous le " "préférez) sous une version plus récente.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint est distribué dans l'espoir qu'il vous sera utile, mais SANS AUCUNE " "GARANTIE. Regardez la licence GNU General Public License pour plus de " "détails.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint est un simple programme de dessin GTK+1/2 conçu pour créer des " "icônes et des dessins bitmaps. Vous pouvez manipuler des images utilisant " "des palettes de couleurs indexées ou couleurs réelles (24 bits) grâce aux " "outils de dessin classiques. Il offre également des fonctionnalités bien " "plus avancées telles que la gestion des canaux, calques et animations. Grâce " "à sa simplicité et son absence de dépendance il fonctionne sous GNU/Linux, " "Windows et ceci même sur les plus vieilles machines PC.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Une documentation présentant toutes les fonctionnalités de mtPaint est " "disponible sous forme d'un manuel. Si vous ne l'avez pas encore, vous pouvez " "le télécharger depuis le site web de mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Si vous aimez mtPaint et que vous souhaitez être informé de la sortie de " "nouvelles versions, où si vous souhaitez faire quelques remarques ou " "suggestions, la liste de diffusion peu vous intéresser:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Créer une nouvelle image" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Ouvrir une image" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Sauver l'image" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Quitter le programme\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Sélectionner toute l'image" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Ne rien sélectionner, annuler la zone de collage" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Copier la sélection vers le presse-papiers" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Copier la sélection vers le presse-papiers, puis Remplir la " "sélection avec la trame actuelle" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" " Ctrl-V Coller le presse-papiers au centre de l'affichage actuelle" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" " Ctrl-K Coller le presse-papiers à l'emplacement à son emplacement " "original" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Entrée Valider les modifications faites au canevas" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Flèches Mode dessin - Déplacer le curseur de la souris" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Flèches Mode sélection - Déplacer le cadre de sélection/de collage " "d'un pixel" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+Flèches Déplacer le curseur de la souris, le cadre de sélection ou " "de collage de x pixels - x est définis dans la fenêtre des préférences" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Flèches Déplacer le calque ou déplacer le cadre de sélection" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ ou ] Remplacer la couleur A par la prochaine ou précédente " "couleur de la palette" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ ou ] Remplacer la couleur B par la prochaine ou précédente " "couleur de la palette\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Suppr Ajuster l'image à la sélection" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Inser Modifier les couleurs - La luminosité, le contraste, la " "saturation, l'isohélie, gamma ..." #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Passer l'image en niveau de gris" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" " Shift-Ctrl-G Passer l'image en niveau de gris (avec correction gamma)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Dessiner un rectangle autour de la zone de sélection avec " "le motif courant" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Remplir la zone de sélection avec le motif courant" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Dessiner une ellipse tenant dans la zone de sélection" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" " Ctrl-Shift-L Dessiner une ellipse pleine tenant dans la zone de " "sélection\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Éditer les valeurs RVB des couleurs A & B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Éditer la palette de couleur\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Préférences" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Information\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Annuler la dernière opération" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Refaire une opération annulée\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Fenêtre d'aperçu" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Fenêtre des calques\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Dessine une tête de flèche ouverte quand l'outil ligne est " "utilisé (taille fixée par flow setting)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Dessine une tête de flèche fermée quand l'outil ligne est " "utilisé (taille fixée par flow setting)\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Fenêtre principale - Zoom +" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Fenêtre principale - Zoom -" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Fenêtre d'affichage - Zoom +" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Fenêtre d'affichage - Zoom -\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% zoom" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% zoom" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% zoom" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% zoom" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% zoom" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% zoom" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% zoom" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% zoom" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% zoom\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Éditer le canal de l'image" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Éditer le canal alpha" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Éditer la sélection" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Éditer le masque\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Aide" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Sélectionner la trame" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Sélectionner le pinceau" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Outil de peinture" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Basculer la barre principale" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Basculer la barre des outils" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Basculer la barre des réglages" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Basculer la palette" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Outil de sélection" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" " Ctrl + F1 - F12 Sauver le presse-papiers courant en tant que fichier 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 Charger le presse-papiers depuis le fichier 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr " Ctrl + 1, 2, ... , 0 Définir l'opacité à 10%, 20%, ... , 100%" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Augmenter l'opacité de 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Réduire l'opacité de 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr " Origine Basculer le mode plein écran" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Haute Changer l'échelle de l'image" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Basse Changer la taille de l'image" #: src/help.c:128 msgid " End Pan Window" msgstr " Fin Aperçu réduit" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Bouton gauche Peindre en utilisant l'outil courant" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Bouton du milieu Sélectionner le point qui deviendra le centre de " "l'image après le prochain zoom" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Bouton droit Valider l'opération / Arrêter le dessin actuel / " "Annuler la sélection\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Molette Avec GTK+2 l'utilisateur peu zoomer avec la molette " "grâce à la fenêtre des préférences\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr "" " Ctrl+Bouton gauche Définis la couleur se trouvant sous le curseur de la " "souris comme couleur A" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+bouton du millieu Créer couleur A/B et motif basés sur la couleur RVB " "en A (images RVB seulement)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr "" " Ctrl+Bouton droit Définis la couleur se trouvant sous le curseur de la " "souris comme couleur B" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+Molette Déplacer la fenêtre d'édition vers la gauche ou vers " "la droite\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Bouton droit Sélectionner le point qui deviendra le centre de " "l'image après le prochain zoom\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "" "Vous pouvez bloquer les déplacements X/Y lors du déplacement de la souris:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" " Shift Limiter le mouvement de la souris à une ligne " "verticale" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" " Shift+Ctrl Limiter le mouvement de la souris à une ligne " "horizontale" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint est maintenu par Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Les personnes suivantes (par ordre alphabétique) ont directement participés " "au projet, Nous les remercions pour leurs générosités et pour le dure " "travaille qu'elles ont fournis:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Auteurs\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - A participé au développement de la version 2.30. " "Développeur principal et mainteneur depuis la version 3.00 jusqu'à " "maintenant." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Auteur original et mainteneur jusqu'à la version 3.00, " "maintenant contributeur occasionnel." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - A écris la méthode de réduction Wu - voir see wu.c pour plus de " "détails.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Contributions divers (retours sur l'utilisation et idées d'améliorations " "sauf indication contraire)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Nouveau look du site en Avril 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Création de Gifsicle qui est utilisé pour la création et " "l'édition des animations GIF http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - Pages man, import dans Launchpad/" "Rosetta" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Traductions\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brésilien Portugais - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Tchèque - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Néerlandais - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Français - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galicien - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Allemand - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italien - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Japonais - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polonais - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugais - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Russe - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Chinois simplifié - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Slovaque - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Espagnol - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Suédois - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwanais - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turque - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Information" #: src/info.c:290 msgid "Memory" msgstr "Mémoire" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Mémoire totale pour main + annuler les images" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Défaire / Refaire / niveau maximal utilisé" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Presse-papiers" #: src/info.c:311 msgid "Unused" msgstr "Inutilisé" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Presse-papiers = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Presse-papiers = %i x %i x RVB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Pixels RVB uniques" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Calques" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Utilisation mémoire des calques" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histogramme des couleurs" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Couleurs indexées - %i couleur(s) sur %i utilisée(s)" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "Pixels du canevas" #: src/info.c:407 msgid "Orphans" msgstr "Orphelins" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "N'a pas pu trouver le dossier de l'utilisateur. Emploi du dossier courant en " "tant que dossier de l'utilisateur." #: src/layer.c:70 msgid "Background" msgstr "Arrière-plan" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Modifié)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Sans titre" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Voulez-vous vraiment supprimer le calque %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Un ou plusieurs calques contien(nen)t des modifications qui n'ont pas été " "enregistrées. Voulez-vous vraiment perdre ces modifications ?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Annuler" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Abandonner les modifications" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "Erreur lors de l'ouverture de %d calques" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Au moins un des calques de l'image n'a pas été sauvé. Vous devez sauver " "individuellement toutes les images avant de sauver la description des " "calques afin de pouvoir recharger cette image composée." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Voulez-vous vraiment supprimer tous les calques ?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Impossible d'ajouter plus de calques." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nouveau calque" #: src/layer.c:1160 msgid "Raise" msgstr "Augmenter" #: src/layer.c:1161 msgid "Lower" msgstr "Abaisser" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Dupliquer le calque" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centrer le calque" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Supprimer le calque" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Fermer la Fenêtre des Calques" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nom du calque" #: src/layer.c:1269 msgid "Position" msgstr "Position" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Couleur transparente" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Afficher tous les calques dans la fenêtre principale" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Il n'y avait aucune couleur inutilisée à enlever !" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "" "La palette ne contient pas 2 couleurs qui ont des valeurs RVB identiques" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "La palette contient %i couleurs qui ont des valeurs RVB identiques. Voulez-" "vous vraiment les fusionner en une seule et réaligner le canevas ?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RVB" #: src/mainwindow.c:496 msgid "indexed" msgstr "Indexé" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Vous essayez de sauver une image %s dans un fichier %s, ce qui n'est pas " "possible. Je vous suggère de sauver avec l'extension PNG." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Vous essayez de sauver un fichier %s avec une palette de plus de %d " "couleurs. Utilisez un autre format ou réduisez la palette à %d couleurs." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Vous essayez de sauver un fichier XPM avec plus de 4096 couleurs. Utilisez " "un autre format ou postérisez l'image en 4 bits, sinon réduisez le nombre de " "couleurs." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Incapable de charger le presse-papiers" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Incapable de sauver le presse-papiers" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Ce canevas/cette palette contient des modifications qui n'ont pas été " "enregistrées. Voulez-vous vraiment perdre ces modifications ?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Image" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Voulez-vous réellement quitter ?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Fichier" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nouveau" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Ouvrir ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Enregistrer" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Enregistrer sous ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Exporter les tampons d'annulation ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Exporter les tampons d'annulation (inversé) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exporter au format Art ASCII ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exporter une animation GIF ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Paramètrer" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Quitter" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Édition" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Annuler" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Refaire" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Couper" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Copier" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Copier dans palette" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Coller au centre" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Coller dans un nouveau calque" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Coller" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Coller le texte" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Coller le texte (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Coller palette" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Charger le presse-papiers" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Enregister le presse-papiers" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importer presse-papiers du système" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Exporter presse-papiers du système" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Sélectionner la trame ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Sélectionner le pinceau ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Affichage" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Barre principale" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Barre des outils" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Barre des réglages" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Palette" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Barre d'état" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Mode plein écran" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Centrer l'image" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Grille de zoom" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Configurer la grille ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Fenêtre d'aperçu" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Découper horizontalement" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Sélectionne la fenêtre d'aperçu" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Aperçu réduit" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Calques" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Convertir en RVB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Convertir en couleurs indexées ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Échelle de l'image ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Taille de l'image ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Ajuster l'image à la sélection" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Miroir vertical" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Miroir horizontal" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Rotation horaire" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Rotation antihoraire" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Rotation ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Biais ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Préférences ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Sélection" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Tout sélectionner" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Aucune (Échap)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Flottante" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Couper en sélection flottante" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Tracer le contour de la sélection" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Remplir la sélection" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Tracer une ellipse" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Tracer une ellipse pleine" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//Rampe horizontale" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//Rampe verticale" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Mélange avec transparence A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Masquer la transparence" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Masquer les couleurs A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Ne plus masquer les couleurs A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Masquer toutes les couleurs" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Enlever le masque" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Charger ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Restaurer la palette par défaut" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Protéger toutes les couleurs" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Aucune protection" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Échanger A & B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Éditer les couleurs A & B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Éditeur de palette ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Définir la taille de la palette ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Fusionner les couleurs dupliquées" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Supprimer les couleurs non utilisées" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Réduction ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Trier les couleurs ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Cycles ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Effe_ts" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Modifier les couleurs ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Inverse" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Niveau de gris" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Niveau de gris (correction gamma)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Transformation" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Côté gauche vers le bas" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Côté droit vers le bas" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Côté supérieur à droite" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Côté inférieur à droite" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Trouver les contours ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Plus net ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Enlever les reliefs ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Adoucir ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Flou gaussien ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Flou Kuwahara-Nagao ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Relief" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//Dilater" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Eroder" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Bactéries ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Ca_nal" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nouveau ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Supprimer ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Éditer l'image" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Éditer le canal alpha" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Éditer la sélection" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Éditer le masque" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Cacher l'image" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Désactiver le canal alpha" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Désactiver la sélection" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Désactiver le masque" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Opérations RVBA" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Seuil ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Dissocier Alpha" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Afficher le canal alpha en superposition" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Paramétrer les superpositions ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Calque" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nouveau calque" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Enregistrer l'image composée ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Supprimer tous les calques" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Configurer l'animation ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Aperçu de l'animation ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Définir le numéro de la trame ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Supprimer tous les numéros de trame ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Plus..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/Aid_e" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "" #: src/mainwindow.c:4933 msgid "//About" msgstr "//À propos" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Personnaliser les raccourcis claviers" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Convertir en couleurs indexées" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Effet bactéries" #: src/memory.c:4744 msgid "Rotating" msgstr "Rotation" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Rotation libre" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Mise à l'Échelle de l'image" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Comptage des pixels RVB uniques" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Application de l'Effet" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Filtre Kuwahara-Nagao" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Biais" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Veuillez patienter ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Parcourir" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Correction gamma" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "RVB 24 bits" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Niveau de gris" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Couleurs indexées" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Depuis le presse-papiers" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Prendre une capture d'Écran" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nouvelle image" #: src/otherwindow.c:288 msgid "Width" msgstr "Largeur" #: src/otherwindow.c:289 msgid "Height" msgstr "Hauteur" #: src/otherwindow.c:290 msgid "Colours" msgstr "Couleurs" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Sélecteur de motifs" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Définir la taille de la palette" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Appliquer" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminosité" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Luminosité" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Distance jusqu'à A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Projection de A vers B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Fréquence" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Trier les couleurs de la palette" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Index de départ" #: src/otherwindow.c:617 msgid "End Index" msgstr "Index de fin" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Inverser l'Ordre" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contraste" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Isohélie" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Modifier les couleurs" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Afficher les détails" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Stocker les valeurs" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palette" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Aperçu automatique" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Réinitialiser" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "" "Les nouvelles dimensions sont identiques à celles actuelles - rien à faire." #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "" "Le système d'exploitation ne peut pas allouer la mémoire pour cette " "opération." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Vous n'avez pas alloué assez de mémoire dans la fenêtre de préférences pour " "cette opération." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Voisin le plus proche" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilinéaire / zone de correspondance" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilinéaire" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bi-cubique" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bords" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Meilleur" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Augmenter la netteté" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Largeur " #: src/otherwindow.c:1168 msgid "Height " msgstr "Hauteur " #: src/otherwindow.c:1170 msgid "Original " msgstr "Original " #: src/otherwindow.c:1176 msgid "New" msgstr "Nouveau" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Excentrage" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centrer" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Conserver les proportions" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Effacer" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Effet" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Effet miroir" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Miroir" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Paramètres" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Netteté de l'image réduite" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Échelle du canevas" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Changer la taille du canevas" #: src/otherwindow.c:1963 msgid "From" msgstr "De" #: src/otherwindow.c:1963 msgid "To" msgstr "Vers" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Échelle" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Éditeur de palette" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Configurer les superpositions" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Éditeur de couleur" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Limite" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Sphère" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Angle" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Cube" #: src/otherwindow.c:2110 msgid "Range" msgstr "Intervalle" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Inversé" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Mode couleur sélective" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Opaque" #: src/otherwindow.c:2128 msgid "Border" msgstr "Bordure" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Transparent" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Tuile " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Grille de tuile" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Zoom minimum" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Largeur de tuile" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Hauteur de tuile" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Configurer la grille" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Espacement des couleurs" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Le plus large (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Somme (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclidien (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Mesurer les différences" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Conversion exacte" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Utiliser la palette courante" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "Quantification PNN (lent, meilleure qualité)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Quantification Wu (rapide)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Quantification Max-min (meilleur pour petites palettes et dithering)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Aucun" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Tramage Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Tramage Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Tramage Floyd-Steinberg (rapide)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Tramage (effet)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Dispersé (effet)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamme" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Faiblement" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Fortement" #: src/otherwindow.c:2385 msgid "Off" msgstr "Désactivé" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Séparer/Somme" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Séparer/Découper" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Longueur/Somme" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Longueur/Découper" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Réduction" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Convertir en couleurs indexées" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Nombre de couleurs indexées à créer" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Tronquer la palette" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Pondération basée sur le diamètre" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Tramage" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Réduire l'étalement des couleurs" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Scan serpentine" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Propagation d'erreur, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Propagation d'erreur sélective" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "TSV inversé" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Constante" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Édition du dégradé" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Points:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Inverse" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Édition personnalisée" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Linéaire" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radial" #: src/otherwindow.c:3018 msgid "Square" msgstr "Carré" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Angulaire" #: src/otherwindow.c:3019 msgid "Conical" msgstr "conique" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Niveau" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Répéter" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A vers B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A vers B (RVB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A vers B (TSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A jusqu'a B (TSV inversé)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Seulement A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Personnaliser" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Courant jusqu'à 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Courant seulement" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Paramétrer le dégradé" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Canal" #: src/otherwindow.c:3047 msgid "Length" msgstr "Longueur" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Longueur de la répétition" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Type de dégradé" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Type d'extension" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Opacité de l'aperçu" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horizontal " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Vertical" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Inchangé" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "Source" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Origine" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Echelle relative" #: src/otherwindow.c:3337 msgid "Display" msgstr "Montrer" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Sauve image %s" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Charge image %s" #: src/png.c:850 msgid "Layer" msgstr "Calque" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d des %d trames ne peuvent pas être sauvé en tant que %s - le mode PNG à " "été utilisé" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Pression" #: src/prefs.c:154 msgid "Current Device" msgstr "Périphérique courant" #: src/prefs.c:431 msgid "Default System Language" msgstr "Langue par défaut du système" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Chinois (simplifié)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Chinois (Taiwanais)" #: src/prefs.c:433 msgid "Czech" msgstr "Tchèque" #: src/prefs.c:433 msgid "Dutch" msgstr "Néerlandais" #: src/prefs.c:433 msgid "English (UK)" msgstr "Anglais (Royaume Uni)" #: src/prefs.c:433 msgid "French" msgstr "Français" #: src/prefs.c:434 msgid "Galician" msgstr "Galicien" #: src/prefs.c:434 msgid "German" msgstr "Allemand" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italien" #: src/prefs.c:435 msgid "Japanese" msgstr "Japonais" #: src/prefs.c:435 msgid "Polish" msgstr "Polonais" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugais" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugais (Brésilien)" #: src/prefs.c:436 msgid "Russian" msgstr "Russe" #: src/prefs.c:436 msgid "Slovak" msgstr "Slovaque" #: src/prefs.c:437 msgid "Spanish" msgstr "Espagnol" #: src/prefs.c:437 msgid "Swedish" msgstr "Suédois" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turque" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "Point chaud XBM X" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "Point chaud XBM Y" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Fichiers récemment utilisés" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Sensibilité de la barre de progression" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Dimensions du canevas" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Curseur X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RVB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Dimensions de la sélection" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Annuler / Refaire" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Couler" #: src/prefs.c:457 msgid "Preferences" msgstr "Préférences" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Mémoire maximale utilisée par les tampons d'annulation (MO)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Nombre max d'annulations" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "Espace commun d'annulation de calques (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Par défaut utiliser la correction gamma" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Optimiser les grilles de transparence" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Désactiver la transparence" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Sélectionnez la langue dans laquelle afficher l'interface\n" "\n" "Vous devrez redémarrer mtPaint pour que la modification\n" "soit prise en compte" #: src/prefs.c:524 msgid "Language" msgstr "Langue" #: src/prefs.c:529 msgid "Interface" msgstr "Interface" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Niveau de gris" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Déplacer la sélection" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Dimensions maximums de la fenêtre d'aperçu réduit" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Afficher le presse-papiers pendant le collage" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Curseur de la souris = Outil" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Confirmer La Sortie" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "La touche Q quitte mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "La sélection d'un nouvel outil valide les modifications" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Centrer la boite de dialogue d'outils" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Les nouvelles images réinitialisent le zoom à 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Défilement de molette de souris = Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Utilise les icônes du menu" #: src/prefs.c:564 msgid "Files" msgstr "Fichiers" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Lire TGAs 16-bit comme 5:6:5 BVR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "Chargement image réversible" #: src/prefs.c:588 msgid "Paths" msgstr "Chemins" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Fichiers Presse-papiers" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Sélectionner le fichier presse-papiers" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Navigateur HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Sélectionner le navigateur HTML" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Emplacement de l'index du manuel" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Sélectionner le fichier index du manuel" #: src/prefs.c:605 msgid "Default Palette" msgstr "Palette par défaut" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Sélectionnez la palette par défaut" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Motifs par défaut" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Sélectionnez le fichier de motifs par défaut" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Barre d'état" #: src/prefs.c:633 msgid "Tablet" msgstr "Tablette" #: src/prefs.c:637 msgid "Device Settings" msgstr "Paramètres du périphérique" #: src/prefs.c:645 msgid "Configure Device" msgstr "Configurer le périphérique" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Outil variable" #: src/prefs.c:654 msgid "Factor" msgstr "Facteur" #: src/prefs.c:680 msgid "Test Area" msgstr "Zone de test" #: src/shifter.c:205 msgid "Frames" msgstr "Trames" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Cycles de la palette" #: src/shifter.c:279 msgid "Start" msgstr "Début" #: src/shifter.c:281 msgid "Finish" msgstr "Fin" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Conserver la palette" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Action" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Commande" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Paramétrer les actions" #: src/spawn.c:515 msgid "Execute" msgstr "Appliquer" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Erreur %i lors de l'exécution de la commande %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Je ne trouve pas la documentation. Si vous ne l'avez pas vous devez " "télécharger le manuel de mtPaint depuis le site web, vous devrez ensuite " "l'installer. Dans le cas contraire vérifiez que son emplacement soit bien " "paramétré dans la fenêtre des préférences." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Une erreur est survenue lors de l'exécution du navigateur HTML. Vous devez " "sélectionner le programme à utiliser dans la fenêtre des préférences." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "Cube RVB" #: src/toolbar.c:234 msgid "By image channel" msgstr "Par canal" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Définition du dégradé" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Propriétés du remplissage" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Appliquer le mode d'opacité" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Propriétés du barbouillage" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "Normal" #: src/toolbar.c:299 msgid "Colour" msgstr "Couleur" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Saturer plus" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplier" #: src/toolbar.c:300 msgid "Divide" msgstr "Diviser" #: src/toolbar.c:300 msgid "Screen" msgstr "Écran" #: src/toolbar.c:300 msgid "Dodge" msgstr "Éclaircir" #: src/toolbar.c:301 msgid "Burn" msgstr "Assombrir" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Lumière dure" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Lumière douce" #: src/toolbar.c:301 msgid "Difference" msgstr "Différence" #: src/toolbar.c:302 msgid "Darken" msgstr "Assombrir seulement" #: src/toolbar.c:302 msgid "Lighten" msgstr "Éclaircir seulement" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extraction de grain" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Fusion de grain" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Mode mélange" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Mode continu" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Mode d'opacité" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Mode de teinte" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Teinte +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Mode mélange" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Désactiver toutes les protections" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Mode de dégradé" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Propriétés" #: src/toolbar.c:1041 msgid "Cut" msgstr "Couper" #: src/toolbar.c:1042 msgid "Copy" msgstr "Copier" #: src/toolbar.c:1043 msgid "Paste" msgstr "Coller" #: src/toolbar.c:1045 msgid "Undo" msgstr "Annuler" #: src/toolbar.c:1046 msgid "Redo" msgstr "Refaire" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Aperçu réduit" #: src/toolbar.c:1053 msgid "Paint" msgstr "Peindre" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Mélanger" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Remplir" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Ligne droite" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Barbouiller" #: src/toolbar.c:1058 msgid "Clone" msgstr "Cloner" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Faire une sélection" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Sélection polygone" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Dégradé" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Sélection à main levée" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Contour d'ellipse" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Ellipse remplie" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Tracer le contour de la sélection" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Remplir la sélection" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Miroir vertical de la sélection" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Miroir horizontal de la sélection" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Rotation horaire de la sélection" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Rotation antihoraire de la sélection" #: src/viewer.c:132 msgid "About" msgstr "À propos de" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Fichier : %s invalide - palette non mise à jour" #~ msgid "Distance to A+B" #~ msgstr "Distance jusqu'à A+B" #~ msgid "Edit Frames" #~ msgstr "Editer les trames" #~ msgid "Not enough memory to rotate image" #~ msgstr "Pas assez de mémoire pour pivoter l'image" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "Pas assez de mémoire pour pivoter le presse-papiers" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "Le fichier est trop grand, il ne doit pas excéder %ix%i : %s" #~ msgid "Could not open %s: %s" #~ msgstr "Impossible d'ouvrir %s : %s" #~ msgid "Error closing %s: %s" #~ msgstr "Erreur lors de la fermeture de %s : %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Impossible d'écrire dans %s : %s" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "La palette ne contient pas assez de couleurs pour faire une fusion" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Il y a trop d'éléments identiques à réduire dans la palette." #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patterns_user.c n'a pas pu être ouvert dans le dossier courant" #~ msgid "Done" #~ msgstr "Fait" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patterns_user.c créé dans le dossier courant" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "L'image courante n'est pas 94x94x3 donc je ne peux pas créer " #~ "patterns_user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Vous essayez d'enregistrer une image RVB dans un fichier XPM ce qui n'est " #~ "pas possible. Enregistrez plutôt avec l'extension PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Vous essayez d'enregistrer une image RVB dans un fichier GIF ce qui n'est " #~ "pas possible. Enregistrez plutôt avec l'extension PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Vous essayez d'enregistrer un fichier XBM avec une palette de plus de 2 " #~ "couleurs. Employez un autre format ou réduisez la palette à 2 couleurs." #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Vous essayez d'enregistrer un canevas indexé dans un fichier JPEG ce qui " #~ "n'est pas possible. Enregistrez plutôt avec l'extension PNG." #~ msgid "/Edit/Create Patterns" #~ msgstr "/Édition/Créer des trames" #~ msgid "/View/Command Line Window" #~ msgstr "/Affichage/Ligne de commande" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Palette/Réduction (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Palette/Réduction (DL3)" #~ msgid "/File/%i" #~ msgstr "/Fichier/%i" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "Qualité de l'image JPEG (100=Haute) " #~ msgid "DL1 Quantize (fastest)" #~ msgstr "Réduction DL1 (la plus rapide)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "Réduction DL3 (très lent, meilleur qualité)" #~ msgid "Loading PNG image" #~ msgstr "Chargement d'une image PNG" #~ msgid "Loading clipboard image" #~ msgstr "Chargement de l'image du presse-papiers" #~ msgid "Saving PNG image" #~ msgstr "Enregistrement d'une image PNG" #~ msgid "Saving Clipboard image" #~ msgstr "Enregistrement du presse-papiers" #~ msgid "Saving Layer image" #~ msgstr "Enregistrement de l'image de calque" #~ msgid "Loading GIF image" #~ msgstr "Chargement d'une image GIF" #~ msgid "Saving GIF image" #~ msgstr "Enregistrement d'une image GIF" #~ msgid "Loading JPEG image" #~ msgstr "Chargement d'une image JPEG" #~ msgid "Saving JPEG image" #~ msgstr "Enregistrement d'une image JPEG" #~ msgid "Loading TIFF image" #~ msgstr "Chargement d'une image TIFF" #~ msgid "Saving TIFF image" #~ msgstr "Enregistrement d'une image TIFF" #~ msgid "Loading BMP image" #~ msgstr "Chargement d'une image BMP" #~ msgid "Saving BMP image" #~ msgstr "Enregistrement d'une image BMP" #~ msgid "Loading XPM image" #~ msgstr "Chargement d'une image XPM" #~ msgid "Saving XPM image" #~ msgstr "Enregistrement d'une image XPM" #~ msgid "Loading XBM image" #~ msgstr "Chargement d'une image XBM" #~ msgid "Saving XBM image" #~ msgstr "Enregistrement d'une image XBM" #~ msgid "Saving UNDO images" #~ msgstr "Enregistrement des tampons d'annulation" #~ msgid "%i Files on Command Line" #~ msgstr "%i Fichiers sur la ligne de commande" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Palette/Réduction (Wu)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Réduction Wu (la meilleur méthode pour les petites palettes)" #~ msgid "Grid colour RGB" #~ msgstr "Grille de couleur RVB" #~ msgid "Zoom" #~ msgstr "Zoom" #~ msgid "Saving Channel image" #~ msgstr "Enregistrement du canal" #~ msgid "Loading LSS16 image" #~ msgstr "Chargement d'une image LSS16" #~ msgid "Saving LSS16 image" #~ msgstr "Enregistrement d'une image LSS16" #~ msgid " C Command Line Window" #~ msgstr " C Fenêtre ligne de commande" #~ msgid "" #~ "Dennis Lee - Wrote the two quantizing methods DL1 & 3 - see quantizer.c " #~ "for more information." #~ msgstr "" #~ "Dennis Lee - A écris les deux méthode de réduction DL1 & 3 - voir le " #~ "fichier quantizer.c pour plus de détails." #~ msgid "Magnus Hjorth - Wrote inifile.c/h, from mhWaveEdit 1.3.0." #~ msgstr "Magnus Hjorth - A écris inifile.c/h, pour mhWaveEdit 1.3.0." #~ msgid "/File/Actions/sep2" #~ msgstr "/Fichier/Actions/sep2" #~ msgid "/Frames" #~ msgstr "/Trames" #~ msgid "/File/Actions/%i" #~ msgstr "/Fichier/Actions/%i" mtpaint-3.40/po/it.po0000644000175000000620000025071111647046422014041 0ustar muammarstaff# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: mtpaint-3.40\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2009-11-29 21:20+0800\n" "Last-Translator: angelo gemmi \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Italian\n" "X-Poedit-Country: Italy\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Anteprima Animazione" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Riproduci" #: src/ani.c:695 msgid "Fix" msgstr "Correggi" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Chiudi" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Errore" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Impossibile creare la cartella di destinazione" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Creazione anteprima fotogrammi" #: src/ani.c:857 msgid "Unable to save image" msgstr "Impossibile salvare l'immagine" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Attenzione!" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "Vuoi veramente cancellare tutto e i dati relativi agli altri livelli?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "No" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Sì" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Imposta fotogramma chiave" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Devi avere almeno due livelli per creare un'animazione" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Devi salvare il tuo file coi livelli prima di creare un'animazione" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Configura animazione" #: src/ani.c:1064 msgid "Output Files" msgstr "File di destinazione" #: src/ani.c:1067 msgid "Start frame" msgstr "Fotogramma iniziale" #: src/ani.c:1068 msgid "End frame" msgstr "Fotogramma finale" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Ritardo" #: src/ani.c:1071 msgid "Output path" msgstr "Percorso di destinazione" #: src/ani.c:1072 msgid "File prefix" msgstr "Prefisso file" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Crea fotogrammi GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Posizioni" #: src/ani.c:1135 msgid "Cycling" msgstr "Ripetizione" #: src/ani.c:1148 msgid "Save" msgstr "Salva" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Anteprima" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Crea fotogrammi" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "l'immagine è troppo grande per trasformarla" #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Gradiente" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfologico" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Trova bordi" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Affina bordi" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Ammorbidisci bordi" #: src/canvas.c:481 msgid "Different X/Y" msgstr "X/Y differenti" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Sfocatura gaussiana" #: src/canvas.c:523 msgid "Radius" msgstr "Raggio" #: src/canvas.c:524 msgid "Amount" msgstr "Ammontare" #: src/canvas.c:525 msgid "Threshold " msgstr "Soglia " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Maschera sfocata" #: src/canvas.c:563 msgid "Outer radius" msgstr "Raggio esterno" #: src/canvas.c:564 msgid "Inner radius" msgstr "Raggio interno" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizza" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Differenza di gaussiani" #: src/canvas.c:594 msgid "Protect details" msgstr "Proteggi dettagli" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Sfocatura di Kuwahara-Nagao" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "L'immagine è troppo grande per questa rotazione." #: src/canvas.c:668 msgid "Smooth" msgstr "Liscia" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Rotazione libera" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Memoria insufficiente per creare gli appunti" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "File della tavolozza non valido" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Canale file non valido" #: src/canvas.c:1311 msgid "Raw frames" msgstr "Fotogrammi grezzi" #: src/canvas.c:1311 msgid "Composited frames" msgstr "Fotogrammi compositi" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "Fotogrammi compositi con ritardo diverso da zero" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "Carica il primo fotogramma" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "Esplodi fotogrammi" #: src/canvas.c:1315 msgid "View Animation" msgstr "Vedi animazione" #: src/canvas.c:1332 msgid "Load Frames" msgstr "Carica fotogrammi" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Questo è un file %s animato" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "Questo è un file %s multipagina" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "Carica nei livelli" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "File troppo grande, dev'essere <= di larghezza=%i altezza=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "Impossibile esplodere fotogrammi" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Impossibile caricare il file" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "Il processo d'importazione è stato interrotto a causa di problemi col file " "alcuni dati come l'intestazione sembravano integri, ma suggerirei di salvare " "questa immagine in un nuovo file, per esser certi che ciò non avvenga ancora." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "L'animazione è troppo lunga per caricarla in tutti i suoi livelli" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "Impossibile esplodere tutti i fotogrammi dell'animazione" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Impossibile aprire il file" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Formato file non supportato" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Il file: %s è gia presente. Vuoi sovrascriverlo?" #: src/canvas.c:1524 msgid "File Found" msgstr "File trovato" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NO" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "SÌ" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Indice Trasparenza" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Qualità di salvataggio JPEG (100=alta)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "Compressione PNG (0=Nessuna)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "Compressione TGA RLE" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "Compressione JPEG2000 (0=senza perdita)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Punto a X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Formato File" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Annullabile" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "Applica profilo colore" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Ritardo animazione" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Impossibile esportare immagini annullate" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Impossibile esportare in file ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Impossibile salvare file: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Carica File Immagine" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Salva File Immagine" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Carica tavolozza file" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Salva tavolozza file" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Esporta immagini annullate" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Esporta immagini annullate (invertito)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "Devi avere 16 colori o di meno per l'esportazione in ASCII art." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Esporta in ASCII Art" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Salva livelli del file" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Selezione cartella per i fotogrammi" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Devi salvare almeno un fotogramma per creare un'animazione GIF" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Esporta animazione GIF" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Carica Canale" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Salva canale" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Salva immagine composita" #: src/channels.c:236 msgid "Cleared" msgstr "Pulito" #: src/channels.c:237 msgid "Set" msgstr "Imposta" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Imposta colore A con raggio B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Imposta trasparenza A a B" #: src/channels.c:240 msgid "Image Red" msgstr "Rosso immagine" #: src/channels.c:241 msgid "Image Green" msgstr "Verde immagine" #: src/channels.c:242 msgid "Image Blue" msgstr "Blu immagine" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Selezione" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maschera" #: src/channels.c:256 msgid "Create Channel" msgstr "Crea Canale" #: src/channels.c:262 msgid "Channel Type" msgstr "Tipo canale" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Stato iniziale canale" #: src/channels.c:273 msgid "Inverted" msgstr "Invertito" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "OK" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Cancella" #: src/channels.c:316 msgid "Delete Channels" msgstr "Elimina canali" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Canale soglia" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Rosso" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Verde" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Blu" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Tonalità" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturazione" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Valore" #: src/cpick.c:902 msgid "Hex" msgstr "Esadecimale" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacità" #: src/font.c:939 msgid "Creating Font Index" msgstr "Creazione indice dei caratteri in corso" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Devi selezionare almeno una cartella in cui cercare caratteri" #: src/font.c:1468 msgid "Font" msgstr "Carattere" #: src/font.c:1469 msgid "Style" msgstr "Stile" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Dimensione" #: src/font.c:1471 msgid "Filename" msgstr "Nome del file" #: src/font.c:1471 msgid "Face" msgstr "Tipo" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Cartella" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Incolla testo" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Testo" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Inserisci il testo qui" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Antiscalettatura" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Inverti" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Colore di sfondo =" #: src/font.c:1805 msgid "Oblique" msgstr "Obliquo" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Angolo di rotazione =" #: src/font.c:1831 msgid "Font Directories" msgstr "Cartella dei caratteri" #: src/font.c:1836 msgid "New Directory" msgstr "Nuova cartella" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Seleziona cartella" #: src/font.c:1848 msgid "Add" msgstr "Aggiungi" #: src/font.c:1852 msgid "Remove" msgstr "Rimuovi" #: src/font.c:1856 msgid "Create Index" msgstr "Crea indice" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Impossibile accedere alla cartella %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Elimina" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Rinomina" #: src/fpick.c:771 msgid "Create Directory" msgstr "Crea Cartella" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Inserisci un nuovo nome file" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Inserisci il nome della nuova cartella" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Crea" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Sei sicuro di voler eliminare \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Impossibile eliminare" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Impossibile rinominare" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Impossibile creare cartella" #: src/fpick.c:939 msgid "Up" msgstr "Sù" #: src/fpick.c:940 msgid "Home" msgstr "Home" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Crea nuova cartella" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Mostra file nascosti" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Ordina senza distinzioni tra maiuscole e minuscole" #: src/fpick.c:1044 msgid "Name" msgstr "Nome" #: src/fpick.c:1046 msgid "Type" msgstr "Tipo" #: src/fpick.c:1047 msgid "Modified" msgstr "Modificato" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Generale" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Scorciatoie da tastiera" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Scorciatoie da mouse" #: src/help.c:28 msgid "Credits" msgstr "Riconoscimenti" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Gli autori\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Vedi la sezione 'Riconoscimenti' per una lista degli autori.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint è software libero; puoi redistribuirlo e/o modificarlo secondo i " "termini della GNU General Public License come pubblicato dalla Free Software " "Foundation; o della versione 3 della licenza, o (a tua discrezione) di ogni " "successiva versione.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint è distribuito con la speranza che sia utile, ma SENZA ALCUNA " "GARANZIA; senza neppure la garanzia implicita di COMMERCIABILITÀ o IDONEITÀ " "PER UNO SCOPO PARTICOLARE. Vedi la GNU General Public License per maggiori " "dettagli\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint è un semplice programma di disegno (GTK 1/2) progettato per la " "creazione di icone ed arte pixellistica. Può modificare tavolozze " "indicizzate o immagini a 24 bit RGB ed offre strumenti di base per il " "disegno e la manipolazione di tavolozze. Ha anche diverse altre " "caratteristiche più avanzate come i canali, i livelli e l'animazione. In " "virtù della sua semplicità e mancanza di dipendenze, può essere eseguito su " "ogni sistema GNU/Linux, Windows e sui PC datati.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "esiste una documentazione completa delle funzioni di mtPaint, contenuta in " "un manuale.Se non l'hai già, puoi scaricarlo dal sito di mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Se ti piace mtpaint e vuoi tenerti aggiornato sulle nuove versioni, o " "inviare qualche riscontro, allora la mailing list può interessarti.\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Crea una nuova immagine" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Apri immagine" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Salva immagine" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Esci dal programma\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Seleziona l'intera immagine" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr "" " Escape Non selezionare nulla, cancella il riquadro di copia" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Copia la selezione negli appunti" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Copia la selezione negli appunti, e quindi copia il " "motivo corrente nell'area di selezione" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" " Ctrl-V Incolla il contenuto degli appunti al centro della View " "corrente" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" " Ctrl-K Incolla il contenuto degli appunti nell'area d'origine" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return/Invio Incolla sulla tela" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Tasti freccia Modalità disegno - Muovi il puntatore del mouse" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Tasti freccia Modalità selezione - Sposta la finestra di selezione o " "incolla casella di un pixel" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Maiusc+ Tasti freccia Sposta il puntatore del mouse, la finestra di " "selezione o incolla casella di x pixel - x è definito dalla finestra di " "preferenze" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr "" " Ctrl+Tasti freccia Muovi livello o ridimensiona il riquadro di selezione" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ or ] Cambia colore A con il successivo o con il precedente " "elemento della tavolozza" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Maiusc+[ or ] Cambia colore B con il successivo o con il precedente " "elemento della tavolozza\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Elimina Ritaglia immagine in base alla selezione" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Inserisci Trasforma colori - ovvero. Luminosità, Contrasto, " "Saturazione, Posterizza, Gamma" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Converti immagine in scala di Grigio" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" " Maiusc-Ctrl-G Converti immagine in scala di Grigio (con correzione " "Gamma)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Disegna un rettangolo intorno all'area di selezione con " "ilriempimento corrente" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr "" " Ctrl-Maiusc-T Riempi l'area selezionata con il riempimento corrente" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" " Ctrl-L Disegna un'ellisse che attraversi l'area di selezione" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" " Ctrl-Maiusc-L Disegna un'ellisse piena che attraversi l'area di " "selezione\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Modifica i valori RGB per i colori A & B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Modifica tutte le tavolozze colori\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Preferenze" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Informazioni\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Annulla l'ultima azione" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Ripristina un'azione annullata\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Finestra Vista" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Finestra livelli\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Disegna una freccia aperta quando si utilizza lo " "strumento linea (imposta dimensioni attraverso i settaggi di flusso)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Disegna una freccia chiusa quando si utilizza lo " "strumento linea (impostadimensioni attraverso i settaggi di flusso)\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Finestra principale - Zoom in" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Finestra principale - Zoom out" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Maiusc +,= Finestra Vista - Zoom in" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Maiusc - Finestra Vista - Zoom out\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% zoom" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% zoom" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% zoom" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% zoom" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% zoom" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% zoom" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% zoom" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% zoom" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% zoom\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Maiusc + 1 Modifica canale immagine" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Maiusc + 2 Modifica canale alfa" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Maiusc + 3 Modifica canale selezione" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Maiusc + 4 Modifica maschera canale\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Aiuto" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Scegli motivo" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Scegli pennello" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Strumento di disegno" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Passa alla barra principale" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Passa a barra strumenti principale" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Passa a barra impostazioni" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Passa a tavolozza" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Strumento selezione" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Passa ad area di lavoro\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr "" " Ctrl + F1 - F12 Salva il contenuto corrente degli appunti nei file 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr "" " Maiusc + F1 - F12 Carica il contenuto degli appunti dai file 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Imposta opacità al 10%, 20%, ... , 100% (finestra " "principale o tastierino numerico" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + or = Incrementa opacità di 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Decrementa opacità di 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Mostra o nascondi la finestra principale menu/barra " "strumenti/barra di stato/tavolozza" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Pagina sù Scala Immagine" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Pagina giù Ridimensiona tela immagine" #: src/help.c:128 msgid " End Pan Window" msgstr " Fine Finestra panoramica" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Tasto sinistro Disegna sulla tela usando lo strumento corrente" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Tasto centrale Seleziona il punto che sarà il centro della immagine " "dopo il successivo zoom" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Tasto destro Incolla sulla tela / arresta il disegno della linea " "corrente / Cancella selezione\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Rotellina di scorrimento del mouse In GTK+2 l'utente può avere la " "rotellina per lo zoom attraverso la finestra di preferenze\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+tasto sinistro Scegli un colore A dal puntatore del mouse" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+tasto centrale Crea colore A/B e motivo basato su colori RGB in A " "(solo immagini RGB)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+tasto destro Scegli colore B dal puntatore del mouse" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+rotellina di scorrimento Sposta la finestra principale a destra o " "a sinistra\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctrl + doppio clic Imposta colore A o B operando una media del colore " "selezionato dal pennello quadrato o linea di selezione (solo RGB)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Maiusc + tasto destro Seleziona il punto che sarà al centro della " "immagine dopo il prossimo zoom\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "È possibile fissare le coordinate X / Y mentre si sposta il mouse:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" " Maiusc Vincola i movimenti del mouse alla linea verticale" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" " Maiusc+Ctrl Vincola i movimenti del mouse alla linea orizzontale" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint è mantenuto da Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Le seguenti persone (in ordine alfabetico) hanno contribuito direttamente al " "progetto, e sono pertanto meritevoli di un sentito ringraziamento per la " "loro generosità e duro lavoro\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Autori\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - che ha contribuito allo sviluppo per la versione 2.30, capo " "sviluppatore egestore progetto dalla versione 3.00 ad oggi." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - autore originale e gestore fino alla versione 3.00, " "occasionalecontributore dopo questa versione" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - ha scritto il metodo di quantizzazione Wu - vedi wu.c per " "ulteriori informazioni.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Contributi generali (riscontri e idee per il miglioramento, salvo diversa " "rettifica\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhair - ha ridisegnato il sito web nell'aprile del 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - che ha creato Gifsicle, necessario per creare e visualizzare " "o animare file GIF - http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia)- man page, Launchpad/Rosetta " "registrazione" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Traduzioni\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Brasiliano Portoghese - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Cecoslovacco - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Olandese - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Francese - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galiziano - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Tedesco - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italiano - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Giapponese - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polacco - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portoghese - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Russo - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Cinese semplificato - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Slovacco - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Spagnolo - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Svedese - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Cinese di Taiwan - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turco - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Informazioni" #: src/info.c:290 msgid "Memory" msgstr "Memoria" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Memoria totale per l'applicazione principale + annullamenti immagini" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Annulla / Ripristina / Livello massimo di annullamenti" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Appunti" #: src/info.c:311 msgid "Unused" msgstr "Inutilizzato" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Appunti = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Appunti = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Pixel unici RGB" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Livelli" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Memoria totale in uso" #: src/info.c:350 msgid "Colour Histogram" msgstr "Istogramma colore" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Indice complessivo dei colori - %i di %i usati" #: src/info.c:391 msgid "Index" msgstr "Indice" #: src/info.c:392 msgid "Canvas pixels" msgstr "Pixel della tela" #: src/info.c:407 msgid "Orphans" msgstr "Orfani" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Impossibile trovare la cartella home. Utilizzo cartella corrente come " "cartella Home" #: src/layer.c:70 msgid "Background" msgstr "Sfondo" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Modificato)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Senza nome" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Vuoi davvero eliminare il livello %i (%s)" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Uno o più livelli contengono modifiche che non sono state salvate. Vuoi " "davvero non tenere traccia di queste modifiche?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Cancella operazione" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Non salvare le modifiche" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d impossibile caricare livello" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Uno o più livelli dell'immagine non sono stati salvati. Devi salvare ogni " "immagine individualmente prima di salvare il file di testo coi livelli per " "caricare questa imagine composita in futuro" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Vuoi davvero cancellare tutti i livelli?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Non puoi aggiungere più livelli" #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nuovo livello" #: src/layer.c:1160 msgid "Raise" msgstr "Porta sù" #: src/layer.c:1161 msgid "Lower" msgstr "Porta giù" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplica livello" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centra livello" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Elimina livello" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Chiudi finestra dei livelli" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nome livello" #: src/layer.c:1269 msgid "Position" msgstr "Posizione" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Colore trasparente" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Mostra tutti i livelli nella finestra principale" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Non ci sono colori inutilizzati da rimuovere!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "La tavolozza non contiene 2 colori che abbiano gli stessi valori RGB" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "La tavolozza contiene %i colori che hanno identici valori RGB. Vuoi davvero " "fonderli in uno e riallineare le tele?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "Indicizzato" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Si sta tentando di salvare un immagine %s su un file %s per il quale " "l'operazione non è permessa. Suggerisco di salvare con estensione png" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Si sta tentando di salvare un file %s con una tavolozza di più di %d colori " "utilizzare un altro formato o ridurre la tavolozza a %d colori" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Si sta tentando di salvare un file XPM con più di 4.096 colori. usa un altro " "formato o posterizza l'immagine a 4 bit, altrimenti riduci il numero di " "colori " #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Impossibile caricare gli appunti" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Impossibile salvare gli appunti" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Questa tela / tavolozza contiene modifiche che non sono state salvate. Vuoi " "davvero perdere questi cambiamenti?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Immagine" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "sRGB" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Vuoi davvero uscire?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nuovo" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Apri ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Salva" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Salva come ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Esporta Immagini annullate ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Esporta Immagini annullate (invertito) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Esporta in ASCII Art ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Esporta GIF animata ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Azioni" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Configura" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Esci" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Modifica" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Annulla" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Ripristina" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Taglia" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Copia" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Copia nella tavolozza" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Incolla al centro" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Incolla su un nuovo livello" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Incolla" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Incolla testo" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Incolla testo (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Incolla tavolozza" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Carica appunti" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Salva negli appunti" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importa appunti dal sistema" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Esporta appunti sul sistema" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Scegli motivo ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Scegli pennello ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Vista" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Mostra barra principale" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Mostra barra strumenti" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Mostra impostazioni barra strumenti" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Mostra area di lavoro" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Mostra tavolozza" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Mostra barra di stato" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Passa a vista immagine" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Centra immagine" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Mostra zoom griglia" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Configura Griglia ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//Tracciatura immagine ..." #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Mostra finestre" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Dividi in orizzontale" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Finestra di anteprima" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Finestra panoramica" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Finestra livelli" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Immagine" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Converti in RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Converti in scala di colore ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Scala tela ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Ridimensiona tela ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Ritaglia" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Ribalta in verticale" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Ribalta in orizzontale" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Ruota in senso orario" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Ruota in senso antiorario" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Rotazione libera ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Deforma ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Informazioni ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Preferenze ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Selezione" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Seleziona tutto" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Nessuna selezione (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Selezione laccio" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Taglia selezione laccio" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Selezione bordo" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Riempi selezione" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Ellisse contornata" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Ellisse piena" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//Rampa orizzontale" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//Rampa verticale" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Trasparenza alfa A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Porta alfa a maschera" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Maschera colore A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Elimina maschera colore A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Maschera tutti i colori" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Cancella maschera" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Tavolozza" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Carica ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Carica predefinita" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Maschera tutto" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Nessuna maschera" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Scambia colori A & B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Modifica colore A & B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "//Retino A" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Modifica tavolozza ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Imposta dimensioni tavolozza ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Fondi colori duplicati" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Rimuovi colori non in uso" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Crea Quantizzato ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Ordina colori ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Cicla ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Effetti" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Trasforma colore ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Inverti" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Scala di grigio" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Scala di grigio (con correzione gamma)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Trasformazione isometrica" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Sinistra verso il basso" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Destra verso il basso" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Lato superiore destro" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Lato inferiore destro" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Trova bordi ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//Differenza di Gaussiani ..." #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Nitidezza ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Maschera sfocata ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Amorbidisci ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Sfocatura Gaussiana ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Sfocatura Kuwahara-Nagao ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Rilievo" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//Dilata" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Erodi" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Canali" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nuovo ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Elimina ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Modifica immagine" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Modifica alfa" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Modifica selezione" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Modifica maschera" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Nascondi immagine" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Disabilita alfa" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Disabilita Selezione" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Disabilita maschera" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Operazioni RGBA" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Soglia ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Disassocia alfa" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Vedi alfa come sovrapposizione" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Configura sovrapposizione ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Livelli" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nuovo livello" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Salva immagine composita ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Composita su un nuovo livello" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Rimuovi tutti i livelli" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Configura animazione ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Anteprima animazione ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Imposta fotogramma chiave ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Rimuovi tutti i fotogrammi chiave ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Ulteriori informazioni..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Aiuto" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Documentazione" #: src/mainwindow.c:4933 msgid "//About" msgstr "//A proposito di..." #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Riassegna scorciatoie da tastiera" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Conversione in scala di colore" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Effetto bacteria" #: src/memory.c:4744 msgid "Rotating" msgstr "Rotazione" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Rotazione libera" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Scalatura immagine" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Conta pixel RGB unici" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Applicazione effetto" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Filtro Kuwahara-Nagao" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Deforma" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Attendere prego ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Sfoglia" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gamma corretto" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bit RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Scala di Grigio" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Scala di colore" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Dagli appunti" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Cattura schermata" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nuova immagine" #: src/otherwindow.c:288 msgid "Width" msgstr "Larghezza" #: src/otherwindow.c:289 msgid "Height" msgstr "Altezza" #: src/otherwindow.c:290 msgid "Colours" msgstr "Colori" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Selezionatore motivi" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Imposta dimensioni tavolozza" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Applica" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminanza" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Luminosità" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Distanza ad A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Proiezione ad A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frequenza" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Ordina colori tavolozza" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Inizio scala" #: src/otherwindow.c:617 msgid "End Index" msgstr "Fine scala" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Ordine inverso" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contrasto" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterizza" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "Bit a bit" #: src/otherwindow.c:870 msgid "Truncated" msgstr "Troncato" #: src/otherwindow.c:870 msgid "Rounded" msgstr "Arrotondato" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Trasforma colore" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Mostra dettagli" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Memorizza valori" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "Tipo di posterizzazione" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Tavolozza" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Anteprima automatica" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Resetta" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "" "La nuova geometria è la stessa attuale - nessuna trasformazione effettuata" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "Il sistema operativo non può allocare memoria per questa operazione" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "Non hai abbastanza memoria assegnata nella finestra delle preferenze per " "questa operazione" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Più vicino" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineare / Mappatura area" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineare" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bicubico" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bicubico edged" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bicubico migliore" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bicubico più nitido" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Larghezza " #: src/otherwindow.c:1168 msgid "Height " msgstr "Altezza " #: src/otherwindow.c:1170 msgid "Original " msgstr "Originale " #: src/otherwindow.c:1176 msgid "New" msgstr "Nuovo" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Spostamento" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centra" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Mantieni proporzioni" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Cancella" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Piastrella" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Rispecchia piastrella" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Rispecchia" #: src/otherwindow.c:1221 msgid "Void" msgstr "Vuoto" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Impostazioni" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Netta riduzione immagine" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Scala tela" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Ridimensiona tela" #: src/otherwindow.c:1963 msgid "From" msgstr "Da" #: src/otherwindow.c:1963 msgid "To" msgstr "A" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Scala" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Modifica tavolozza" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Configura sovrapposizione" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Modifica colore" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Limite" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Sfera" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Angolo" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Cubo" #: src/otherwindow.c:2110 msgid "Range" msgstr "Gamma" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Inverso" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Modalità Colore-selettivo" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Opaco" #: src/otherwindow.c:2128 msgid "Border" msgstr "Bordo" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Trasparente" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Piastrella " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Gliglia intelligente" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Griglia piastrella" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Zoom minimo griglio" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Larghezza piastrella" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Altezza piastrella" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Configura griglia" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Spazio colore" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Il più larga (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Somma" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclideo" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Differenza misura" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Conversione esatta" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Usa la tavolozza corrente" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "Quantizza PNN (lento, qualità superiore)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Quantizza Wu (veloce)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Quantizza massimo-minimo (migliore per piccole tavolozze e retinatura)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Nessuno" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (veloce)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Retinato (effetto)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Diffuso (effetto)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Gamut" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Debole" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Forte" #: src/otherwindow.c:2385 msgid "Off" msgstr "Disattivato" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Separa/Somma" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Separa/Dividi" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Lunghezza / Somma" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Lunghezza/Dividi" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Crea quantizzato" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Converti a scala di colore" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Scala di colori da usare" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Tronca tavolozza" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Peso basato su diametro" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Retino" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Riduci trasparenza colore" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Serpentine scan" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Diffusione d'errore" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Diffusione d'errore selettiva" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "Precisione completa di errore" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "HSV inverso" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Costante" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Modifica gradiente" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Punti" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Inverti" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Edita personalizzato" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineare" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radiale" #: src/otherwindow.c:3018 msgid "Square" msgstr "Quadrato" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Angolare" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Conico" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Livello" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Ripeti" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A su B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A su B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "A su B (sRGB)" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A su B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A su B (HSV invertito)" #: src/otherwindow.c:3022 msgid "A only" msgstr "A soltanto" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Personalizzato" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Corrente a 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Solo corrente" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Configura gradiente" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Canale" #: src/otherwindow.c:3047 msgid "Length" msgstr "Lunghezza" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Ripeti lunghezza" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Tipo di gradiente" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Tipo di estensione" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Anteprima opacità" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "Seleziona gradiente" #: src/otherwindow.c:3220 msgid "At distance" msgstr "A distanza" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Orizzontale " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Verticale" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Immutato" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "Tracciatura immagine" #: src/otherwindow.c:3323 msgid "Source" msgstr "Fonte" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Origine" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Scala relativa" #: src/otherwindow.c:3337 msgid "Display" msgstr "Mostra" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Salvataggio %s immagine" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Caricamento %s immagine" #: src/png.c:850 msgid "Layer" msgstr "Livello" #: src/png.c:6318 msgid "Applying colour profile" msgstr "Applicazione profilo colore" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d su %d fotogrammi non potevano essere salvati come %s - salvati come PNG " "invece" #: src/png.c:6744 msgid "Explode frames" msgstr "Esplodi fotogrammi" #: src/prefs.c:146 msgid "Pressure" msgstr "Pressione" #: src/prefs.c:154 msgid "Current Device" msgstr "Periferica attuale" #: src/prefs.c:431 msgid "Default System Language" msgstr "Lingua predefinita del sistema" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Cinese" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Cinese (di Taiwan)" #: src/prefs.c:433 msgid "Czech" msgstr "Cecoslovacco" #: src/prefs.c:433 msgid "Dutch" msgstr "Olandese" #: src/prefs.c:433 msgid "English (UK)" msgstr "Inglese (regno unito)" #: src/prefs.c:433 msgid "French" msgstr "Francese" #: src/prefs.c:434 msgid "Galician" msgstr "Galiziano" #: src/prefs.c:434 msgid "German" msgstr "Tedesco" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italiano" #: src/prefs.c:435 msgid "Japanese" msgstr "Giapponese" #: src/prefs.c:435 msgid "Polish" msgstr "Polacco" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portoghese" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portoghese (Brasiliano)" #: src/prefs.c:436 msgid "Russian" msgstr "Russo" #: src/prefs.c:436 msgid "Slovak" msgstr "Slovacco" #: src/prefs.c:437 msgid "Spanish" msgstr "Spagnolo" #: src/prefs.c:437 msgid "Swedish" msgstr "Svedese" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turco" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "Punto d'ascissa (x) XBM" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "Punto d'ordinata (y) XBM" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "File aperti di recente" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Limite della barra d'avanzamento" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometria tela" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Cursore X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Seleziona geometria" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Annulla / Ripristina" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Flusso" #: src/prefs.c:457 msgid "Preferences" msgstr "Preferenze" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "Numero massimo di thread (0 per rilevarli in automatico)" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Memoria massima in uso per annullamenti" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Massimi livelli di annullamento" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "Annulla spazio su livello comune (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Usa correzione gamma come impostazione predefinita" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Ottimizza scacchiera di trasparenza" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Disabilita trasparenze nella finestra Vista" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Seleziona la tua lingua preferita\n" "\n" "Devi riavviare mtpaint perché questo cambiamento divenga effettivo" #: src/prefs.c:524 msgid "Language" msgstr "Lingua" #: src/prefs.c:529 msgid "Interface" msgstr "Interfaccia" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Sfondo in scala di grigi" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Sposta pixel nella selezione" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Dimensioni massime della finestra panoramica" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Mostra il contenuto degli appunti mentre incolli" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Cursore mouse = Strumento" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Conferma uscita" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Il tasto Q chiude Mtpaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Cambio strumento per incollare" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Centra la finestra d'impostazioni strumenti" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "La nuova immagine imposta lo zoom al 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Rotellina di scorrimento del mouse=Zoom" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Usa icone menu" #: src/prefs.c:564 msgid "Files" msgstr "File" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Leggi TGA a 16 bit come BGR 5:6:5" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Scrivi TGA dal basso in alto" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "Caricamento in corso d'immagine annullabile" #: src/prefs.c:588 msgid "Paths" msgstr "Percorsi" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "File degli appunti" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Seleziona il file dagli appunti" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Browser HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Seleziona il browser" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Locazione dell'indice del manuale" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Seleziona indice del manuale" #: src/prefs.c:605 msgid "Default Palette" msgstr "Tavolozza predefinita" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Seleziona la tavolozza predefinita" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Motivi predefiniti" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Seleziona il file coi motivi predefiniti" #: src/prefs.c:616 msgid "Default Theme" msgstr "Tema preimpostato" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "Seleziona il file del tema preimpostato" #: src/prefs.c:624 msgid "Status Bar" msgstr "Barra di stato" #: src/prefs.c:633 msgid "Tablet" msgstr "Tavoletta" #: src/prefs.c:637 msgid "Device Settings" msgstr "Impostazioni periferica" #: src/prefs.c:645 msgid "Configure Device" msgstr "Configura periferica" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Variabili del dispositivo" #: src/prefs.c:654 msgid "Factor" msgstr "Fattore" #: src/prefs.c:680 msgid "Test Area" msgstr "Area di prova" #: src/shifter.c:205 msgid "Frames" msgstr "Fotogrammi" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Cicla tavolozza" #: src/shifter.c:279 msgid "Start" msgstr "Avvia" #: src/shifter.c:281 msgid "Finish" msgstr "Termina" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Correggi tavolozza" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Azione" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Comando" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Configura le azioni file" #: src/spawn.c:515 msgid "Execute" msgstr "Esegui" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Errore %i segnalato nel tentativo di avviare %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Non riesco a trovare la documentazione. O devi scaricare il manuale di " "mtpaint dal sito web ed installarlo, oppure impostare la corretta locazione " "nella finestra delle preferenze" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "C'è stato un problema nell'avviare il browser HTML. Devi impostare il nome " "correttodel programma nella finestra delle preferenze" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "Il thread helper non risponde. Salva il lavoro ed esci dal programma." #: src/toolbar.c:233 msgid "RGB Cube" msgstr "Cubo RGB" #: src/toolbar.c:234 msgid "By image channel" msgstr "Per canale immagine" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Gradient-driven" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Impostazioni riempimento" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Preserva opacità" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Impostazioni sfumino" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "Spaziatura pennello" #: src/toolbar.c:298 msgid "Normal" msgstr "Normale" #: src/toolbar.c:299 msgid "Colour" msgstr "Colore" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Più saturato" #: src/toolbar.c:300 msgid "Multiply" msgstr "Moltiplica" #: src/toolbar.c:300 msgid "Divide" msgstr "Dividi" #: src/toolbar.c:300 msgid "Screen" msgstr "Scherma" #: src/toolbar.c:300 msgid "Dodge" msgstr "Scherma" #: src/toolbar.c:301 msgid "Burn" msgstr "Brucia" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Alte luci" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Basse luci" #: src/toolbar.c:301 msgid "Difference" msgstr "Differenza" #: src/toolbar.c:302 msgid "Darken" msgstr "Scurisci" #: src/toolbar.c:302 msgid "Lighten" msgstr "Schiarisci" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Estrai grana" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Fondi grana" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Modalità trasparente" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Modalità continua" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Modalità opacità" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Modalità colore" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Colore +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Modalità trasparente" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Disabilita tutte le maschere" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Modalità gradiente" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Barra impostazioni" #: src/toolbar.c:1041 msgid "Cut" msgstr "Taglia" #: src/toolbar.c:1042 msgid "Copy" msgstr "Copia" #: src/toolbar.c:1043 msgid "Paste" msgstr "Incolla" #: src/toolbar.c:1045 msgid "Undo" msgstr "Annulla" #: src/toolbar.c:1046 msgid "Redo" msgstr "Ripristina" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Finestra panoramica" #: src/toolbar.c:1053 msgid "Paint" msgstr "Disegno" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Mix" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Secchiello" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Linea retta" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Sfuma" #: src/toolbar.c:1058 msgid "Clone" msgstr "Clona" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Crea selezione" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Selezione poligonale" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Applica gradiente" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Selezione laccio" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Ellisse contornata" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Ellisse piena" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Contorna selezione" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Riempi selezione" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Ribalta selezione in verticale" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Ribalta selezione in orizzontale" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Ruota selezione in senso orario" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Ruota selezione in senso antiorario" #: src/viewer.c:132 msgid "About" msgstr "Informazioni su" #~ msgid "Distance to A+B" #~ msgstr "Distanza ad A+B" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "File: %s non valido - tavolozza non aggiornata" #~ msgid "Import GIF animation - Choose frames directory" #~ msgstr "Importa animazione GIF - Seleziona la cartella dei fotogrammi" #~ msgid "This is an animated GIF file. What do you want to do?" #~ msgstr "Questa è una GIF animata. Cosa vuoi farci?" #~ msgid "Edit Frames" #~ msgstr "Modifica fotogrammi" mtpaint-3.40/po/README0000644000175000000620000000010510453234272013727 0ustar muammarstaffThe po files here allow mtPaint to be translated to other languages. mtpaint-3.40/po/es.po0000644000175000000620000026105111647046422014033 0ustar muammarstaff# Spanish translations for mtpaint package # Traducciones al espanol para el paquete mtpaint. # Copyright (C) 2005 THE mtpaint'S COPYRIGHT HOLDER # This file is distributed under the same license as the mtpaint package. # Mark Tyler, 2005. # msgid "" msgstr "" "Project-Id-Version: mtpaint 0.78\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2011-01-10 04:38+0000\n" "Last-Translator: Fitoschido \n" "Language-Team: GALPon MiniNo \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2011-09-03 18:36+0000\n" "X-Generator: Launchpad (build 13830)\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Previsualización de la animación" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Reproducir" #: src/ani.c:695 msgid "Fix" msgstr "Fijar" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Cerrar" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Error" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "No se puede crear directorio de salida" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Crear fotogramas de animación" #: src/ani.c:857 msgid "Unable to save image" msgstr "No se puede guardar la imagen" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Aviso" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "¿Realmente desea limpiar todos los datos de posición y ciclo de todas las " "capas?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "No" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Sí" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Establecer número de fotogramas" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "Debe tener al menos 2 capas para crear una animación" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "Debe guardar las capas antes de crear una animación" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Configurar animación" #: src/ani.c:1064 msgid "Output Files" msgstr "Archivos de salida" #: src/ani.c:1067 msgid "Start frame" msgstr "Fotograma inicial" #: src/ani.c:1068 msgid "End frame" msgstr "Fotograma final" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Retardo" #: src/ani.c:1071 msgid "Output path" msgstr "Ruta de salida" #: src/ani.c:1072 msgid "File prefix" msgstr "Prefijo del archivo" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "Crear fotogramas GIF" #: src/ani.c:1098 msgid "Positions" msgstr "Posiciones" #: src/ani.c:1135 msgid "Cycling" msgstr "Ciclo" #: src/ani.c:1148 msgid "Save" msgstr "Guardar" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Previsualizar" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Crear fotogramas" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "La imagen es demasiado grande para la transformación." #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Degradado" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfológico" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Detección de bordes" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Realzado de bordes" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Suavizado de bordes" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Diferentes X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Desenfoque Gaussiano" #: src/canvas.c:523 msgid "Radius" msgstr "Radio" #: src/canvas.c:524 msgid "Amount" msgstr "Cantidad" #: src/canvas.c:525 msgid "Threshold " msgstr "Umbral " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Máscara de desenfoque" #: src/canvas.c:563 msgid "Outer radius" msgstr "Radio exterior" #: src/canvas.c:564 msgid "Inner radius" msgstr "Radio interior" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normalizar" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Diferencia de Gauss" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Desenfoque Kuwahara-Nagao" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "La imagen es demasiado grande para la rotación." #: src/canvas.c:668 msgid "Smooth" msgstr "Suavizado" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Rotación libre" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "No hay suficiente memoria para crear el portapapeles" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Archivo de canal no válido." #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Ver animación" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Esto es un %s animado." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "El archivo es demasiado grande, debe ser <= a anchura=%i altura=%i" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "No se pudo cargar el archivo" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "La biblioteca de archivos importados tuvo que cerrarse debido a un problema " "con el archivo (posiblemente datos incorrectos de la imagen o un archivo " "seccionado). Se ha podido cargar alguna información, ya que la cabecera está " "correcta, pero se sugiere que guarde esta imagen a un nuevo archivo, para " "que esto no vuelva a ocurrir." #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "No se puede abrir el archivo" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Formato de archivo no soportado" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "El archivo: %s ya existe. ¿Desea sobreescribirlo?" #: src/canvas.c:1524 msgid "File Found" msgstr "Archivo encontrado" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "NO" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "SÍ" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Índice de transparencia" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "Nivel de calidad JPEG (100=Alta)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "Compresión PNG (0=ninguna)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "Compresión TGA RLE" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "Compresión JPEG2000 (0=sin pérdida)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Punto en X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Formato de archivo" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Reversible" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Retardo para la animación" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "No se pudo exportar el historial de cambios" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "No se pudo exportar fichero ASCII" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "No se pudo guardar el archivo: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Cargar imagen" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Guardar imagen" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Cargar paleta" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Guardar paleta" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Exportar el historial de cambios" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Exportar el historial de cambios (a la inversa)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "Tiene que tener 16 colores o menos en la paleta para exportar arte ASCII." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "Exportar arte ASCII" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Guardar archivos de capas" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "Elige directorio de fotogramas" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Debe tener al menos un fotograma para crear un GIF animado." #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "Exportar animación GIF" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Cargar canal" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Guardar canal" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Guardar imagen compuesta" #: src/channels.c:236 msgid "Cleared" msgstr "Limpiado" #: src/channels.c:237 msgid "Set" msgstr "Establecer" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Colorear A radio B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "Mezclar A en B" #: src/channels.c:240 msgid "Image Red" msgstr "Imagen roja" #: src/channels.c:241 msgid "Image Green" msgstr "Imagen verde" #: src/channels.c:242 msgid "Image Blue" msgstr "Imagen azul" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Selección" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Máscara" #: src/channels.c:256 msgid "Create Channel" msgstr "Crear canal" #: src/channels.c:262 msgid "Channel Type" msgstr "Tipo de canal" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Estado inicial de canal" #: src/channels.c:273 msgid "Inverted" msgstr "Invertido" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "Aceptar" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Cancelar" #: src/channels.c:316 msgid "Delete Channels" msgstr "Borrar Canales" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Umbral de canal" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Rojo" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Verde" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Azul" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Matiz" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Saturación" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Valor" #: src/cpick.c:902 msgid "Hex" msgstr "Hex" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opacidad" #: src/font.c:939 msgid "Creating Font Index" msgstr "Crear índice de tipografías" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "Debe seleccionar al menos un directorio para buscar tipografías" #: src/font.c:1468 msgid "Font" msgstr "Tipografía" #: src/font.c:1469 msgid "Style" msgstr "Estilo" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Tamaño" #: src/font.c:1471 msgid "Filename" msgstr "Nombre de archivo" #: src/font.c:1471 msgid "Face" msgstr "Diseño" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Directorio" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Pegar texto" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Texto" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Introduzca aquí el texto" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Suavizar" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invertir" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Color de fondo =" #: src/font.c:1805 msgid "Oblique" msgstr "Oblicuo" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Ángulo de rotación =" #: src/font.c:1831 msgid "Font Directories" msgstr "Directorio de tipografías" #: src/font.c:1836 msgid "New Directory" msgstr "Directorio nuevo" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Seleccionar directorio" #: src/font.c:1848 msgid "Add" msgstr "Añadir" #: src/font.c:1852 msgid "Remove" msgstr "Eliminar" #: src/font.c:1856 msgid "Create Index" msgstr "Crear índice" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "No se puede acceder al directorio %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Borrar" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Renombrar" #: src/fpick.c:771 msgid "Create Directory" msgstr "Crear carpeta" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Introduzca el nuevo nombre de archivo" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Introduzca el nombre de la carpeta nueva" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Crear" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "¿Realmente desea borrar \"%s\"?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "No se puede borrar" #: src/fpick.c:843 msgid "Unable to rename" msgstr "No se puede renombrar" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "No se puede crear el directorio" #: src/fpick.c:939 msgid "Up" msgstr "Arriba" #: src/fpick.c:940 msgid "Home" msgstr "Inicio" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Crear una carpeta nueva" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Mostrar archivos ocultos" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Ordenar por nombre (ignorar min/mayúsculas)" #: src/fpick.c:1044 msgid "Name" msgstr "Nombre" #: src/fpick.c:1046 msgid "Type" msgstr "Tipo" #: src/fpick.c:1047 msgid "Modified" msgstr "Modificado" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "General" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Atajos de teclado" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Atajos de ratón" #: src/help.c:28 msgid "Credits" msgstr "Créditos" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 Los autores\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Ver la sección de «Créditos» para el listado de autores.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint es software libre; usted puede redistribuirlo y/o modificarlo bajo " "los términos de la GNU General Public License publicada por la Free Software " "Foundation; ya sea la versión 3 de la licencia, o (a su elección) cualquier " "versión posterior.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint se distribuye con la esperanza de que sea útil, pero SIN NINGUNA " "GARANTÍA; aún sin la garantía implícita de MERCANTIBILIDAD o IDONEIDAD PARA " "UN PROPÓSITO PARTICULAR. Vea la Licencia Pública General de GNU para más " "detalles.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint es un programa de dibujo GTK+1/2 sencillo diseñado para crear iconos " "y demás arte basado en píxeles. Puede editar paletas indizadas e imágenes " "RGB de 24 bits, y ofrece herramientas básicas de edición y manipulación de " "paletas. También ofrece opciones avanzadas como canales, capas y animación. " "Debido a su simplicidad carece de dependencias y se ejecuta bien en GNU/" "Linux, Windows y hardware obsoleto.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Hay una extensa documentación de las características de mtPaint en un " "manual. Si no lo tiene ya, puede descargarlo del sitio web de mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Si le gusta mtPaint y quiere mantenerse informado sobre nuevas " "actualizaciones o quiere enviar algún comentario, puede que le interese la " "lista de correo:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Crear imagen nueva" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Abrir imagen" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Guardar imagen" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Salir de la aplicación\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Seleccionar toda la imagen" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape No seleccionar nada, cancelar caja de pegado" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Copiar selección al portapapeles" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X Copiar selección al portapapeles, y pintar el patrón " "actual al área seleccionada" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" " Ctrl-V Pegar del portapapeles al centro de la vista actual" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K Pegar del portapapeles a sitio del que fue copiado" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Intro Pegar en el lienzo" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Teclas flecha Modo pintura - Mover el puntero del ratón" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Teclas flecha Modo selección - Empujar marco de selección o pegar " "de un píxel en uno" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Mayús+Teclas flecha Empujar marco de selección o pegar en x pixeles - x " "está definido en la ventana de preferencias" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Teclas flecha Mover capa o redimensionar marco de selección" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ o ] Cambia el color A al siguiente o al anterior en la paleta" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Mayús+[ o ] Cambia el color B al siguinte o al anterior en la " "paleta\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Supr Cortar imagen a la selección" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Transformar colores - ej. brillo, contraste, saturación, " "posterizar, gama" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Convertir la imagen a escala de grises" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr "" " Mayús-Ctrl-G Convertir la imagen a escala de grises (con gama " "corregida)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Dibujar un rectángulo alrededor del área de selección " "con el relleno actual" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Mayús-T Llenar el área de selección con el actual relleno" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr "" " Ctrl-L Dibujar una elipse atravesando el área de selección" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" " Ctrl-Mayús-L Dibujar una elipse rellenada atravesando el área de " "selección\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Editar los valores RGB para colores A y B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Editar toda la paleta de colores\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Preferencias" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Información\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Deshacer la última acción" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Rehacer una acción deshecha\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Ventana Ver" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Ventana Capas\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Dibujar cabeza de flecha abierta con herramienta de línea (según el " "ajuste de tamaño de flujo)" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Dibujar cabeza de flecha cerrada con herramienta de línea (según el " "ajuste de tamaño de flujo)\\n\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Zoom acercar" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Zoom alejar" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Mayús +,= Ventana Ver - Ampliar" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Mayús - Ventana Ver - Reducir\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr " 1 10% zoom" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr " 2 25% zoom" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr " 3 50% zoom" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr " 4 100% zoom" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr " 5 400% zoom" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr " 6 800% zoom" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr " 7 1200% zoom" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr " 8 1600% zoom" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% zoom\\n\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Mayús + 1 Editar canal de imagen" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Mayús + 2 Editar canal alfa" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Mayús + 3 Editar canal de selección" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Mayús + 4 Editar canal de máscara\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Ayuda" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Elegir patrón" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Elegir brocha" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Herramienta de pintura" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Conmutar barra de herramientas principal" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Conmutar barra de herramientas de Herramientas" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Conmutar barra de herramientas de Preferencias" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Conmutar paleta" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Herramienta de selección" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Conmutar área acoplada\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Guardar el portapapeles actual al archivo 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Mayús + F1 - F12 Cargar portapapeles desde el archivo 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Establecer opacidad al 10%, 20%, ... , 100% (números " "de teclado principal o numérico)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + o = Incrementar la opacidad en 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Disminuir la opacidad en 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Inicio Mostrar o esconder el menú de la ventana principal/barra " "de estado/paleta" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Re Pág Escalar imagen" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Av Pág Redimensionar lienzo" #: src/help.c:128 msgid " End Pan Window" msgstr " Fin Quitar ventana" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " Botón Izquierdo Pinta en el lienzo usando la herramienta activa" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr " Botón central Fija el centro para el siguiente zoom" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Botón Derecho Pega en el lienzo / Termina el trazado de una linea / " "Cancela una selección\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Rueda de Desplazamiento En GTK+2 el usuario puede activar el zoom con la " "rueda de desplazamiento en la ventana de preferencias\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+Botón izquierdo Elegir color A con el ratón" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+Botón central Crea color A/B y patrón de puntos basado en " "colores RGB en A (solo imágenes RGB)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Botón derecho Elegir color B con el ratón" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+Rueda de desplazamiento Moverse en la ventana principal a la " "izquierda ou a la derecha\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctrl + doble clic establece el color intermedio para A o B que esté bajo " "el pincel o la selección marcada (solo para RGB)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Mays+Botón Derecho Fija el centro para el zoom siguiente\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "Puede fijar las coordenadas X/Y mientras mueve el ratón:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr "" " Mayús Restringe los movimientos del ratón a una línea " "vertical" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr "" " Mayús+Ctrl Restringe los movimientos del ratón a una línea " "horizontal" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint es mantenido por Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "Las siguientes personas (en orden alfabético) han contribuido directamente " "en el projecto y, por tanto, se les agradece enormemente su generosidad y " "duro trabajo:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Autores\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - Contribuyó como desarrollador en la versión 2.30. Principal " "desarrollador y mantenedor a partir de la versión 3.00 hasta la actualidad." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Autor original y mantenedor hasta la versión 3.00, " "contribuyente ocasional desde entonces." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Escribió el metodo de cuantización Wu - ver wu.c para más " "información\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Contribuciones generales (comentarios e ideas de mejora a menos que se " "indique lo contrario)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - Rediseño del sitio web, abril 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Creó Gifsicle que es necesario para la creación y " "visualización de archivos GIF animados http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex Team (Junta de Andalucia) - página man, registro en Launchpad/" "Rosetta" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Afonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Traducciones\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Portugues brasilero - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Checo - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Holandés - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Francés - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Gallego (Galicia) - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Alemán - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italiano - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Japones - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Polaco - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugues - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Ruso - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Chino simplificado - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Eslovaco - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Español - Guadalinex Team (Junta de Andalucia), Antonio Sánchez León, Miguel " "Anxo Bouzada, Francisco José Rey" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Sueco - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Chino Taiwanes - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turco - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Información" #: src/info.c:290 msgid "Memory" msgstr "Memoria" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Memoria total disponible para principal + deshacer imagenes" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Deshacer / Rehacer/ Máximo número de niveles usados" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Portapapeles" #: src/info.c:311 msgid "Unused" msgstr "Sin usar" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Portapapeles = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Portapapeles = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Píxeles RGB aislados" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Capas" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Consumo total de memoria de la capa" #: src/info.c:350 msgid "Colour Histogram" msgstr "Histograma de color" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Total de colores indexados - %i de %i usados" #: src/info.c:391 msgid "Index" msgstr "Índice" #: src/info.c:392 msgid "Canvas pixels" msgstr "Píxeles del lienzo" #: src/info.c:407 msgid "Orphans" msgstr "Huérfanos" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "No se pudo encontrar la carpeta local. Se está usando la carpeta actual como " "local." #: src/layer.c:70 msgid "Background" msgstr "Fondo" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Modificado)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Sin título" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "¿Realmente desea borrar la capa %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Una o más capas contienen cambios que no se han guardado. ¿Seguro que quiere " "perder estos cambios?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Cancelar operación" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Perder los cambios" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d capas fallaron al cargar" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "No se guardaron una o más capas de la imagen. Debe guardar cada imagen " "individualmente para cargar la imagen compuesta en el futuro." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "¿Está seguro de que quiere borrar todas las capas?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "No puede añadir más capas." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Capa nueva" #: src/layer.c:1160 msgid "Raise" msgstr "Elevar" #: src/layer.c:1161 msgid "Lower" msgstr "Bajar" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Duplicar capa" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Centrar capa" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Borrar capa" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Cerrar ventana de capas" #: src/layer.c:1268 msgid "Layer Name" msgstr "Nombre de capa" #: src/layer.c:1269 msgid "Position" msgstr "Posición" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Color transparente" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Mostrar todas las capas en la ventana principal" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "No había colores sin usar para eliminar!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "La paleta no contiene 2 colores que posean idénticos valores RGB" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "La paleta contiene %i colores que tienen idénticos valores RGB. ¿Quiere " "fusionarlos en uno y realinear el lienzo?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "indexado" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "Está tratando de guardar una imagen %s en un archivo %s, lo que no es " "posible. Le sugerimos que lo guarde con la extensión PNG." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "Está tratando de guardar un archivo %s con una paleta de más de %d colores. " "Use otro formato o reduzca la paleta a %d colores." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "Está tratando de guardar un archivo XPM con más de 4096 colores. Use otro " "formato o posterize la imagen a 4 bits, o también reduzca el número de " "colores." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "No se pudo cargar el portapapeles" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "No se pudo guardar el portapapeles" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Este lienzo/paleta contiene cambios que no han sido guardados. ¿Seguro que " "quiere perderlos?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Imagen" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "¿Está seguro de querer salir?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Archivo" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nuevo" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Abrir ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Guardar" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Guardar como ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Exportar el historial de imágenes ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Exportar el historial de imágenes (a la inversa) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Exportar arte ASCII ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Exportar GIF animado ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Acciones" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Configurar" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Salir" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Editar" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Deshacer" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Rehacer" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Cortar" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Copiar" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Copiar a la paleta" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Pegar en el centro" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//Pegar en una nueva capa" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Pegar" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Pegar Texto" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Pegar texto (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Pegar paleta" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Cargar portapapeles" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Guardar portapapeles" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importar de portapapeles del sistema" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Exportar al portapapeles del sistema" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Escoger patrón ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Escoger brocha ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Ver" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Mostrar barra de herramientas principal" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Mostrar barra de herramientas" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Mostrar barra de preferencias" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Mostrar acoplamiento" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Mostrar paleta" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Mostrar barra de estado" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Cambiar a vista completa" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Centrar imagen" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Mostrar rejilla de ampliación" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Configurar rejilla ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//Trazado de imagen ..." #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Ver ventana" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Dividir en horizontal" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Ver ventana en foco" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Vista reducida" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Ventana de capas" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Imagen" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Convertir a RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Convertir a indexado ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Escalar lienzo ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Redimensionar lienzo ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Recortar" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Voltear verticalmente" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Voltear horizontalmente" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Rotar en sentido horario" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Rotar en sentido anti horario" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Rotar libremente ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Inclinar ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Información ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Preferencias ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Selección" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Seleccionar todo" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Eliminar selección (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Selección de lazo" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Cortar selección de lazo" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Contorno de selección" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Llenar selección" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Contorno de elipse" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Rellenar elipse" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//Rampa horizontal" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//Rampa vertical" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Mezclar alfa A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Mover alfa a máscara" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Enmascarar colores A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Desenmascarar colores A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Enmascarar todos los colores" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Limpiar máscara" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Paleta" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Cargar ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Cargar valores por defecto" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Enmascarar todo" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//No enmascarar nada" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//Intercambiar A y B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Editar colores A y B ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Editar paleta ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Establecer el tamaño de la paleta ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Fusionar Duplicar colores" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Eliminar colores no usados" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Crear cuantificado ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Listar colores ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Paleta «Shifter» ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Efe_ctos" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Transformar color ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invertir" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Escala de grises" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Escala de grises (Gama corregida)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Transformación isométrica" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///hacia abajo lado izquierdo" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///hacia abajo lado derecho" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///hacia la derecha parte superior" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///hacia la derecha parte inferior" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Detección de bordes ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//Diferencia de Gauss ..." #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Remarcado ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Máscara de desenfoque ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Suavizado ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Suavizado Gaussiano ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Difuminado Kuwahara-Nagao ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Realce" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//Dilatar" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Erosionar" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//«Bacteria» ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Canales" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nuevo ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "" #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Editar imagen" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Editar alfa" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Editar selección" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Editar máscara" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Esconder imagen" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Deshabilitar alfa" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Deshabilitar selección" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Deshabilitar máscara" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//Unir operaciones RGBA" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Umbral ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Disociar alfa" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Ver alfa como un revestimiento" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Configurar revestimientos ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/Capas" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nueva capa" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Guardar imagen compuesta ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Componer en una capa nueva" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Borrar todas las capas" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Configurar animación ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Vista previa de animación ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Establecer número de fotogramas ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Borrar todos los fotogramas ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Más" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/_Ayuda" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Documentación" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Acerca de" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Vincular teclas de acceso rápido" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Convertir a paleta indexada" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Efecto «bacteria»" #: src/memory.c:4744 msgid "Rotating" msgstr "Rotando" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Rotación libre" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Escalando la imagen" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Contando pixeles RGB únicos" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Aplicando efecto" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Filtro Kuwahara-Nagao" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Inclinar" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Espere por favor ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Buscar" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gama corregida" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "RGB de 24 bits" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Escala de grises" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Paleta indexada" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Del portapapeles" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Capturar pantalla" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nueva imagen" #: src/otherwindow.c:288 msgid "Width" msgstr "Anchura" #: src/otherwindow.c:289 msgid "Height" msgstr "Altura" #: src/otherwindow.c:290 msgid "Colours" msgstr "Colores" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Selector de patrón" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Establecer el tamaño de la paleta" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Aplicar" #: src/otherwindow.c:599 msgid "Luminance" msgstr "Luminancia" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Brillo" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Distancia a A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Proyección A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frecuencia" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Mostrar paleta de colores" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Inicio del índice" #: src/otherwindow.c:617 msgid "End Index" msgstr "Fin del índice" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Invertir el orden" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contraste" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Posterizar" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gama" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Tansformar el color" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Mostrar detalle" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Valores guardados" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Paleta" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto previsualización" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Restablecer" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "La nueva geometría es la misma que la actual - No se hace nada" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "El sistema operativo no puede asignar memoria para esta operación." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "No ha asignado la suficiente memoria en la ventana de preferencias para esta " "operación." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Vecino más cercano" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineal / Mapeo de área" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineal" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bicúbico" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bicúbico recortado" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bicúbico mejorado" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bicúbico realzado" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "" #: src/otherwindow.c:1167 msgid "Width " msgstr "Ancho " #: src/otherwindow.c:1168 msgid "Height " msgstr "Alto " #: src/otherwindow.c:1170 msgid "Original " msgstr "Original " #: src/otherwindow.c:1176 msgid "New" msgstr "Nuevo" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Compensar" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centrado" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Fijar Relación Alto/Ancho" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Limpiar" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Mosaico" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Mosaico de espejo" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Espejo" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Preferencias" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Reducción enfocada de imagen" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Escalar el lienzo" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Redimensionar el lienzo" #: src/otherwindow.c:1963 msgid "From" msgstr "Desde" #: src/otherwindow.c:1963 msgid "To" msgstr "Hacia" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Escala" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Editor de paleta" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Configurar revestimientos" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Editor de colores" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Límite" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Esfera" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Ángulo" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Cubo" #: src/otherwindow.c:2110 msgid "Range" msgstr "Rango" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Inverso" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Color-modo de selección" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Opaco" #: src/otherwindow.c:2128 msgid "Border" msgstr "Borde" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Transparente" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Mosaico " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Rejilla inteligente" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Rejilla de mosaico" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Mínima ampliación de la rejilla" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Anchura del mosaico" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Altura del mosaico" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Configurar la rejilla" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Espacio de color" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "El más grande" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Suma (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclidiano (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Diferencia de medida" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Conversión exacta" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Usar paleta actual" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "Cuantificar PNN (lento, mejor calidad)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Cuantificar «Wu» (rápido)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Cuantificar «Max-Min» (mejor para pequeñas paletas y punteados)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Ninguno" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "«Floyd-Steinberg»" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "«Stucki»" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (rápido)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Punteado (efecto)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Disperso (efecto)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Fuera de gama" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Débil" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Fuerte" #: src/otherwindow.c:2385 msgid "Off" msgstr "Apagado" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Separar/Sumar" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Separar/Cortar" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Longitud/Sumar" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Longitud/Cortar" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Crear cuantificado" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Convertir a Indexado" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Colores indexados a usar" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Paleta truncada" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Basado en la ponderación del diámetro" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Punteado" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Reducir color sangrado" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Exploración serpeante" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Error de propagación, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Error selectivo de propagación" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "Error total de precisión" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "Atrás HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Constante" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Editar gradación" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Puntos:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Inverso" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Editar personalización" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineal" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radial" #: src/otherwindow.c:3018 msgid "Square" msgstr "Cuadrado" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Angular" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Cónico" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Nivel" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Repetir" #: src/otherwindow.c:3021 msgid "A to B" msgstr "de A a B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "de A a B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "de A a B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "de A a B (volver HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Uno solo" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Personalizado" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Actual a 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Actual solo" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Configurar gradación" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Canal" #: src/otherwindow.c:3047 msgid "Length" msgstr "Longitud" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Repetir longitud" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Tipo de gradación" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Tipo de extensión" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Previsualizar opacidad" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "A distancia" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horizontal " #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Vertical" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Sin cambios" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "Trazando imagen" #: src/otherwindow.c:3323 msgid "Source" msgstr "Origen" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Origen" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Escala Relativa" #: src/otherwindow.c:3337 msgid "Display" msgstr "Mostrar" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Guardar imagen %s" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Cargando imagen %s" #: src/png.c:850 msgid "Layer" msgstr "Capa" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "%d fuera de %d fotogramas no se guardaron como %s - guardados como PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Presión" #: src/prefs.c:154 msgid "Current Device" msgstr "Dispositivo actual" #: src/prefs.c:431 msgid "Default System Language" msgstr "Lenguaje predefinido" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Hino (Simplificado)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Chino (Taiwanés)" #: src/prefs.c:433 msgid "Czech" msgstr "Checo" #: src/prefs.c:433 msgid "Dutch" msgstr "Holandés" #: src/prefs.c:433 msgid "English (UK)" msgstr "Inglés (Reino Unido)" #: src/prefs.c:433 msgid "French" msgstr "Francés" #: src/prefs.c:434 msgid "Galician" msgstr "Galego" #: src/prefs.c:434 msgid "German" msgstr "Alemán" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italiano" #: src/prefs.c:435 msgid "Japanese" msgstr "Japonés" #: src/prefs.c:435 msgid "Polish" msgstr "Polaco" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugués" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugués (Brasileño)" #: src/prefs.c:436 msgid "Russian" msgstr "Ruso" #: src/prefs.c:436 msgid "Slovak" msgstr "Eslovaco" #: src/prefs.c:437 msgid "Spanish" msgstr "Español" #: src/prefs.c:437 msgid "Swedish" msgstr "Sueco" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turco" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "Referencia XBM X" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "Referencia XBM Y" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Archivos recientes" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Límite de silencio de la barra de progreso" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometría del lienzo" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Cursor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Píxel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Selección de geometria" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Deshacer /Rehacer" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Flujo" #: src/prefs.c:457 msgid "Preferences" msgstr "Preferencias" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Máxima memoria usada para deshacer (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Nivel máximo de deshacer" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "Porcentaje de espacio que elimina la capa común (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Unar corrección gama por defecto" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Optimiza comprobación alpha" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Deshabilitar ventana de transparencias" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Seleccione la traducción al idioma deseado\n" "\n" "Necesita reiniciar mtPaint\n" "para que esto tenga efecto" #: src/prefs.c:524 msgid "Language" msgstr "Idioma" #: src/prefs.c:529 msgid "Interface" msgstr "Interfaz" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Fondo de grises" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Selección mover pixeles" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Máximo Tamaño de ventana reducida" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Mostrar portapapeles mientras se pega" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Movimiento del ratón = Herramienta" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Confirmar salir" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Pulse Q para salir de mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "El cambio de herramienta implica el pegado" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Preferencias de herramienta de centrado" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "La nueva imagen establece el zoom al 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Rueda del ratón = Ampliar" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Usar iconos de menú" #: src/prefs.c:564 msgid "Files" msgstr "Archivos" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Leer 16-bit TGAs como 5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Escribir TGAs de abajo a arriba según la orden" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "Carga reversible de imagenes" #: src/prefs.c:588 msgid "Paths" msgstr "Rutas" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Archivos del portapapeles" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Seleccione portapapeles" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "Programa navegador HTML" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Selecciona programa de navegación" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Localización del archivo índice del manual" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Selecciona el archivo índice del manual" #: src/prefs.c:605 msgid "Default Palette" msgstr "Paleta predeterminada" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Seleccionar paleta predeterminada" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Patrones predeterminados" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Seleccionar archivos de patrones" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Barra de estado" #: src/prefs.c:633 msgid "Tablet" msgstr "Tableta" #: src/prefs.c:637 msgid "Device Settings" msgstr "Parámetros de dispositivo" #: src/prefs.c:645 msgid "Configure Device" msgstr "Configurar dispositivo" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Variables del lápiz" #: src/prefs.c:654 msgid "Factor" msgstr "Factor" #: src/prefs.c:680 msgid "Test Area" msgstr "Area de prueba" #: src/shifter.c:205 msgid "Frames" msgstr "Fotogramas" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Paleta «Shifter»" #: src/shifter.c:279 msgid "Start" msgstr "Empezar" #: src/shifter.c:281 msgid "Finish" msgstr "Terminar" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Fijar paleta" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Acción" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Orden" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Configurar acciones de archivos" #: src/spawn.c:515 msgid "Execute" msgstr "Ejecutar" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Se produjo un errr %i cuando se intentaba cargar %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "No se puede encontrar la documentación. Necesitas descargar el manual de " "mtPaint e instalarlo, o establece la correcta localización en la ventana de " "preferencias." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Hay un problema arrancando el navegador HTML. Necesitas establecer un " "programa de navegación en la ventana de preferencias." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "Cubo RGB" #: src/toolbar.c:234 msgid "By image channel" msgstr "Por imagen de canal" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Ejecutar-gradación" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Preferencias de relleno" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Respetar opacidad" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Preferencias de emborronado" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "Espaciado de brocha" #: src/toolbar.c:298 msgid "Normal" msgstr "Normal" #: src/toolbar.c:299 msgid "Colour" msgstr "Color" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Saturar más" #: src/toolbar.c:300 msgid "Multiply" msgstr "Multiplicar" #: src/toolbar.c:300 msgid "Divide" msgstr "Dividir" #: src/toolbar.c:300 msgid "Screen" msgstr "Pantalla" #: src/toolbar.c:300 msgid "Dodge" msgstr "Blanquear" #: src/toolbar.c:301 msgid "Burn" msgstr "Ennegrecer" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Claridad fuerte" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Claridad suave" #: src/toolbar.c:301 msgid "Difference" msgstr "Diferencia" #: src/toolbar.c:302 msgid "Darken" msgstr "Oscurecer" #: src/toolbar.c:302 msgid "Lighten" msgstr "Clarear" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Extraer granulado" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Combinar granulado" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Mod de mezcla" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Modo continuo" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Modo opaco" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Modo teñido" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Teñido +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Modo de mezcla" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Deshabilitar todas las máscaras" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Modo gradación" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Barra de propiedades" #: src/toolbar.c:1041 msgid "Cut" msgstr "Cortar" #: src/toolbar.c:1042 msgid "Copy" msgstr "Copiar" #: src/toolbar.c:1043 msgid "Paste" msgstr "Pegar" #: src/toolbar.c:1045 msgid "Undo" msgstr "Deshacer" #: src/toolbar.c:1046 msgid "Redo" msgstr "Rehacer" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Vista preliminar" #: src/toolbar.c:1053 msgid "Paint" msgstr "Dibujar" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Emborronar" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Rellenar con pintura" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Línea recta" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Emborronar" #: src/toolbar.c:1058 msgid "Clone" msgstr "Clonar" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Realizar selección" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Selección poligonal" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Situar gradación" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "Selección libre" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Contorno de elipse" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Elipse rellena" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Resaltar la selección" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Rellenar la selección" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Voltear la selección verticalmente" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Voltear la selección horizontalmente" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Rotar la selección en sentido horario" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Rotar la selección en sentido anti horario" #: src/viewer.c:132 msgid "About" msgstr "Acerca de" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "El archivo: %s no es válido - La paleta no se actualizó" #~ msgid "Distance to A+B" #~ msgstr "Distancia a A+B" #~ msgid "Edit Frames" #~ msgstr "Editar fotogramas" #~ msgid "Not enough memory to rotate image" #~ msgstr "No hay suficiente memoria para rotar la imagen" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "No hay suficiente memoria para rotar el portapapeles" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "" #~ "Archivo demasiado grande, su tamaño debe ser <= anchura=%i altura=%i : %s" #~ msgid "Could not open %s: %s" #~ msgstr "No se pudo abrir %s: %s" #~ msgid "Error closing %s: %s" #~ msgstr "Error al cerrar %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "No se pudo escribir a %s: %s" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "La paleta no contiene suficientes colores para hacer una fusión" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Hay demasiados elementos en la paleta a reducir." #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "" #~ "El archivo de patrones -patterns_user.c- no pudo abrirse en el directorio " #~ "actual" #~ msgid "Done" #~ msgstr "Hecho" #~ msgid "patterns_user.c created in current directory" #~ msgstr "" #~ "El archivo de patrones -patterns_user.c- no pudo abrirse en el directorio " #~ "actual" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "La imagen actual no tiene las dimensiones 94x94x3 así que no puedo crear " #~ "el fichero de patrones patterns_user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está intentando guardar una imagen RGB a un fichero XPM, lo cual no es " #~ "posible. Sugiero que lo guarde con extensión PNG." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está intentando guardar una imagen RGB a un fichero GIF, lo cual no es " #~ "posible. Sugiero que lo guarde con extensión PNG." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "Está intentando guardar un fichero XBM con una paleta de mas de 2 " #~ "colores. Reduzca la paleta a 2 colores o use otro formato." #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "Está intentando guardar un lienzo a un fichero JPEG, lo cual no es " #~ "posible.Le sugiero que lo guarde con extensión PNG." #~ msgid "/Edit/Create Patterns" #~ msgstr "/Editar/Crear Patrones" #~ msgid "/View/Command Line Window" #~ msgstr "/Ver/Línea de comandos" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Paleta/Crear Cantidades (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Paleta/Crear Cantidades (DL3)" #~ msgid "/File/%i" #~ msgstr "/Archivo/%i" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "Calidad JPEG Guardado (100=Alta) " #~ msgid "DL1 Quantize (fastest)" #~ msgstr "Ponderado DL1 (el más rápido)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "Ponderado DL3 (muy lento, mejor calidad)" #~ msgid "Loading PNG image" #~ msgstr "Cargar imagen PNG" #~ msgid "Loading clipboard image" #~ msgstr "Cargar imagen del Portapapeles" #~ msgid "Saving PNG image" #~ msgstr "Guardar imagen PNG" #~ msgid "Saving Clipboard image" #~ msgstr "Guardar imagen del Portapapeles" #~ msgid "Saving Layer image" #~ msgstr "Guardar imagen de la capa" #~ msgid "Loading GIF image" #~ msgstr "Cargar imagen GIF" #~ msgid "Saving GIF image" #~ msgstr "Guardar imagen GIF" #~ msgid "Loading JPEG image" #~ msgstr "Cargar imagen JPEG" #~ msgid "Saving JPEG image" #~ msgstr "Guardar imagen JPEG" #~ msgid "Loading TIFF image" #~ msgstr "Cargar imagen TIFF" #~ msgid "Saving TIFF image" #~ msgstr "Guardar imagen TIFF" #~ msgid "Loading BMP image" #~ msgstr "Cargar imagen BMP" #~ msgid "Saving BMP image" #~ msgstr "Guardar imagen BMP" #~ msgid "Loading XPM image" #~ msgstr "Cargar imagen XPM" #~ msgid "Saving XPM image" #~ msgstr "Guardar imagen XPM" #~ msgid "Loading XBM image" #~ msgstr "Cargar imagen XBM" #~ msgid "Saving XBM image" #~ msgstr "Guardar imagen XBM" #~ msgid "Saving UNDO images" #~ msgstr "Guardando histórico de imagenes" #~ msgid "%i Files on Command Line" #~ msgstr "%i Archivos en la línea de ordenes" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Paleta/Crear Cuantificado (Wu)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Cuantificación Wu (el mejor método para paletas pequeñas)" #~ msgid "Grid colour RGB" #~ msgstr "Color RGB de la rejilla" #~ msgid "Zoom" #~ msgstr "Ampliación" #~ msgid "Lanczos3" #~ msgstr "Lanczos3" #~ msgid "Saving Channel image" #~ msgstr "Guardar imagen de canal" #~ msgid "Loading LSS16 image" #~ msgstr "Cargar imagen LSS16" #~ msgid "Saving LSS16 image" #~ msgstr "Guardar imagen LSS16" #~ msgid " C Command Line Window" #~ msgstr " C Ventana de línea de ordenes" #~ msgid "/File/Actions/sep2" #~ msgstr "/Archivo/Actions/sep2" #~ msgid "/Frames" #~ msgstr "/Fotogramas" #~ msgid "/File/Actions/%i" #~ msgstr "/Archivo/Actions/%i" mtpaint-3.40/po/nl.po0000644000175000000620000026036511647046422014044 0ustar muammarstaff# Dutch translations for mtpaint package # Copyright (C) 2005 THE mtpaint'S COPYRIGHT HOLDER # This file is distributed under the same license as the mtpaint package. # Mark Tyler, 2005. # msgid "" msgstr "" "Project-Id-Version: mtpaint-3.20 dutch\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2008-112-31 23:24+0100\n" "Last-Translator: Hans Strijards hannesworst@hotmail.com>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Dutch\n" "X-Poedit-Country: Nederland\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "Animatie Preview" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "Afspelen" #: src/ani.c:695 msgid "Fix" msgstr "Herstel" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "Sluiten" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "Fout" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "Kan geen map voor output aanmaken" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "Kaders aanmaken voor animatie" #: src/ani.c:857 msgid "Unable to save image" msgstr "Niet in staat afbeelding te bewaren" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "Waarschuwing" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "" "Wilt u werkelijk voor alle lagen de positie- en kantelgegevens opruimen?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "Nee" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "Ja" #: src/ani.c:993 msgid "Set Key Frame" msgstr "Hoofdkader instellen" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "U moet tenminste 2 lagen aanmaken voor een animatie" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "U moet uw lagenbestand bewaren voordat u een animatie kunt maken" #: src/ani.c:1054 msgid "Configure Animation" msgstr "Animatie aanmaken" #: src/ani.c:1064 msgid "Output Files" msgstr "Output-bestanden" #: src/ani.c:1067 msgid "Start frame" msgstr "Kader opstarten" #: src/ani.c:1068 msgid "End frame" msgstr "Kader afsluiten" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "Uitstellen" #: src/ani.c:1071 msgid "Output path" msgstr "Uitvoer-pad" #: src/ani.c:1072 msgid "File prefix" msgstr "Voorvoegsel voor bestand" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "GIF-kader aanmaken" #: src/ani.c:1098 msgid "Positions" msgstr "Posities" #: src/ani.c:1135 msgid "Cycling" msgstr "Kantelen" #: src/ani.c:1148 msgid "Save" msgstr "Bewaren" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "Preview" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "Kaders aanmaken" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "De afbeelding is te groot om om te zetten." #: src/canvas.c:399 msgid "MT" msgstr "MT" #: src/canvas.c:399 msgid "Sobel" msgstr "Sobel" #: src/canvas.c:399 msgid "Prewitt" msgstr "Prewitt" #: src/canvas.c:399 msgid "Kirsch" msgstr "Kirsch" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "Gradiënt" #: src/canvas.c:400 msgid "Roberts" msgstr "Roberts" #: src/canvas.c:400 msgid "Laplace" msgstr "Laplace" #: src/canvas.c:400 msgid "Morphological" msgstr "Morfologisch" #: src/canvas.c:405 msgid "Edge Detect" msgstr "Hoek bepalen" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "Hoeken aanscherpen" #: src/canvas.c:429 msgid "Edge Soften" msgstr "Hoeken minder scherp maken" #: src/canvas.c:481 msgid "Different X/Y" msgstr "Verschil X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "Guassiaans vervagen" #: src/canvas.c:523 msgid "Radius" msgstr "Radius" #: src/canvas.c:524 msgid "Amount" msgstr "Totaal" #: src/canvas.c:525 msgid "Threshold " msgstr "Drempel " #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "Vervagend maskereren" #: src/canvas.c:563 msgid "Outer radius" msgstr "Omtrek" #: src/canvas.c:564 msgid "Inner radius" msgstr "Binnenradius" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "Normaliseren" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "Verschillende soorten Gaussiaanse wazen" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "Kuwahara-Nagao vervagen" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "De afbeelding is te groot om te kantelen." #: src/canvas.c:668 msgid "Smooth" msgstr "Zacht" #: src/canvas.c:670 msgid "Free Rotate" msgstr "Vrij roteren" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "Onvoldoende geheugen om Klembord aan te maken" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "Ongeldig kanaalbestand" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "Animatie bekijken" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "Dit is een %s-bestand met animatie." #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "Bestand is te groot, moet <= dan de breedte=%i hoogte=%i zijn" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "Kan bestand niet laden" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "De bibiotheek voor importbestanden werd afgesloten vanwege een probleem met " "het bestand (mogelijk corrupte beeldgegevens of een afgebroken bestand). Ik " "ben erin geslaagd bepaalde gegevens te laden, aangezien de header in orde " "is, maar ik stel voor dat u dit bestand in een nieuwe folder opslaat om " "herhaling te voorkomen" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "Kan bestand niet openen" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "Bestandsformaat niet ondersteund" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "Bestand: %s bestaat al. Wilt u het overschrijven?" #: src/canvas.c:1524 msgid "File Found" msgstr "Bestand gevonden" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "Nee" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "Ja" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "Transparantie-index" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG kwaliteit behouden(100=Hoog)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "PNG-compressie(0=geen)" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "TGA RLE-compressie" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "JPEG2000-compressie (0=zonder verlies)" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "Centraal punt op X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "Bestandsformaat" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "Onuitvoerbaar" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "Uitstel van animatie" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "Niet mogelijk om gewiste afbeeldingen uit te voeren" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "Niet in staat om ASCII-bestand uit te voeren" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "Niet mogelijk om bestand te bewaren: %s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "Afbeelding laden" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "Afbeelding opslaan" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "Palet laden" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "Palet opslaan" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "Afbeelding wissen" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "Afbeelding wissen (terugwerkend)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "" "Er kunnen maar maximaal 16 of minder paletkleuren zijn om onder te brengen " "in een ASCII-bestand." #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "ASCII uitvoeren" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "Bestandslagen opslaan" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "Voor een GIF-animatie moet u tenminste één kader opslaan" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "GIF-animatie uitvoeren" #: src/canvas.c:2136 msgid "Load Channel" msgstr "Invoerkanaal laden" #: src/canvas.c:2140 msgid "Save Channel" msgstr "Invoerkanaal opslaan" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "Samengestelde afbeelding opslaan" #: src/channels.c:236 msgid "Cleared" msgstr "Gewist" #: src/channels.c:237 msgid "Set" msgstr "Instellen" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "Kleur A van radius B instellen" #: src/channels.c:239 msgid "Set blend A to B" msgstr "A met B mengen" #: src/channels.c:240 msgid "Image Red" msgstr "Rood kleuren" #: src/channels.c:241 msgid "Image Green" msgstr "Groen kleuren" #: src/channels.c:242 msgid "Image Blue" msgstr "Blauw kleuren" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "Alfa" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "Selectie" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "Maskeren" #: src/channels.c:256 msgid "Create Channel" msgstr "Invoerkanaal aanmaken" #: src/channels.c:262 msgid "Channel Type" msgstr "Kanaaltype" #: src/channels.c:269 msgid "Initial Channel State" msgstr "Aanvankelijk staat van het kanaal" #: src/channels.c:273 msgid "Inverted" msgstr "Ingevoegd" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "Bevestig" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "Verwerpen" #: src/channels.c:316 msgid "Delete Channels" msgstr "Kanaal wissen" #: src/channels.c:373 msgid "Threshold Channel" msgstr "Drempelkanaal" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "Rood" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "Groen" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "Blauw" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "Tint" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "Verzadiging" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "Waarde" #: src/cpick.c:902 msgid "Hex" msgstr "Hex" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "Opaciteit" #: src/font.c:939 msgid "Creating Font Index" msgstr "Font-index aanmaken" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "U moet tenminste een folder kiezen om een font te zoeken." #: src/font.c:1468 msgid "Font" msgstr "Font" #: src/font.c:1469 msgid "Style" msgstr "Stijl" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "Grootte" #: src/font.c:1471 msgid "Filename" msgstr "Bestandsnaam" #: src/font.c:1471 msgid "Face" msgstr "Gezicht" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "Folder" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "Tekst plakken" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "Tekst" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "Tekst hier invoegen" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "Anti-alias" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "Invoegen" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "Achtergrondkleur =" #: src/font.c:1805 msgid "Oblique" msgstr "Schuin" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "Rotatiehoek =" #: src/font.c:1831 msgid "Font Directories" msgstr "Font folders" #: src/font.c:1836 msgid "New Directory" msgstr "Nieuwe folder" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "Folder kiezen" #: src/font.c:1848 msgid "Add" msgstr "Toevoegen" #: src/font.c:1852 msgid "Remove" msgstr "Verwijderen" #: src/font.c:1856 msgid "Create Index" msgstr "Index aanmaken" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "Geen toegang tot folder %s" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "Wissen" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "Hernoemen" #: src/fpick.c:771 msgid "Create Directory" msgstr "Folder aanmaken" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "Nieuwe bestandsnaam invoeren" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "Naam van de nieuwe folder invoeren" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "Aanmaken" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "Wilt u het écht wissen \"%s\" ?" #: src/fpick.c:838 msgid "Unable to delete" msgstr "Wissen onmogelijk" #: src/fpick.c:843 msgid "Unable to rename" msgstr "Hernoemen onmogelijk" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "Niet mogelijk om een neuwe folder aan te maken" #: src/fpick.c:939 msgid "Up" msgstr "Omhoog" #: src/fpick.c:940 msgid "Home" msgstr "Home" #: src/fpick.c:941 msgid "Create New Directory" msgstr "Nieuwe folder aanmaken" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "Toon verborgen bestanden" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "Niet-hoofdlettergevoelige ordening" #: src/fpick.c:1044 msgid "Name" msgstr "Naam" #: src/fpick.c:1046 msgid "Type" msgstr "Type" #: src/fpick.c:1047 msgid "Modified" msgstr "Aangepast" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "Algemeen" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "Sneltoetsen" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "Sneltoetsen met de muis" #: src/help.c:28 msgid "Credits" msgstr "Met dank aan" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - Copyright (C) 2004-2011 De auteurs\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "Voor alle auteurs, zie sectie 'Met dank aan'.\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint is vrije software; het mag vrijelijk worden verspreid en of " "aangepast onder de bepalingen van de GNU General Public License zoals die " "zijn gepubliceerd door de Free Software Foundation; iedere versie 3 van de " "licentie, of (indien noodzakelijk) een latere versie.\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint is verspreid vanuit de hoop dat het programma voor u bruikbaar is, " "maar ZONDER GARANTIE; zonder zelfs de ingesloten garantie van " "VERKOOPBAARHEID of GESCHIKTHEID VOOR EEN SPECIFIEK DOEL. Zie voor meer " "details de GNU General Public License.\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint is een eenvoudig GTK+1/2 tekenprogramma, ontworpen om iconen en " "pixel-gebaseerde afbeeldingen te maken. Men kan ermee een geïndexeerd " "kleurenpalet bewerken of 24 bits RGB afbeeldingen. Het biedt de mogelijkheid " "om eenvoudige kleurenafbeeldingen te ontwerpen. Het programma beschikt " "echter over meer mogelijkheden, zoals het uivoeren van kanalen, " "verschillende lagen en animaties. Vanwege de eenvoud, omdat het geen " "afhankelijkheden bezit, werkt het programma goed onder GNU/Linux, Windows en " "andere besturingssystemen.\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "Er is een volledige documentatie over het gebruik van mtPaint beschikbaar " "als handleiding. U kunt deze downloaden van de website van mtPaint.\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "Wanner mtPaint u bevalt en wanneer u op de hoogte wilt blijven van nieuwe " "uitgaven, of wanneer u feedback wilt geven, dan kan het voor u interessant " "zijn in de mailing-list te worden opgenomen:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "http://sourceforge.net/mail/?group_id=155874" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N Nieuwe afbeelding aanmaken" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O Afbeelding openen" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S Afbeelding bewaren" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q Programma afsluiten\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A Selecteer gehele afbeelding" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape Niets selecteren, plakken afzeggen" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C Kopieer selectie naar het klembord" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr "" " Ctrl-X kopieer selectie naar het klembord, dan gekozen patroon " "afdrukken in geselecteerd gebied" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr "" " Ctrl-V Selectie uit het klembord in het midden van afbeelding " "plakken" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr "" " Ctrl-K Selectie uit het klembord terugplaatsen in " "oorspronkelijk bestand" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return Doorgaan met plakken naar canvas" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Pijltjestoetsen Tekenmodus - verplaats de cursor" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr "" " Pijltjestoetsen Selectiemodus - Klik op de selectiebalk of plak " "pixel voor pixel" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+pijltjestoetsen Klik met de muis, selecteer met de selectiebalk, of " "plak pixel voor pixel - x wordt vastgesteld vanuit het voorkeursscherm" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+pijltjestoetsen Verplaats de laag of pas de selectie aan" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr "" " [ of ] Verplaats kleur A naar het volgende of vorige " "paletgebied " #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr "" " Shift+[ of ] Verplaats kleur B naar het volgende of vorige " "paletgebied\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete Verklein de afbeelding tot de selectie" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr "" " Insert Kleuren veranderen - d.i. Helderheid, Contrast, " "Dichtheid, Verhoudingen, Kleurengamma" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G Afbeelding in grijstinten" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G Afbeelding in grijstinten (Gamma bijgesteld)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr "" " Ctrl-T Trek een rechthoek rond het geselecteerde gebied met de " "huidige vulling" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T Vul de selectie met de gekozen vulling" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L Trek een Ellips rond het geselecteerde gebied" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr "" " Ctrl-Shift-L Trek een gevulde Ellips rond het geslecteerde gebied\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E Bewerk de RGB-waarden voor kleuren A & B" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W Bewerk alle paletkleuren\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P Voorkeuren" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I Informatie\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z Maak laatste handeling ongedaan" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R Herstel een ongedaan gemaakte handeling\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V Zie venster" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L Lagen in venster\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" " A Teken een open pijl met het lijn-gereedschap (formaat is " "afhankelijk van de gekozen 'flow-instelling')" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" " S Teken een dichte pijl met het lijn-gereedschap (formaat " "is afhankelijk van de gekozen 'flow-instelling')\n" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= Primair bewerkingsvenster - inzoomen" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - Primair bewerkingsvenster - uitzoomen" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= Venster bekijken - inzoomen" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - Venster bekijken - uitzoomen\n" #: src/help.c:97 #, c-format msgid " 1 10% zoom" msgstr "" #: src/help.c:98 #, c-format msgid " 2 25% zoom" msgstr "" #: src/help.c:99 #, c-format msgid " 3 50% zoom" msgstr "" #: src/help.c:100 #, c-format msgid " 4 100% zoom" msgstr "" #: src/help.c:101 #, c-format msgid " 5 400% zoom" msgstr "" #: src/help.c:102 #, c-format msgid " 6 800% zoom" msgstr "" #: src/help.c:103 #, c-format msgid " 7 1200% zoom" msgstr "" #: src/help.c:104 #, c-format msgid " 8 1600% zoom" msgstr "" #: src/help.c:105 #, c-format msgid " 9 2000% zoom\n" msgstr "" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 Bewerk afbeeldingskanaal" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 Bewerk alpha kanaal" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 Bewerk selectiekanaal" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 Bewerk maskeer kanaal\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 Hulp" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 Patroon kiezen" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 Penseel kiezen" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 Schildergereedschap" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 Primaire werkbalk afsluiten" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 Werkbalk 'gereedschap' sluiten" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 Werkbalk 'Instellingen' sluiten" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 Palet sluiten" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 Selectie-instrument" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr " F12 Werkgebied sluiten\n" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 Huidig klembord-bestand opslaan in bestand 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 klembord laden uit bestand 1-12\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr "" " Ctrl + 1, 2, ... , 0 Opaciteit instellen tot 10%, 20%, ... , 100% " "(algemene of toetsenblok-nummers)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + of = Opaciteit vermeerderen met 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - Opaciteit verminderen met 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr "" " Home Toon of verberg primair venster/menu/werkbalk/statusbalk/" "palet" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Pagina verder Afbeelding inschalen" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Pagina terug Ondergrond van de afbeelding herschalen" #: src/help.c:128 msgid " End Pan Window" msgstr " Einde Overzicht-scherm" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr "" " linker muisknop Met het huidige gereedschap in het kader tekenen" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " Middelste muisknop Kies een punt in de afbeelding als centrum om de " "volgende keer op in te zoomen" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " Rechter muisknop Bevestig plakken naar de ondergrond / Stop met " "tekenen / Annuleer selectie\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " Muis-wiel Gebruikers kunnen in GTK+2 via het venster 'voorkeuren' " "het muiswiel instellen om in of uit te zoomen\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+linker muisknop Selecteer kleur A met muis" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" " Ctrl+Middelste muisknop Kleur A/B en patroon aanmaken vanuit de RGB-" "kleur in A (alleen RGB-afbeeldingen)" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+Rechter muisknop Selecteer kleur B met muis" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr "" " Ctrl+Muiswiel Het primaire bewerkinginsvenster naar links of rechts " "verschuiven\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" " Ctr+Dubbel-klik Stel kleur A of B in als algemene kleur van penseel, " "vierkant of gemarkeerde selectie (alleen RGB)\n" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+Rechter muisknop Kiest het punt als centrum van de afbeelding, na " "het volgende in- of uitzoomen\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "U kunt de X/Y coördinaten vastzetten terwijl u de muis beweegt:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift Beperk muisbewegingen tot een vertikale lijn" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl Beperk muisbewegingen tot een horizontale lijn" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint wordt onderhouden door Dmitry Groshev.\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "wjaguar@users.sourceforge.net" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "http://mtpaint.sourceforge.net/\n" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "De volgende mensen hebben (in alfabetische volgorde) direct aan dit project " "meegewerkt. We danken hen voor hun bijdrage en hun inspanningen:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "Auteurs\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - Mede-ontwikkelaar voor versie 2.30. Hoofd ontwikkeling en " "onderhoud vanaf versie 3.00 tot op heden." #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "" "Mark Tyler - Oorspronkelijke auteur en ontwikkelaar tot aan versie 3.00, bij " "gelegenheid medewerker sindsdien." #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - Ontwierp de Wu-kwantiseer-methode - zie voor meer informatie wu." "c.\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "" "Algemene bijdragen (Feedback en ideeën die bijdragen, tenzij anders " "gesteld)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhari - herontwerp website April 2005" #: src/help.c:156 msgid "Alan Horkan" msgstr "Alan Horkan" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "Alexandre Prokoudine" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "Antonio Andrea Bianco" #: src/help.c:159 msgid "Dennis Lee" msgstr "Dennis Lee" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "Ed Jason" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - Ontwierp 'Gifsicle', benodigd voor het maken en bekijken van " "GIF-animaties http://www.lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Het Guadilinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registratie" #: src/help.c:164 msgid "Lou Afonso" msgstr "Lou Alfonso" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "Magnus Hjorth" #: src/help.c:166 msgid "Martin Zelaia" msgstr "Martin Zelaia" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "Pavel Ruzicka" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "Puppy Linux (Barry Kauler)" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "Vlastimil Krejcir" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" "William Kern\n" "\n" #: src/help.c:172 msgid "Translations\n" msgstr "Vertalingen\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "Braziliaans-portugees - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "Tsjechisch - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "Nederlands - Hans Strijards" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "Frans - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, Philippe " "Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "Galego - Miguel Anxo Bouzada" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "Duits - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "Italiaans - Angelo Gemmi" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "Japans - Norihiro YONEDA" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "Pools - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "Portugees - Israel G. Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "Russisch - Sergey Irupin, Dmitry Groshev" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "Vereenvoudigd Chinees - Cecc" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "Slowaaks - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "Spaans - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "Zweeds - Daniel Nylander, Daniel Eriksson" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "Taiwanees-chinees - Wei-Lun Chao" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "Turks - Muhammet Kara, Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "Informatie" #: src/info.c:290 msgid "Memory" msgstr "Geheugen" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "Totaal geheugen voor de primaire en gewiste afbeeldingen" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "Wis / Herstel / Max gebruikte niveaus" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "Klembord" #: src/info.c:311 msgid "Unused" msgstr "Ongebruikt" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "Klembord = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "Klembord = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "Unieke RGB pixels" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "Lagen" #: src/info.c:343 msgid "Total layer memory usage" msgstr "Totaal geheugengebruik voor lagen" #: src/info.c:350 msgid "Colour Histogram" msgstr "Kleurengeschiedenis" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "Kleuren-index totalen - %i van %i gebruikt" #: src/info.c:391 msgid "Index" msgstr "Index" #: src/info.c:392 msgid "Canvas pixels" msgstr "Ondergrond-pixels" #: src/info.c:407 msgid "Orphans" msgstr "Wezen" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "" "Kon home-directory niet vinden. Huidige directory gebruiken als home-" "directory." #: src/layer.c:70 msgid "Background" msgstr "Achtergond" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(Aangepast)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "Naamloos" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "Wilt u echt een laag wissen %i (%s) ?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "Een of meer lagen bevatten bewerkingen dit niet zijn opgeslagen. Wilt u ze " "werkelijk afsluiten?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "Niet afsluiten" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "Afsluiten en bewerkingen verliezen" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d lagen konden niet geladen worden" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "Een of meer afbeeldingslagen zijn niet bewaard. U moet iedere afbeelding " "afzonderlijk opslaan voordat het tekstbestand van de laag kan worden " "opgeslagen, om zo later de samengestelde afbeelding te kunnen laden." #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "Wilt u werkelijk alle lagen wissen?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "Kan geen lagen meer toevoegen." #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "Nieuwe laag" #: src/layer.c:1160 msgid "Raise" msgstr "Omhoog" #: src/layer.c:1161 msgid "Lower" msgstr "Omlaag" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "Laag verdubbelen" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "Laag centraliseren" #: src/layer.c:1164 msgid "Delete Layer" msgstr "Laag wissen" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "Lagen-venster sluiten" #: src/layer.c:1268 msgid "Layer Name" msgstr "Naam van de laag" #: src/layer.c:1269 msgid "Position" msgstr "Positie" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "Transparante kleur" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "Toon alle lagen in het hoofdvenster" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "Geen ongebruikte kleuren om te verwijderen!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "Het palet bevat geen 2 kleuren met dezelfde RGB waarden " #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "Het palet bevat %i kleuren met identieke RGB-waarden. Wilt u ze werkelijk in " "een index samenbrengen en de ondergrond opnieuw invullen?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "RGB" #: src/mainwindow.c:496 msgid "indexed" msgstr "geïndexeerd" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" "U probeert een %s afbeelding op te slaan als een %s bestand, hetgeen niet " "mogelijk is. Ik stel voor dat u het bewaard als een PNG-extensie." #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" "U probeert een %s bestand op te slaan met een palet van meer dan %d kleuren. " "U moet een ander bestandstype kiezen, of het palet terugbrengen tot %d " "kleuren." #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" "U probeert een XPM-bestand op te slaan met meer dan 4096 kleuren. Gebruik " "een ander bestandsformaat of zet de afbeelding om tot 4 bits. Of verminder " "het aantal kleuren." #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "Kan klembord niet laden" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "Kan klembord niet opslaan" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "" "De afbeelding of het palet bevatten veranderingen die nog niet zijn " "opgeslagen. Wilt u werkelijk deze veranderingen wissen?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "Afbeelding" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "Wilt u werkelijk afsluiten?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/_Bestand" #: src/mainwindow.c:4665 msgid "//New" msgstr "//Nieuw" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//Openen ..." #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//Opslaan" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//Opslaan als ..." #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//Uitvoeren ongedaan gemaakte afbeeldingen ..." #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//Uitvoeren ongedaan gemaakte afbeeldingen (herstel) ..." #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//Uitvoeren als ASCII-bestand ..." #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//Uitvoeren GIF-animatie ..." #: src/mainwindow.c:4675 msgid "//Actions" msgstr "//Acties" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "///Configureren" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//Afsluiten" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/_Bewerken" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//Ongedaan maken" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//Herstellen" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//Knippen" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//Kopiëren" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "//Naar het palet kopiëren" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//Plak in het midden" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//In nieuwe laag plakken" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//Plakken" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//Tekst plakken" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "//Tekst plakken (FreeType)" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "//Palet plakken" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//Klembord laden" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//Klembord opslaan" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "//Importeer Klembord uit het Systeem" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "//Exporteer klembord naar het Systeem" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//Patroon kiezen ..." #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//Penseel kiezen ..." #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/_Bekijken" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//Primaire taakbalk tonen" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//Taakbalk 'gereedschap' tonen" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//Venster 'Instellingen' tonen" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "//Toon werkgebied" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//Palet tonen" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//Status-balk tonen" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//Afbeeldingsviewer sluiten" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//Afbeelding in het midden plaatsen" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//Toon inzoom-raster" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "//Raster samenstellen ..." #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "//Afbeelding opsporen ..." #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//Venster bekijken" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//Horizontaal verdelen" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//Venster Focus" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//Overzicht-scherm sluiten" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//Vensterlagen" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/_Afbeelding" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//Omzetten naar RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//Omzetten naar geïndexeerd ..." #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//Ondergrond inschalen ..." #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//Ondergrond herschalen ..." #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//Inperken" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//Verticaal draaien" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//Horizontaal draaien" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//Met de klok mee draaien" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//Tegen de klok in draaien" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//Vrij draaien ..." #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "//Verdraaien ..." #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//Informatie ..." #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//Voorkeuren ..." #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/_Selectie" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//Alles selecteren" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//Niets selecteren (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//Lasso-selectie" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//Lasso-selectie knippen" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//Omtrek selecteren" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//Selectie opvullen" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//Omtrek Elips" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//Elips opvullen" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "//Horizontale glooiing" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "//Verticale glooiing" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//Alpha mengen A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//Alpha verplaatsen om te maskeren" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//Kleuren maskeren A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//Maskeren kleuren A,B ongedaan maken" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//Maskeer alle kleuren" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//Maskeren verhelderen" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/_Palet" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//Laden ..." #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//Standaard laden" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//Alles maskeren" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//Niets maskeren" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//A & B bijeenvoegen" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//Kleuren A & B bewerken ..." #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "//In A dopen" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//Palet bewerken ..." #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//Paletgrootte instellen ..." #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//Meerdere kleuren mengen" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//Verwijder ongebruikte kleuren" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//Vast aantal aanmaken ..." #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//Kleuren ordenen ..." #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//Palet wisselen ..." #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/Effe_cten" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//Kleuren omvormen ..." #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//Invoegen" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//Grijstinten" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//Grijstinten (Gecorrigeerd gamma)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//Isometrisch omvormen" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///Linkerkant omlaag" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///Rechterkant omlaag" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///Bovenkant rechts" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///Onderkant rechts" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//Hoek vaststellen ..." #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "//Verschil van Gausiaans ..." #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//Aanscherpen ..." #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//Maskeren vervagen ..." #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//Verzachten ..." #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//Gausiaanse vervaging ..." #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "//Kuwahara-Nagao vervaging ..." #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//Ciseleren" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "//Laten uitdijen" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "//Laten eroderen" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//Korrelig ..." #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/Ka_nalen" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//Nieuw ..." #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//Wissen ..." #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//Afbeelding bewerken" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//Alpha bewerken" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//Selectie bewerken" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//Maskeren bewerken" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//Afbeelding verbergen" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//Alpha uitschakelen" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//Selectie uitschakelen" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//Maskeren uitschakelen" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//RGBA bewerkingen koppelen" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//Drempel ..." #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "//Alpha losmaken" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//Bekijk Alpha als een bovenlaag" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//Bovenlagen bewerken ..." #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/_Lagen" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "//Nieuwe laag" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//Samengestelde afbeelding opslaan ..." #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "//Samenstellen in een nieuwe laag" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//Alle lagen verwijderen" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//Animatie bewerken ..." #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//Animatie-preview ..." #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//Hoofdkader instellen ..." #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//Alle hoofdkaders verwijderen ..." #: src/mainwindow.c:4929 msgid "/More..." msgstr "/Meer..." #: src/mainwindow.c:4931 msgid "/_Help" msgstr "" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//Documentatie" #: src/mainwindow.c:4933 msgid "//About" msgstr "//Over" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//Snelkoppeling sleutelcodes opnieuw binden" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "Overbrengen naar een geïndexeerd palet" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "Korrel-effect" #: src/memory.c:4744 msgid "Rotating" msgstr "Draaien" #: src/memory.c:5096 msgid "Free Rotation" msgstr "Vrij draaien" #: src/memory.c:5682 msgid "Scaling Image" msgstr "Afbeelding inschalen" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "Unieke RGB Pixels tellen" #: src/memory.c:6950 msgid "Applying Effect" msgstr "Effect toepassen" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "Kuwahara-Nagao filter" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "Verdraaien" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "Even wachten ..." #: src/mygtk.c:189 msgid "STOP" msgstr "STOP" #: src/mygtk.c:816 msgid "Browse" msgstr "Bladeren" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "Gamma gecorrigeerd" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 bits RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "Grijstinten" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "Geïndexeerd palet" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "Vanuit het klembord" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "Schermafdruk nemen" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "Nieuwe afbeelding" #: src/otherwindow.c:288 msgid "Width" msgstr "Breedte" #: src/otherwindow.c:289 msgid "Height" msgstr "Hoogte" #: src/otherwindow.c:290 msgid "Colours" msgstr "Kleuren" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "Patroon kiezen" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "Palet-grootte instellen" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "Toepassen" #: src/otherwindow.c:599 msgid "Luminance" msgstr "lichtheid" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "Helderheid" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "Afstand tot A" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "Projectie naar A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "Frequentie" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "Paletkleuren ordenen" #: src/otherwindow.c:616 msgid "Start Index" msgstr "Index starten" #: src/otherwindow.c:617 msgid "End Index" msgstr "Index beëindigen" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "Volgorde omkeren" #: src/otherwindow.c:868 msgid "Contrast" msgstr "Contrast" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "Vervloeien" #: src/otherwindow.c:869 msgid "Gamma" msgstr "Gamma" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "Kleuren omvormen" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "Detail tonen" #: src/otherwindow.c:927 msgid "Store Values" msgstr "Waarden bewaren" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "Palet" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "Auto-preview" #: src/otherwindow.c:1006 msgid "Reset" msgstr "Opnieuw instellen" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "De geometrie is hetzelfde gebleven - niets om te doen" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "" "Het besturingssysteem kan het geheugen voor deze bewerking niet vrijmaken." #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "" "U hebt in het voorkeursscherm niet genoeg geheugen vrijgemaakt voor deze " "bewerking." #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "Naaste buur" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "Bilineair / Gebied in kaart brengen" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "Bilineair" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "Bicubisch" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "Bicubisch kantig" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "Bicubisch beter" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "Bicubisch scherper" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "Breedte " #: src/otherwindow.c:1168 msgid "Height " msgstr "Hoogte " #: src/otherwindow.c:1170 msgid "Original " msgstr "Origineel " #: src/otherwindow.c:1176 msgid "New" msgstr "Nieuw" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "Vlakdruk" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "Centrum" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "Aspect-ratio bepalen" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "Helder" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "Facet" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "Facet spiegelen" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "Spiegelen" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "Instellingen" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "Scherpere verkleining afbeelding" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "Ondergrond inschalen" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "Ondergrond herschalen" #: src/otherwindow.c:1963 msgid "From" msgstr "Van" #: src/otherwindow.c:1963 msgid "To" msgstr "Naar" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "HSV" #: src/otherwindow.c:1979 msgid "Scale" msgstr "Schaal" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "Palet bewerken" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "Bovenlagen samenstellen" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "Kleuren bewerken" #: src/otherwindow.c:2079 msgid "Limit" msgstr "Beperken" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "Sfeer" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "Hoek" #: src/otherwindow.c:2080 msgid "Cube" msgstr "Kubus" #: src/otherwindow.c:2110 msgid "Range" msgstr "Bereik" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "Invoegen" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "Manier van kleuren kiezen" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "Opaque" #: src/otherwindow.c:2128 msgid "Border" msgstr "Grens" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "Transparant" #: src/otherwindow.c:2129 msgid "Tile " msgstr "Tegel " #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "Slim raster" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "Tegel-raster" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "Minimum raster zoom" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "Tegel-breedte" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "Tegel-hoogte" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "Raster samenstellen" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "Kleuren-ruimte" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "Grootst (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "Totaal (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "Euclidiaans (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "Verschil-meting" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "Exacte omzetting" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "Huidig palet gebruiken" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "PNN afronden (langzaam, meer kwaliteit)" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "Wu afronden (snel)" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "Max-min afronden (het beste voor kleine paletten en aanstippen)" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "Geen" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (snel)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "Aangestipt (effect)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "Verspreid (effect)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "Scala" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "Weekelijks" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "Ten strengste" #: src/otherwindow.c:2385 msgid "Off" msgstr "Uit" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "Scheiden/Totaal" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "Scheiden/Splitsen" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "Lengte/Totaal" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "Lengte/Splitsen" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "Afronding maken" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "Omvormen tot het geïndexeerde" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "Geïndexeerde kleuren voor gebruik" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "Palet inperken" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "Weging die op de diameter is gebaseerd" #: src/otherwindow.c:2442 msgid "Dither" msgstr "Aanstippen" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "Verminder kleuren-vloeiing" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "Serpentine scan" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "Uitvoerfout, %" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "Specifieke uitvoerfout" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "Fout geheel bepalen" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "HSV terug" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "Continu" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "Gradiënt bewerken" #: src/otherwindow.c:2837 msgid "Points:" msgstr "Punten:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "Omkeren" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "Standaard bewerken" #: src/otherwindow.c:3018 msgid "Linear" msgstr "Lineair" #: src/otherwindow.c:3018 msgid "Radial" msgstr "Radiaal" #: src/otherwindow.c:3018 msgid "Square" msgstr "Vierkant" #: src/otherwindow.c:3019 msgid "Angular" msgstr "Hoekig" #: src/otherwindow.c:3019 msgid "Conical" msgstr "Conisch" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "Niveau" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "Herhalen" #: src/otherwindow.c:3021 msgid "A to B" msgstr "Van A naar B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "van A naar B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "van A naar B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "van A naar B (teruguit HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "Alleen A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "Standaard" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "Huidig tegenover 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "Alleen huidig" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "Graad samenstellen" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "Kanaal" #: src/otherwindow.c:3047 msgid "Length" msgstr "Lengte" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "Lengte herhalen" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "Soort gradiënt" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "Soort verlenging" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "Preview opaciteit" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "Op afstand" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "Horizontaal" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "Verticaal" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "Onveranderd" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "Afbeelding opsporen" #: src/otherwindow.c:3323 msgid "Source" msgstr "Bron" #: src/otherwindow.c:3325 msgid "Origin" msgstr "Oorsprong" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "Relatieve schaal" #: src/otherwindow.c:3337 msgid "Display" msgstr "Laten zien" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "Bewaren %s afbeelding" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "Laden %s afbeelding" #: src/png.c:850 msgid "Layer" msgstr "Laag" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "" "%d van de %d kaders konden niet %s worden opgeslagen - in plaats daarvan als " "PNG opgeslagen" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "Druk" #: src/prefs.c:154 msgid "Current Device" msgstr "Huidig apparaat" #: src/prefs.c:431 msgid "Default System Language" msgstr "Standaard systeem-taal" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "Chinees (Vereenvoudigd)" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "Chinees (Taiwanees)" #: src/prefs.c:433 msgid "Czech" msgstr "Tsjechisch" #: src/prefs.c:433 msgid "Dutch" msgstr "Nederlands" #: src/prefs.c:433 msgid "English (UK)" msgstr "Engels (Verenigd Koninkrijk)" #: src/prefs.c:433 msgid "French" msgstr "Frans" #: src/prefs.c:434 msgid "Galician" msgstr "Galicisch" #: src/prefs.c:434 msgid "German" msgstr "Duits" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "Italiaans" #: src/prefs.c:435 msgid "Japanese" msgstr "Japans" #: src/prefs.c:435 msgid "Polish" msgstr "Pools" #: src/prefs.c:435 msgid "Portuguese" msgstr "Portugees" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "Portugees (Braziliaans)" #: src/prefs.c:436 msgid "Russian" msgstr "Russisch" #: src/prefs.c:436 msgid "Slovak" msgstr "Slowaaks" #: src/prefs.c:437 msgid "Spanish" msgstr "Spaans" #: src/prefs.c:437 msgid "Swedish" msgstr "Zweeds" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "Turks" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X hotspot" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y hotspot" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "Recent gebruikte bestanden" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "Beperk einde voortgangs-balk" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "Geometrie van de ondergrond" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "Cursor X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "Pixel [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "Geometrie selectie" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "Ongedaan maken / Herstellen" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "Flow" #: src/prefs.c:457 msgid "Preferences" msgstr "Voorkeuren" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "Max geheugen gebruikt voor het ongedaan maken (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "Max ongedaan gemaakte niveaus" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "Gemeenschappelijke laag ongedaan gemaakte ruimte (%)" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "Gebruik standaard gamma-correctie" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "Alpha chequers optimaliseren" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "Verhinder transparantie-venster" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "Selecteer voorkeurs-taal\n" "\n" "U moet wél mtPaint herstarten\n" "om de veranderingen door te voeren" #: src/prefs.c:524 msgid "Language" msgstr "Taal" #: src/prefs.c:529 msgid "Interface" msgstr "Grensvlak" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "Grijstinten achtergrond" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "Selectie van aangebrachte pixels" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "Max formaat overzicht-scherm" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "Toon klembord tijdens plakken" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "Cursor verplaatsen = Gereedschap" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "Afsluiten bevestigen" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "De Q-toets sluit mtPaint af" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "Veranderen van gereedschap beïnvloedt plakken" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "Gereedschap- en instellings-dialogen centreren" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "Nieuwe afbeelding stelt zoom in naar 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "Muiswiel = Zoomen" #: src/prefs.c:559 msgid "Use menu icons" msgstr "Gebruik iconen uit het menu" #: src/prefs.c:564 msgid "Files" msgstr "Bestanden" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "Lees 16-bit TGAs als 5:6:5 BGR" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "Schrijf TGA's in omgekeerde volgorde" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "Afbeelding laden onmogelijk" #: src/prefs.c:588 msgid "Paths" msgstr "Paden" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "Bestanden voor Klembord" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "Selecteer klembord-bestand" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML Browser-programma" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "Selecteer Browser-programma" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "Locatie van handboek-index" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "Selecteer handboek index-bestand" #: src/prefs.c:605 msgid "Default Palette" msgstr "Standaard palet" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "Selecteer standaard palet" #: src/prefs.c:610 msgid "Default Patterns" msgstr "Standaard patronen" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "Selecteer bestand voor standaard patronen" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "Status-balk" #: src/prefs.c:633 msgid "Tablet" msgstr "Bord" #: src/prefs.c:637 msgid "Device Settings" msgstr "Instellingen apparaat" #: src/prefs.c:645 msgid "Configure Device" msgstr "Apparaat samenstellen" #: src/prefs.c:652 msgid "Tool Variable" msgstr "Gereedschaps-variabele" #: src/prefs.c:654 msgid "Factor" msgstr "Factor" #: src/prefs.c:680 msgid "Test Area" msgstr "Test-gebied" #: src/shifter.c:205 msgid "Frames" msgstr "Kaders" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "Palet wisselen" #: src/shifter.c:279 msgid "Start" msgstr "Starten" #: src/shifter.c:281 msgid "Finish" msgstr "Beëindigen" #: src/shifter.c:330 msgid "Fix Palette" msgstr "Palet vaststellen" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "Actie" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "Commando" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "Bestands-acties samenstellen" #: src/spawn.c:515 msgid "Execute" msgstr "Uitvoeren" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "Een fout %i opgetreden bij het uitvoeren van %s" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "Ik kan geen documentatie vinden. Download het mtPaint Handboek van de " "website en installeer het, of u moet in het 'voorkeuren-scherm' de juiste " "locatie instellen." #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "Er was een probleem met de HTML-browser. Voer in het 'voorkeuren-scherm' de " "correcte naam voor het programma in." #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB kubus" #: src/toolbar.c:234 msgid "By image channel" msgstr "Door afbeeldings-kanaal" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "Door gradiënt" #: src/toolbar.c:236 msgid "Fill settings" msgstr "Instellingen vullen" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "Opaciteits-modus respecteren" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "Vlek-instellingen" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "Penseel-ruimte" #: src/toolbar.c:298 msgid "Normal" msgstr "Normaal" #: src/toolbar.c:299 msgid "Colour" msgstr "Kleur" #: src/toolbar.c:299 msgid "Saturate More" msgstr "Meer verzadigen" #: src/toolbar.c:300 msgid "Multiply" msgstr "Vermenigvuldigen" #: src/toolbar.c:300 msgid "Divide" msgstr "Delen" #: src/toolbar.c:300 msgid "Screen" msgstr "Scherm" #: src/toolbar.c:300 msgid "Dodge" msgstr "Tegenhouden" #: src/toolbar.c:301 msgid "Burn" msgstr "Doordrukken" #: src/toolbar.c:301 msgid "Hard Light" msgstr "Hard licht" #: src/toolbar.c:301 msgid "Soft Light" msgstr "Zacht licht" #: src/toolbar.c:301 msgid "Difference" msgstr "Verschil" #: src/toolbar.c:302 msgid "Darken" msgstr "Donker maken" #: src/toolbar.c:302 msgid "Lighten" msgstr "Lichter maken" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "Graanstructuur uittrekken" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "Graanstructuur verdichten" #: src/toolbar.c:323 msgid "Blend mode" msgstr "Meng-modus" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "Continue modus" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "Opaciteits-modus" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "Tint modus" #: src/toolbar.c:889 msgid "Tint +-" msgstr "Tint +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "Meng-modus" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "Alle maskeringen uitschakelen" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "Gradiënt-modus" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "Venster 'Instellingen'" #: src/toolbar.c:1041 msgid "Cut" msgstr "Knippen" #: src/toolbar.c:1042 msgid "Copy" msgstr "Kopiëren" #: src/toolbar.c:1043 msgid "Paste" msgstr "Plakken" #: src/toolbar.c:1045 msgid "Undo" msgstr "Ongedaan maken" #: src/toolbar.c:1046 msgid "Redo" msgstr "Herstellen" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "Overzicht-scherm" #: src/toolbar.c:1053 msgid "Paint" msgstr "Schilderen" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "Wisselen" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "Vloed-vulling" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "Rechte lijn" #: src/toolbar.c:1057 msgid "Smudge" msgstr "Vlek" #: src/toolbar.c:1058 msgid "Clone" msgstr "Kloon" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "Selectie maken" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "Selectie veelhoek" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "Overgangskleur Plaatsen" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "lasso selecteren" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "Omtrek elips" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "Gevulde Elips" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "Omtrek selectie" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "Selectie vullen" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "Selectie verticaal draaien" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "Selectie horizontaal draaien" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "Selectie met de klok mee draaien" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "Selectie tegen de klok in draaien" #: src/viewer.c:132 msgid "About" msgstr "Over" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "Bestand: %s niet valide - palet kan niet worden opgewaardeerd" #~ msgid "Import GIF animation - Choose frames directory" #~ msgstr "GIF-animatie invoegen - kies kaderbestand" #~ msgid "Distance to A+B" #~ msgstr "Afstand tot A+B" #~ msgid "Edit Frames" #~ msgstr "Kaders bewerken" #~ msgid " C Command Line Window" #~ msgstr " C Terminal" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "Het palet bevat niet genoeg kleuren om te mengen" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "Er zijn teveel dezelfde palet-items om te verminderen." #~ msgid "/View/Command Line Window" #~ msgstr "/Bekijken/Terminal" #~ msgid "Grid colour RGB" #~ msgstr "Raster-kleur RGB" #~ msgid "Zoom" #~ msgstr "Zoomen" #~ msgid "%i Files on Command Line" #~ msgstr "%i bestanden in de wachtrij" #~ msgid "Not enough memory to rotate image" #~ msgstr "Onvoldoende geheugen om afbeelding te draaien" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "Onvoldoende geheugen om klembord te draaien" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "Bestand is te groot, moet <= dan breedte=%i hoogte=%i zijn : %s" #~ msgid "Could not open %s: %s" #~ msgstr "Kan %s: %s niet openen" #~ msgid "Error closing %s: %s" #~ msgstr "Fout bij afsluiten %s: %s" #~ msgid "Could not write to %s: %s" #~ msgstr "Kan niet schrijven naar %s: %s" #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patronen_gebruiker.c kan in het huidige bestand niet geopend worden" #~ msgid "Done" #~ msgstr "Klaar" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patronen_gebruiker.c aangemaakt in het huidige bestand" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "" #~ "Huidige afbeelding is niet 94x94x3, dus ik kan geen patronen_gebruiker.c " #~ "aanmaken" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "U probeert een RGB-afbeelding op te slaan, hetgeen niet mogelijk is. Sla " #~ "op met PNG-extensie." #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible.I " #~ "would suggest you save with a PNG extension." #~ msgstr "" #~ "U probeert een RGB-afbeelding op te slaan als GIF-bestand, hetgeen niet " #~ "mogelijk is. Sla op met PNG-extensie." #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "U probeert een XBM-bestand te bewaren met een palet van meer dan 2 " #~ "kleuren. Gebruik een ander bestandsformaat of breng het palet terug tot " #~ "twee kleuren." #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "U probeert een geïndexeerde Ondergrond op te slaan in een JPEG-bestand, " #~ "hetgeen niet mogelijk is. Sla op met PNG-extensie." #~ msgid "/File/Actions/sep2" #~ msgstr "/Bestand/Acties/sep2" #~ msgid "/Edit/Create Patterns" #~ msgstr "/Bewerk/Patronen aanmaken" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/Palet/Vast aantal aanmaken(DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/Palet/Vast aantal aanmaken (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/Palet/Vast aantal aanmaken (Wu)" #~ msgid "/Frames" #~ msgstr "/Kaders" #~ msgid "/File/%i" #~ msgstr "/Bestand/%i" #~ msgid "/File/Actions/%i" #~ msgstr "/Bestand/Acties/%i" #~ msgid "DL1 Quantize (fastest)" #~ msgstr "DL1 Vast aantal aanmaken (snelst)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "DL3 vast aantal aanmaken (zeer traag, betere kwaliteit)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Wu Vast aantal aanmaken (de beste manier voor een kleine palet)" #~ msgid "Loading PNG image" #~ msgstr "PNG-afbeelding laden" #~ msgid "Loading clipboard image" #~ msgstr "Klembord-afbeelding laden" #~ msgid "Saving PNG image" #~ msgstr "PNG-afbeelding opslaan" #~ msgid "Saving Clipboard image" #~ msgstr "Klembord-afbeelding opslaan" #~ msgid "Saving Layer image" #~ msgstr "Afbeeldings-laag opslaan" #~ msgid "Saving Channel image" #~ msgstr "Afbeeldings-kanaal opslaan" #~ msgid "Loading GIF image" #~ msgstr "GIF-afbeelding laden" #~ msgid "Saving GIF image" #~ msgstr "GIF-afbeelding opslaan" #~ msgid "Loading JPEG image" #~ msgstr "JPEG-afbeelding laden" #~ msgid "Saving JPEG image" #~ msgstr "JPEG-afbeelding opslaan" #~ msgid "Loading TIFF image" #~ msgstr "TIFF-afbeelding laden" #~ msgid "Saving TIFF image" #~ msgstr "TIFF-afbeelding opslaan" #~ msgid "Loading BMP image" #~ msgstr "BMP-afbeelding laden" #~ msgid "Saving BMP image" #~ msgstr "BMP-afbeelding opslaan" #~ msgid "Loading XPM image" #~ msgstr "XPM-afbeelding laden" #~ msgid "Saving XPM image" #~ msgstr "XPM-afbeelding opslaan" #~ msgid "Loading XBM image" #~ msgstr "XBM-afbeelding laden" #~ msgid "Saving XBM image" #~ msgstr "XBM-afbeelding opslaan" #~ msgid "Loading LSS16 image" #~ msgstr "LSS16-afbeelding laden" #~ msgid "Saving LSS16 image" #~ msgstr "LSS16-afbeelding opslaan" #~ msgid "Saving UNDO images" #~ msgstr "Ongedaan gemaakte afbeeldingen opslaan" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "JPEG kwaliteit opslaan (100=Hoog) " #~ msgid "Lanczos3" #~ msgstr "Lanczos3" mtpaint-3.40/po/zh_TW.po0000644000175000000620000024407211647046423014464 0ustar muammarstaff# Traditional Chinese translation for mtpaint. # This file is distributed under the same license as the mtpaint package. # Wei-Lun Chao , 2006, 07. # msgid "" msgstr "" "Project-Id-Version: mtpaint 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-10-17 19:43+0400\n" "PO-Revision-Date: 2007-04-19 10:32+0800\n" "Last-Translator: Wei-Lun Chao \n" "Language-Team: Chinese (traditional) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Rosetta-Version: 0.1\n" "Plural-Forms: nplurals=2; plural=n != 1\n" #: src/ani.c:673 msgid "Animation Preview" msgstr "動畫預覽" #: src/ani.c:682 src/shifter.c:305 msgid "Play" msgstr "播放" #: src/ani.c:695 msgid "Fix" msgstr "修復" #: src/ani.c:700 src/ani.c:1144 src/font.c:1826 src/font.c:1843 #: src/shifter.c:340 src/viewer.c:205 msgid "Close" msgstr "關閉" #: src/ani.c:755 src/ani.c:857 src/ani.c:1038 src/ani.c:1044 src/canvas.c:368 #: src/canvas.c:650 src/canvas.c:924 src/canvas.c:1267 src/canvas.c:1297 #: src/canvas.c:1399 src/canvas.c:1416 src/canvas.c:1961 src/canvas.c:1966 #: src/canvas.c:2036 src/canvas.c:2114 src/canvas.c:2130 src/font.c:1316 #: src/fpick.c:732 src/fpick.c:856 src/layer.c:639 src/layer.c:893 #: src/layer.c:1057 src/mainwindow.c:274 src/mainwindow.c:302 #: src/mainwindow.c:531 src/mainwindow.c:575 src/mainwindow.c:601 #: src/otherwindow.c:1072 src/otherwindow.c:1122 src/otherwindow.c:1124 #: src/spawn.c:734 src/spawn.c:788 src/spawn.c:819 src/thread.c:321 #: src/viewer.c:1335 msgid "Error" msgstr "錯誤" #: src/ani.c:755 msgid "Unable to create output directory" msgstr "無法建立輸出目錄" #: src/ani.c:809 msgid "Creating Animation Frames" msgstr "正在建立動畫圖框" #: src/ani.c:857 msgid "Unable to save image" msgstr "無法儲存圖像" #: src/ani.c:890 src/fpick.c:834 src/layer.c:422 src/layer.c:497 #: src/layer.c:904 src/layer.c:918 src/mainwindow.c:306 src/mainwindow.c:1120 #: src/png.c:6729 msgid "Warning" msgstr "警告" #: src/ani.c:890 msgid "" "Do you really want to clear all of the position and cycle data for all of " "the layers?" msgstr "您真的要在所有圖層上清除全部的位置和循環資料嗎?" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "No" msgstr "否" #: src/ani.c:891 src/fpick.c:834 src/layer.c:422 src/layer.c:920 #: src/mainwindow.c:306 msgid "Yes" msgstr "是" #: src/ani.c:993 msgid "Set Key Frame" msgstr "設定主要框架" #: src/ani.c:1038 msgid "You must have at least 2 layers to create an animation" msgstr "您必須至少有 2 層圖層以建立動畫" #: src/ani.c:1044 msgid "You must save your layers file before creating an animation" msgstr "您必須在建立動畫之前儲存您的圖層檔案" #: src/ani.c:1054 msgid "Configure Animation" msgstr "配置動畫" #: src/ani.c:1064 msgid "Output Files" msgstr "輸出檔案" #: src/ani.c:1067 msgid "Start frame" msgstr "開始圖框" #: src/ani.c:1068 msgid "End frame" msgstr "結束圖框" #: src/ani.c:1070 src/shifter.c:283 msgid "Delay" msgstr "延遲" #: src/ani.c:1071 msgid "Output path" msgstr "輸出路徑" #: src/ani.c:1072 msgid "File prefix" msgstr "檔案前綴" #: src/ani.c:1092 msgid "Create GIF frames" msgstr "建立 GIF 圖框" #: src/ani.c:1098 msgid "Positions" msgstr "位置" #: src/ani.c:1135 msgid "Cycling" msgstr "循環中" #: src/ani.c:1148 msgid "Save" msgstr "儲存" #: src/ani.c:1151 src/font.c:1766 src/otherwindow.c:1001 #: src/otherwindow.c:1475 src/otherwindow.c:2079 src/otherwindow.c:3548 msgid "Preview" msgstr "預覽" #: src/ani.c:1154 src/shifter.c:335 msgid "Create Frames" msgstr "建立圖框" #: src/canvas.c:369 msgid "The image is too large to transform." msgstr "圖像太大而無法變換。" #: src/canvas.c:399 msgid "MT" msgstr "" #: src/canvas.c:399 msgid "Sobel" msgstr "" #: src/canvas.c:399 msgid "Prewitt" msgstr "" #: src/canvas.c:399 msgid "Kirsch" msgstr "" #: src/canvas.c:400 src/otherwindow.c:1964 src/otherwindow.c:2996 #: src/otherwindow.c:3124 msgid "Gradient" msgstr "漸層" #: src/canvas.c:400 msgid "Roberts" msgstr "" #: src/canvas.c:400 msgid "Laplace" msgstr "" #: src/canvas.c:400 msgid "Morphological" msgstr "" #: src/canvas.c:405 msgid "Edge Detect" msgstr "" #: src/canvas.c:423 msgid "Edge Sharpen" msgstr "邊緣銳化" #: src/canvas.c:429 msgid "Edge Soften" msgstr "邊緣柔化" #: src/canvas.c:481 msgid "Different X/Y" msgstr "差異度 X/Y" #: src/canvas.c:485 src/memory.c:7541 msgid "Gaussian Blur" msgstr "高斯模糊" #: src/canvas.c:523 msgid "Radius" msgstr "半徑" #: src/canvas.c:524 msgid "Amount" msgstr "數量" #: src/canvas.c:525 msgid "Threshold " msgstr "臨界值" #: src/canvas.c:527 src/memory.c:7710 msgid "Unsharp Mask" msgstr "去銳利化遮罩" #: src/canvas.c:563 msgid "Outer radius" msgstr "" #: src/canvas.c:564 msgid "Inner radius" msgstr "" #: src/canvas.c:565 src/info.c:363 msgid "Normalize" msgstr "正規化" #: src/canvas.c:567 src/memory.c:7882 msgid "Difference of Gaussians" msgstr "" #: src/canvas.c:594 msgid "Protect details" msgstr "" #: src/canvas.c:596 msgid "Kuwahara-Nagao Blur" msgstr "" #: src/canvas.c:651 msgid "The image is too large for this rotation." msgstr "此旋轉所用圖像太大。" #: src/canvas.c:668 msgid "Smooth" msgstr "平滑" #: src/canvas.c:670 msgid "Free Rotate" msgstr "自由旋轉" #: src/canvas.c:924 src/viewer.c:1335 msgid "Not enough memory to create clipboard" msgstr "建立剪貼簿所需記憶體不足" #: src/canvas.c:1267 msgid "Invalid palette file" msgstr "" #: src/canvas.c:1297 msgid "Invalid channel file." msgstr "無效的通道檔案。" #: src/canvas.c:1311 msgid "Raw frames" msgstr "" #: src/canvas.c:1311 msgid "Composited frames" msgstr "" #: src/canvas.c:1312 msgid "Composited frames with nonzero delay" msgstr "" #: src/canvas.c:1313 msgid "Load First Frame" msgstr "" #: src/canvas.c:1313 msgid "Explode Frames" msgstr "" #: src/canvas.c:1315 msgid "View Animation" msgstr "檢視動畫" #: src/canvas.c:1332 msgid "Load Frames" msgstr "" #: src/canvas.c:1336 #, c-format msgid "This is an animated %s file." msgstr "此為 %s 的動畫檔案。" #: src/canvas.c:1337 #, c-format msgid "This is a multipage %s file." msgstr "" #: src/canvas.c:1345 msgid "Load into Layers" msgstr "" #: src/canvas.c:1388 #, c-format msgid "File is too big, must be <= to width=%i height=%i" msgstr "" #: src/canvas.c:1390 msgid "Unable to explode frames" msgstr "" #: src/canvas.c:1392 msgid "Unable to load file" msgstr "無法載入檔案" #: src/canvas.c:1394 msgid "" "The file import library had to terminate due to a problem with the file " "(possibly corrupt image data or a truncated file). I have managed to load " "some data as the header seemed fine, but I would suggest you save this image " "to a new file to ensure this does not happen again." msgstr "" "檔案匯入函式庫必須由於檔案問題而終止 (可能是圖像資料破損或是檔案被截斷)。因為" "檔頭似乎還好,我有試著載入某些資料,但是我會建議您儲存此圖像到新的檔案,以確" "保這不會再次發生。" #: src/canvas.c:1396 msgid "The animation is too long to load all of it into layers." msgstr "" #: src/canvas.c:1398 msgid "Could not explode all the frames in the animation." msgstr "" #: src/canvas.c:1416 msgid "Cannot open file" msgstr "無法開啟檔案" #: src/canvas.c:1417 msgid "Unsupported file format" msgstr "不支援的檔案格式" #: src/canvas.c:1523 #, c-format msgid "File: %s already exists. Do you want to overwrite it?" msgstr "檔案:%s 已經存在。您要覆寫它嗎?" #: src/canvas.c:1524 msgid "File Found" msgstr "找到檔案" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "NO" msgstr "否" #: src/canvas.c:1524 src/mainwindow.c:1164 msgid "YES" msgstr "是" #: src/canvas.c:1562 src/prefs.c:444 msgid "Transparency index" msgstr "透明度索引" #: src/canvas.c:1562 src/prefs.c:445 msgid "JPEG Save Quality (100=High)" msgstr "JPEG 儲存品質 (100=高)" #: src/canvas.c:1563 src/prefs.c:446 msgid "PNG Compression (0=None)" msgstr "" #: src/canvas.c:1563 src/prefs.c:578 msgid "TGA RLE Compression" msgstr "" #: src/canvas.c:1564 src/prefs.c:445 msgid "JPEG2000 Compression (0=Lossless)" msgstr "" #: src/canvas.c:1565 msgid "Hotspot at X =" msgstr "作用點位於 X =" #: src/canvas.c:1565 msgid "Y =" msgstr "Y =" #: src/canvas.c:1587 src/canvas.c:1648 msgid "File Format" msgstr "檔案格式" #: src/canvas.c:1677 src/canvas.c:1686 src/otherwindow.c:293 msgid "Undoable" msgstr "" #: src/canvas.c:1678 src/prefs.c:583 msgid "Apply colour profile" msgstr "" #: src/canvas.c:1710 msgid "Animation delay" msgstr "動畫延遲" #: src/canvas.c:1961 msgid "Unable to export undo images" msgstr "無法匯出復原圖像" #: src/canvas.c:1966 msgid "Unable to export ASCII file" msgstr "無法匯出 ASCII 檔案" #: src/canvas.c:2035 src/layer.c:892 src/mainwindow.c:524 #, c-format msgid "Unable to save file: %s" msgstr "無法儲存檔案:%s" #: src/canvas.c:2090 src/toolbar.c:1038 msgid "Load Image File" msgstr "載入圖像檔" #: src/canvas.c:2094 src/toolbar.c:1039 msgid "Save Image File" msgstr "儲存圖像檔" #: src/canvas.c:2097 msgid "Load Palette File" msgstr "載入調色盤檔案" #: src/canvas.c:2101 msgid "Save Palette File" msgstr "儲存調色盤檔案" #: src/canvas.c:2105 msgid "Export Undo Images" msgstr "匯出復原圖像" #: src/canvas.c:2109 msgid "Export Undo Images (reversed)" msgstr "匯出復原圖像 (反向)" #: src/canvas.c:2114 msgid "You must have 16 or fewer palette colours to export ASCII art." msgstr "您必須有 16 或更少的調色盤顏色以匯出 ASCII 圖案。" #: src/canvas.c:2117 msgid "Export ASCII Art" msgstr "匯出 ASCII 圖案" #: src/canvas.c:2121 msgid "Save Layer Files" msgstr "儲存圖層檔案" #: src/canvas.c:2124 msgid "Choose frames directory" msgstr "選取圖框目錄" #: src/canvas.c:2130 msgid "You must save at least one frame to create an animated GIF." msgstr "您必須儲存至少一個圖框以建立動畫的 GIF。" #: src/canvas.c:2133 msgid "Export GIF animation" msgstr "匯出 GIF 動畫" #: src/canvas.c:2136 msgid "Load Channel" msgstr "載入通道" #: src/canvas.c:2140 msgid "Save Channel" msgstr "儲存通道" #: src/canvas.c:2143 msgid "Save Composite Image" msgstr "儲存合成圖像" #: src/channels.c:236 msgid "Cleared" msgstr "已清除" #: src/channels.c:237 msgid "Set" msgstr "設定" #: src/channels.c:238 msgid "Set colour A radius B" msgstr "設定顏色 A 半徑 B" #: src/channels.c:239 msgid "Set blend A to B" msgstr "設定混色 A 到 B" #: src/channels.c:240 msgid "Image Red" msgstr "紅色圖像" #: src/channels.c:241 msgid "Image Green" msgstr "綠色圖像" #: src/channels.c:242 msgid "Image Blue" msgstr "藍色圖像" #: src/channels.c:244 src/mainwindow.c:1139 msgid "Alpha" msgstr "α" #: src/channels.c:245 src/mainwindow.c:1139 msgid "Selection" msgstr "選擇" #: src/channels.c:246 src/mainwindow.c:1139 msgid "Mask" msgstr "遮罩" #: src/channels.c:256 msgid "Create Channel" msgstr "建立通道" #: src/channels.c:262 msgid "Channel Type" msgstr "通道型態" #: src/channels.c:269 msgid "Initial Channel State" msgstr "初始通道狀態" #: src/channels.c:273 msgid "Inverted" msgstr "已反相" #: src/channels.c:275 src/channels.c:332 src/fpick.c:1172 src/info.c:419 #: src/mygtk.c:252 src/otherwindow.c:630 src/otherwindow.c:1016 #: src/otherwindow.c:1251 src/otherwindow.c:1473 src/otherwindow.c:2469 #: src/otherwindow.c:2870 src/otherwindow.c:3075 src/otherwindow.c:3245 #: src/otherwindow.c:3343 src/prefs.c:712 src/spawn.c:513 msgid "OK" msgstr "確定" #: src/channels.c:276 src/channels.c:333 src/fpick.c:786 src/fpick.c:1179 #: src/otherwindow.c:298 src/otherwindow.c:539 src/otherwindow.c:631 #: src/otherwindow.c:993 src/otherwindow.c:1252 src/otherwindow.c:1474 #: src/otherwindow.c:2470 src/otherwindow.c:2871 src/otherwindow.c:3076 #: src/otherwindow.c:3246 src/otherwindow.c:3344 src/otherwindow.c:3547 #: src/prefs.c:713 src/spawn.c:514 src/viewer.c:1434 msgid "Cancel" msgstr "取消" #: src/channels.c:316 msgid "Delete Channels" msgstr "刪除通道" #: src/channels.c:373 msgid "Threshold Channel" msgstr "臨界通道" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Red" msgstr "紅色" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Green" msgstr "綠色" #: src/cpick.c:901 src/otherwindow.c:601 src/otherwindow.c:867 #: src/toolbar.c:296 msgid "Blue" msgstr "藍色" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:869 #: src/toolbar.c:298 msgid "Hue" msgstr "色調" #: src/cpick.c:901 src/otherwindow.c:599 src/otherwindow.c:868 #: src/toolbar.c:298 msgid "Saturation" msgstr "飽和度" #: src/cpick.c:902 src/toolbar.c:298 msgid "Value" msgstr "" #: src/cpick.c:902 msgid "Hex" msgstr "" #: src/cpick.c:902 src/layer.c:1270 src/otherwindow.c:2996 src/prefs.c:450 #: src/toolbar.c:903 msgid "Opacity" msgstr "濁度" #: src/font.c:939 msgid "Creating Font Index" msgstr "" #: src/font.c:1316 msgid "You must select at least one directory to search for fonts." msgstr "" #: src/font.c:1468 msgid "Font" msgstr "" #: src/font.c:1469 msgid "Style" msgstr "" #: src/font.c:1470 src/fpick.c:1045 src/otherwindow.c:3324 src/prefs.c:450 #: src/toolbar.c:903 msgid "Size" msgstr "大小" #: src/font.c:1471 msgid "Filename" msgstr "" #: src/font.c:1471 msgid "Face" msgstr "" #: src/font.c:1472 src/spawn.c:506 msgid "Directory" msgstr "" #: src/font.c:1712 src/font.c:1825 src/toolbar.c:1064 src/viewer.c:1381 #: src/viewer.c:1433 msgid "Paste Text" msgstr "貼上文字" #: src/font.c:1725 src/font.c:1753 msgid "Text" msgstr "" #: src/font.c:1756 src/viewer.c:1439 msgid "Enter Text Here" msgstr "在此輸入文字" #: src/font.c:1785 src/viewer.c:1396 msgid "Antialias" msgstr "反鋸齒" #: src/font.c:1790 src/viewer.c:1406 msgid "Invert" msgstr "反相" #: src/font.c:1795 src/viewer.c:1411 msgid "Background colour =" msgstr "背景顏色 =" #: src/font.c:1805 msgid "Oblique" msgstr "" #: src/font.c:1808 src/viewer.c:1419 msgid "Angle of rotation =" msgstr "旋轉角度 =" #: src/font.c:1831 msgid "Font Directories" msgstr "" #: src/font.c:1836 msgid "New Directory" msgstr "" #: src/font.c:1837 src/spawn.c:507 msgid "Select Directory" msgstr "" #: src/font.c:1848 msgid "Add" msgstr "" #: src/font.c:1852 msgid "Remove" msgstr "" #: src/font.c:1856 msgid "Create Index" msgstr "" #: src/fpick.c:731 #, c-format msgid "Could not access directory %s" msgstr "" #: src/fpick.c:770 src/fpick.c:793 msgid "Delete" msgstr "" #: src/fpick.c:770 src/fpick.c:798 msgid "Rename" msgstr "" #: src/fpick.c:771 msgid "Create Directory" msgstr "" #: src/fpick.c:778 msgid "Enter the new filename" msgstr "" #: src/fpick.c:779 msgid "Enter the name of the new directory" msgstr "" #: src/fpick.c:798 src/otherwindow.c:297 src/otherwindow.c:1989 msgid "Create" msgstr "建立" #: src/fpick.c:833 #, c-format msgid "Do you really want to delete \"%s\" ?" msgstr "" #: src/fpick.c:838 msgid "Unable to delete" msgstr "" #: src/fpick.c:843 msgid "Unable to rename" msgstr "" #: src/fpick.c:852 msgid "Unable to create directory" msgstr "" #: src/fpick.c:939 msgid "Up" msgstr "" #: src/fpick.c:940 msgid "Home" msgstr "" #: src/fpick.c:941 msgid "Create New Directory" msgstr "" #: src/fpick.c:942 msgid "Show Hidden Files" msgstr "" #: src/fpick.c:943 msgid "Case Insensitive Sort" msgstr "" #: src/fpick.c:1044 msgid "Name" msgstr "" #: src/fpick.c:1046 msgid "Type" msgstr "" #: src/fpick.c:1047 msgid "Modified" msgstr "" #: src/help.c:25 src/prefs.c:481 msgid "General" msgstr "一般" #: src/help.c:26 msgid "Keyboard shortcuts" msgstr "鍵盤捷徑" #: src/help.c:27 msgid "Mouse shortcuts" msgstr "滑鼠捷徑" #: src/help.c:28 msgid "Credits" msgstr "鳴謝" #: src/help.c:32 msgid "mtPaint 3.40 - Copyright (C) 2004-2011 The Authors\n" msgstr "mtPaint 3.40 - 版權 (C) 2004-2011 作者群\n" #: src/help.c:33 msgid "See 'Credits' section for a list of the authors.\n" msgstr "作者表列請參看「鳴謝」區段。\n" #: src/help.c:34 msgid "" "mtPaint 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 3 of the License, or (at your option) any later " "version.\n" msgstr "" "mtPaint 為自由軟體;基於自由軟體基金會發布的 GNU 通用公共許可,您可以再次散布" "它和/或修改它;可依版本 3 的授權,或是 (依您的選擇) 任何之後的版本。\n" #: src/help.c:35 msgid "" "mtPaint 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.\n" msgstr "" "mtPaint 是希望它會有用而發行的,但是不做任何保證;也不暗示任何的適銷性或特定" "目的的合用性。 參看 GNU 通用公共許可來獲得更多細節。\n" #: src/help.c:36 msgid "" "mtPaint is a simple GTK+1/2 painting program designed for creating icons and " "pixel based artwork. It can edit indexed palette or 24 bit RGB images and " "offers basic painting and palette manipulation tools. It also has several " "other more powerful features such as channels, layers and animation. Due to " "its simplicity and lack of dependencies it runs well on GNU/Linux, Windows " "and older PC hardware.\n" msgstr "" "mtPaint 為簡單的 GTK+1/2 繪圖程式,設計用來建立圖示和基於像素的原圖。它可以編" "輯索引過的調色盤或 24 位元的 RGB 圖像以及提供基本繪圖和調色盤處理工具。它也有" "更多其他的強大特徵像是通道、圖層和動畫。由於它的簡易性和較少的相依性,它在 " "GNU/Linux、Windows 和舊的 PC 硬體上運行地很好。\n" #: src/help.c:37 msgid "" "There is full documentation of mtPaint's features contained in a handbook. " "If you don't already have this, you can download it from the mtPaint " "website.\n" msgstr "" "完整的 mtPaint 特色文件包含在手冊之中。 如果您尚未得到它,您可以從 mtPaint 網" "站下載。\n" #: src/help.c:38 msgid "" "If you like mtPaint and you want to keep up to date with new releases, or " "you want to give some feedback, then the mailing lists may be of interest to " "you:\n" msgstr "" "如果您喜歡 mtPaint 並且要保持使用更新的版本,或是想要供給某些回饋,那麼您也許" "會對郵遞論壇感到興趣:\n" #: src/help.c:39 msgid "http://sourceforge.net/mail/?group_id=155874" msgstr "" #: src/help.c:42 msgid " Ctrl-N Create new image" msgstr " Ctrl-N 建立新圖像" #: src/help.c:43 msgid " Ctrl-O Open Image" msgstr " Ctrl-O 開啟圖像" #: src/help.c:44 msgid " Ctrl-S Save Image" msgstr " Ctrl-S 儲存圖像" #: src/help.c:45 msgid " Ctrl-Shift-S Save layers file" msgstr "" #: src/help.c:46 msgid " Ctrl-Q Quit program\n" msgstr " Ctrl-Q 離開程式\n" #: src/help.c:47 msgid " Ctrl-A Select whole image" msgstr " Ctrl-A 選取整個圖像" #: src/help.c:48 msgid " Escape Select nothing, cancel paste box" msgstr " Escape 沒有選取任何東西,取消貼上方框" #: src/help.c:49 msgid " J Lasso selection\n" msgstr "" #: src/help.c:50 msgid " Ctrl-C Copy selection to clipboard" msgstr " Ctrl-C 複製選擇到剪貼簿" #: src/help.c:51 msgid "" " Ctrl-X Copy selection to clipboard, and then paint current " "pattern to selection area" msgstr " Ctrl-X 複製選擇到剪貼簿,然後繪製目前式樣到選擇區域" #: src/help.c:52 msgid " Ctrl-V Paste clipboard to centre of current view" msgstr " Ctrl-V 貼上剪貼簿到目前的檢視中心" #: src/help.c:53 msgid " Ctrl-K Paste clipboard to location it was copied from" msgstr " Ctrl-K 貼上剪貼簿到它複製而來的位置" #: src/help.c:54 msgid " Ctrl-Shift-V Paste clipboard to new layer" msgstr "" #: src/help.c:55 msgid " Enter/Return Commit paste to canvas" msgstr " Enter/Return 認可貼上到畫布" #: src/help.c:56 msgid " Shift+Enter/Return Commit paste and swap canvas into the clipboard\n" msgstr "" #: src/help.c:57 msgid " Arrow keys Paint Mode - Move the mouse pointer" msgstr " Arrow keys 繪製模式 - 變更顏色 A 或 B" #: src/help.c:58 msgid "" " Arrow keys Selection Mode - Nudge selection box or paste box by one " "pixel" msgstr " Arrow keys 選擇模式 - 微動選取方塊或位移一個像素後貼上方框" #: src/help.c:59 msgid "" " Shift+Arrow keys Nudge mouse pointer, selection box or paste box by x " "pixels - x is defined by the Preferences window" msgstr "" " Shift+Arrow keys 輕推選取方塊或位移 x 像素再貼上方框 - x 由偏好設定視窗所" "定義" #: src/help.c:60 msgid " Ctrl+Arrows Move layer or resize selection box" msgstr " Ctrl+Arrows 移動圖層或調整大小選取方塊" #: src/help.c:61 msgid " Ctrl+Shift+Arrows Move layer or resize selection box by x pixels\n" msgstr "" #: src/help.c:62 msgid " Enter/Return Paint Mode - Simulate left click" msgstr "" #: src/help.c:63 msgid " Backspace Paint Mode - Simulate right click\n" msgstr "" #: src/help.c:64 msgid "" " [ or ] Change colour A to the next or previous palette item" msgstr " [ or ] 變更顏色 A 為下一個或上一個調色盤項目" #: src/help.c:65 msgid "" " Shift+[ or ] Change colour B to the next or previous palette item\n" msgstr " Shift+[ or ] 變更顏色 B 為下一個或上一個調色盤項目\n" #: src/help.c:66 msgid " Delete Crop image to selection" msgstr " Delete 裁剪圖像之後選擇" #: src/help.c:67 msgid "" " Insert Transform colours - i.e. Brightness, Contrast, " "Saturation, Posterize, Gamma" msgstr " Insert 變換顏色 -也就是亮度、對比、飽和度、色調分離、γ 值" #: src/help.c:68 msgid " Ctrl-G Greyscale the image" msgstr " Ctrl-G 圖像灰階化" #: src/help.c:69 msgid " Shift-Ctrl-G Greyscale the image (Gamma corrected)" msgstr " Shift-Ctrl-G 圖像灰階化 (γ 值已修正)" #: src/help.c:70 msgid " Ctrl+M Mirror the image" msgstr "" #: src/help.c:71 msgid " Shift-Ctrl-I Invert the image\n" msgstr "" #: src/help.c:72 msgid "" " Ctrl-T Draw a rectangle around the selection area with the " "current fill" msgstr " Ctrl-T 以目前填充色在選擇區域周圍繪製矩形" #: src/help.c:73 msgid " Ctrl-Shift-T Fill in the selection area with the current fill" msgstr " Ctrl-Shift-T 以目前填充色填滿選擇區域" #: src/help.c:74 msgid " Ctrl-L Draw an ellipse spanning the selection area" msgstr " Ctrl-L 繪製展開選擇區域的橢圓" #: src/help.c:75 msgid " Ctrl-Shift-L Draw a filled ellipse spanning the selection area\n" msgstr " Ctrl-Shift-L 繪製展開選擇區域的填色橢圓\n" #: src/help.c:76 msgid " Ctrl-E Edit the RGB values for colours A & B" msgstr " Ctrl-E 編輯用於顏色 A & B 的 RGB 值" #: src/help.c:77 msgid " Ctrl-W Edit all palette colours\n" msgstr " Ctrl-W 編輯所有調色盤顏色\n" #: src/help.c:78 msgid " Ctrl-P Preferences" msgstr " Ctrl-P 偏好設定" #: src/help.c:79 msgid " Ctrl-I Information\n" msgstr " Ctrl-I 資訊\n" #: src/help.c:80 msgid " Ctrl-Z Undo last action" msgstr " Ctrl-Z 復原最後一筆動作" #: src/help.c:81 msgid " Ctrl-R Redo an undone action\n" msgstr " Ctrl-R 重做已復原動作\n" #: src/help.c:82 msgid " Shift-T Text Tool (GTK+)" msgstr "" #: src/help.c:83 msgid " T Text Tool (FreeType)\n" msgstr "" #: src/help.c:84 msgid " V View Window" msgstr " V 檢視視窗" #: src/help.c:85 msgid " L Layers Window\n" msgstr " L 圖層視窗\n" #: src/help.c:86 msgid " B Toggle Snap to Tile Grid mode\n" msgstr "" #: src/help.c:87 msgid " X Swap Colours A & B" msgstr "" #: src/help.c:88 msgid " E Choose Colour\n" msgstr "" #: src/help.c:89 msgid "" " A Draw open arrow head when using the line tool (size set " "by flow setting)" msgstr "" #: src/help.c:90 msgid "" " S Draw closed arrow head when using the line tool (size " "set by flow setting)\n" msgstr "" #: src/help.c:91 msgid " D Line Tool" msgstr "" #: src/help.c:92 msgid " F Flood Fill Tool\n" msgstr "" #: src/help.c:93 msgid " +,= Main edit window - Zoom in" msgstr " +,= 主要編輯視窗 - 放大" #: src/help.c:94 msgid " - Main edit window - Zoom out" msgstr " - 主要編輯視窗 - 縮小" #: src/help.c:95 msgid " Shift +,= View window - Zoom in" msgstr " Shift +,= 檢視視窗 - 放大" #: src/help.c:96 msgid " Shift - View window - Zoom out\n" msgstr " Shift - 檢視視窗 - 縮小\n" #: src/help.c:97 #, fuzzy, c-format msgid " 1 10% zoom" msgstr " 1 10% 縮放" #: src/help.c:98 #, fuzzy, c-format msgid " 2 25% zoom" msgstr " 2 25% 縮放" #: src/help.c:99 #, fuzzy, c-format msgid " 3 50% zoom" msgstr " 3 50% 縮放" #: src/help.c:100 #, fuzzy, c-format msgid " 4 100% zoom" msgstr " 4 100% 縮放" #: src/help.c:101 #, fuzzy, c-format msgid " 5 400% zoom" msgstr " 5 400% 縮放" #: src/help.c:102 #, fuzzy, c-format msgid " 6 800% zoom" msgstr " 6 800% 縮放" #: src/help.c:103 #, fuzzy, c-format msgid " 7 1200% zoom" msgstr " 7 1200% 縮放" #: src/help.c:104 #, fuzzy, c-format msgid " 8 1600% zoom" msgstr " 8 1600% 縮放" #: src/help.c:105 #, fuzzy, c-format msgid " 9 2000% zoom\n" msgstr " 9 2000% 縮放\n" #: src/help.c:106 msgid " Shift + 1 Edit image channel" msgstr " Shift + 1 編輯圖像通道" #: src/help.c:107 msgid " Shift + 2 Edit alpha channel" msgstr " Shift + 2 編輯 α 通道" #: src/help.c:108 msgid " Shift + 3 Edit selection channel" msgstr " Shift + 3 編輯選取通道" #: src/help.c:109 msgid " Shift + 4 Edit mask channel\n" msgstr " Shift + 4 編輯遮罩通道\n" #: src/help.c:110 msgid " F1 Help" msgstr " F1 說明" #: src/help.c:111 msgid " F2 Choose Pattern" msgstr " F2 選取式樣" #: src/help.c:112 msgid " F3 Choose Brush" msgstr " F3 選取筆刷" #: src/help.c:113 msgid " F4 Paint Tool" msgstr " F4 繪製工具" #: src/help.c:114 msgid " F5 Toggle Main Toolbar" msgstr " F5 切換主工具列" #: src/help.c:115 msgid " F6 Toggle Tools Toolbar" msgstr " F6 切換工具工具列" #: src/help.c:116 msgid " F7 Toggle Settings Toolbar" msgstr " F7 切換設定值工具列" #: src/help.c:117 msgid " F8 Toggle Palette" msgstr " F8 切換調色盤" #: src/help.c:118 msgid " F9 Selection Tool" msgstr " F9 選擇工具" #: src/help.c:119 msgid " F12 Toggle Dock Area\n" msgstr "" #: src/help.c:120 msgid " Ctrl + F1 - F12 Save current clipboard to file 1-12" msgstr " Ctrl + F1 - F12 儲存目前剪貼簿到檔案 1-12" #: src/help.c:121 msgid " Shift + F1 - F12 Load clipboard from file 1-12\n" msgstr " Shift + F1 - F12 從檔案 1-12 載入剪貼簿\n" #: src/help.c:122 msgid "" " Ctrl + 1, 2, ... , 0 Set opacity to 10%, 20%, ... , 100% (main or keypad " "numbers)" msgstr " Ctrl + 1, 2,…,0 設定濁度到 10%, 20%,…,100% (主鍵區或數字鍵區數字)" #: src/help.c:123 msgid " Ctrl + + or = Increase opacity by 1" msgstr " Ctrl + + 或 = 增加濁度 1" #: src/help.c:124 msgid " Ctrl + - Decrease opacity by 1\n" msgstr " Ctrl + - 減少濁度 1\n" #: src/help.c:125 msgid "" " Home Show or hide main window menu/toolbar/status bar/palette" msgstr " Home 顯示或隱藏主視窗選單/工具列/狀態列/調色盤" #: src/help.c:126 msgid " Page Up Scale Image" msgstr " Page Up 伸縮圖像" #: src/help.c:127 msgid " Page Down Resize Image canvas" msgstr " Page Down 調整圖像畫布大小" #: src/help.c:128 msgid " End Pan Window" msgstr " End 全景視窗" #: src/help.c:131 msgid " Left button Paint to canvas using the current tool" msgstr " 左鍵 使用目前工具繪製到畫布" #: src/help.c:132 msgid "" " Middle button Selects the point which will be the centre of the " "image after the next zoom" msgstr "" " 中鍵 設定用於下一次縮放之後的中心" #: src/help.c:133 msgid "" " Right button Commit paste to canvas / Stop drawing current line / " "Cancel selection\n" msgstr "" " 右鍵 認可貼上到畫布/停止繪製目前線" "條/取消選擇\n" #: src/help.c:134 msgid "" " Scroll Wheel In GTK+2 the user can have the scroll wheel zoom in " "or out via the Preferences window\n" msgstr "" " 滾輪 在 GTK+2 中使用者可以透過偏好設定" "視窗來用滾輪放大或縮小\n" #: src/help.c:135 msgid " Ctrl+Left button Choose colour A from under mouse pointer" msgstr " Ctrl+左鍵 從滑鼠指標下方選取顏色 A" #: src/help.c:136 msgid "" " Ctrl+Middle button Create colour A/B and pattern based on the RGB colour " "in A (RGB images only)" msgstr "" #: src/help.c:137 msgid " Ctrl+Right button Choose colour B from under mouse pointer" msgstr " Ctrl+右鍵 從滑鼠指標下方選取顏色 B" #: src/help.c:138 msgid " Ctrl+Scroll Wheel Scroll the main edit window left or right\n" msgstr " Ctrl+滾輪 向左或向右滾動主要編輯視窗\n" #: src/help.c:139 msgid "" " Ctrl+Double click Set colour A or B to average colour under brush " "square or selection marquee (RGB only)\n" msgstr "" #: src/help.c:140 msgid "" " Shift+Right button Selects the point which will be the centre of the " "image after the next zoom\n" "\n" msgstr "" " Shift+右鍵 設定用於下一次縮放之後的中心\n" "\n" #: src/help.c:141 msgid "You can fixate the X/Y co-ordinates while moving the mouse:\n" msgstr "移動滑鼠時,您可以修正 X/Y 座標:\n" #: src/help.c:142 msgid " Shift Constrain mouse movements to vertical line" msgstr " Shift 相對於垂直線等比例滑鼠移動" #: src/help.c:143 msgid " Shift+Ctrl Constrain mouse movements to horizontal line" msgstr " Shift+Ctrl 相對於水平線等比例滑鼠移動" #: src/help.c:146 msgid "mtPaint is maintained by Dmitry Groshev.\n" msgstr "mtPaint 是由 Dmitry Groshev 所維護。\n" #: src/help.c:147 msgid "wjaguar@users.sourceforge.net" msgstr "" #: src/help.c:148 msgid "http://mtpaint.sourceforge.net/\n" msgstr "" #: src/help.c:149 msgid "" "The following people (in alphabetical order) have contributed directly to " "the project, and are therefore worthy of gracious thanks for their " "generosity and hard work:\n" "\n" msgstr "" "下列人士 (依字母排序) 對於計畫有直接的貢獻,因而值得對於它們的慷慨和努力成果" "表示由衷的感謝:\n" "\n" #: src/help.c:150 msgid "Authors\n" msgstr "作者\n" #: src/help.c:151 msgid "" "Dmitry Groshev - Contributing developer for version 2.30. Lead developer and " "maintainer from version 3.00 to the present." msgstr "" "Dmitry Groshev - 協助開發版本 2.30。從版本 3.00 起到目前為止的領導開發者與維" "護者。" #: src/help.c:152 msgid "" "Mark Tyler - Original author and maintainer up to version 3.00, occasional " "contributor thereafter." msgstr "Mark Tyler - 原來的作者與維護者到版本 3.00 為止,之後不時有所貢獻。" #: src/help.c:153 msgid "" "Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more " "information.\n" "\n" msgstr "" "Xiaolin Wu - 編寫 Wu 量化方法 - 參看 wu.c 以獲得更多資訊。\n" "\n" #: src/help.c:154 msgid "" "General Contributions (Feedback and Ideas for improvements unless otherwise " "stated)\n" msgstr "一般貢獻(若無額外記載表示意見回饋與改進想法)\n" #: src/help.c:155 msgid "Abdulla Al Muhairi - Website redesign April 2005" msgstr "Abdulla Al Muhairi - 2005 年 4 月網站重新設計" #: src/help.c:156 msgid "Alan Horkan" msgstr "" #: src/help.c:157 msgid "Alexandre Prokoudine" msgstr "" #: src/help.c:158 msgid "Antonio Andrea Bianco" msgstr "" #: src/help.c:159 msgid "Dennis Lee" msgstr "" #: src/help.c:160 msgid "Donald White" msgstr "" #: src/help.c:161 msgid "Ed Jason" msgstr "" #: src/help.c:162 msgid "" "Eddie Kohler - Created Gifsicle which is needed for the creation and viewing " "of animated GIF files http://www.lcdf.org/gifsicle/" msgstr "" "Eddie Kohler - 建立 Gifsicle 做為建立和觀看動畫 GIF 所需的檔案 http://www." "lcdf.org/gifsicle/" #: src/help.c:163 msgid "" "Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta " "registration" msgstr "" "Guadalinex 團隊 (Junta de Andalucia) - 線上手冊、Launchpad/Rosetta 註冊" #: src/help.c:164 msgid "Lou Afonso" msgstr "" #: src/help.c:165 msgid "Magnus Hjorth" msgstr "" #: src/help.c:166 msgid "Martin Zelaia" msgstr "" #: src/help.c:167 msgid "Pasi Kallinen" msgstr "" #: src/help.c:168 msgid "Pavel Ruzicka" msgstr "" #: src/help.c:169 msgid "Puppy Linux (Barry Kauler)" msgstr "" #: src/help.c:170 msgid "Vlastimil Krejcir" msgstr "" #: src/help.c:171 msgid "" "William Kern\n" "\n" msgstr "" #: src/help.c:172 msgid "Translations\n" msgstr "翻譯\n" #: src/help.c:173 msgid "Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno" msgstr "葡萄牙語(巴西) - Paulo Trevizan, Valter Nazianzeno" #: src/help.c:174 msgid "Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik" msgstr "捷克語 - Pavel Ruzicka, Martin Petricek, Roman Hornik" #: src/help.c:175 msgid "Dutch - Hans Strijards" msgstr "" #: src/help.c:176 msgid "" "French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, " "Philippe Etienne" msgstr "" "法語 - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, Philippe " "Etienne" #: src/help.c:177 msgid "Galician - Miguel Anxo Bouzada" msgstr "" #: src/help.c:178 msgid "German - Oliver Frommel, B. Clausius, Ulrich Ringel" msgstr "德語 - Oliver Frommel, B. Clausius, Ulrich Ringel" #: src/help.c:179 msgid "Hungarian - Ur Balazs" msgstr "" #: src/help.c:180 msgid "Italian - Angelo Gemmi" msgstr "" #: src/help.c:181 msgid "Japanese - Norihiro YONEDA" msgstr "" #: src/help.c:182 msgid "Polish - Bartosz Kaszubowski, LucaS" msgstr "波蘭語 - Bartosz Kaszubowski, LucaS" #: src/help.c:183 msgid "Portuguese - Israel G. Lugo, Tiago Silva" msgstr "葡萄牙語 - Israel G.Lugo, Tiago Silva" #: src/help.c:184 msgid "Russian - Sergey Irupin, Dmitry Groshev" msgstr "" #: src/help.c:185 msgid "Simplified Chinese - Cecc" msgstr "" #: src/help.c:186 msgid "Slovak - Jozef Riha" msgstr "斯洛伐克語 - Jozef Riha" #: src/help.c:187 msgid "" "Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel " "Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" msgstr "" "西班牙語 - Guadalinex 團隊 (Junta de Andalucia), Antonio Sanchez Leon, " "Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme" #: src/help.c:188 msgid "Swedish - Daniel Nylander, Daniel Eriksson" msgstr "" #: src/help.c:189 msgid "Tagalog - Anjelo delCarmen" msgstr "" #: src/help.c:190 msgid "Taiwanese Chinese - Wei-Lun Chao" msgstr "中文(臺灣) - 趙惟倫" #: src/help.c:191 msgid "Turkish - Muhammet Kara, Tutku Dalmaz" msgstr "土耳其語 - Muhammet Kara、Tutku Dalmaz" #: src/info.c:281 msgid "Information" msgstr "資訊" #: src/info.c:290 msgid "Memory" msgstr "記憶體" #: src/info.c:293 msgid "Total memory for main + undo images" msgstr "用於主要 + 復原圖像的記憶體總計" #: src/info.c:306 msgid "Undo / Redo / Max levels used" msgstr "復原/重做/最大使用級數" #: src/info.c:310 src/otherwindow.c:954 src/otherwindow.c:3307 src/png.c:642 #: src/png.c:847 msgid "Clipboard" msgstr "剪貼簿" #: src/info.c:311 msgid "Unused" msgstr "未使用的" #: src/info.c:316 #, c-format msgid "Clipboard = %i x %i" msgstr "剪貼簿 = %i x %i" #: src/info.c:318 #, c-format msgid "Clipboard = %i x %i x RGB" msgstr "剪貼簿 = %i x %i x RGB" #: src/info.c:326 msgid "Unique RGB pixels" msgstr "唯一 RGB 像素" #: src/info.c:339 src/layer.c:155 msgid "Layers" msgstr "圖層" #: src/info.c:343 msgid "Total layer memory usage" msgstr "圖層記憶體用量總計" #: src/info.c:350 msgid "Colour Histogram" msgstr "顏色長條圖" #: src/info.c:372 #, c-format msgid "Colour index totals - %i of %i used" msgstr "顏色索引總計 - 已使用 %2$i 的 %1$i" #: src/info.c:391 msgid "Index" msgstr "索引" #: src/info.c:392 msgid "Canvas pixels" msgstr "畫布像素" #: src/info.c:407 msgid "Orphans" msgstr "段落前分頁" #: src/inifile.c:817 msgid "" "Could not find home directory. Using current directory as home directory." msgstr "找不到主目錄。使用目前目錄做為主目錄。" #: src/layer.c:70 msgid "Background" msgstr "背景" #: src/layer.c:156 src/mainwindow.c:5223 msgid "(Modified)" msgstr "(已修改)" #: src/layer.c:157 src/mainwindow.c:5224 msgid "Untitled" msgstr "無標題" #: src/layer.c:419 #, c-format msgid "Do you really want to delete layer %i (%s) ?" msgstr "您真的要刪除圖層 %i (%s) 嗎?" #: src/layer.c:498 msgid "" "One or more of the layers contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "一個或更多的未儲存圖層含有變更。 您真的要丟棄這些變更嗎?" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Cancel Operation" msgstr "取消作業" #: src/layer.c:499 src/mainwindow.c:1122 msgid "Lose Changes" msgstr "丟棄變更" #: src/layer.c:638 #, c-format msgid "%d layers failed to load" msgstr "%d 個圖層載入時失敗" #: src/layer.c:904 msgid "" "One or more of the image layers has not been saved. You must save each " "image individually before saving the layers text file in order to load this " "composite image in the future." msgstr "" "一個或更多的圖像圖層未儲存。 您必須在儲存圖層文字檔案之前,個別地儲存每個圖" "像,以便在之後載入這個合成圖像。" #: src/layer.c:919 msgid "Do you really want to delete all of the layers?" msgstr "您真的要刪除全部的圖層嗎?" #: src/layer.c:1057 msgid "You cannot add any more layers." msgstr "您無法再加入任何圖層。" #: src/layer.c:1159 src/otherwindow.c:261 msgid "New Layer" msgstr "新增圖層" #: src/layer.c:1160 msgid "Raise" msgstr "提升" #: src/layer.c:1161 msgid "Lower" msgstr "降低" #: src/layer.c:1162 msgid "Duplicate Layer" msgstr "重製圖層" #: src/layer.c:1163 msgid "Centralise Layer" msgstr "圖層置中" #: src/layer.c:1164 msgid "Delete Layer" msgstr "刪除圖層" #: src/layer.c:1165 msgid "Close Layers Window" msgstr "關閉圖層視窗" #: src/layer.c:1268 msgid "Layer Name" msgstr "圖層名稱" #: src/layer.c:1269 msgid "Position" msgstr "位置" #: src/layer.c:1272 msgid "Transparent Colour" msgstr "透明色" #: src/layer.c:1300 msgid "Show all layers in main window" msgstr "在主視窗中顯示全部圖層" #: src/mainwindow.c:275 msgid "There were no unused colours to remove!" msgstr "沒有未使用的顏色可移除!" #: src/mainwindow.c:302 msgid "The palette does not contain 2 colours that have identical RGB values" msgstr "調色盤不包含兩種具有相同 RGB 值的顏色" #: src/mainwindow.c:305 #, c-format msgid "" "The palette contains %i colours that have identical RGB values. Do you " "really want to merge them into one index and realign the canvas?" msgstr "" "調色盤含有 %i 種具有相等 RGB 值的顏色。 您真的要將它們合併為一個索引和重新對" "整畫布嗎?" #: src/mainwindow.c:493 src/mainwindow.c:1141 src/otherwindow.c:1964 #: src/otherwindow.c:2589 msgid "RGB" msgstr "" #: src/mainwindow.c:496 msgid "indexed" msgstr "" #: src/mainwindow.c:502 #, c-format msgid "" "You are trying to save an %s image to an %s file which is not possible. I " "would suggest you save with a PNG extension." msgstr "" #: src/mainwindow.c:504 #, c-format msgid "" "You are trying to save an %s file with a palette of more than %d colours. " "Either use another format or reduce the palette to %d colours." msgstr "" #: src/mainwindow.c:528 msgid "" "You are trying to save an XPM file with more than 4096 colours. Either use " "another format or posterize the image to 4 bits, or otherwise reduce the " "number of colours." msgstr "" #: src/mainwindow.c:575 msgid "Unable to load clipboard" msgstr "無法載入剪貼簿" #: src/mainwindow.c:601 msgid "Unable to save clipboard" msgstr "無法儲存剪貼簿" #: src/mainwindow.c:1121 msgid "" "This canvas/palette contains changes that have not been saved. Do you " "really want to lose these changes?" msgstr "此畫布/調色盤含有未儲存的變更。 您真的要丟棄這些變更嗎?" #: src/mainwindow.c:1139 src/otherwindow.c:948 src/otherwindow.c:3307 msgid "Image" msgstr "圖像" #: src/mainwindow.c:1141 src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "sRGB" msgstr "" #: src/mainwindow.c:1163 msgid "Do you really want to quit?" msgstr "您真的要離開嗎?" #: src/mainwindow.c:4663 msgid "/_File" msgstr "/檔案(_F)" #: src/mainwindow.c:4665 msgid "//New" msgstr "//新增" #: src/mainwindow.c:4666 msgid "//Open ..." msgstr "//開啟…" #: src/mainwindow.c:4667 src/mainwindow.c:4918 msgid "//Save" msgstr "//儲存" #: src/mainwindow.c:4668 src/mainwindow.c:4845 src/mainwindow.c:4895 #: src/mainwindow.c:4919 msgid "//Save As ..." msgstr "//另存為…" #: src/mainwindow.c:4670 msgid "//Export Undo Images ..." msgstr "//匯出復原圖像…" #: src/mainwindow.c:4671 msgid "//Export Undo Images (reversed) ..." msgstr "//匯出復原圖像 (反向)…" #: src/mainwindow.c:4672 msgid "//Export ASCII Art ..." msgstr "//匯出 ASCII 圖案…" #: src/mainwindow.c:4673 msgid "//Export Animated GIF ..." msgstr "//匯出動畫 GIF…" #: src/mainwindow.c:4675 msgid "//Actions" msgstr "" #: src/mainwindow.c:4693 msgid "///Configure" msgstr "" #: src/mainwindow.c:4716 msgid "//Quit" msgstr "//離開" #: src/mainwindow.c:4718 msgid "/_Edit" msgstr "/編輯(_E)" #: src/mainwindow.c:4720 msgid "//Undo" msgstr "//復原" #: src/mainwindow.c:4721 msgid "//Redo" msgstr "//重做" #: src/mainwindow.c:4723 msgid "//Cut" msgstr "//剪下" #: src/mainwindow.c:4724 msgid "//Copy" msgstr "//複製" #: src/mainwindow.c:4725 msgid "//Copy To Palette" msgstr "" #: src/mainwindow.c:4726 msgid "//Paste To Centre" msgstr "//貼到中心" #: src/mainwindow.c:4727 msgid "//Paste To New Layer" msgstr "//貼到新圖層" #: src/mainwindow.c:4728 msgid "//Paste" msgstr "//貼上" #: src/mainwindow.c:4729 msgid "//Paste Text" msgstr "//貼上文字" #: src/mainwindow.c:4731 msgid "//Paste Text (FreeType)" msgstr "" #: src/mainwindow.c:4733 msgid "//Paste Palette" msgstr "" #: src/mainwindow.c:4735 msgid "//Load Clipboard" msgstr "//載入剪貼簿" #: src/mainwindow.c:4749 msgid "//Save Clipboard" msgstr "//儲存剪貼簿" #: src/mainwindow.c:4763 msgid "//Import Clipboard from System" msgstr "" #: src/mainwindow.c:4764 msgid "//Export Clipboard to System" msgstr "" #: src/mainwindow.c:4766 msgid "//Choose Pattern ..." msgstr "//選取式樣…" #: src/mainwindow.c:4767 msgid "//Choose Brush ..." msgstr "//選取筆刷…" #: src/mainwindow.c:4768 msgid "//Choose Colour ..." msgstr "" #: src/mainwindow.c:4770 msgid "/_View" msgstr "/檢視(_V)" #: src/mainwindow.c:4772 msgid "//Show Main Toolbar" msgstr "//顯示主工具列" #: src/mainwindow.c:4773 msgid "//Show Tools Toolbar" msgstr "//顯示工具工具列" #: src/mainwindow.c:4774 msgid "//Show Settings Toolbar" msgstr "//顯示設定值工具列" #: src/mainwindow.c:4775 msgid "//Show Dock" msgstr "" #: src/mainwindow.c:4776 msgid "//Show Palette" msgstr "//顯示調色盤" #: src/mainwindow.c:4777 msgid "//Show Status Bar" msgstr "//顯示狀態列" #: src/mainwindow.c:4779 msgid "//Toggle Image View" msgstr "//切換圖像檢視" #: src/mainwindow.c:4780 msgid "//Centralize Image" msgstr "//圖像置中" #: src/mainwindow.c:4781 msgid "//Show Zoom Grid" msgstr "//顯示縮放格線" #: src/mainwindow.c:4782 msgid "//Snap To Tile Grid" msgstr "" #: src/mainwindow.c:4783 msgid "//Configure Grid ..." msgstr "" #: src/mainwindow.c:4784 msgid "//Tracing Image ..." msgstr "" #: src/mainwindow.c:4786 msgid "//View Window" msgstr "//檢視視窗" #: src/mainwindow.c:4787 msgid "//Horizontal Split" msgstr "//水平分隔" #: src/mainwindow.c:4788 msgid "//Focus View Window" msgstr "//焦點檢視視窗" #: src/mainwindow.c:4790 msgid "//Pan Window" msgstr "//全景視窗" #: src/mainwindow.c:4791 msgid "//Layers Window" msgstr "//圖層視窗" #: src/mainwindow.c:4793 msgid "/_Image" msgstr "/圖像(_I)" #: src/mainwindow.c:4795 msgid "//Convert To RGB" msgstr "//轉換到 RGB" #: src/mainwindow.c:4796 msgid "//Convert To Indexed ..." msgstr "//轉換到索引值…" #: src/mainwindow.c:4798 msgid "//Scale Canvas ..." msgstr "//伸縮畫布…" #: src/mainwindow.c:4799 msgid "//Resize Canvas ..." msgstr "//調整畫布大小…" #: src/mainwindow.c:4800 msgid "//Crop" msgstr "//裁剪" #: src/mainwindow.c:4802 src/mainwindow.c:4827 msgid "//Flip Vertically" msgstr "//垂直翻轉" #: src/mainwindow.c:4803 src/mainwindow.c:4828 msgid "//Flip Horizontally" msgstr "//水平翻轉" #: src/mainwindow.c:4804 src/mainwindow.c:4829 msgid "//Rotate Clockwise" msgstr "//順時針旋轉" #: src/mainwindow.c:4805 src/mainwindow.c:4830 msgid "//Rotate Anti-Clockwise" msgstr "//逆時針旋轉" #: src/mainwindow.c:4806 msgid "//Free Rotate ..." msgstr "//自由旋轉…" #: src/mainwindow.c:4807 msgid "//Skew ..." msgstr "" #: src/mainwindow.c:4810 msgid "//Segment ..." msgstr "" #: src/mainwindow.c:4812 msgid "//Information ..." msgstr "//資訊…" #: src/mainwindow.c:4813 msgid "//Preferences ..." msgstr "//偏好設定…" #: src/mainwindow.c:4815 msgid "/_Selection" msgstr "/選擇(_S)" #: src/mainwindow.c:4817 msgid "//Select All" msgstr "//全選" #: src/mainwindow.c:4818 msgid "//Select None (Esc)" msgstr "//全部不選 (Esc)" #: src/mainwindow.c:4819 msgid "//Lasso Selection" msgstr "//套索選擇" #: src/mainwindow.c:4820 msgid "//Lasso Selection Cut" msgstr "//剪下套索選擇" #: src/mainwindow.c:4822 msgid "//Outline Selection" msgstr "//描邊選擇" #: src/mainwindow.c:4823 msgid "//Fill Selection" msgstr "//填充選擇" #: src/mainwindow.c:4824 msgid "//Outline Ellipse" msgstr "//描邊橢圓" #: src/mainwindow.c:4825 msgid "//Fill Ellipse" msgstr "//填充橢圓" #: src/mainwindow.c:4832 msgid "//Horizontal Ramp" msgstr "" #: src/mainwindow.c:4833 msgid "//Vertical Ramp" msgstr "" #: src/mainwindow.c:4835 msgid "//Alpha Blend A,B" msgstr "//α 混色 A,B" #: src/mainwindow.c:4836 msgid "//Move Alpha to Mask" msgstr "//移動 α 到遮罩" #: src/mainwindow.c:4837 msgid "//Mask Colour A,B" msgstr "//遮罩顏色 A,B" #: src/mainwindow.c:4838 msgid "//Unmask Colour A,B" msgstr "//取消遮罩顏色 A,B" #: src/mainwindow.c:4839 msgid "//Mask All Colours" msgstr "//遮罩所有顏色" #: src/mainwindow.c:4840 msgid "//Clear Mask" msgstr "//清除遮罩" #: src/mainwindow.c:4842 msgid "/_Palette" msgstr "/調色盤(_P)" #: src/mainwindow.c:4844 src/mainwindow.c:4894 msgid "//Load ..." msgstr "//載入…" #: src/mainwindow.c:4846 msgid "//Load Default" msgstr "//載入預設" #: src/mainwindow.c:4848 msgid "//Mask All" msgstr "//全部遮罩" #: src/mainwindow.c:4849 msgid "//Mask None" msgstr "//全無遮罩" #: src/mainwindow.c:4851 msgid "//Swap A & B" msgstr "//交換 A & B" #: src/mainwindow.c:4852 msgid "//Edit Colour A & B ..." msgstr "//編輯顏色 A & B…" #: src/mainwindow.c:4853 msgid "//Dither A" msgstr "" #: src/mainwindow.c:4854 msgid "//Palette Editor ..." msgstr "//調色盤編輯器…" #: src/mainwindow.c:4855 msgid "//Set Palette Size ..." msgstr "//設定調色盤大小…" #: src/mainwindow.c:4856 msgid "//Merge Duplicate Colours" msgstr "//合併重製顏色" #: src/mainwindow.c:4857 msgid "//Remove Unused Colours" msgstr "//移除未使用的顏色" #: src/mainwindow.c:4859 msgid "//Create Quantized ..." msgstr "//建立量化…" #: src/mainwindow.c:4861 msgid "//Sort Colours ..." msgstr "//排序顏色…" #: src/mainwindow.c:4862 msgid "//Palette Shifter ..." msgstr "//調色盤轉移器…" #: src/mainwindow.c:4863 msgid "//Pick Gradient ..." msgstr "" #: src/mainwindow.c:4865 msgid "/Effe_cts" msgstr "/效果(_C)" #: src/mainwindow.c:4867 msgid "//Transform Colour ..." msgstr "//變換顏色…" #: src/mainwindow.c:4868 msgid "//Invert" msgstr "//反相" #: src/mainwindow.c:4869 msgid "//Greyscale" msgstr "//灰階" #: src/mainwindow.c:4870 msgid "//Greyscale (Gamma corrected)" msgstr "//灰階 (γ 值已修正)" #: src/mainwindow.c:4871 msgid "//Isometric Transformation" msgstr "//等量變換" #: src/mainwindow.c:4873 msgid "///Left Side Down" msgstr "///左側向下" #: src/mainwindow.c:4874 msgid "///Right Side Down" msgstr "///右側向下" #: src/mainwindow.c:4875 msgid "///Top Side Right" msgstr "///頂端向右" #: src/mainwindow.c:4876 msgid "///Bottom Side Right" msgstr "///底側向右" #: src/mainwindow.c:4878 msgid "//Edge Detect ..." msgstr "//邊緣偵測…" #: src/mainwindow.c:4879 msgid "//Difference of Gaussians ..." msgstr "" #: src/mainwindow.c:4880 msgid "//Sharpen ..." msgstr "//銳化…" #: src/mainwindow.c:4881 msgid "//Unsharp Mask ..." msgstr "//去銳化遮罩…" #: src/mainwindow.c:4882 msgid "//Soften ..." msgstr "//柔化…" #: src/mainwindow.c:4883 msgid "//Gaussian Blur ..." msgstr "//高斯模糊…" #: src/mainwindow.c:4884 msgid "//Kuwahara-Nagao Blur ..." msgstr "" #: src/mainwindow.c:4885 msgid "//Emboss" msgstr "//浮雕" #: src/mainwindow.c:4886 msgid "//Dilate" msgstr "" #: src/mainwindow.c:4887 msgid "//Erode" msgstr "" #: src/mainwindow.c:4889 msgid "//Bacteria ..." msgstr "//菌化…" #: src/mainwindow.c:4891 msgid "/Cha_nnels" msgstr "/通道(_N)" #: src/mainwindow.c:4893 msgid "//New ..." msgstr "//新增…" #: src/mainwindow.c:4896 msgid "//Delete ..." msgstr "//刪除…" #: src/mainwindow.c:4898 msgid "//Edit Image" msgstr "//編輯圖像" #: src/mainwindow.c:4899 msgid "//Edit Alpha" msgstr "//編輯 α" #: src/mainwindow.c:4900 msgid "//Edit Selection" msgstr "//編輯選擇" #: src/mainwindow.c:4901 msgid "//Edit Mask" msgstr "//編輯遮罩" #: src/mainwindow.c:4903 msgid "//Hide Image" msgstr "//隱藏圖像" #: src/mainwindow.c:4904 msgid "//Disable Alpha" msgstr "//停用 α" #: src/mainwindow.c:4905 msgid "//Disable Selection" msgstr "//停用選擇" #: src/mainwindow.c:4906 msgid "//Disable Mask" msgstr "//停用遮罩" #: src/mainwindow.c:4908 msgid "//Couple RGBA Operations" msgstr "//接合 RGBA 計算" #: src/mainwindow.c:4909 msgid "//Threshold ..." msgstr "//臨界值…" #: src/mainwindow.c:4910 msgid "//Unassociate Alpha" msgstr "" #: src/mainwindow.c:4912 msgid "//View Alpha as an Overlay" msgstr "//視 α 為外罩" #: src/mainwindow.c:4913 msgid "//Configure Overlays ..." msgstr "//配置外罩…" #: src/mainwindow.c:4915 msgid "/_Layers" msgstr "/圖層(_L)" #: src/mainwindow.c:4917 msgid "//New Layer" msgstr "" #: src/mainwindow.c:4920 msgid "//Save Composite Image ..." msgstr "//儲存合成圖像…" #: src/mainwindow.c:4921 msgid "//Composite to New Layer" msgstr "" #: src/mainwindow.c:4922 msgid "//Remove All Layers" msgstr "//移除所有圖層" #: src/mainwindow.c:4924 msgid "//Configure Animation ..." msgstr "//配置動畫…" #: src/mainwindow.c:4925 msgid "//Preview Animation ..." msgstr "//預覽動畫…" #: src/mainwindow.c:4926 msgid "//Set Key Frame ..." msgstr "//設定關鍵框架…" #: src/mainwindow.c:4927 msgid "//Remove All Key Frames ..." msgstr "//移除所有關鍵圖框…" #: src/mainwindow.c:4929 msgid "/More..." msgstr "" #: src/mainwindow.c:4931 msgid "/_Help" msgstr "/求助(_H)" #: src/mainwindow.c:4932 msgid "//Documentation" msgstr "//文件" #: src/mainwindow.c:4933 msgid "//About" msgstr "//關於" #: src/mainwindow.c:4935 msgid "//Rebind Shortcut Keycodes" msgstr "//重新連結快捷鍵" #: src/memory.c:2678 msgid "Quantize Pass 1" msgstr "" #: src/memory.c:2732 msgid "Quantize Pass 2" msgstr "" #: src/memory.c:2951 src/memory.c:3335 msgid "Converting to Indexed Palette" msgstr "轉換到索引過的調色盤" #: src/memory.c:4709 src/otherwindow.c:562 msgid "Bacteria Effect" msgstr "菌化效果" #: src/memory.c:4744 msgid "Rotating" msgstr "旋轉" #: src/memory.c:5096 msgid "Free Rotation" msgstr "自由旋轉" #: src/memory.c:5682 msgid "Scaling Image" msgstr "伸縮圖像" #: src/memory.c:6903 msgid "Counting Unique RGB Pixels" msgstr "計數唯一的 RGB 像素" #: src/memory.c:6950 msgid "Applying Effect" msgstr "套用效果" #: src/memory.c:8167 msgid "Kuwahara-Nagao Filter" msgstr "" #: src/memory.c:9822 src/otherwindow.c:3212 msgid "Skew" msgstr "" #: src/memory.c:9966 msgid "Segmentation Pass 1" msgstr "" #: src/memory.c:10093 msgid "Segmentation Pass 2" msgstr "" #: src/mygtk.c:170 msgid "Please Wait ..." msgstr "請稍待…" #: src/mygtk.c:189 msgid "STOP" msgstr "停止" #: src/mygtk.c:816 msgid "Browse" msgstr "瀏覽" #: src/mygtk.c:1983 msgid "Gamma corrected" msgstr "γ 值已修正" #: src/otherwindow.c:259 msgid "24 bit RGB" msgstr "24 位元 RGB" #: src/otherwindow.c:259 msgid "Greyscale" msgstr "灰階" #: src/otherwindow.c:259 msgid "Indexed Palette" msgstr "索引過的調色盤" #: src/otherwindow.c:260 msgid "From Clipboard" msgstr "" #: src/otherwindow.c:260 msgid "Grab Screenshot" msgstr "抓取螢幕快照" #: src/otherwindow.c:261 src/toolbar.c:1037 msgid "New Image" msgstr "新增圖像" #: src/otherwindow.c:288 msgid "Width" msgstr "寬度" #: src/otherwindow.c:289 msgid "Height" msgstr "高度" #: src/otherwindow.c:290 msgid "Colours" msgstr "顏色" #: src/otherwindow.c:431 msgid "Pattern Chooser" msgstr "式樣選擇器" #: src/otherwindow.c:498 msgid "Set Palette Size" msgstr "設定調色盤大小" #: src/otherwindow.c:538 src/otherwindow.c:632 src/otherwindow.c:1011 #: src/otherwindow.c:3077 src/otherwindow.c:3345 src/otherwindow.c:3546 #: src/prefs.c:714 msgid "Apply" msgstr "套用" #: src/otherwindow.c:599 msgid "Luminance" msgstr "照度" #: src/otherwindow.c:599 src/otherwindow.c:868 msgid "Brightness" msgstr "亮度" #: src/otherwindow.c:600 msgid "Distance to A" msgstr "到 A 的距離" #: src/otherwindow.c:601 msgid "Projection to A->B" msgstr "投影到 A->B" #: src/otherwindow.c:602 msgid "Frequency" msgstr "頻率" #: src/otherwindow.c:607 msgid "Sort Palette Colours" msgstr "排序調色盤顏色" #: src/otherwindow.c:616 msgid "Start Index" msgstr "開始索引" #: src/otherwindow.c:617 msgid "End Index" msgstr "結束索引" #: src/otherwindow.c:623 msgid "Reverse Order" msgstr "反向排序" #: src/otherwindow.c:868 msgid "Contrast" msgstr "對比" #: src/otherwindow.c:869 src/otherwindow.c:2048 msgid "Posterize" msgstr "色調分離" #: src/otherwindow.c:869 msgid "Gamma" msgstr "γ 值" #: src/otherwindow.c:870 msgid "Bitwise" msgstr "" #: src/otherwindow.c:870 msgid "Truncated" msgstr "" #: src/otherwindow.c:870 msgid "Rounded" msgstr "" #: src/otherwindow.c:887 src/toolbar.c:1048 msgid "Transform Colour" msgstr "變換顏色" #: src/otherwindow.c:921 msgid "Show Detail" msgstr "顯示細節" #: src/otherwindow.c:927 msgid "Store Values" msgstr "" #: src/otherwindow.c:937 msgid "Posterize type" msgstr "" #: src/otherwindow.c:941 src/otherwindow.c:944 src/otherwindow.c:2429 msgid "Palette" msgstr "調色盤" #: src/otherwindow.c:973 msgid "Auto-Preview" msgstr "自動預覽" #: src/otherwindow.c:1006 msgid "Reset" msgstr "重置" #: src/otherwindow.c:1072 msgid "New geometry is the same as now - nothing to do." msgstr "新的座標位置與現在相同 - 無事可做。" #: src/otherwindow.c:1122 msgid "The operating system cannot allocate the memory for this operation." msgstr "作業系統無法為此作業配置記憶體。" #: src/otherwindow.c:1124 msgid "" "You have not allocated enough memory in the Preferences window for this " "operation." msgstr "對於此作業您在偏好設定視窗中未配置足夠的記憶體。" #: src/otherwindow.c:1144 msgid "Nearest Neighbour" msgstr "最近的鄰居" #: src/otherwindow.c:1145 msgid "Bilinear / Area Mapping" msgstr "雙線性/區域對映" #: src/otherwindow.c:1145 src/otherwindow.c:3018 msgid "Bilinear" msgstr "雙線性" #: src/otherwindow.c:1146 msgid "Bicubic" msgstr "雙立體" #: src/otherwindow.c:1147 msgid "Bicubic edged" msgstr "雙立體邊緣化" #: src/otherwindow.c:1148 msgid "Bicubic better" msgstr "雙立體優化" #: src/otherwindow.c:1149 msgid "Bicubic sharper" msgstr "雙立體銳化" #: src/otherwindow.c:1150 msgid "Blackman-Harris" msgstr "Blackman-Harris" #: src/otherwindow.c:1167 msgid "Width " msgstr "寬度 " #: src/otherwindow.c:1168 msgid "Height " msgstr "高度 " #: src/otherwindow.c:1170 msgid "Original " msgstr "原值 " #: src/otherwindow.c:1176 msgid "New" msgstr "新值" #: src/otherwindow.c:1185 src/otherwindow.c:3051 src/otherwindow.c:3219 msgid "Offset" msgstr "偏移" #: src/otherwindow.c:1191 src/otherwindow.c:2079 msgid "Centre" msgstr "置中" #: src/otherwindow.c:1202 msgid "Fix Aspect Ratio" msgstr "修復寬高比" #: src/otherwindow.c:1211 src/shifter.c:325 msgid "Clear" msgstr "清除" #: src/otherwindow.c:1211 src/otherwindow.c:1221 msgid "Tile" msgstr "並排" #: src/otherwindow.c:1212 msgid "Mirror tile" msgstr "鏡像並排" #: src/otherwindow.c:1221 src/otherwindow.c:3020 msgid "Mirror" msgstr "鏡像" #: src/otherwindow.c:1221 msgid "Void" msgstr "" #: src/otherwindow.c:1229 src/otherwindow.c:2408 msgid "Settings" msgstr "設定值" #: src/otherwindow.c:1234 msgid "Sharper image reduction" msgstr "" #: src/otherwindow.c:1236 msgid "Boundary extension" msgstr "" #: src/otherwindow.c:1261 msgid "Scale Canvas" msgstr "伸縮畫布" #: src/otherwindow.c:1261 msgid "Resize Canvas" msgstr "調整畫布大小" #: src/otherwindow.c:1963 msgid "From" msgstr "從" #: src/otherwindow.c:1963 msgid "To" msgstr "到" #: src/otherwindow.c:1964 src/otherwindow.c:2589 msgid "HSV" msgstr "" #: src/otherwindow.c:1979 msgid "Scale" msgstr "尺度" #: src/otherwindow.c:1994 msgid "Palette Editor" msgstr "調色盤編輯器" #: src/otherwindow.c:2015 msgid "Configure Overlays" msgstr "配置外罩" #: src/otherwindow.c:2071 msgid "Colour Editor" msgstr "顏色編輯器" #: src/otherwindow.c:2079 msgid "Limit" msgstr "限制" #: src/otherwindow.c:2080 msgid "Sphere" msgstr "球體" #: src/otherwindow.c:2080 src/otherwindow.c:3218 msgid "Angle" msgstr "角度" #: src/otherwindow.c:2080 msgid "Cube" msgstr "立方體" #: src/otherwindow.c:2110 msgid "Range" msgstr "範圍" #: src/otherwindow.c:2112 msgid "Inverse" msgstr "反向" #: src/otherwindow.c:2119 src/toolbar.c:890 msgid "Colour-Selective Mode" msgstr "顏色選擇模式" #: src/otherwindow.c:2128 msgid "Opaque" msgstr "" #: src/otherwindow.c:2128 msgid "Border" msgstr "" #: src/otherwindow.c:2129 msgid "Transparent" msgstr "" #: src/otherwindow.c:2129 msgid "Tile " msgstr "" #: src/otherwindow.c:2129 msgid "Segment" msgstr "" #: src/otherwindow.c:2146 msgid "Smart grid" msgstr "" #: src/otherwindow.c:2148 msgid "Tile grid" msgstr "" #: src/otherwindow.c:2150 msgid "Minimum grid zoom" msgstr "最小格線縮放" #: src/otherwindow.c:2152 msgid "Tile width" msgstr "" #: src/otherwindow.c:2154 msgid "Tile height" msgstr "" #: src/otherwindow.c:2168 msgid "Configure Grid" msgstr "" #: src/otherwindow.c:2355 src/otherwindow.c:3125 msgid "Colour space" msgstr "顏色空間" #: src/otherwindow.c:2361 msgid "Largest (Linf)" msgstr "最大 (Linf)" #: src/otherwindow.c:2361 msgid "Sum (L1)" msgstr "總和 (L1)" #: src/otherwindow.c:2361 msgid "Euclidean (L2)" msgstr "歐式幾何 (L2)" #: src/otherwindow.c:2362 msgid "Difference measure" msgstr "差異測量" #: src/otherwindow.c:2371 msgid "Exact Conversion" msgstr "精確轉換" #: src/otherwindow.c:2371 msgid "Use Current Palette" msgstr "使用目前調色盤" #: src/otherwindow.c:2372 msgid "PNN Quantize (slow, better quality)" msgstr "" #: src/otherwindow.c:2373 msgid "Wu Quantize (fast)" msgstr "" #: src/otherwindow.c:2374 msgid "Max-Min Quantize (best for small palettes and dithering)" msgstr "" #: src/otherwindow.c:2377 src/otherwindow.c:3020 src/otherwindow.c:3307 msgid "None" msgstr "無" #: src/otherwindow.c:2377 msgid "Floyd-Steinberg" msgstr "Floyd-Steinberg" #: src/otherwindow.c:2377 msgid "Stucki" msgstr "Stucki" #: src/otherwindow.c:2380 msgid "Floyd-Steinberg (quick)" msgstr "Floyd-Steinberg (快速)" #: src/otherwindow.c:2380 msgid "Dithered (effect)" msgstr "已遞色 (效果)" #: src/otherwindow.c:2381 msgid "Scattered (effect)" msgstr "已散射 (效果)" #: src/otherwindow.c:2384 msgid "Gamut" msgstr "全音階" #: src/otherwindow.c:2384 msgid "Weakly" msgstr "弱" #: src/otherwindow.c:2384 msgid "Strongly" msgstr "強" #: src/otherwindow.c:2385 msgid "Off" msgstr "關" #: src/otherwindow.c:2385 msgid "Separate/Sum" msgstr "分隔/總和" #: src/otherwindow.c:2385 msgid "Separate/Split" msgstr "分隔/拆開" #: src/otherwindow.c:2386 msgid "Length/Sum" msgstr "長度/總和" #: src/otherwindow.c:2386 msgid "Length/Split" msgstr "長度/拆開" #: src/otherwindow.c:2392 msgid "Create Quantized" msgstr "建立量化" #: src/otherwindow.c:2392 msgid "Convert To Indexed" msgstr "轉換到索引色" #: src/otherwindow.c:2400 msgid "Indexed Colours To Use" msgstr "所使用的索引色" #: src/otherwindow.c:2427 msgid "Truncate palette" msgstr "" #: src/otherwindow.c:2428 msgid "Diameter based weighting" msgstr "" #: src/otherwindow.c:2442 msgid "Dither" msgstr "遞色" #: src/otherwindow.c:2450 msgid "Reduce colour bleed" msgstr "減低顏色抽取" #: src/otherwindow.c:2452 msgid "Serpentine scan" msgstr "彎曲的掃描" #: src/otherwindow.c:2455 msgid "Error propagation, %" msgstr "錯誤傳播,%" #: src/otherwindow.c:2456 msgid "Selective error propagation" msgstr "選擇性錯誤傳播" #: src/otherwindow.c:2464 msgid "Full error precision" msgstr "" #: src/otherwindow.c:2589 msgid "Backward HSV" msgstr "反向 HSV" #: src/otherwindow.c:2590 src/otherwindow.c:2831 msgid "Constant" msgstr "常數" #: src/otherwindow.c:2794 msgid "Edit Gradient" msgstr "編輯漸層" #: src/otherwindow.c:2837 msgid "Points:" msgstr "點數:" #: src/otherwindow.c:3000 src/toolbar.c:312 msgid "Reverse" msgstr "反向" #: src/otherwindow.c:3001 msgid "Edit Custom" msgstr "編輯自訂" #: src/otherwindow.c:3018 msgid "Linear" msgstr "線性" #: src/otherwindow.c:3018 msgid "Radial" msgstr "放射" #: src/otherwindow.c:3018 msgid "Square" msgstr "方形" #: src/otherwindow.c:3019 msgid "Angular" msgstr "" #: src/otherwindow.c:3019 msgid "Conical" msgstr "" #: src/otherwindow.c:3020 src/otherwindow.c:3539 msgid "Level" msgstr "平面" #: src/otherwindow.c:3020 msgid "Repeat" msgstr "重覆" #: src/otherwindow.c:3021 msgid "A to B" msgstr "A 到 B" #: src/otherwindow.c:3021 msgid "A to B (RGB)" msgstr "A 到 B (RGB)" #: src/otherwindow.c:3021 msgid "A to B (sRGB)" msgstr "" #: src/otherwindow.c:3022 msgid "A to B (HSV)" msgstr "A 到 B (HSV)" #: src/otherwindow.c:3022 msgid "A to B (backward HSV)" msgstr "A 到 B (反向 HSV)" #: src/otherwindow.c:3022 msgid "A only" msgstr "只有 A" #: src/otherwindow.c:3023 src/otherwindow.c:3024 msgid "Custom" msgstr "自訂" #: src/otherwindow.c:3024 msgid "Current to 0" msgstr "目前值到 0" #: src/otherwindow.c:3024 msgid "Current only" msgstr "只有目前值" #: src/otherwindow.c:3035 msgid "Configure Gradient" msgstr "配置漸層" #: src/otherwindow.c:3042 src/png.c:853 msgid "Channel" msgstr "通道" #: src/otherwindow.c:3047 msgid "Length" msgstr "長度" #: src/otherwindow.c:3049 msgid "Repeat length" msgstr "重覆長度" #: src/otherwindow.c:3053 msgid "Gradient type" msgstr "漸層類型" #: src/otherwindow.c:3056 msgid "Extension type" msgstr "擴充類型" #: src/otherwindow.c:3059 msgid "Preview opacity" msgstr "預覽濁度" #: src/otherwindow.c:3127 msgid "Pick Gradient" msgstr "" #: src/otherwindow.c:3220 msgid "At distance" msgstr "" #: src/otherwindow.c:3221 msgid "Horizontal " msgstr "" #: src/otherwindow.c:3222 msgid "Vertical" msgstr "" #: src/otherwindow.c:3307 msgid "Unchanged" msgstr "" #: src/otherwindow.c:3312 msgid "Tracing Image" msgstr "" #: src/otherwindow.c:3323 msgid "Source" msgstr "" #: src/otherwindow.c:3325 msgid "Origin" msgstr "" #: src/otherwindow.c:3326 msgid "Relative scale" msgstr "" #: src/otherwindow.c:3337 msgid "Display" msgstr "" #: src/otherwindow.c:3526 msgid "Segment Image" msgstr "" #: src/otherwindow.c:3536 msgid "Threshold" msgstr "" #: src/otherwindow.c:3542 msgid "Minimum size" msgstr "" #: src/png.c:481 #, c-format msgid "Saving %s image" msgstr "" #: src/png.c:481 #, c-format msgid "Loading %s image" msgstr "" #: src/png.c:850 msgid "Layer" msgstr "" #: src/png.c:6318 msgid "Applying colour profile" msgstr "" #: src/png.c:6727 #, c-format msgid "%d out of %d frames could not be saved as %s - saved as PNG instead" msgstr "%2$d 中的 %1$d 張圖框無法儲存為 %3$s - 轉而儲存為 PNG" #: src/png.c:6744 msgid "Explode frames" msgstr "" #: src/prefs.c:146 msgid "Pressure" msgstr "壓力" #: src/prefs.c:154 msgid "Current Device" msgstr "目前裝置" #: src/prefs.c:431 msgid "Default System Language" msgstr "預設系統語言" #: src/prefs.c:432 msgid "Chinese (Simplified)" msgstr "" #: src/prefs.c:432 msgid "Chinese (Taiwanese)" msgstr "中文 (臺灣)" #: src/prefs.c:433 msgid "Czech" msgstr "捷克語" #: src/prefs.c:433 msgid "Dutch" msgstr "" #: src/prefs.c:433 msgid "English (UK)" msgstr "英語 (英國)" #: src/prefs.c:433 msgid "French" msgstr "法語" #: src/prefs.c:434 msgid "Galician" msgstr "" #: src/prefs.c:434 msgid "German" msgstr "德語" #: src/prefs.c:434 msgid "Hungarian" msgstr "" #: src/prefs.c:434 msgid "Italian" msgstr "" #: src/prefs.c:435 msgid "Japanese" msgstr "" #: src/prefs.c:435 msgid "Polish" msgstr "波蘭語" #: src/prefs.c:435 msgid "Portuguese" msgstr "葡萄牙語" #: src/prefs.c:436 msgid "Portuguese (Brazilian)" msgstr "葡萄牙語 (巴西)" #: src/prefs.c:436 msgid "Russian" msgstr "" #: src/prefs.c:436 msgid "Slovak" msgstr "斯洛伐克語" #: src/prefs.c:437 msgid "Spanish" msgstr "西班牙語" #: src/prefs.c:437 msgid "Swedish" msgstr "" #: src/prefs.c:437 msgid "Tagalog" msgstr "" #: src/prefs.c:437 msgid "Turkish" msgstr "土耳其語" #: src/prefs.c:444 msgid "XBM X hotspot" msgstr "XBM X 熱點" #: src/prefs.c:444 msgid "XBM Y hotspot" msgstr "XBM Y 熱點" #: src/prefs.c:446 msgid "Recently Used Files" msgstr "最近使用的檔案" #: src/prefs.c:447 msgid "Progress bar silence limit" msgstr "進度條靜止限制" #: src/prefs.c:448 msgid "Canvas Geometry" msgstr "畫布幾何位置" #: src/prefs.c:448 msgid "Cursor X,Y" msgstr "游標 X,Y" #: src/prefs.c:449 msgid "Pixel [I] {RGB}" msgstr "像素 [I] {RGB}" #: src/prefs.c:449 msgid "Selection Geometry" msgstr "選擇幾何位置" #: src/prefs.c:449 msgid "Undo / Redo" msgstr "復原/重做" #: src/prefs.c:450 src/toolbar.c:903 msgid "Flow" msgstr "流暢" #: src/prefs.c:457 msgid "Preferences" msgstr "偏好設定" #: src/prefs.c:484 msgid "Max threads (0 to autodetect)" msgstr "" #: src/prefs.c:491 msgid "Max memory used for undo (MB)" msgstr "用於復原的最大記憶體 (MB)" #: src/prefs.c:492 msgid "Max undo levels" msgstr "" #: src/prefs.c:493 msgid "Communal layer undo space (%)" msgstr "" #: src/prefs.c:501 msgid "Use gamma correction by default" msgstr "預設使用 γ 修正" #: src/prefs.c:503 msgid "Optimize alpha chequers" msgstr "最佳化 α 審核器" #: src/prefs.c:505 msgid "Disable view window transparencies" msgstr "停用檢視視窗透明度" #: src/prefs.c:513 msgid "" "Select preferred language translation\n" "\n" "You will need to restart mtPaint\n" "for this to take full effect" msgstr "" "選取喜好的語言翻譯\n" "\n" "您需要重新啟動 mtPaint\n" "以便達到完全的效果" #: src/prefs.c:524 msgid "Language" msgstr "語言" #: src/prefs.c:529 msgid "Interface" msgstr "" #: src/prefs.c:533 msgid "Greyscale backdrop" msgstr "灰階背景" #: src/prefs.c:534 msgid "Selection nudge pixels" msgstr "選擇微動像素" #: src/prefs.c:535 msgid "Max Pan Window Size" msgstr "最大全景視窗大小" #: src/prefs.c:542 msgid "Display clipboard while pasting" msgstr "貼上時顯示剪貼簿" #: src/prefs.c:544 msgid "Mouse cursor = Tool" msgstr "滑鼠游標 = 工具" #: src/prefs.c:546 msgid "Confirm Exit" msgstr "確認離開" #: src/prefs.c:548 msgid "Q key quits mtPaint" msgstr "Q 鍵離開 mtPaint" #: src/prefs.c:550 msgid "Changing tool commits paste" msgstr "認可貼上變更工具" #: src/prefs.c:552 msgid "Centre tool settings dialogs" msgstr "置中工具設定對話框" #: src/prefs.c:554 msgid "New image sets zoom to 100%" msgstr "新圖像設定縮放為 100%" #: src/prefs.c:557 msgid "Mouse Scroll Wheel = Zoom" msgstr "滑鼠捲動輪 = 縮放" #: src/prefs.c:559 msgid "Use menu icons" msgstr "" #: src/prefs.c:564 msgid "Files" msgstr "檔案" #: src/prefs.c:579 msgid "Read 16-bit TGAs as 5:6:5 BGR" msgstr "" #: src/prefs.c:580 msgid "Write TGAs in bottom-up row order" msgstr "" #: src/prefs.c:581 msgid "Undoable image loading" msgstr "" #: src/prefs.c:588 msgid "Paths" msgstr "" #: src/prefs.c:590 msgid "Clipboard Files" msgstr "剪貼簿檔案" #: src/prefs.c:591 msgid "Select Clipboard File" msgstr "選取剪貼簿檔案" #: src/prefs.c:595 msgid "HTML Browser Program" msgstr "HTML 瀏覽程式" #: src/prefs.c:596 msgid "Select Browser Program" msgstr "選取瀏覽程式" #: src/prefs.c:600 msgid "Location of Handbook index" msgstr "手冊索引位置" #: src/prefs.c:601 msgid "Select Handbook Index File" msgstr "選取手冊索引檔" #: src/prefs.c:605 msgid "Default Palette" msgstr "" #: src/prefs.c:606 msgid "Select Default Palette" msgstr "" #: src/prefs.c:610 msgid "Default Patterns" msgstr "" #: src/prefs.c:611 msgid "Select Default Patterns File" msgstr "" #: src/prefs.c:616 msgid "Default Theme" msgstr "" #: src/prefs.c:617 msgid "Select Default Theme File" msgstr "" #: src/prefs.c:624 msgid "Status Bar" msgstr "狀態列" #: src/prefs.c:633 msgid "Tablet" msgstr "繪圖板" #: src/prefs.c:637 msgid "Device Settings" msgstr "裝置設定值" #: src/prefs.c:645 msgid "Configure Device" msgstr "配置裝置" #: src/prefs.c:652 msgid "Tool Variable" msgstr "工具變數" #: src/prefs.c:654 msgid "Factor" msgstr "係數" #: src/prefs.c:680 msgid "Test Area" msgstr "測試區域" #: src/shifter.c:205 msgid "Frames" msgstr "圖框" #: src/shifter.c:272 msgid "Palette Shifter" msgstr "調色盤轉移器" #: src/shifter.c:279 msgid "Start" msgstr "開始" #: src/shifter.c:281 msgid "Finish" msgstr "結束" #: src/shifter.c:330 msgid "Fix Palette" msgstr "修正調色盤" #: src/spawn.c:449 src/spawn.c:500 msgid "Action" msgstr "" #: src/spawn.c:449 src/spawn.c:500 msgid "Command" msgstr "" #: src/spawn.c:456 msgid "Configure File Actions" msgstr "" #: src/spawn.c:515 msgid "Execute" msgstr "" #: src/spawn.c:732 #, c-format msgid "Error %i reported when trying to run %s" msgstr "試著運行 %2$s 時回報錯誤 %1$i" #: src/spawn.c:789 msgid "" "I am unable to find the documentation. Either you need to download the " "mtPaint Handbook from the web site and install it, or you need to set the " "correct location in the Preferences window." msgstr "" "我無法找到文件。若非您需要從網站下載 mtPaint 手冊並安裝它,就是您需要在「偏好" "設定」視窗中設定正確的位置。" #: src/spawn.c:820 msgid "" "There was a problem running the HTML browser. You need to set the correct " "program name in the Preferences window." msgstr "" "執行 HTML 瀏覽器時發生問題。您需要在「偏好設定」視窗中設定正確的程式名稱。" #: src/thread.c:322 msgid "Helper thread is not responding. Save your work and exit the program." msgstr "" #: src/toolbar.c:233 msgid "RGB Cube" msgstr "RGB 立方體" #: src/toolbar.c:234 msgid "By image channel" msgstr "依圖像通道" #: src/toolbar.c:235 msgid "Gradient-driven" msgstr "受漸層驅使" #: src/toolbar.c:236 msgid "Fill settings" msgstr "填充設定值" #: src/toolbar.c:253 msgid "Respect opacity mode" msgstr "相關濁度模式" #: src/toolbar.c:254 msgid "Smudge settings" msgstr "塗抹設定值" #: src/toolbar.c:274 msgid "Brush spacing" msgstr "" #: src/toolbar.c:298 msgid "Normal" msgstr "" #: src/toolbar.c:299 msgid "Colour" msgstr "" #: src/toolbar.c:299 msgid "Saturate More" msgstr "" #: src/toolbar.c:300 msgid "Multiply" msgstr "" #: src/toolbar.c:300 msgid "Divide" msgstr "" #: src/toolbar.c:300 msgid "Screen" msgstr "" #: src/toolbar.c:300 msgid "Dodge" msgstr "" #: src/toolbar.c:301 msgid "Burn" msgstr "" #: src/toolbar.c:301 msgid "Hard Light" msgstr "" #: src/toolbar.c:301 msgid "Soft Light" msgstr "" #: src/toolbar.c:301 msgid "Difference" msgstr "" #: src/toolbar.c:302 msgid "Darken" msgstr "" #: src/toolbar.c:302 msgid "Lighten" msgstr "" #: src/toolbar.c:302 msgid "Grain Extract" msgstr "" #: src/toolbar.c:303 msgid "Grain Merge" msgstr "" #: src/toolbar.c:323 msgid "Blend mode" msgstr "" #: src/toolbar.c:846 msgid "More..." msgstr "" #: src/toolbar.c:886 msgid "Continuous Mode" msgstr "連續模式" #: src/toolbar.c:887 msgid "Opacity Mode" msgstr "濁度模式" #: src/toolbar.c:888 msgid "Tint Mode" msgstr "色調模式" #: src/toolbar.c:889 msgid "Tint +-" msgstr "色調 +-" #: src/toolbar.c:891 msgid "Blend Mode" msgstr "" #: src/toolbar.c:892 msgid "Disable All Masks" msgstr "停用全部遮罩" #: src/toolbar.c:896 msgid "Gradient Mode" msgstr "漸層模式" #: src/toolbar.c:1012 msgid "Settings Toolbar" msgstr "設定值工具列" #: src/toolbar.c:1041 msgid "Cut" msgstr "剪下" #: src/toolbar.c:1042 msgid "Copy" msgstr "複製" #: src/toolbar.c:1043 msgid "Paste" msgstr "貼上" #: src/toolbar.c:1045 msgid "Undo" msgstr "復原" #: src/toolbar.c:1046 msgid "Redo" msgstr "重做" #: src/toolbar.c:1049 src/viewer.c:485 msgid "Pan Window" msgstr "全景視窗" #: src/toolbar.c:1053 msgid "Paint" msgstr "繪製" #: src/toolbar.c:1054 msgid "Shuffle" msgstr "搬移" #: src/toolbar.c:1055 msgid "Flood Fill" msgstr "填充" #: src/toolbar.c:1056 msgid "Straight Line" msgstr "直線" #: src/toolbar.c:1057 msgid "Smudge" msgstr "塗抹" #: src/toolbar.c:1058 msgid "Clone" msgstr "仿製" #: src/toolbar.c:1059 msgid "Make Selection" msgstr "選擇" #: src/toolbar.c:1060 msgid "Polygon Selection" msgstr "多邊形選擇" #: src/toolbar.c:1061 msgid "Place Gradient" msgstr "放置漸層" #: src/toolbar.c:1063 msgid "Lasso Selection" msgstr "套索選擇" #: src/toolbar.c:1066 msgid "Ellipse Outline" msgstr "橢圓描邊" #: src/toolbar.c:1067 msgid "Filled Ellipse" msgstr "填滿的橢圓" #: src/toolbar.c:1068 msgid "Outline Selection" msgstr "描邊選擇區域" #: src/toolbar.c:1069 msgid "Fill Selection" msgstr "填充選擇區域" #: src/toolbar.c:1071 msgid "Flip Selection Vertically" msgstr "垂直翻轉選擇區域" #: src/toolbar.c:1072 msgid "Flip Selection Horizontally" msgstr "水平翻轉選擇區域" #: src/toolbar.c:1073 msgid "Rotate Selection Clockwise" msgstr "順時針旋轉選擇區域" #: src/toolbar.c:1074 msgid "Rotate Selection Anti-Clockwise" msgstr "逆時針旋轉選擇區域" #: src/viewer.c:132 msgid "About" msgstr "關於" #~ msgid "File: %s invalid - palette not updated" #~ msgstr "檔案:%s 無效 - 調色盤未更新" #~ msgid "Distance to A+B" #~ msgstr "到 A+B 的距離" #~ msgid "Edit Frames" #~ msgstr "編輯圖框" #~ msgid " C Command Line Window" #~ msgstr " C 命令列視窗" #~ msgid "The palette does not contain enough colours to do a merge" #~ msgstr "調色盤不包含足夠的顏色來做合併" #~ msgid "There are too many identical palette items to be reduced." #~ msgstr "有太多相同的調色盤項目可以來縮小。" #~ msgid "/View/Command Line Window" #~ msgstr "/檢視(V)/命令列視窗" #~ msgid "Grid colour RGB" #~ msgstr "格線顏色 RGB" #~ msgid "Zoom" #~ msgstr "縮放" #~ msgid "%i Files on Command Line" #~ msgstr "%i 個檔案在命令列上" #~ msgid "Not enough memory to rotate image" #~ msgstr "旋轉圖像所需記憶體不足" #~ msgid "Not enough memory to rotate clipboard" #~ msgstr "旋轉剪貼簿所需記憶體不足" #~ msgid "File is too big, must be <= to width=%i height=%i : %s" #~ msgstr "檔案太大,必須是 <= 寬度=%i 高度=%i:%s" #~ msgid "" #~ "Dennis Lee - Wrote the two quantizing methods DL1 & 3 - see quantizer.c " #~ "for more information." #~ msgstr "" #~ "Dennis Lee - 編寫兩個量化方法 DL1 & 3 - 參看 quantizer.c 以獲得更多資訊。" #~ msgid "Magnus Hjorth - Wrote inifile.c/h, from mhWaveEdit 1.3.0." #~ msgstr "Magnus Hjorth - 編寫 inifile.c/h,來自 mhWaveEdit 1.3.0." #~ msgid "Could not open %s: %s" #~ msgstr "無法開啟 %s:%s" #~ msgid "Error closing %s: %s" #~ msgstr "關閉 %s 時發生錯誤:%s" #~ msgid "Could not write to %s: %s" #~ msgstr "無法寫入 %s:%s" #~ msgid "patterns_user.c could not be opened in current directory" #~ msgstr "patterns_user.c 無法在目前的目錄中開啟" #~ msgid "Done" #~ msgstr "已完成" #~ msgid "patterns_user.c created in current directory" #~ msgstr "patterns_user.c 建立在目前的目錄中" #~ msgid "Current image is not 94x94x3 so I cannot create patterns_user.c" #~ msgstr "目前圖像並非 94x94x3 因而我無法建立 patterns_user.c" #~ msgid "" #~ "You are trying to save an RGB image to an XPM file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "您正試著儲存 RGB 圖像到 XPM 檔案,而這並不可能。我會建議您儲存為 PNG 延伸" #~ "格式。" #~ msgid "" #~ "You are trying to save an RGB image to a GIF file which is not possible. " #~ "I would suggest you save with a PNG extension." #~ msgstr "" #~ "您正試著儲存 RGB 圖像到 GIF 檔案,而這並不可能。我會建議您儲存為 PNG 延伸" #~ "格式。" #~ msgid "" #~ "You are trying to save an XBM file with a palette of more than 2 " #~ "colours. Either use another format or reduce the palette to 2 colours." #~ msgstr "" #~ "您正試著儲存 XBM 檔案,它的調色盤有超過 2 種顏色。若非使用其他格式,就縮小" #~ "調色板到 2 種顏色。" #~ msgid "" #~ "You are trying to save an indexed canvas to a JPEG file which is not " #~ "possible. I would suggest you save with a PNG extension." #~ msgstr "" #~ "您正試著儲存索引過的畫布為 JPEG 檔案,而這並不可能。 我會建議您儲存為 PNG " #~ "延伸格式。" #~ msgid "" #~ "You are trying to save an LSS16 file with a palette of more than 16 " #~ "colours. Either use another format or reduce the palette to 16 colours." #~ msgstr "" #~ "您正試著儲存 LSS16 檔案,它的調色盤有超過 16 種顏色。若非使用其他格式,就" #~ "縮小調色盤到 16 種顏色。" #~ msgid "/Edit/Create Patterns" #~ msgstr "/編輯(E)/建立式樣" #~ msgid "/View/Toggle Image View (Home)" #~ msgstr "/檢視(V)/切換圖像檢視 (個人資料夾)" #~ msgid "/Palette/Create Quantized (DL1)" #~ msgstr "/調色盤(P)/建立量化 (DL1)" #~ msgid "/Palette/Create Quantized (DL3)" #~ msgstr "/調色盤(P)/建立量化 (DL3)" #~ msgid "/Palette/Create Quantized (Wu)" #~ msgstr "/調色盤(P)/建立量化 (Wu)" #~ msgid "/File/%i" #~ msgstr "/檔案(F)/%i" #~ msgid "Lanczos3" #~ msgstr "Lanczos3" #~ msgid "DL1 Quantize (fastest)" #~ msgstr "DL1 量化 (最快)" #~ msgid "DL3 Quantize (very slow, better quality)" #~ msgstr "DL3 量化 (很慢,較好品質)" #~ msgid "Wu Quantize (best method for small palettes)" #~ msgstr "Wu 量化 (用於小調色盤的最好方法)" #~ msgid "Loading PNG image" #~ msgstr "載入 PNG 圖像" #~ msgid "Loading clipboard image" #~ msgstr "載入剪貼簿圖像" #~ msgid "Saving PNG image" #~ msgstr "儲存 PNG 圖像" #~ msgid "Saving Clipboard image" #~ msgstr "儲存剪貼簿圖像" #~ msgid "Saving Layer image" #~ msgstr "儲存圖層圖像" #~ msgid "Saving Channel image" #~ msgstr "儲存通道圖像" #~ msgid "Loading GIF image" #~ msgstr "載入 GIF 圖像" #~ msgid "Saving GIF image" #~ msgstr "儲存 GIF 圖像" #~ msgid "Loading JPEG image" #~ msgstr "載入 JPEG 圖像" #~ msgid "Saving JPEG image" #~ msgstr "儲存 JPEG 圖像" #~ msgid "Loading TIFF image" #~ msgstr "載入 TIFF 圖像" #~ msgid "Saving TIFF image" #~ msgstr "儲存 TIFF 圖像" #~ msgid "Loading BMP image" #~ msgstr "載入 BMP 圖像" #~ msgid "Saving BMP image" #~ msgstr "儲存 BMP 圖像" #~ msgid "Loading XPM image" #~ msgstr "載入 XPM 圖像" #~ msgid "Saving XPM image" #~ msgstr "儲存 XPM 圖像" #~ msgid "Loading XBM image" #~ msgstr "載入 XBM 圖像" #~ msgid "Saving XBM image" #~ msgstr "儲存 XBM 圖像" #~ msgid "Loading LSS16 image" #~ msgstr "載入 LSS16 圖像" #~ msgid "Saving LSS16 image" #~ msgstr "儲存 LSS16 圖像" #~ msgid "Saving UNDO images" #~ msgstr "儲存復原圖像" #~ msgid "JPEG Save Quality (100=High) " #~ msgstr "JPEG 儲存品質 (100=高) " mtpaint-3.40/NEWS0000644000175000000620000012101111677126246013142 0ustar muammarstaff------------ mtPaint NEWS ------------ Here is a summary of the main changes in this release (see handbook for full details): 3.40 2011-12-30 * Tagalog translation added by Anjelo delCarmen * Hungarian translation added by Ur Balazs * Czech translation updated by Roman Hornik * German translation updated by B. Clausius * Italian translation updated by Angelo Gemmi * Japanese translation updated by Norihiro YONEDA * Swedish translation updated by Daniel Eriksson * Spanish translation updated by Adolfo Jayme * Brazilian Portuguese translation updated by Valter Nazianzeno * Chinese (Simplified) translation updated by Cecc * Russian translation updated * Eliminated flicker when positioning line, polygon side, or gradient in Windows version * Scrolling made more smooth in Windows version * Dock area now holds settings toolbar and layers dialog when their windows are closed * Main toolbar and tools toolbar now rearrange themselves to fit in window * Preferences window now has scrollbars when screen is too small to display it whole * The preview button on the colour selectors is now a toggle to enable interactive previews * Line tool now displays geometry info on the status bar * Gaussian blur effect now faster by 20-35% * Image scaling now faster by 10-35% * "Protect details" toggle added to Kuwahara-Nagao blur * Image scaling, Gaussian blur, Unsharp mask and Difference of Gaussians effects now use multithreading to utilize all available CPU cores * Moving the pointer with the arrow keys now scrolls the canvas when moving beyond the viewport * Dragging selection frame in canvas window, layer in view window, or colour in palette window, beyond the viewport now scrolls the window * "View->Snap To Tile Grid" restricts the positions of tools to tile grid points - B key toggles on/off * sRGB colour scale generation added to palette editor * sRGB gradients added * Line tool now uses stroke gradient when no gradient placement exists * "Palette->Pick Gradient" approximates an A->B gradient using colours from current palette (see handbook section 3.3.9) * New palette sort mode added - Brightness * "Image->Segment" added : See handbook section 6.10 for details * Colour chooser popup added - press 'E' to open * Posterize function in Transform Colour window now has 3 types - Bitwise, Truncated, Rounded * Toggle to transform RGB clipboard image added to Transform Colour window * The Convert To Indexed window now remembers the previous settings in that mtPaint session * Text pasting tools now support multiline text (use Ctrl+Enter to insert line breaks) * "~/.fonts" directory added to default font paths for FreeType text tool on Linux * Animated GIF and multipage TIFF files now can be loaded into layers (one frame/page per layer) * GIF animation file exploding is now done internally in mtPaint, not Gifsicle * "Explode Frames" can now save frames in any suitable supported file format * File actions can now specify file format conversion : See handbook section A.7 for details * Netpbm file formats (PBM/PGM/PPM/PAM) save/load added * PCX file format save/load added * SVG file format import added (using librsvg; requires GTK+ 2.4 or later) * Better support for loading CMYK TIFF files as RGB/RGBA * ICC colour profiles embedded in PNG, JPEG and TIFF images now can be applied on load (using LittleCMS) * JPEG2000 file format support now can be compiled with either JasPer or OpenJPEG library * GIF loader made more tolerant to truncated or malformed GIF files * PNG and TGA loaders now convert palette-based alpha into an alpha channel * "Palette->Open" now can extract palette from indexed images in any supported file format * "Scale Canvas" now has 3 boundary extension modes - Mirror, Tile, Void * Filename and modified status now part of undo system * Transparent colour now part of undo system * Palette sorting, dragging a colour, or removing duplicate colours now do not lose transparent colour * New keyboard shortcuts added - J for lasso tool, D for line tool, F for flood fill tool * Toolbar and menu icons are now themeable (Preferences->Paths->Default Theme) * Command line globbing now possible using -w option, e.g. mtpaint -w "*.jpg" * Loading default settings from /etc/mtpaint/mtpaintrc is now supported in Windows version * Name and location of user settings file is now configurable : See handbook section A.6.4 for details * "Smart grid" and gamma correction are now enabled by default * "Selective error propagation" for dithering is now at 85% by default * Drawing and fill tools now are 2-3 times faster * Support for compiling with libpng 1.4, libjpeg 8a, and zlib 1.2.5 added * Configure script rewritten, now understands standard variables and options for installation paths and (cross-)compilation settings * Minimum required GTK+2 version now can be specified as configure option (e.g., "./configure gtk2.8") * Workaround for bug in GTK+ versions 2.14.0 - 2.14.2, 2.16.0, 2.16.1 added (spin buttons had wrong max values) * Workaround for unknown problem in GTK+ version 2.24.4 added (program locked up when trying to save a file when layers list is active) * BUGFIX - Problems with editing large images at high zoom levels are now eliminated * BUGFIX - Titlebar now displays new image's filename after loading layers file, as it should * BUGFIX - Layers list now correctly displays selected layer after loading layers file * BUGFIX - Layers window now correctly displays transparent colour after it has been modified elsewhere * BUGFIX - Other layers shown on canvas are now redrawn properly when current layer is moved * BUGFIX - Loading TIFF files with X or Y mirroring doesn't cause crash * BUGFIX - Planar TIFF files with alpha now load properly * BUGFIX - Transparency in indexed TGA files is now read properly * BUGFIX - Failed operations now do not flag image as modified * BUGFIX - Gradient colours are now properly updated after converting indexed image to RGB * BUGFIX - Cut operation in gradient mode when no placement exists now draws shapeburst gradient as it should * BUGFIX - Drawing arrowheads with tablet enabled now works properly * BUGFIX - Drawing arrowheads now doesn't produce corrupted undo frames * BUGFIX - Builtin file selector now properly handles manual edits in directory box * BUGFIX - Problem with FreeType text dialog occasionally hiding behind main window is now eliminated * BUGFIX - Lists in FreeType text dialog now don't fail to update or scroll * BUGFIX - FreeType text renderer now can handle PCF bitmap fonts * BUGFIX - FreeType text renderer now properly handles TTF fonts with embedded bitmaps * BUGFIX - FreeType text renderer now doesn't mistake some Unicode fonts for non-Unicode * BUGFIX - ":unscaled" font paths in xorg.conf are now parsed properly * BUGFIX - Redraw lag when moving a dialog over main window in Windows is now greatly reduced (fixed in GTK+) * BUGFIX - Ctrl+T key now draws selection outline as it should - keyboard shortcut for text tool is now Shift+T * BUGFIX - Handbook installed into a path with spaces in it no longer fails to open in nondefault browser on Windows * BUGFIX - Internationalization no longer fails on Windows when the current directory is not the installation directory * BUGFIX - Redraw glitches in builtin file selector on Windows are now eliminated * BUGFIX - Drag 'n' drop of files with non ASCII characters in names now works on Windows * "Distance to A+B" palette sort mode removed due to utter uselessness 3.31 2009-4-15 * Japanese translation updated by Norihiro YONEDA * Swedish translation updated by Daniel Nylander and Fredrik Forsmo * French translation updated by Plume * Builtin file selector uses stock file and directory icons on GTK+2 * Default settings are loaded from file /etc/mtpaint/mtpaintrc if it exists * BUGFIX - Compilation with GTK+ colour selector now works * BUGFIX - Escape key now works properly in builtin file selector in GTK+1 * BUGFIX - Filename length in builtin file selector no longer is limited to 100 characters * BUGFIX - Resizing the canvas window now doesn't cause polygon marquee to slide out of place * BUGFIX - Polygon marquee shrunk by resizing the canvas is now redrawn properly * BUGFIX - Problem with message windows not responding to mouse in some cases is now eliminated 3.30 2009-2-12 * Chinese (Simplified) translation updated by Cecc * Dutch translation added by Hans Strijards * Italian translation added by Angelo Gemmi * Swedish translation added by Daniel Nylander * Spanish translation updated by Miguel Anxo Bouzada, Francisco Jose Rey * Galician translation updated by Miguel Anxo Bouzada * Czech translation updated by Martin Petricek * French translation updated by Johan Serre * Portuguese translation updated by Tiago Silva * Turkish translation updated by Tutku Dalmaz * Russian translation updated * New colour picker (old one available as configure option) * New file picker (old one available as configure option) * Some menu items can have an icon (if set in the preferences) * Dock area added which now holds the former command line window (View->Show Dock) * Layers window handling reworked to make it more responsive * Layers window: position now editable via spin buttons * Layers window: transparent colour toggle removed * L key now toggles the layers window off (if the main window has focus) * "Composite to New Layer" operation added to Layers menu * Palette can be copied to or from the canvas using the Edit menu * System clipboard can be imported or exported using the Edit menu * Horizontal and vertical ramps can be created using the Selection menu * Shapeburst gradient now used for filling gradients when no placement exists (see handbook section 3.5.6.5) * Angular and conical gradients added * New image creation can now be made undoable * New image or layer can now be created from system clipboard or internal clipboard * Screenshots can now be grabbed into a new layer * Lasso tool now trims existing clipboard if no selection is present * Image->Skew skews image in one or two directions * View->Configure Grid sets grid colour preferences * "Smart Grid" toggle shows layer boundaries around transparent pixels * "View->Tracing Image" added : See handbook section 5.5 for details * Gaussian blur effect for images with alpha now is about 40% faster and uses less memory * Kuwahara-Nagao blur effect added (edge-preserving blur) * Dilation and erosion effects added * Seven new edge detection filters added - Sobel, Prewitt, Kirsch, Gradient, Roberts, Laplace, Morphological * Invert effect now respects masking * Drawing operations on utility channels now respect tool opacity * Drawing in image channel with coupled alpha now ignores drawing modes for alpha channel * Smudge tool now works about two times faster * 12 new blend modes added - Multiply, Divide, Screen, Dodge, Burn, Hard Light, Soft Light, Difference, Darken, Lighten, Grain Extract, Grain Merge * Ctrl+Double click selects average colour underneath brush square or selection marquee * "Convert to indexed" using current palette now truncates the palette only if requested * "Convert to indexed" PNN and Wu quantizers now have diameter based weighting option * Brush preview area, canvas, view and palette window now do not lose mouse button release events in GTK+1 * Brush preview area border now can't be messed up by theme engines * Makefiles now honor DESTDIR * Configure script now honors CC * Shift+Enter while pasting swaps clipboard with canvas (see handbook section 4.9) * Communal memory space now implemented for layers (see handbook section 8.2.1) * Support using ImageMagick for GIF animation, instead of Gifsicle - "./configure imagick" * BUGFIX - Polygon line selection now clearer in Windows version * BUGFIX - Occasional redraw glitches in paste and gradient previews eliminated * BUGFIX - "Remove All Layers" with layers window closed doesn't cause crash * BUGFIX - Pasting in tint mode into indexed images' utility channels now works correctly * BUGFIX - Gradient preview now properly shows effect of mask channel on alpha channel * BUGFIX - Alt+S key now opens Selection menu as it should * BUGFIX - Directory for animation frames is created relative to layers file, as it should be * BUGFIX - Saving animation frames in PNG format doesn't cause crash * BUGFIX - When pasting to a new layer it is created untitled, as it should * BUGFIX - CMYK JPEG files now load properly as RGB * BUGFIX - Drawing with A to B gradient in utility channels now respects left/right button * BUGFIX - Saving PNG images with more than one utility channel now works properly 3.21 2008-6-8 * Russian translation added by Sergey Irupin * Spanish translation updated by Antonio Sanchez Leon * Galician translation added by Miguel Anxo Bouzada * Use 'xdg-open' if available to open HTML help in default browser on Linux * Relaxed sanity checking in XPM loader to accept files with malformed headers * "Exact Conversion" option added to Palette->Create Quantized * Counting used colours now about twice as fast * Workaround for bug in libpng versions 1.2.17 - 1.2.24 added (was losing extra channels when loading) * BUGFIX - Canvas, view and palette area borders now can't be messed up by theme engines * BUGFIX - Persistent rectangle selection now doesn't steal arrow keys from gradient placement tool * BUGFIX - Internationalization now works properly in GTK+1 * BUGFIX - FreeType text rendering quality improved on Windows * BUGFIX - Text in active menu items no longer becomes invisible on Windows Vista (fixed in GTK+) * BUGFIX - Removable drives are now visible in fileselector on Windows (fixed in GTK+) 3.20 2007-12-27 * mtPaint is now licensed as GPL version 3 (or later) * Chinese (Simplified) added by puppychinese(Cecc) * Japanese translation added by Norihiro YONEDA * Polish translation updated by Groszek150(LucaS) * FreeType text pasting facility added * Actions section added to File menu * Sharper image reduction toggle added to "Scale Canvas" * Spacing for non-continuous tools is now configurable - right click the continuous mode toggle * "Blend" drawing mode added * "Unassociate Alpha" operation added to Channels menu * Palette is now stored in RGB PNG files * PNG compression level made configurable * TGA file format save/load added * JPEG2000 file format save/load added (EXPERIMENTAL) * XPM files with up to 4096 colours can now be saved and loaded as RGB images * Palette->Dither A sets colour A/B and the pattern based on the current A colour and the palette * Max-min quantizer added - creates small palettes with higher saturation and contrast * Faster and better PNN quantizer replaces the old DL3 quantizer * Full error precision toggle added to settings page of 'Convert To Indexed' window * Eliminated flicker when scrolling canvas in GTK+1 and GTK+2/Windows * Dragging the main/view window divider made to behave in GTK+1 * Main menu now rearranges itself to fit in window * Tile based undo system introduced to save memory when changes affect only small areas of the canvas * Max undo levels now configurable (from 10 to 1000) * Image loading now can be made undoable * mtPaint can now be compiled as a library (libmtpaint) * Image rotation now sharper and faster * Difference of Gaussians effect added * Patterns increased to 100 and now stored in xbm_patterns.xbm file * Edit->Create Patterns removed as patterns are now saved as standard XBM file * Preferences->Paths : Default palette and patterns now selectable * BUGFIX - Colour selective mode with zoom < 100% doesn't cause crash * BUGFIX - Gradient preview now properly shows effect of mask channel * BUGFIX - "Resize Canvas" with negative offset now works correctly * BUGFIX - Clipboard rotation now properly handles clipboard alpha * BUGFIX - Transparency in greyscale PNG files is now read properly * Lanczos3 rescaling filter removed due to unfavourable results * DL1 quantizer removed for the same reason 3.11 2007-4-2 * Slovak translation added by Jozef Riha * French translation updated by Sylvain Cresto * LSS16 file format load/save added to support syslinux bootup splash screens * Clipboard alpha is now used as clipboard mask when pasting to image without alpha channel * "Resize Canvas" can now be used to offset an image, with or without changing its size * TIFF files with alpha saved by Photoshop now load properly * Bash-specific idioms in configure script replaced by POSIXy equivalents * Zoom combo boxes are now better behaved in GTK+1 * DL3 quantizer now faster by about 30% * BUGFIX - Negative values in "Transform Colour" and "Resize Canvas" dialogs are read correctly again * BUGFIX - Drawing a 2 pixels high filled ellipse doesn't cause crash * BUGFIX - Tool cursor now doesn't revert to default one after showing or hiding view window * BUGFIX - Keyboard shortcut for swapping colours A & B now works in GTK+1 * BUGFIX - Clicking the palette grid in gradient editor now works properly in GTK+1 * BUGFIX - All spin buttons are now wide enough in GTK+1 * BUGFIX - No more redraw glitches when toggling view window on/off in GTK+1 3.10 2007-1-22 * Gradient drawing mode added * Palette shifting feature added to Palette menu * Turkish translation added by Muhammet Kara, Tutku Dalmaz * Taiwanese Chinese translation added by Wei-Lun Chao * Image tiling mode added to "Resize Canvas" * Greyscale effect now respects masking * Gamma corrected greyscale effect added * Gaussian blur effect replaces the old blur effect * Unsharp mask effect added * More palette sort modes added * Controls for alpha/selection/mask A/B added to "Edit colour A & B" * RGB and HSV colour scales generation integrated into palette editor * New advanced dithering modes with many configuration options added to "Convert To Indexed" window * Optional gamma correction for image scaling, rotation, Gaussian blur and unsharp mask * Smudge tool can be configured to ignore opacity mode - right click the tool icon * Smudge tool respects tool opacity for RGB images * Channel deletion made easier to use * View window can now be placed under drawing window using the View menu or 'H' key * "Blend A to B" with colour A identical to B now works like GIMP's Color To Alpha filter * Arrows and Shift+Arrows now move cursor around on canvas * Enter now simulates left mouse click, and Backspace, right click * '[' ']' and '{' '}' keys now used to change colour A/B * Ctrl+scroll wheel now scrolls canvas left-right (GTK+2 only) * Shift-+/- keys now zooms view window in/out * Shift-1...Shift-4 keys now switch to image/alpha/selection/mask channel * Selection marquee now persists through tool changes * Lasso tool now works for rectangular selections too * Indexed clipboard can now be pasted into RGB image * Image save/load completely rewritten, now with better support for TIFF, BMP, XPM and XBM formats * Channels, composite images and undo images can now be saved to any suitable supported file format * Image channel can now be saved and loaded just like other channels * Paint tool in tint mode now respects both Tint +/- toggle and left/right mouse button * "By image channel" flood fill option now works in non-fuzzy mode too * BUGFIX - Polygonal selections now respect selection channel * BUGFIX - Effects menu items now remain enabled for indexed images' utility channels * BUGFIX - 'Focus View Window' toggle now doesn't cause snatching during layer drags * BUGFIX - Smudge now doesn't make pixels darker than it should 3.02 2006-10-14 * Polish translation added by Simek * Spanish translation updated for version 3 by Antonio San * All menu items on all translations updated * Saving compressed GIF files now supported (using libgif) * Library detection in configure script improved * BUGFIX - Image scaling and rotation in nearest-neighbour mode now work correctly * BUGFIX - Lasso tool now properly handles clipboard alpha * BUGFIX - Clipboard save path now can be changed in Preferences * BUGFIX - XPM files smaller than 4*4 pixels can now be loaded 3.01 2006-7-15 * German translation updated for version 3 * BUGFIX - Memory alignment problems on Windows fixed (might affect speed) * BUGFIX - RGB-specific menu items now properly disabled in indexed mode 3.00 2006-6-21 * Channels facilities added * Menus & toolbars reworked to be more task oriented * Toolbars can now be toggled on and off via the View menu * Drag 'n' drop from file managers supported for loading new layers * Animation preview has a play toggle * Clicking palette numbers opens up "Palette Editor" window * Paste preview now respects the palette protection mask * Transform Colour Window - Hue control added * Transform Colour Window - Selective palette option * Undo now less wasteful of memory when adjusting the palette * Major rewrite of back end code to improve performance * Colour A/B editor now uses GTK+ colour dialog * Ctrl+Arrows resizes selection area * Flood fill has fuzzy mode - right click icon for controls * Saving/Loading clipboards now includes mask data * Saving a composite layer image now de-coupled from saving the layer data file * Most documentation has been removed from the F1 help and is now in HTML form * HTML documentation available as a separate download package * mtPaint mailing lists set up - http://sourceforge.net/mail/?group_id=155874 * configure script makes no assumptions about CPU - ./configure --help * BUGFIX - Saving a composite layer image does not occasionally leave transparent areas * BUGFIX - Transforming colour of palette with preview (RGB images) now works properly * BUGFIX - Status bar now updated after removing all layers * BUGFIX - Scaling image to width/height 1/2 does not cause crash 2.31 2006-5-31 * German translation contributed by Oliver Frommel 2.30 2006-3-1 * Animation of layers is now possible - see 'Animation' in docs for info * Animated GIF files can now be opened frame by frame if you have Gifsicle installed * File->Export Animated GIF ... can create an animated GIF file if you have Gifsicle installed * Image can now be centralized in the window - Preferences->Zoom to toggle * Image scaling facilities improved and extended by Dmitry Groshev * Edit->Tint Mode added by Dmitry Groshev - see bottom of Tools section in docs for info * Ellipse outline code improved by Dmitry Groshev * Selection->Alpha Blend A,B : see website tutorial for example * Various tutorials added to website * BUGFIX - Clone tool does not misbehave when dragging beyond image edge with CTRL pressed * BUGFIX - Text rotation should now work properly in Windows XP * BUGFIX - Files with UTF8 characters in the filenames can now be opened in Windows * BUGFIX - Status bar wobbling with some Windows systems resolved * BUGFIX - Text paste + selection mask + zoom doesn't lose mask 2.20 2006-1-1 * mtPaint web site is now at http://mtpaint.sourceforge.net/ * View window now part of the main window - V key toggles on/off * Ctrl+Arrows or Ctrl+Shift+Arrows moves a layer around * View->Set Zoom window sets zoom for main/view window + focus toggle - Z key toggles on/off * Palette scaling now uses colour A/B as start/finish colour & index * Gimp palette files (*.gpl) can now be loaded/saved via the Palette menu * If file ~/mtpaint.gpl exists, it is loaded as the default palette on startup * Transparent GIF information can now be loaded/saved + general GIF import improvements * Transparent pixels in main edit area are now grey chequers in single layer mode * Counting all RGB colours now requires 2MB not 16MB * Custom icons can now be compiled for mtPaint - see ./src/icons1/README for details * Maximum layers increased to 100 * Windows binary installation has been simplified with standard setup.exe * BUGFIX - When changing tool with function key, brush perimeter is now cleared properly 2.10 2005-11-20 * Support for pressure sensitive tablets via Preferences window, see 'Tools' in docs * Colour histogram added to Information window (Ctrl-I) * Palette->Create Quantized (Wu) method added - Good for small palettes e.g. 32 * Convert to Indexed window improved * View window now has focus toggle to keep locked on the main window centre position * Info window now counts all colours in RGB images - if 16MB memory is available * Preferences window is now non-modal and has an apply button * ./src/Makefile simplified * Brazilian Portuguese translation contributed by Paulo Trevizan * BUGFIX - memory leak fixed with DL1 Quantize & Floyd-Steinberg * BUGFIX - segfault fixed when pressing * and - keys simultaneously in pan window * BUGFIX - segfault fixed when using read only filesystems with no ~/.mtpaint write access * BUGFIX - segfault fixed when loading certain animated GIFs - warning message instead 2.03 2005-9-23 * BUGFIX - Resolved rare segfault when shifting a layer up/down with no view window showing 2.02 2005-9-19 * PNG files with a transparency can now be loaded and saved - See 'Limitations' * View->Show zoom grid - Parameters set in Preferences window->Zoom * "Save As" window improved with new file attribute widgets * Status bar changes - (T=?) for transparencies, 'x' in selection geometry * mtPaint project registered with Launchpad/Rosetta to help with translations: https://launchpad.net/products/mtpaint/+translations * Partial French translation contributed by Nicolas Velin * Partial Portuguese translation contributed by Israel G. Lugo * BUGFIX - Copy/Paste in auto commit mode followed by paint tool does not draw extra line 2.01 2005-8-14 * BUGFIX - Resolved occasional segfault when loading and showing all layers in the main window * BUGFIX - Windows version: screenshot grabbing now hides the new image window 2.00 2005-8-7 * View -> Layers Window - See 'Layers' in docs for info * Edit -> Paste To New Layer * Polygon selection tool added - See 'Selections' in docs for info * Selection -> Lasso Selection & Cut * Clone tool added - See 'Tools' in docs for info * View window now has zoom facility * Line tool now has the ability to draw an arrowhead - See 'Tools' in docs for info * Relative filenames passed at command line now converted to absolutes * GTK+2: Grabbing a screenshot via the new image window minimizes main window first * Preferences toggle to commit paste when changing tool * Keyboard shortcuts for recently used files - Shift+Ctrl+F1 = Revert * Icons on toolbar reworked to accommodate most commonly used functions * BUGFIX - Greyscale PNG files are now loaded properly 0.97 2005-6-4 * Text tool: Antialiasing without a background colour now possible (alpha blended edges) * Text tool: Changing colour/pattern during paste updates text * Text tool: Independent toggles for background colour and rotation * Changes are flagged in the titlebar * Brushes and patterns increased to 81 * Maximum tool size/flow increased to 200 * Logic of colour A/B editor improved for RGB images * Help docs now supported with international po files * Accuracy of circle brush in continuous mode improved * Specifying a CPU is now more generic - see "./configure --help" * BUGFIX - Loading a large image now correctly adjusts the scrollbars * BUGFIX - Czech characters improved in Windows 0.95 2005-5-4 * Text tool added - See "Tools" for usage * View window now available via View menu or 'V' key * Brush presets now available via Edit menu, F3, icon on toolbar or preview area * Screenshot grabbing facility - "mtpaint -s" or File->New - See "Tips" section * Right mouse button paints with A/B reversed * Palette -> Swap A & B * Mouse scroll wheel zooms in/out if set in Preferences - GTK+2 only * Function keys don't zoom any more - use numbers 1-9 instead * Various new keyboard shortcuts added/changed * Website redesign contributed by Abdulla Al Muhairi * BUGFIX - Xine does not now close Pan Window/Pattern chooser popup * BUGFIX - Occasional pasting 'slips' eliminated * BUGFIX - Edit all colours window now works properly when screen depth <24 bpp 0.90 2005-4-12 * Internationalization now supported with "./configure intl" * Spanish translation contributed by the Guadalinex team * Czech translation contributed by Pavel Ruzicka * Preferences window allows the manual selection of language translations * Man page contributed by Guadalinex team - "./configure man" to install * Pasting with less than 100% opacity now shows preview of resulting transparency * Widget behaviour improved in Quantize & Transform Colour windows * Page Up/Down keys now work as expected in Command Line Window * Changing tool does not tax the CPU as much on older hardware * Accuracy improvements for line tool and circle in continuous mode when size>1 * Max geometry is now 16384x16384 * New typeface for palette numbers * Several more configure script options added - "./configure --help" for details * BUGFIX - Pattern flood fills now work under all conditions * BUGFIX - In GTK+2, filenames with non ASCII characters are now be handled properly * BUGFIX - Attempting to fill on a protected colour does not set opacity to 100% * BUGFIX - Ctrl -/+ Adjusts opacity as originally designed * BUGFIX - Undo/Redo to an indexed image with smudge does not cause segfault 0.75 2005-2-15 * Pan window added - See "Tools" for usage * Colour protection mask now works with RGB images * Selection -> Outline Ellipse + New icon : Thickness = tool size * Converting RGB images to indexed improved: * i) 'Exact' option now uses less memory + slightly quicker * ii) Accuracy of 'Dither' method is now better * iii) Floyd-Steinberg option added * iv) Palette quantization DL1 & DL3 options added with[out] Floyd-Steinberg * Palette -> Create Quantized (DL1 & DL3) : RGB images only * Palette -> Sort -> Frequency : Sorts an indexed palette by pixel frequency on canvas * Palette Sort window has apply button * File -> Export Undo Images (reversed) * Transform Colour window improved: * i) Apply button added * ii) Toggles to transform RGB image and/or palette * iii) Gamma moved to top and is now the 1st operation to be done * iv) Window now pops up where the mouse pointer is positioned * v) Return/Enter keys now press 'OK' button * Tips section added to README & help * Progress window is now movable and does not remain above other windows * configure script improved to cater for systems without pkg-config, i.e. GTK+1 only * BUGFIX - Memory leaks in read_png & read_jpeg cleaned up * BUGFIX - Corrupt PNG & JPEG files are now handled properly * BUGFIX - Palette area update invisibility on some systems corrected * BUGFIX - Jerking of vertical/horizontal scrollbars when zooming eliminated * BUGFIX - Zooming in GTK+1 now respects the specified zoom centre * BUGFIX - While pasting, cursor flickering on slow hardware has been eliminated 0.50 2005-1-1 * Smudge tool - RGB images only, continuous or non-continuous modes * Image -> Free Rotate : Rotate image at any angle * Selection -> Mask Colour A,B : See 'Selections' in README/Help for example * Selection -> Unmask Colour A,B * Selection -> Mask All Colours * Selection -> Clear Mask : Revert to normal opaque rectangular paste * Counting unique RGB pixels is faster (particularly GTK+2) * Selection geometry on status bar now also shows selection diagonal angle + length * Preferences -> Force zoom to 100% or current zoom with a new file * Numbers 1-9 set zoom, Insert=Transform colours, Delete=Crop, Page Up/Down=Scale/Resize * 1-9, +, -, =, Q, Home, Insert, etc... keys work while Command Line window selected * Compilation now works using gcc-2.95 and libpng-1.0 * Configure script contains example of how to compile with Slackware 8.0 * Undo/Redo stops current paste only when changing to/from Indexed/RGB * BUGFIX - Occasional Pango warnings in GTK+2 upon startup stopped * BUGFIX - When undo/redo clears paste the cursor is not stuck as 4 way arrow * BUGFIX - Last pixel of straight line now painted if size=1 0.47 2004-12-11 * View -> 10%, 25%, 50% : +, -/= keys can be used to get zoom below 100% * View -> Toggle Image View (Home key) : Show/Hide palette, menu, status bar etc * View -> Command Line Window : Shows files passed in command line (if > 1) * Effects -> Isometric Transformations * Palette colours : Shift + click/drag moves a colour to a new index * Posterize effect merged with brightness/contrast/saturation window -> Transform Colour * Gamma added to Transform Colour window * Using "mtpaint -v" or calling from other binary name starts in full image view * Selection resize method improved + right button = clear * Limitation relating to flood fill colour resolved for most situations * Using arrow keys while painting changes colour A/B * Edit -> Opacity Undo Mode (F12) replaces Preferences option * Greyscale now in Effects menu * Escape key now selects first button of alert box * Default tool is now selection * Colour toolbar icons moved together * Keyboard shortcuts added for Cropping/Transforming colours/Invert/Greyscale * Compiler options tweaked - faster/smaller binary * BUGFIX - Undo/Redo to indexed/RGB while pasting RGB/indexed does not cause segfault 0.45 2004-11-21 * Tool opacity is now variable so subtle RGB painting is now possible * Effects -> Edge Detect, Sharpen, Soften, Blur, Emboss * Scaling a 24 bit RGB image is now smoother * Image -> Convert To Indexed : Exact conversion, Quantized Palette, Dithered, Scattered * Save TIFF files (uncompressed RGB) * Save GIF files (uncompressed indexed 256 colours) * Save BMP files (uncompressed indexed & RGB) * File -> Export Undo Images * File -> Export ASCII Art * Palette -> Add Colours changed to Set Palette Size, i.e. reduction is now possible * File -> Save As : If image has a filename, put this into the filename box * When loading a png/tiff/jpeg/gif only use progress bar if image is large * Middle mouse button sets the zoom centre * Image -> Preferences : Q key can now quit mtPaint * Spray/shuffle mouse pointers made more consistent * BUGFIX - Rotating the image with no undo memory does not cause image corruption * BUGFIX in GTK+2.4 - Pressing enter while pasting does not press toolbar button 0.40 2004-11-8 * File -> New : Create 24 bit RGB image * Most functions/tools now work on a 24 bit RGB canvas (except colour protection mask) * Load/Save 24 bit RGB PNG files * Load 24 bit RGB/Greyscale, Save 24 bit RGB JPEG files - Quality set by Preferences * Load TIFF files * Load uncompressed BMP files * Image -> Convert To RGB * Image -> Convert To Indexed * Edit -> Load Clipboard -> 1-12 * Edit -> Save Clipboard -> 1-12 * More icons have been added to the toolbar * File menu now contains a recently used file list - Set limit in Preferences window (0-20) * Maximum canvas height/width set to 8192, minimum set to 1 * Last directory loaded from command line is now correctly remembered * Palette -> Load default * BUGFIX - Resizing/Scaling with no undo memory does not cause segfault * BUGFIX - Using a static tool after resize/scale/rotate does not create unwanted shapes * BUGFIX - An occasional crash when using the GTK+ colour selector was corrected 0.37 2004-10-25 * Image -> Brightness-Contrast-Saturation * Image -> Scale Canvas * Image -> Resize Canvas * Image -> Preferences : The user can specify what info is displayed on the status bar * Image -> Rotate Clockwise * Image -> Rotate Anti-Clockwise * Selection -> Rotate Clockwise * Selection -> Rotate Anti-Clockwise * Help -> About (F1) : Reflects the current README file * File -> New : User can now create a greyscale image * Palette -> Edit All Colours * Palette -> Create Scale : Create blended colours from one index to another * Palette -> Sort * Image -> Bacteria Effect : Try it a few times with "mtpaint graphics/bacteria.png" * File selection window geometry stored independently from main window geometry * BUGFIX - Progress window now appears above file selector in GTK+2 Windows/Gnome * BUGFIX - Maximizing A/B colour editor window does not cause segfault or window corruption 0.35 2004-10-16 * Sources can now be compiled using MinGW/MSYS to create a Windows version of mtPaint * XPM & XBM images can now be loaded and saved * File -> Preferences : User can view/set XPM/XBM transparency/hotspot info * Straight line tool added to toolbar * Image menu now houses Convert to greyscale, Posterize, Information, Preferences and Crop * Image -> Flip Vertically * Image -> Flip Horizontally * Image -> Invert * Selection -> Flip Vertically * Selection -> Flip Horizontally * Undo/redo levels displayed on status bar * Progress bar is now used for load/save/flip - Useful for large images or slow machines * Minimum main window size set so 640x480 screens can use mtPaint * Setting zoom centre now requires Shift+Right button - Avoids clash with paste/line tools * BUGFIX - Save failure does not now clear the mem_changed flag * BUGFIX - Accuracy of max undo levels improved in Information window * BUGFIX - Menus updated when loading file from command line (no option to crop to 1x1) 0.30 2004-10-4 * GIF images can now be loaded into mtPaint * Mouse pointers for static shapes improved * Selection menu now houses "Select All", "Select None" * Selection -> Outline Rectangle : Draws outline of tool size pixels around current selection * Selection -> Filled Rectangle : Fills the current selection area * Selection -> Filled Ellipse : Draws a filled ellipse inside the current selection area * Selection -> Line - Slash : Draws straight line on selection from top left to bottom right * Selection -> Line - Backslash : Draws straight line on selection from top right to bottom left * Edit -> Continuous Painting : Makes painting the 6 static shapes continuous and smooth * Status bar has "CON" to indicate if the program is in Continuous Painting mode * Information window now contains details of current clipboard data * Ctrl+Left Button while over palette sets colour B (useful for stylus/tablet users) * configure script extended - use "./configure --help" for details * BUGFIX - Selecting None during paste at high zoom does not tax the CPU * BUGFIX - Changing tool during paste at high zoom does not tax the CPU * BUGFIX - Pasting while already pasting at high zoom does not cause program termination * BUGFIX - Selection/Paste perimeter does not get corrupted in GTK+2 while using scrollbars 0.25 2004-9-24 * Palette -> Convert To Greyscale : Converts current palette to greyscale * Edit -> Crop : Crops the canvas to the current selection * The red/white selection box can now be resized by clicking and dragging the corners * Selection geometry is now displayed on the status bar * Start with blank canvas if file was not successfully loaded from the command line * Enter/Return now commits a paste even when Shift/Ctrl are pressed * Loading a palette can now be undone/redone * BUGFIX - Errors while trying to "Save As" are now treated properly * BUGFIX - Pressing CTRL and moving the mouse without pressing a button does not tax the CPU * BUGFIX - Loading a palette with 256 colours is now possible * BUGFIX - Paste To Centre menu item now behaves as expected * BUGFIX - mem_changed flag now cleared properly after saving - no more false warnings * BUGFIX - Fixed segfault when cutting during a paste (edit menu logic improved) * Select/Paste now uses less CPU and doesn't flicker as much * Undo system rewritten: * Accommodates geometry changes from cropping * Only malloc's memory as required, not en masse at beginning * Tool perimeter shows correct position when mouse is over the grey background 0.24 2004-9-19 * Makefile - Default compiler options changed to make no optimizations * Preferences -> Option to show mouse cursor as the tool shape * Preferences -> Confirm exit alert now optional * When quitting/opening/file-new without saving changes, the user is warned * TODO list in README updated with my plans for the next few months * File -> Save As given shortcut Shift+Ctrl-S * Selection tool added to toolbar * Edit -> Cut * Edit -> Copy * Edit -> Paste To Centre * Edit -> Paste * Edit -> Select All * Edit -> Select None * Preferences -> Option to not display clipboard image while pasting * README updated with details about selection, copy, cut, paste etc. * BUGFIX in memory.c - correct posterizing now happens whether using -ffast-math or not * BUGFIX in GTK+1 - CTRL shortcuts are now not blocked by size/spray spin buttons * First public release of mtPaint on gnomefiles.org 0.23 2004-9-13 First public release of mtPaint on freshmeat.net 0.21 2004-9-6 Beta testing begins! 0.20 2004-9-5 9 basic tools + palette edit/add/posterize/merge/load/save finished 0.16 2004-8-31 Undo/Redo implemented - default MAX_UNDO = 100 0.15 2004-8-28 Patterns implemented with square tool + colour protection mask implemented 0.05 2004-8-14 PNG load + image display & zoom features 0.04 2004-8-12 Program structure fixated 0.02 2004-8-7 GUI fixated 0.00 2004-7-4 Project started - GUI & back end designs kicked around on paper and in Glade mtpaint-3.40/COPYING0000644000175000000620000010451310647712716013505 0ustar muammarstaff GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . mtpaint-3.40/gtk/0000755000175000000620000000000011677155677013246 5ustar muammarstaffmtpaint-3.40/gtk/pango182_1wj.patch0000644000175000000620000001066011477024043016366 0ustar muammarstaffdiff -udpr pango-1.8.2_/pango/pango-utils.c pango-1.8.2/pango/pango-utils.c --- pango-1.8.2_/pango/pango-utils.c 2005-06-15 02:35:08.000000000 +0400 +++ pango-1.8.2/pango/pango-utils.c 2010-12-06 02:54:30.000000000 +0300 @@ -1472,6 +1472,120 @@ alias_free (struct PangoAlias *alias) g_free (alias); } +#ifdef G_OS_WIN32 + +static const char *builtin_aliases[] = { + "courier = \"courier new\"", + "\"segoe ui\" = \"segoe ui,arial unicode ms,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"", + "tahoma = \"tahoma,arial unicode ms,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"", + /* It sucks to use the same GulimChe, MS Gothic, Sylfaen, Kartika, + * Latha, Mangal and Raavi fonts for all three of sans, serif and + * mono, but it isn't like there would be much choice. For most + * non-Latin scripts that Windows includes any font at all for, it + * has ony one. One solution is to install the free DejaVu fonts + * that are popular on Linux. They are listed here first. + */ + "sans = \"dejavu sans,tahoma,arial unicode ms,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"", + "sans-serif = \"dejavu sans,tahoma,arial unicode ms,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"", + "serif = \"dejavu serif,georgia,angsana new,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"", + "mono = \"dejavu sans mono,courier new,courier monothai,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"", + "monospace = \"dejavu sans mono,courier new,courier monothai,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi\"" +}; + +static void +read_builtin_aliases (void) +{ + + GString *line_buffer; + GString *tmp_buffer1; + GString *tmp_buffer2; + const char *pos; + int line; + struct PangoAlias alias_key; + struct PangoAlias *alias; + char **new_families; + int n_new; + int i; + + line_buffer = g_string_new (NULL); + tmp_buffer1 = g_string_new (NULL); + tmp_buffer2 = g_string_new (NULL); + +#define ASSERT(x) if (!(x)) g_error ("Assertion failed: " #x) + + for (line = 0; line < G_N_ELEMENTS (builtin_aliases); line++) + { + g_string_assign (line_buffer, builtin_aliases[line]); + gboolean append = FALSE; + + pos = line_buffer->str; + + ASSERT (pango_scan_string (&pos, tmp_buffer1) && + pango_skip_space (&pos)); + + if (*pos == '+') + { + append = TRUE; + pos++; + } + + ASSERT (*(pos++) == '='); + + ASSERT (pango_scan_string (&pos, tmp_buffer2)); + + ASSERT (!pango_skip_space (&pos)); + + alias_key.alias = g_ascii_strdown (tmp_buffer1->str, -1); + + /* Remove any existing values */ + alias = g_hash_table_lookup (pango_aliases_ht, &alias_key); + + if (!alias) + { + alias = g_new0 (struct PangoAlias, 1); + alias->alias = alias_key.alias; + + g_hash_table_insert (pango_aliases_ht, + alias, alias); + } + else + g_free (alias_key.alias); + + new_families = g_strsplit (tmp_buffer2->str, ",", -1); + + n_new = 0; + while (new_families[n_new]) + n_new++; + + if (alias->families && append) + { + alias->families = g_realloc (alias->families, + sizeof (char *) *(n_new + alias->n_families)); + for (i = 0; i < n_new; i++) + alias->families[alias->n_families + i] = new_families[i]; + g_free (new_families); + alias->n_families += n_new; + } + else + { + for (i = 0; i < alias->n_families; i++) + g_free (alias->families[i]); + g_free (alias->families); + + alias->families = new_families; + alias->n_families = n_new; + } + } + +#undef ASSERT + + g_string_free (line_buffer, TRUE); + g_string_free (tmp_buffer1, TRUE); + g_string_free (tmp_buffer2, TRUE); +} + +#endif + static void read_alias_file (const char *filename) { @@ -1507,7 +1621,7 @@ read_alias_file (const char *filename) if (!pango_skip_space (&pos)) continue; - if (!pango_scan_word (&pos, tmp_buffer1) || + if (!pango_scan_string (&pos, tmp_buffer1) || !pango_skip_space (&pos)) { errstring = g_strdup ("Line is not of the form KEY=VALUE or KEY+=VALUE"); @@ -1615,6 +1729,9 @@ pango_load_aliases (void) (GDestroyNotify)alias_free, NULL); +#ifdef G_OS_WIN32 + read_builtin_aliases (); +#endif filename = g_strconcat (pango_get_sysconf_subdirectory (), G_DIR_SEPARATOR_S "pango.aliases", mtpaint-3.40/gtk/gtk267_5wj.patch0000644000175000000620000023060411365515456016072 0ustar muammarstaffdiff -udpr gtk+-2.6.7_/gdk/win32/gdkcursor-win32.c gtk+-2.6.7/gdk/win32/gdkcursor-win32.c --- gtk+-2.6.7_/gdk/win32/gdkcursor-win32.c 2004-03-06 06:37:07.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/gdkcursor-win32.c 2010-04-27 01:10:46.000000000 +0400 @@ -41,6 +41,12 @@ _gdk_win32_data_to_wcursor (GdkCursorTyp if (i >= G_N_ELEMENTS (cursors) || !cursors[i].name) return NULL; + /* use real win32 cursor if possible */ + if (cursors[i].builtin) + { + return LoadCursor (NULL, cursors[i].builtin); + } + w = GetSystemMetrics (SM_CXCURSOR); h = GetSystemMetrics (SM_CYCURSOR); diff -udpr gtk+-2.6.7_/gdk/win32/gdkdnd-win32.c gtk+-2.6.7/gdk/win32/gdkdnd-win32.c --- gtk+-2.6.7_/gdk/win32/gdkdnd-win32.c 2004-12-20 00:00:58.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/gdkdnd-win32.c 2010-04-27 01:52:49.000000000 +0400 @@ -978,6 +978,8 @@ gdk_dropfiles_filter (GdkXEvent *xev, /* WM_DROPFILES drops are always file names */ context->targets = g_list_append (NULL, GUINT_TO_POINTER (_text_uri_list)); + context->actions = GDK_ACTION_COPY; + context->suggested_action = GDK_ACTION_COPY; current_dest_drag = context; event->dnd.type = GDK_DROP_START; @@ -987,8 +989,8 @@ gdk_dropfiles_filter (GdkXEvent *xev, DragQueryPoint (hdrop, &pt); ClientToScreen (msg->hwnd, &pt); - event->dnd.x_root = pt.x; - event->dnd.y_root = pt.y; + event->dnd.x_root = pt.x + _gdk_offset_x; + event->dnd.y_root = pt.y + _gdk_offset_y; event->dnd.time = _gdk_win32_get_next_tick (msg->time); nfiles = DragQueryFile (hdrop, 0xFFFFFFFF, NULL, 0); diff -udpr gtk+-2.6.7_/gdk/win32/gdkdrawable-win32.c gtk+-2.6.7/gdk/win32/gdkdrawable-win32.c --- gtk+-2.6.7_/gdk/win32/gdkdrawable-win32.c 2005-04-04 00:36:39.000000000 +0400 +++ gtk+-2.6.7/gdk/win32/gdkdrawable-win32.c 2010-04-27 01:32:46.000000000 +0400 @@ -1856,6 +1856,16 @@ _gdk_win32_blit (gboolean u xdest, ydest, use_fg_bg)); + /* If blitting from the root window, take the multi-monitor offset + * into account. + */ + if (src == ((GdkWindowObject *)_gdk_parent_root)->impl) + { + GDK_NOTE (MISC, g_print ("... offsetting src coords\n")); + xsrc -= _gdk_offset_x; + ysrc -= _gdk_offset_y; + } + draw_impl = (GdkDrawableImplWin32 *) drawable; if (GDK_IS_DRAWABLE_IMPL_WIN32 (src)) diff -udpr gtk+-2.6.7_/gdk/win32/gdkevents-win32.c gtk+-2.6.7/gdk/win32/gdkevents-win32.c --- gtk+-2.6.7_/gdk/win32/gdkevents-win32.c 2005-04-04 03:40:42.000000000 +0400 +++ gtk+-2.6.7/gdk/win32/gdkevents-win32.c 2010-04-27 01:10:46.000000000 +0400 @@ -162,7 +162,8 @@ static HKL latin_locale = NULL; #endif static gboolean in_ime_composition = FALSE; -static UINT resize_timer; +static UINT modal_timer; +static UINT sync_timer = 0; static int debug_indent = 0; @@ -1841,140 +1842,7 @@ handle_configure_event (MSG *msg, } } -static void -erase_background (GdkWindow *window, - HDC hdc) -{ - HDC bgdc = NULL; - HBRUSH hbr = NULL; - HPALETTE holdpal = NULL; - RECT rect; - COLORREF bg; - GdkColormap *colormap; - GdkColormapPrivateWin32 *colormap_private; - int x, y; - int x_offset, y_offset; - - if (((GdkWindowObject *) window)->input_only || - ((GdkWindowObject *) window)->bg_pixmap == GDK_NO_BG || - GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->position_info.no_bg) - { - return; - } - - colormap = gdk_drawable_get_colormap (window); - - if (colormap && - (colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR || - colormap->visual->type == GDK_VISUAL_STATIC_COLOR)) - { - int k; - - colormap_private = GDK_WIN32_COLORMAP_DATA (colormap); - - if (!(holdpal = SelectPalette (hdc, colormap_private->hpal, FALSE))) - WIN32_GDI_FAILED ("SelectPalette"); - else if ((k = RealizePalette (hdc)) == GDI_ERROR) - WIN32_GDI_FAILED ("RealizePalette"); - else if (k > 0) - GDK_NOTE (COLORMAP, g_print ("erase_background: realized %p: %d colors\n", - colormap_private->hpal, k)); - } - - x_offset = y_offset = 0; - while (window && ((GdkWindowObject *) window)->bg_pixmap == GDK_PARENT_RELATIVE_BG) - { - /* If this window should have the same background as the parent, - * fetch the parent. (And if the same goes for the parent, fetch - * the grandparent, etc.) - */ - x_offset += ((GdkWindowObject *) window)->x; - y_offset += ((GdkWindowObject *) window)->y; - window = GDK_WINDOW (((GdkWindowObject *) window)->parent); - } - - if (GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->position_info.no_bg) - { - /* Improves scolling effect, e.g. main buttons of testgtk */ - return; - } - - GetClipBox (hdc, &rect); - - if (((GdkWindowObject *) window)->bg_pixmap == NULL) - { - bg = _gdk_win32_colormap_color (GDK_DRAWABLE_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->colormap, - ((GdkWindowObject *) window)->bg_color.pixel); - - if (!(hbr = CreateSolidBrush (bg))) - WIN32_GDI_FAILED ("CreateSolidBrush"); - else if (!FillRect (hdc, &rect, hbr)) - WIN32_GDI_FAILED ("FillRect"); - if (hbr != NULL) - DeleteObject (hbr); - } - else if (((GdkWindowObject *) window)->bg_pixmap != GDK_NO_BG) - { - GdkPixmap *pixmap = ((GdkWindowObject *) window)->bg_pixmap; - GdkPixmapImplWin32 *pixmap_impl = GDK_PIXMAP_IMPL_WIN32 (GDK_PIXMAP_OBJECT (pixmap)->impl); - - if (x_offset == 0 && y_offset == 0 && - pixmap_impl->width <= 8 && pixmap_impl->height <= 8) - { - if (!(hbr = CreatePatternBrush (GDK_PIXMAP_HBITMAP (pixmap)))) - WIN32_GDI_FAILED ("CreatePatternBrush"); - else if (!FillRect (hdc, &rect, hbr)) - WIN32_GDI_FAILED ("FillRect"); - if (hbr != NULL) - DeleteObject (hbr); - } - else - { - HGDIOBJ oldbitmap; - - if (!(bgdc = CreateCompatibleDC (hdc))) - { - WIN32_GDI_FAILED ("CreateCompatibleDC"); - return; - } - if (!(oldbitmap = SelectObject (bgdc, GDK_PIXMAP_HBITMAP (pixmap)))) - { - WIN32_GDI_FAILED ("SelectObject"); - DeleteDC (bgdc); - return; - } - x = -x_offset; - while (x < rect.right) - { - if (x + pixmap_impl->width >= rect.left) - { - y = -y_offset; - while (y < rect.bottom) - { - if (y + pixmap_impl->height >= rect.top) - { - if (!BitBlt (hdc, x, y, - pixmap_impl->width, pixmap_impl->height, - bgdc, 0, 0, SRCCOPY)) - { - WIN32_GDI_FAILED ("BitBlt"); - SelectObject (bgdc, oldbitmap); - DeleteDC (bgdc); - return; - } - } - y += pixmap_impl->height; - } - } - x += pixmap_impl->width; - } - SelectObject (bgdc, oldbitmap); - DeleteDC (bgdc); - } - } -} - -static GdkRegion * +GdkRegion * _gdk_win32_hrgn_to_region (HRGN hrgn) { RGNDATA *rgndata; @@ -2043,6 +1911,7 @@ handle_wm_paint (MSG *msg, if (GetUpdateRgn (msg->hwnd, hrgn, FALSE) == ERROR) { WIN32_GDI_FAILED ("GetUpdateRgn"); + DeleteObject (hrgn); return; } @@ -2115,6 +1984,7 @@ handle_wm_paint (MSG *msg, } } + DeleteObject (hrgn); return; } @@ -2138,15 +2008,32 @@ handle_stuff_while_moving_or_resizing (v } static VOID CALLBACK -resize_timer_proc (HWND hwnd, - UINT msg, - UINT id, - DWORD time) +modal_timer_proc (HWND hwnd, + UINT msg, + UINT id, + DWORD time) { if (_sizemove_in_progress) handle_stuff_while_moving_or_resizing (); } +static VOID CALLBACK +sync_timer_proc (HWND hwnd, + UINT msg, + UINT id, + DWORD time) +{ + MSG message; + if (PeekMessageW (&message, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)) + { + return; + } + + RedrawWindow (hwnd, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ALLCHILDREN); + + KillTimer (hwnd, sync_timer); +} + static void handle_display_change (void) { @@ -2923,11 +2810,17 @@ gdk_event_translate (GdkDisplay *display if (GDK_WINDOW_DESTROYED (window)) break; - erase_background (window, (HDC) msg->wParam); return_val = TRUE; *ret_valp = 1; break; + case WM_SYNCPAINT: + + sync_timer = SetTimer (GDK_WINDOW_HWND (window), + 1, + 200, sync_timer_proc); + break; + case WM_PAINT: handle_wm_paint (msg, window, FALSE, NULL); break; @@ -3042,15 +2935,31 @@ gdk_event_translate (GdkDisplay *display case WM_ENTERSIZEMOVE: _sizemove_in_progress = TRUE; - resize_timer = SetTimer (NULL, 0, 20, resize_timer_proc); + modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc); break; case WM_EXITSIZEMOVE: _sizemove_in_progress = FALSE; - KillTimer (NULL, resize_timer); + KillTimer (NULL, modal_timer); + break; + + case WM_ENTERMENULOOP: + _sizemove_in_progress = TRUE; + modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc); + break; + + case WM_EXITMENULOOP: + _sizemove_in_progress = FALSE; + KillTimer (NULL, modal_timer); break; case WM_WINDOWPOSCHANGED : + /* If position and size haven't changed, don't do anything */ + if (_sizemove_in_progress && + (((WINDOWPOS *)msg->lParam)->flags & SWP_NOMOVE) && + (((WINDOWPOS *)msg->lParam)->flags & SWP_NOSIZE)) + break; + /* Once we've entered the moving or sizing modal loop, we won't * return to the main loop until we're done sizing or moving. */ @@ -3058,55 +2967,14 @@ gdk_event_translate (GdkDisplay *display GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && !GDK_WINDOW_DESTROYED (window)) { - RECT client_rect; - POINT point; - - GetClientRect (msg->hwnd, &client_rect); - point.x = client_rect.left; /* always 0 */ - point.y = client_rect.top; - /* top level windows need screen coords */ - if (gdk_window_get_parent (window) == _gdk_parent_root) - { - ClientToScreen (msg->hwnd, &point); - point.x += _gdk_offset_x; - point.y += _gdk_offset_y; - } - - GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->width = client_rect.right - client_rect.left; - GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->height = client_rect.bottom - client_rect.top; - - ((GdkWindowObject *) window)->x = point.x; - ((GdkWindowObject *) window)->y = point.y; - if (((GdkWindowObject *) window)->event_mask & GDK_STRUCTURE_MASK) { - GdkEvent *event = gdk_event_new (GDK_CONFIGURE); - - event->configure.window = window; - - event->configure.width = client_rect.right - client_rect.left; - event->configure.height = client_rect.bottom - client_rect.top; - - event->configure.x = point.x; - event->configure.y = point.y; - if (((GdkWindowObject *) window)->resize_count > 1) ((GdkWindowObject *) window)->resize_count -= 1; -#if 0 /* I don't like calling _gdk_event_func() from here, isn't there - * a risk of getting events processed in the wrong order, like - * Owen says in the discussion of bug #99540? - */ - fixup_event (event); - if (_gdk_event_func) - (*_gdk_event_func) (event, _gdk_event_data); - gdk_event_free (event); -#else /* Calling append_event() is slower, but guarantees that events won't - * get reordered, I think. - */ - append_event (display, event); -#endif - + handle_configure_event (msg, window); + g_main_context_iteration (NULL, FALSE); + /* Dispatch main loop - to realize resizes... */ handle_stuff_while_moving_or_resizing (); @@ -3119,6 +2987,7 @@ gdk_event_translate (GdkDisplay *display case WM_SIZING: GetWindowRect (GDK_WINDOW_HWND (window), &rect); + drag = (RECT *) msg->lParam; GDK_NOTE (EVENTS, g_print (" %s curr:%s drag:%s", (msg->wParam == WMSZ_BOTTOM ? "BOTTOM" : (msg->wParam == WMSZ_BOTTOMLEFT ? "BOTTOMLEFT" : @@ -3131,13 +3000,13 @@ gdk_event_translate (GdkDisplay *display (msg->wParam == WMSZ_BOTTOMRIGHT ? "BOTTOMRIGHT" : "???")))))))), _gdk_win32_rect_to_string (&rect), - _gdk_win32_rect_to_string ((RECT *) msg->lParam))); + _gdk_win32_rect_to_string (drag))); impl = GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl); - drag = (RECT *) msg->lParam; orig_drag = *drag; if (impl->hint_flags & GDK_HINT_RESIZE_INC) { + GDK_NOTE (EVENTS, g_print (" (RESIZE_INC)")); if (impl->hint_flags & GDK_HINT_BASE_SIZE) { /* Resize in increments relative to the base size */ @@ -3166,7 +3035,6 @@ gdk_event_translate (GdkDisplay *display if (drag->bottom == rect.bottom) break; adjust_drag (&drag->bottom, rect.bottom, impl->hints.height_inc); - break; case WMSZ_BOTTOMLEFT: @@ -3221,7 +3089,7 @@ gdk_event_translate (GdkDisplay *display { *ret_valp = TRUE; return_val = TRUE; - GDK_NOTE (EVENTS, g_print (" (handled RESIZE_INC: drag:%s)", + GDK_NOTE (EVENTS, g_print (" (handled RESIZE_INC: %s)", _gdk_win32_rect_to_string (drag))); } } @@ -3230,18 +3098,105 @@ gdk_event_translate (GdkDisplay *display if (impl->hint_flags & GDK_HINT_ASPECT) { - gdouble drag_aspect = (gdouble) (drag->right - drag->left) / (drag->bottom - drag->top); - - GDK_NOTE (EVENTS, g_print (" (aspect:%g)", drag_aspect)); - if (drag_aspect < impl->hints.min_aspect || - drag_aspect > impl->hints.max_aspect) + RECT decorated_rect; + RECT undecorated_drag; + int decoration_width, decoration_height; + gdouble drag_aspect; + int drag_width, drag_height, new_width, new_height; + + GetClientRect (GDK_WINDOW_HWND (window), &rect); + decorated_rect = rect; + _gdk_win32_adjust_client_rect (window, &decorated_rect); + + /* Set undecorated_drag to the client area being dragged + * out, in screen coordinates. + */ + undecorated_drag = *drag; + undecorated_drag.left -= decorated_rect.left - rect.left; + undecorated_drag.right -= decorated_rect.right - rect.right; + undecorated_drag.top -= decorated_rect.top - rect.top; + undecorated_drag.bottom -= decorated_rect.bottom - rect.bottom; + + decoration_width = (decorated_rect.right - decorated_rect.left) - (rect.right - rect.left); + decoration_height = (decorated_rect.bottom - decorated_rect.top) - (rect.bottom - rect.top); + + drag_width = undecorated_drag.right - undecorated_drag.left; + drag_height = undecorated_drag.bottom - undecorated_drag.top; + + drag_aspect = (gdouble) drag_width / drag_height; + + GDK_NOTE (EVENTS, g_print (" (ASPECT:%g--%g curr: %g)", + impl->hints.min_aspect, impl->hints.max_aspect, drag_aspect)); + + if (drag_aspect < impl->hints.min_aspect) { - *drag = rect; - *ret_valp = TRUE; - return_val = TRUE; - GDK_NOTE (EVENTS, g_print (" (handled ASPECT: drag:%s)", - _gdk_win32_rect_to_string (drag))); + /* Aspect is getting too narrow */ + switch (msg->wParam) + { + case WMSZ_BOTTOM: + case WMSZ_TOP: + /* User drags top or bottom edge outward. Keep height, increase width. */ + new_width = impl->hints.min_aspect * drag_height; + drag->left -= (new_width - drag_width) / 2; + drag->right = drag->left + new_width + decoration_width; + break; + case WMSZ_BOTTOMLEFT: + case WMSZ_BOTTOMRIGHT: + /* User drags bottom-left or bottom-right corner down. Adjust height. */ + new_height = drag_width / impl->hints.min_aspect; + drag->bottom = drag->top + new_height + decoration_height; + break; + case WMSZ_LEFT: + case WMSZ_RIGHT: + /* User drags left or right edge inward. Decrease height */ + new_height = drag_width / impl->hints.min_aspect; + drag->top += (drag_height - new_height) / 2; + drag->bottom = drag->top + new_height + decoration_height; + break; + case WMSZ_TOPLEFT: + case WMSZ_TOPRIGHT: + /* User drags top-left or top-right corner up. Adjust height. */ + new_height = drag_width / impl->hints.min_aspect; + drag->top = drag->bottom - new_height - decoration_height; + } + } + else if (drag_aspect > impl->hints.max_aspect) + { + /* Aspect is getting too wide */ + switch (msg->wParam) + { + case WMSZ_BOTTOM: + case WMSZ_TOP: + /* User drags top or bottom edge inward. Decrease width. */ + new_width = impl->hints.max_aspect * drag_height; + drag->left += (drag_width - new_width) / 2; + drag->right = drag->left + new_width + decoration_width; + break; + case WMSZ_BOTTOMLEFT: + case WMSZ_TOPLEFT: + /* User drags bottom-left or top-left corner left. Adjust width. */ + new_width = impl->hints.max_aspect * drag_height; + drag->left = drag->right - new_width - decoration_width; + break; + case WMSZ_BOTTOMRIGHT: + case WMSZ_TOPRIGHT: + /* User drags bottom-right or top-right corner right. Adjust width. */ + new_width = impl->hints.max_aspect * drag_height; + drag->right = drag->left + new_width + decoration_width; + break; + case WMSZ_LEFT: + case WMSZ_RIGHT: + /* User drags left or right edge outward. Increase height. */ + new_height = drag_width / impl->hints.max_aspect; + drag->top -= (new_height - drag_height) / 2; + drag->bottom = drag->top + new_height + decoration_height; + break; + } } + *ret_valp = TRUE; + return_val = TRUE; + GDK_NOTE (EVENTS, g_print (" (handled ASPECT: %s)", + _gdk_win32_rect_to_string (drag))); } break; diff -udpr gtk+-2.6.7_/gdk/win32/gdkgeometry-win32.c gtk+-2.6.7/gdk/win32/gdkgeometry-win32.c --- gtk+-2.6.7_/gdk/win32/gdkgeometry-win32.c 2005-03-13 01:07:34.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/gdkgeometry-win32.c 2010-04-27 01:10:46.000000000 +0400 @@ -108,9 +108,9 @@ gdk_window_scroll (GdkWindow *window, GdkRegion *invalidate_region; GdkWindowImplWin32 *impl; GdkWindowObject *obj; - GdkRectangle dest_rect; GList *tmp_list; GdkWindowParentPos parent_pos; + HRGN native_invalidate_region; g_return_if_fail (GDK_IS_WINDOW (window)); @@ -130,22 +130,6 @@ gdk_window_scroll (GdkWindow *window, if (obj->update_area) gdk_region_offset (obj->update_area, dx, dy); - invalidate_region = gdk_region_rectangle (&impl->position_info.clip_rect); - - dest_rect = impl->position_info.clip_rect; - dest_rect.x += dx; - dest_rect.y += dy; - gdk_rectangle_intersect (&dest_rect, &impl->position_info.clip_rect, &dest_rect); - - if (dest_rect.width > 0 && dest_rect.height > 0) - { - GdkRegion *tmp_region; - - tmp_region = gdk_region_rectangle (&dest_rect); - gdk_region_subtract (invalidate_region, tmp_region); - gdk_region_destroy (tmp_region); - } - gdk_window_compute_parent_pos (impl, &parent_pos); parent_pos.x += obj->x; @@ -156,10 +140,13 @@ gdk_window_scroll (GdkWindow *window, gdk_window_tmp_unset_bg (window); - if (!ScrollWindowEx (GDK_WINDOW_HWND (window), - dx, dy, NULL, NULL, - NULL, NULL, SW_SCROLLCHILDREN)) - WIN32_API_FAILED ("ScrollWindowEx"); + native_invalidate_region = CreateRectRgn (0, 0, 0, 0); + if (native_invalidate_region == NULL) + WIN32_API_FAILED ("CreateRectRgn"); + + API_CALL (ScrollWindowEx, (GDK_WINDOW_HWND (window), + dx, dy, NULL, NULL, + native_invalidate_region, NULL, SW_SCROLLCHILDREN)); if (impl->position_info.no_bg) gdk_window_tmp_reset_bg (window); @@ -173,8 +160,15 @@ gdk_window_scroll (GdkWindow *window, tmp_list = tmp_list->next; } - gdk_window_invalidate_region (window, invalidate_region, TRUE); - gdk_region_destroy (invalidate_region); + if (native_invalidate_region != NULL) + { + invalidate_region = _gdk_win32_hrgn_to_region (native_invalidate_region); + gdk_region_offset (invalidate_region, impl->position_info.x_offset, + impl->position_info.y_offset); + gdk_window_invalidate_region (window, invalidate_region, TRUE); + gdk_region_destroy (invalidate_region); + GDI_CALL (DeleteObject, (native_invalidate_region)); + } } void diff -udpr gtk+-2.6.7_/gdk/win32/gdkinput-win32.c gtk+-2.6.7/gdk/win32/gdkinput-win32.c --- gtk+-2.6.7_/gdk/win32/gdkinput-win32.c 2005-02-25 03:09:52.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/gdkinput-win32.c 2010-04-27 01:52:07.000000000 +0400 @@ -43,16 +43,10 @@ #define PACKETMODE (PK_BUTTONS) #include -/* If USE_SYSCONTEXT is on, we open the Wintab device (hmm, what if - * there are several?) as a system pointing device, i.e. it controls - * the normal Windows cursor. This seems much more natural. - */ -#define USE_SYSCONTEXT 1 /* The code for the other choice is not - * good at all. - */ - #define DEBUG_WINTAB 1 /* Verbose debug messages enabled */ +#define PROXIMITY_OUT_DELAY 200 /* In milliseconds, see set_ignore_core */ + #endif #if defined(HAVE_WINTAB) || defined(HAVE_WHATEVER_OTHER) @@ -63,10 +57,6 @@ /* Forward declarations */ -#if !USE_SYSCONTEXT -static GdkInputWindow *gdk_input_window_find_within (GdkWindow *window); -#endif - #ifdef HAVE_WINTAB static GdkDevicePrivate *gdk_input_find_dev_from_ctx (HCTX hctx, @@ -211,7 +201,6 @@ _gdk_input_wintab_init_check (void) GdkDevicePrivate *gdkdev; GdkWindowAttr wa; WORD specversion; - LOGCONTEXT defcontext; HCTX *hctx; UINT ndevices, ncursors, ncsrtypes, firstcsr, hardware; BOOL active; @@ -219,6 +208,7 @@ _gdk_input_wintab_init_check (void) int i, k; int devix, cursorix; char devname[100], csrname[100]; + BOOL defcontext_done; if (wintab_initialized) return; @@ -233,17 +223,6 @@ _gdk_input_wintab_init_check (void) WTInfo (WTI_INTERFACE, IFC_SPECVERSION, &specversion); GDK_NOTE (INPUT, g_print ("Wintab interface version %d.%d\n", HIBYTE (specversion), LOBYTE (specversion))); -#if USE_SYSCONTEXT - WTInfo (WTI_DEFSYSCTX, 0, &defcontext); -#if DEBUG_WINTAB - GDK_NOTE (INPUT, (g_print("DEFSYSCTX:\n"), print_lc(&defcontext))); -#endif -#else - WTInfo (WTI_DEFCONTEXT, 0, &defcontext); -#if DEBUG_WINTAB - GDK_NOTE (INPUT, (g_print("DEFCONTEXT:\n"), print_lc(&defcontext))); -#endif -#endif WTInfo (WTI_INTERFACE, IFC_NDEVICES, &ndevices); WTInfo (WTI_INTERFACE, IFC_NCURSORS, &ncursors); #if DEBUG_WINTAB @@ -268,6 +247,11 @@ _gdk_input_wintab_init_check (void) for (devix = 0; devix < ndevices; devix++) { LOGCONTEXT lc; + + /* We open the Wintab device (hmm, what if there are several?) as a + * system pointing device, i.e. it controls the normal Windows + * cursor. This seems much more natural. + */ WTInfo (WTI_DEVICES + devix, DVC_NAME, devname); @@ -279,65 +263,39 @@ _gdk_input_wintab_init_check (void) WTInfo (WTI_DEVICES + devix, DVC_NPRESSURE, &axis_npressure); WTInfo (WTI_DEVICES + devix, DVC_ORIENTATION, axis_or); + defcontext_done = FALSE; if (HIBYTE (specversion) > 1 || LOBYTE (specversion) >= 1) { - WTInfo (WTI_DDCTXS + devix, CTX_NAME, lc.lcName); - WTInfo (WTI_DDCTXS + devix, CTX_OPTIONS, &lc.lcOptions); - lc.lcOptions |= CXO_MESSAGES; -#if USE_SYSCONTEXT - lc.lcOptions |= CXO_SYSTEM; + /* Try to get device-specific default context */ + /* Some drivers, e.g. Aiptek, don't provide this info */ + if (WTInfo (WTI_DSCTXS + devix, 0, &lc) > 0) + defcontext_done = TRUE; +#if DEBUG_WINTAB + if (defcontext_done) + GDK_NOTE (INPUT, (g_print("Using device-specific default context\n"))); + else + GDK_NOTE (INPUT, (g_print("Note: Driver did not provide device specific default context info despite claiming to support version 1.1\n"))); #endif - lc.lcStatus = 0; - WTInfo (WTI_DDCTXS + devix, CTX_LOCKS, &lc.lcLocks); - lc.lcMsgBase = WT_DEFBASE; - lc.lcDevice = devix; - lc.lcPktRate = 50; - lc.lcPktData = PACKETDATA; - lc.lcPktMode = PK_BUTTONS; /* We want buttons in relative mode */ - lc.lcMoveMask = PACKETDATA; - lc.lcBtnDnMask = lc.lcBtnUpMask = ~0; - WTInfo (WTI_DDCTXS + devix, CTX_INORGX, &lc.lcInOrgX); - WTInfo (WTI_DDCTXS + devix, CTX_INORGY, &lc.lcInOrgY); - WTInfo (WTI_DDCTXS + devix, CTX_INORGZ, &lc.lcInOrgZ); - WTInfo (WTI_DDCTXS + devix, CTX_INEXTX, &lc.lcInExtX); - WTInfo (WTI_DDCTXS + devix, CTX_INEXTY, &lc.lcInExtY); - WTInfo (WTI_DDCTXS + devix, CTX_INEXTZ, &lc.lcInExtZ); - lc.lcOutOrgX = axis_x.axMin; - lc.lcOutOrgY = axis_y.axMin; - lc.lcOutExtX = axis_x.axMax - axis_x.axMin; - lc.lcOutExtY = axis_y.axMax - axis_y.axMin; - lc.lcOutExtY = -lc.lcOutExtY; /* We want Y growing downward */ - WTInfo (WTI_DDCTXS + devix, CTX_SENSX, &lc.lcSensX); - WTInfo (WTI_DDCTXS + devix, CTX_SENSY, &lc.lcSensY); - WTInfo (WTI_DDCTXS + devix, CTX_SENSZ, &lc.lcSensZ); - WTInfo (WTI_DDCTXS + devix, CTX_SYSMODE, &lc.lcSysMode); - WTInfo (WTI_DDCTXS + devix, CTX_SYSORGX, &lc.lcSysOrgX); - WTInfo (WTI_DDCTXS + devix, CTX_SYSORGY, &lc.lcSysOrgY); - WTInfo (WTI_DDCTXS + devix, CTX_SYSEXTX, &lc.lcSysExtX); - WTInfo (WTI_DDCTXS + devix, CTX_SYSEXTY, &lc.lcSysExtY); - WTInfo (WTI_DDCTXS + devix, CTX_SYSSENSX, &lc.lcSysSensX); - WTInfo (WTI_DDCTXS + devix, CTX_SYSSENSY, &lc.lcSysSensY); } - else - { - lc = defcontext; - lc.lcOptions |= CXO_MESSAGES; - lc.lcMsgBase = WT_DEFBASE; - lc.lcPktRate = 50; - lc.lcPktData = PACKETDATA; - lc.lcPktMode = PACKETMODE; - lc.lcMoveMask = PACKETDATA; - lc.lcBtnUpMask = lc.lcBtnDnMask = ~0; -#if 0 - lc.lcOutExtY = -lc.lcOutExtY; /* Y grows downward */ -#else - lc.lcOutOrgX = axis_x.axMin; - lc.lcOutOrgY = axis_y.axMin; - lc.lcOutExtX = axis_x.axMax - axis_x.axMin; - lc.lcOutExtY = axis_y.axMax - axis_y.axMin; - lc.lcOutExtY = -lc.lcOutExtY; /* We want Y growing downward */ + + if (!defcontext_done) + WTInfo (WTI_DEFSYSCTX, 0, &lc); +#if DEBUG_WINTAB + GDK_NOTE (INPUT, (g_print("Default context:\n"), print_lc(&lc))); #endif - } + lc.lcOptions |= CXO_MESSAGES; + lc.lcStatus = 0; + lc.lcMsgBase = WT_DEFBASE; + lc.lcPktRate = 50; + lc.lcPktData = PACKETDATA; + lc.lcPktMode = PACKETMODE; + lc.lcMoveMask = PACKETDATA; + lc.lcBtnUpMask = lc.lcBtnDnMask = ~0; + lc.lcOutOrgX = axis_x.axMin; + lc.lcOutOrgY = axis_y.axMin; + lc.lcOutExtX = axis_x.axMax - axis_x.axMin; + lc.lcOutExtY = axis_y.axMax - axis_y.axMin; + lc.lcOutExtY = -lc.lcOutExtY; /* We want Y growing downward */ #if DEBUG_WINTAB GDK_NOTE (INPUT, (g_print("context for device %d:\n", devix), print_lc(&lc))); @@ -386,11 +344,7 @@ _gdk_input_wintab_init_check (void) gdkdev->info.name = g_strconcat (devname, " ", csrname, NULL); gdkdev->info.source = GDK_SOURCE_PEN; gdkdev->info.mode = GDK_MODE_SCREEN; -#if USE_SYSCONTEXT gdkdev->info.has_cursor = TRUE; -#else - gdkdev->info.has_cursor = FALSE; -#endif gdkdev->hctx = *hctx; gdkdev->cursor = cursorix; WTInfo (WTI_CURSORS + cursorix, CSR_PKTDATA, &gdkdev->pktdata); @@ -527,32 +481,6 @@ decode_tilt (gint *axis_data, axis_data[1] = sin (az) * cos (el) * 1000; } -#if !USE_SYSCONTEXT - -static GdkInputWindow * -gdk_input_window_find_within (GdkWindow *window) -{ - GList *list; - GdkWindow *tmpw; - GdkInputWindow *candidate = NULL; - - for (list = _gdk_input_windows; list != NULL; list = list->next) - { - tmpw = ((GdkInputWindow *) (tmp_list->data))->window; - if (tmpw == window - || IsChild (GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (tmpw))) - { - if (candidate) - return NULL; /* Multiple hits */ - candidate = (GdkInputWindow *) (list->data); - } - } - - return candidate; -} - -#endif /* USE_SYSCONTEXT */ - #endif /* HAVE_WINTAB */ static void @@ -726,15 +654,53 @@ get_modifier_key_state (void) return state; } +#ifdef HAVE_WINTAB + +static guint ignore_core_timer = 0; + +static gboolean +ignore_core_timefunc (gpointer data) +{ + /* The delay has passed */ + _gdk_input_ignore_core = FALSE; + ignore_core_timer = 0; + + return FALSE; /* remove timeout */ +} + +/* + * Set or unset the _gdk_input_ignore_core variable that tells GDK + * to ignore events for the core pointer when the tablet is in proximity + * The unsetting is delayed slightly so that if a tablet event arrives + * just after proximity out, it does not cause a core pointer event + * which e.g. causes GIMP to switch tools. + */ +static void +set_ignore_core (gboolean ignore) +{ + if (ignore) + { + _gdk_input_ignore_core = TRUE; + /* Remove any pending clear */ + if (ignore_core_timer) + { + g_source_remove (ignore_core_timer); + ignore_core_timer = 0; + } + } + else + if (!ignore_core_timer) + ignore_core_timer = g_timeout_add (PROXIMITY_OUT_DELAY, + ignore_core_timefunc, NULL); +} +#endif /* HAVE_WINTAB */ + gboolean _gdk_input_other_event (GdkEvent *event, MSG *msg, GdkWindow *window) { #ifdef HAVE_WINTAB -#if !USE_SYSCONTEXT - GdkWindow *current_window; -#endif GdkDisplay *display; GdkWindowObject *obj, *grab_obj; GdkInputWindow *input_window; @@ -753,7 +719,6 @@ _gdk_input_other_event (GdkEvent *event return FALSE; } -#if USE_SYSCONTEXT window = gdk_window_at_pointer (&x, &y); if (window == NULL) window = _gdk_parent_root; @@ -765,17 +730,6 @@ _gdk_input_other_event (GdkEvent *event g_print ("gdk_input_win32_other_event: window=%p (%d,%d)\n", GDK_WINDOW_HWND (window), x, y)); -#else - /* ??? This code is pretty bogus */ - current_window = gdk_win32_handle_table_lookup (GetActiveWindow ()); - if (current_window == NULL) - return FALSE; - - input_window = gdk_input_window_find_within (current_window); - if (input_window == NULL) - return FALSE; -#endif - if (msg->message == WT_PACKET) { if (!WTPacket ((HCTX) msg->lParam, msg->wParam, &packet)) @@ -925,13 +879,6 @@ _gdk_input_other_event (GdkEvent *event event->button.time = _gdk_win32_get_next_tick (msg->time); event->button.device = &gdkdev->info; -#if 0 -#if USE_SYSCONTEXT - /* Buttons 1 to 3 will come in as WM_[LMR]BUTTON{DOWN,UP} */ - if (event->button.button <= 3) - return FALSE; -#endif -#endif event->button.axes = g_new(gdouble, gdkdev->info.num_axes); gdk_input_translate_coordinates (gdkdev, input_window, @@ -1030,12 +977,12 @@ _gdk_input_other_event (GdkEvent *event if (LOWORD (msg->lParam) == 0) { event->proximity.type = GDK_PROXIMITY_OUT; - _gdk_input_ignore_core = FALSE; + set_ignore_core (FALSE); } else { event->proximity.type = GDK_PROXIMITY_IN; - _gdk_input_ignore_core = TRUE; + set_ignore_core (TRUE); } event->proximity.time = _gdk_win32_get_next_tick (msg->time); event->proximity.device = &gdkdev->info; diff -udpr gtk+-2.6.7_/gdk/win32/gdkkeys-win32.c gtk+-2.6.7/gdk/win32/gdkkeys-win32.c --- gtk+-2.6.7_/gdk/win32/gdkkeys-win32.c 2005-02-24 01:02:59.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/gdkkeys-win32.c 2010-04-27 01:36:26.000000000 +0400 @@ -265,7 +265,7 @@ reset_after_dead (guchar key_state[256]) } } -static gboolean +static void handle_dead (guint keysym, guint *ksymp) { @@ -306,9 +306,12 @@ handle_dead (guint keysym, case GDK_Greek_accentdieresis: /* 0x7ae */ *ksymp = GDK_Greek_accentdieresis; break; default: - return FALSE; + /* By default use the keysym as such. This takes care of for + * instance the dead U+09CD (BENGALI VIRAMA) on the ekushey + * Bengali layout. + */ + *ksymp = keysym; break; } - return TRUE; } static void @@ -446,14 +449,7 @@ update_keymap (void) reset_after_dead (key_state); /* Use dead keysyms instead of "undead" ones */ - if (!handle_dead (keysym, ksymp)) - GDK_NOTE (EVENTS, - g_print ("Unhandled dead key cp:%d vk:%02x sc:%x ch:%02x wc:%04x keysym:%04x%s%s\n", - _gdk_input_codepage, vk, - scancode, chars[0], - wcs[0], keysym, - (shift&0x1 ? " shift" : ""), - (shift&0x2 ? " altgr" : ""))); + handle_dead (keysym, ksymp); } else if (k == 0) { diff -udpr gtk+-2.6.7_/gdk/win32/gdkprivate-win32.h gtk+-2.6.7/gdk/win32/gdkprivate-win32.h --- gtk+-2.6.7_/gdk/win32/gdkprivate-win32.h 2005-04-04 03:40:42.000000000 +0400 +++ gtk+-2.6.7/gdk/win32/gdkprivate-win32.h 2010-04-27 01:10:46.000000000 +0400 @@ -360,6 +360,8 @@ HRGN _gdk_win32_gdkregion_to_hrgn (Gd gint x_origin, gint y_origin); +GdkRegion *_gdk_win32_hrgn_to_region (HRGN hrgn); + void _gdk_win32_adjust_client_rect (GdkWindow *window, RECT *RECT); diff -udpr gtk+-2.6.7_/gdk/win32/gdkproperty-win32.c gtk+-2.6.7/gdk/win32/gdkproperty-win32.c --- gtk+-2.6.7_/gdk/win32/gdkproperty-win32.c 2005-04-04 03:40:42.000000000 +0400 +++ gtk+-2.6.7/gdk/win32/gdkproperty-win32.c 2010-04-27 01:55:59.000000000 +0400 @@ -561,7 +561,7 @@ gdk_screen_get_setting (GdkScreen *scr const gchar *name, GValue *value) { - g_return_val_if_fail (screen == gdk_screen_get_default (), FALSE); + g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE); /* * XXX : if these values get changed through the Windoze UI the diff -udpr gtk+-2.6.7_/gdk/win32/gdkwindow-win32.c gtk+-2.6.7/gdk/win32/gdkwindow-win32.c --- gtk+-2.6.7_/gdk/win32/gdkwindow-win32.c 2005-03-12 02:45:53.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/gdkwindow-win32.c 2010-04-27 01:10:46.000000000 +0400 @@ -37,7 +37,13 @@ #include "gdkprivate-win32.h" #include "gdkinput-win32.h" -#if defined __MINGW32__ || (WINVER < 0x0500) +#if defined __MINGW32__ +#include +#endif + +#if (defined __W32API_MAJOR_VERSION ? ((__W32API_MAJOR_VERSION < 3) || \ + ((__W32API_MAJOR_VERSION == 3) && (__W32API_MINOR_VERSION < 8))) : \ + (WINVER < 0x0500)) typedef struct { DWORD bV5Size; LONG bV5Width; diff -udpr gtk+-2.6.7_/gdk/win32/xcursors.h gtk+-2.6.7/gdk/win32/xcursors.h --- gtk+-2.6.7_/gdk/win32/xcursors.h 2001-02-23 06:51:40.000000000 +0300 +++ gtk+-2.6.7/gdk/win32/xcursors.h 2010-04-27 01:10:46.000000000 +0400 @@ -1,357 +1,357 @@ -static const struct { const gchar *name; gint type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = { - { "X_cursor", 0, 16, 16, 7, 7, +static const struct { const gchar *name; const gchar *builtin; gint type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = { + { "X_cursor", NULL, 0, 16, 16, 7, 7, "\125\000\000\125\152\100\001\251\152\220\006\251\152\244\032\251" "\032\251\152\244\006\252\252\220\001\252\252\100\000\152\251\000" "\000\152\251\000\001\252\252\100\006\252\252\220\032\251\152\244" "\152\244\032\251\152\220\006\251\152\100\001\251\125\000\000\125" }, - { "arrow", 2, 16, 16, 14, 1, + { "arrow", IDC_ARROW, 2, 16, 16, 14, 1, "\000\000\000\025\000\000\001\151\000\000\026\251\000\001\152\244" "\000\026\252\244\001\152\252\220\006\252\252\220\005\126\252\100" "\000\032\252\100\000\152\151\000\001\251\151\000\006\244\144\000" "\032\220\144\000\152\100\020\000\031\000\000\000\004\000\000\000" }, - { "based_arrow_down", 4, 10, 12, 4, 10, + { "based_arrow_down", NULL, 4, 10, 12, 4, 10, "\125\125\126\252\251\125\125\126\252\251\125\245\120\032\100\001" "\244\001\132\124\031\246\101\152\224\005\245\000\025\100" }, - { "based_arrow_up", 6, 10, 12, 4, 10, + { "based_arrow_up", NULL, 6, 10, 12, 4, 10, "\000\120\000\032\100\026\251\101\232\144\025\245\100\032\100\001" "\244\005\132\125\152\252\225\125\125\152\252\225\125\125" }, - { "boat", 8, 16, 9, 14, 4, + { "boat", NULL, 8, 16, 9, 14, 4, "\000\026\000\000\000\152\240\000\201\225\150\000\252\252\252\252" "\125\125\126\225\125\125\131\125\125\125\145\100\252\252\244\000" "\125\125\120\000" }, - { "bogosity", 10, 15, 16, 7, 7, + { "bogosity", NULL, 10, 15, 16, 7, 7, "\125\105\105\125\251\031\032\225\144\144\145\101\221\221\220\126" "\126\126\125\252\252\252\226\145\145\146\131\221\221\231\146\106" "\106\145\231\131\131\226\252\252\252\125\225\225\225\006\106\106" "\101\131\031\031\126\244\144\152\125\121\121\125" }, - { "bottom_left_corner", 12, 16, 16, 1, 14, + { "bottom_left_corner", IDC_SIZENESW, 12, 16, 16, 1, 14, "\125\000\000\000\151\000\000\000\151\025\000\120\151\031\001\220" "\151\031\006\100\151\031\031\000\151\031\144\000\151\031\220\000" "\151\032\125\120\151\032\252\220\151\025\125\120\151\000\000\000" "\151\125\125\125\152\252\252\251\152\252\252\251\125\125\125\125" }, - { "bottom_right_corner", 14, 16, 16, 14, 14, + { "bottom_right_corner", IDC_SIZENWSE, 14, 16, 16, 14, 14, "\000\000\000\125\000\000\000\151\005\000\124\151\006\100\144\151" "\001\220\144\151\000\144\144\151\000\031\144\151\000\006\144\151" "\005\125\244\151\006\252\244\151\005\125\124\151\000\000\000\151" "\125\125\125\151\152\252\252\251\152\252\252\251\125\125\125\125" }, - { "bottom_side", 16, 15, 16, 7, 14, + { "bottom_side", IDC_SIZENS, 16, 15, 16, 7, 14, "\000\005\100\000\000\031\000\000\000\144\000\000\001\220\000\000" "\006\100\000\000\031\000\000\120\144\024\001\221\221\220\001\226" "\131\000\001\231\220\000\001\251\000\000\001\220\000\125\125\125" "\125\252\252\252\226\252\252\252\125\125\125\125" }, - { "bottom_tee", 18, 16, 12, 8, 10, + { "bottom_tee", NULL, 18, 16, 12, 8, 10, "\000\005\120\000\000\006\220\000\000\006\220\000\000\006\220\000" "\000\006\220\000\000\006\220\000\000\006\220\000\000\006\220\000" "\125\126\225\125\152\252\252\251\152\252\252\251\125\125\125\125" }, - { "box_spiral", 20, 16, 16, 8, 8, + { "box_spiral", NULL, 20, 16, 16, 8, 8, "\252\252\252\251\225\125\125\125\232\252\252\251\231\125\125\131" "\231\252\252\231\231\225\125\231\231\232\251\231\231\231\131\231" "\231\231\231\231\231\232\231\231\231\225\131\231\231\252\251\231" "\231\125\125\231\232\252\252\231\225\125\125\131\252\252\252\251" }, - { "center_ptr", 22, 12, 16, 5, 1, + { "center_ptr", IDC_UPARROW, 22, 12, 16, 5, 1, "\000\125\000\000\151\000\001\151\100\001\252\100\005\252\120\006" "\252\220\026\252\224\032\252\244\132\252\245\151\151\151\145\151" "\131\124\151\025\000\151\000\000\151\000\000\151\000\000\125\000" }, - { "circle", 24, 16, 16, 8, 8, + { "circle", NULL, 24, 16, 16, 8, 8, "\000\025\124\000\001\132\245\100\005\252\252\120\026\252\252\224" "\032\245\132\244\132\220\006\245\152\100\001\251\152\100\001\251" "\152\100\001\251\152\100\001\251\132\220\006\245\032\245\132\244" "\026\252\252\224\005\252\252\120\001\132\245\100\000\025\124\000" }, - { "clock", 26, 15, 16, 6, 3, + { "clock", IDC_APPSTARTING, 26, 15, 16, 6, 3, "\032\252\252\101\241\252\012\112\030\132\112\141\206\222\111\206" "\251\131\046\006\124\220\232\006\251\012\132\252\252\244\142\032" "\110\221\210\151\042\106\041\244\211\030\232\246\044\242\032\110" "\246\250\024\052\232\252\252\252\152\252\252\251" }, - { "coffee_mug", 28, 16, 16, 7, 9, + { "coffee_mug", NULL, 28, 16, 16, 7, 9, "\002\252\252\000\011\125\125\200\051\125\125\151\046\125\126\231" "\145\252\251\131\245\125\125\131\245\125\125\131\145\125\125\131" "\045\125\125\131\046\226\126\231\151\231\231\231\251\232\231\231" "\246\231\226\231\145\125\125\131\045\125\125\131\012\252\252\240" }, - { "cross", 30, 16, 16, 7, 7, - "\000\025\120\000\000\031\220\000\000\031\220\000\000\031\220\000" - "\000\031\220\000\125\131\225\125\125\131\225\125\252\251\252\252" - "\125\125\125\125\252\251\252\252\000\031\220\000\000\031\220\000" - "\000\031\220\000\000\031\220\000\000\031\220\000\000\031\220\000" }, - { "cross_reverse", 32, 16, 15, 7, 7, + { "cross", IDC_CROSS, 30, 16, 15, 7, 7, + "\000\031\220\000\000\031\220\000\000\031\220\000\000\031\220\000" + "\000\031\220\000\125\131\225\125\252\251\252\252\125\125\125\125" + "\252\251\252\252\125\131\225\125\000\031\220\000\000\031\220\000" + "\000\031\220\000\000\031\220\000\000\031\220\000" }, + { "cross_reverse", NULL, 32, 16, 15, 7, 7, "\044\030\220\140\211\030\221\211\142\130\226\044\030\230\230\220" "\006\050\242\100\125\210\211\125\252\240\052\252\000\001\000\000" "\252\240\052\252\125\210\211\125\006\050\242\100\030\230\230\220" "\142\130\226\044\211\030\221\211\044\030\220\140" }, - { "crosshair", 34, 16, 16, 7, 7, - "\000\005\100\000\000\006\100\000\000\006\100\000\000\006\100\000" - "\000\006\100\000\000\006\100\000\125\126\125\125\125\126\125\125" - "\252\251\252\252\000\006\100\000\000\006\100\000\000\006\100\000" - "\000\006\100\000\000\006\100\000\000\006\100\000\000\006\100\000" }, - { "diamond_cross", 36, 16, 16, 7, 7, - "\000\025\120\000\000\131\224\000\001\151\245\000\005\211\211\100" - "\026\011\202\120\130\011\200\224\145\131\225\145\252\250\252\251" - "\125\125\125\125\250\011\200\250\045\011\201\140\011\111\205\200" - "\002\131\226\000\000\231\230\000\000\051\240\000\000\011\200\000" }, - { "dot", 38, 12, 12, 6, 6, + { "crosshair", IDC_CROSS, 34, 16, 15, 7, 7, + "\000\006\100\000\000\006\100\000\000\006\100\000\000\006\100\000" + "\000\006\100\000\000\006\100\000\125\126\125\125\252\251\252\252" + "\125\126\125\125\000\006\100\000\000\006\100\000\000\006\100\000" + "\000\006\100\000\000\006\100\000\000\006\100\000" }, + { "diamond_cross", NULL, 36, 15, 15, 7, 7, + "\000\031\220\000\001\246\220\000\031\231\220\001\222\141\220\031" + "\011\201\221\220\046\001\232\252\232\252\225\125\025\125\252\251" + "\252\251\220\046\001\221\220\230\031\001\222\141\220\001\231\231" + "\000\001\246\220\000\001\231\000\000" }, + { "dot", NULL, 38, 12, 12, 6, 6, "\001\125\100\025\252\124\032\252\244\132\252\245\152\252\251\152" "\252\251\152\252\251\152\252\251\132\252\245\032\252\244\025\252" "\124\001\125\100" }, - { "dotbox", 40, 14, 14, 7, 6, + { "dotbox", NULL, 40, 14, 14, 7, 6, "\125\125\125\126\252\252\251\145\125\125\226\100\000\031\144\000" "\001\226\101\124\031\144\032\101\226\101\244\031\144\025\101\226" "\100\000\031\144\000\001\226\125\125\131\152\252\252\225\125\125" "\125" }, - { "double_arrow", 42, 12, 16, 6, 8, + { "double_arrow", IDC_SIZENS, 42, 12, 16, 6, 8, "\000\125\000\001\151\100\005\252\120\026\252\224\132\151\245\151" "\151\151\125\151\125\000\151\000\000\151\000\125\151\125\151\151" "\151\132\151\245\026\252\224\005\252\120\001\151\100\000\125\000" }, - { "draft_large", 44, 15, 16, 14, 0, - "\000\000\000\024\000\000\005\140\000\001\132\100\000\126\250\000" - "\025\252\200\005\152\252\001\132\252\240\006\252\252\200\000\026" - "\250\000\001\146\240\000\026\032\000\001\140\150\000\026\001\200" - "\001\140\006\000\006\000\000\000\040\000\000\000" }, - { "draft_small", 46, 15, 15, 14, 0, + { "draft_large", NULL, 44, 15, 15, 14, 0, + "\000\000\000\030\000\000\006\220\000\001\252\100\000\152\244\000" + "\032\252\200\006\252\251\001\252\252\240\005\125\252\100\000\031" + "\250\000\001\226\220\000\031\032\000\001\220\144\000\031\001\200" + "\001\220\005\000\011\000\000\000\000" }, + { "draft_small", NULL, 46, 15, 15, 14, 0, "\000\000\000\030\000\000\006\220\000\001\252\000\000\152\244\000" "\032\252\200\000\125\251\000\000\031\240\000\001\226\100\000\031" "\030\000\001\220\100\000\031\000\000\001\220\000\000\031\000\000" "\001\220\000\000\011\000\000\000\000" }, - { "draped_box", 48, 14, 14, 7, 6, + { "draped_box", NULL, 48, 14, 14, 7, 6, "\125\125\125\126\252\252\251\140\145\220\226\032\132\111\146\220" "\151\226\244\121\251\145\032\105\226\121\244\131\152\105\032\226" "\151\006\231\141\245\244\226\006\131\011\152\252\252\225\125\125" "\125" }, - { "exchange", 50, 16, 16, 7, 7, + { "exchange", NULL, 50, 16, 16, 7, 7, "\120\025\124\000\144\152\251\000\151\252\252\100\152\245\126\220" "\145\220\001\220\145\245\000\120\152\251\000\000\125\125\000\000" "\000\000\125\125\000\000\152\251\005\000\032\131\006\100\006\131" "\006\225\132\251\001\252\252\151\000\152\251\031\000\025\124\005" }, - { "fleur", 52, 16, 16, 8, 8, + { "fleur", IDC_SIZEALL, 52, 16, 16, 8, 8, "\000\005\120\000\000\006\224\000\000\032\244\000\000\152\251\000" "\001\026\224\100\006\106\221\220\132\126\225\245\152\252\252\251" "\152\252\252\251\132\126\225\245\006\106\221\220\001\026\224\100" "\000\152\251\000\000\032\244\000\000\006\220\000\000\005\120\000" }, - { "gobbler", 54, 16, 16, 14, 3, - "\000\000\152\220\000\000\152\120\220\000\132\132\226\252\232\125" - "\252\252\252\125\252\251\132\120\252\245\132\120\151\125\132\220" - "\125\125\252\120\126\252\251\120\025\225\125\100\001\225\125\000" - "\001\220\000\000\001\220\000\000\006\251\000\000\005\125\000\000" }, - { "gumby", 56, 16, 16, 2, 0, + { "gobbler", NULL, 54, 16, 16, 14, 2, + "\000\000\125\120\000\000\152\220\120\000\152\125\225\125\132\132" + "\226\252\232\125\252\252\252\120\252\251\132\120\252\245\132\120" + "\151\125\132\220\125\125\252\120\026\252\251\100\001\225\125\000" + "\001\220\000\000\001\220\000\000\005\225\000\000\006\251\000\000" }, + { "gumby", NULL, 56, 16, 16, 2, 0, "\012\252\000\000\122\125\200\000\244\225\140\000\251\231\230\000" "\244\225\130\000\244\232\231\120\252\225\132\244\132\225\132\252" "\005\225\130\152\000\225\130\152\000\226\131\252\000\226\130\152" "\000\226\130\025\002\126\126\000\011\126\125\200\012\250\252\200" }, - { "hand1", 58, 13, 16, 12, 0, + { "hand1", IDC_HAND, 58, 13, 16, 12, 0, "\000\000\006\200\000\032\240\000\152\220\000\152\220\000\152\220" "\000\152\251\001\152\252\221\232\252\224\252\252\251\046\252\252" "\105\132\252\101\126\252\100\226\145\100\051\131\000\006\231\000" "\000\151\000\000" }, - { "hand2", 60, 16, 16, 0, 1, + { "hand2", IDC_HAND, 60, 16, 16, 0, 1, "\025\125\100\000\152\252\220\000\225\125\144\000\152\251\131\000" "\026\125\126\100\001\251\126\100\006\125\126\100\001\251\131\220" "\006\125\145\144\001\245\225\131\000\132\125\144\000\031\145\220" "\000\006\126\100\000\001\231\000\000\000\144\000\000\000\020\000" }, - { "heart", 62, 15, 14, 6, 8, + { "heart", NULL, 62, 15, 14, 6, 8, "\012\250\252\200\245\152\126\212\100\144\006\244\000\100\006\220" "\000\000\032\100\000\000\151\000\104\001\251\000\100\032\051\000" "\001\240\051\000\032\000\051\001\240\000\051\132\000\000\051\240" "\000\000\052\000\000" }, - { "icon", 64, 16, 16, 8, 8, + { "icon", NULL, 64, 16, 16, 8, 8, "\252\252\252\252\246\146\146\146\231\231\231\232\246\146\146\146" "\231\125\125\232\246\125\125\146\231\125\125\232\246\125\125\146" "\231\125\125\232\246\125\125\146\231\125\125\232\246\125\125\146" "\231\231\231\232\246\146\146\146\231\231\231\232\252\252\252\252" }, - { "iron_cross", 66, 16, 16, 8, 7, + { "iron_cross", NULL, 66, 16, 16, 8, 7, "\005\125\125\120\032\252\252\244\026\252\252\224\145\252\252\131" "\151\152\251\151\152\132\245\251\152\226\226\251\152\252\252\251" "\152\252\252\251\152\226\226\251\152\132\245\251\151\152\251\151" "\145\252\252\131\026\252\252\224\032\252\252\244\005\125\125\120" }, - { "left_ptr", 68, 10, 16, 1, 1, + { "left_ptr", IDC_ARROW, 68, 10, 16, 1, 1, "\120\000\006\100\000\151\000\006\244\000\152\220\006\252\100\152" "\251\006\252\244\152\252\226\252\125\151\244\006\106\220\120\151" "\000\001\244\000\032\100\000\120" }, - { "left_side", 70, 16, 15, 1, 7, + { "left_side", IDC_SIZEWE, 70, 16, 15, 1, 7, "\125\000\000\000\151\000\000\000\151\000\120\000\151\001\220\000" "\151\006\100\000\151\031\000\000\151\145\125\125\151\252\252\251" "\151\145\125\125\151\031\000\000\151\006\100\000\151\001\220\000" "\151\000\120\000\151\000\000\000\125\000\000\000" }, - { "left_tee", 72, 12, 16, 1, 8, + { "left_tee", NULL, 72, 12, 16, 1, 8, "\125\000\000\151\000\000\151\000\000\151\000\000\151\000\000\151" "\000\000\151\125\125\152\252\251\152\252\251\151\125\125\151\000" "\000\151\000\000\151\000\000\151\000\000\151\000\000\125\000\000" }, - { "leftbutton", 74, 16, 16, 8, 8, + { "leftbutton", NULL, 74, 16, 16, 8, 8, "\025\125\125\120\152\252\252\244\152\252\252\244\145\145\145\144" "\145\146\146\144\145\146\146\144\145\146\146\144\145\146\146\144" "\145\145\145\144\152\252\252\244\152\252\252\244\152\252\252\244" "\152\252\252\244\152\252\252\244\152\252\252\244\025\125\125\120" }, - { "ll_angle", 76, 12, 12, 1, 10, + { "ll_angle", NULL, 76, 12, 12, 1, 10, "\125\000\000\151\000\000\151\000\000\151\000\000\151\000\000\151" "\000\000\151\000\000\151\000\000\151\125\125\152\252\251\152\252" "\251\125\125\125" }, - { "lr_angle", 78, 12, 12, 10, 10, + { "lr_angle", NULL, 78, 12, 12, 10, 10, "\000\000\125\000\000\151\000\000\151\000\000\151\000\000\151\000" "\000\151\000\000\151\000\000\151\125\125\151\152\252\251\152\252" "\251\125\125\125" }, - { "man", 80, 16, 16, 14, 5, + { "man", NULL, 80, 16, 16, 14, 5, "\001\132\224\000\006\251\252\000\005\131\225\100\220\006\100\004" "\144\032\220\052\031\145\145\232\006\246\152\105\001\146\145\000" "\000\045\144\000\000\031\220\000\000\145\144\000\001\226\131\000" "\006\131\226\100\026\144\146\120\152\220\032\245\252\220\032\252" }, - { "middlebutton", 82, 16, 16, 8, 8, + { "middlebutton", NULL, 82, 16, 16, 8, 8, "\025\125\125\120\152\252\252\244\152\252\252\244\145\145\145\144" "\146\145\146\144\146\145\146\144\146\145\146\144\146\145\146\144" "\145\145\145\144\152\252\252\244\152\252\252\244\152\252\252\244" "\152\252\252\244\152\252\252\244\152\252\252\244\025\125\125\120" }, - { "mouse", 84, 16, 16, 4, 1, + { "mouse", NULL, 84, 16, 16, 4, 1, "\000\125\100\000\001\124\000\000\000\152\000\000\000\045\000\000" "\025\151\125\100\125\132\125\120\152\252\252\225\225\125\125\145" "\232\132\132\151\232\132\132\151\232\132\132\151\225\125\125\151" "\005\125\125\051\001\125\124\000\000\225\140\000\000\052\200\000" }, - { "pencil", 86, 13, 16, 11, 15, + { "pencil", NULL, 86, 13, 16, 11, 15, "\132\220\000\031\131\000\006\126\220\000\145\230\000\012\246\100" "\001\225\140\000\031\131\000\002\125\200\000\145\144\000\012\126" "\000\001\225\220\000\031\131\000\001\252\100\000\032\220\000\001" "\244\000\000\031" }, - { "pirate", 88, 16, 16, 7, 12, + { "pirate", IDC_NO, 88, 16, 16, 7, 12, "\000\152\220\000\001\252\244\000\006\252\251\000\032\132\132\100" "\032\132\132\100\006\252\251\000\001\252\244\000\100\152\220\001" "\200\152\220\045\220\152\220\151\145\032\101\220\032\200\052\100" "\000\052\200\000\026\252\250\011\252\125\132\251\225\000\005\144" }, - { "plus", 90, 12, 12, 5, 6, + { "plus", NULL, 90, 12, 12, 5, 6, "\000\125\000\000\151\000\000\151\000\000\151\000\125\151\125\152" "\252\251\152\252\251\125\151\125\000\151\000\000\151\000\000\151" "\000\000\125\000" }, - { "question_arrow", 92, 11, 16, 5, 8, + { "question_arrow", IDC_HELP, 92, 11, 16, 5, 8, "\002\252\000\052\252\002\245\152\032\125\151\152\001\245\151\012" "\221\124\251\101\152\224\001\251\100\006\144\000\031\220\002\246" "\240\026\232\120\026\245\000\026\120\000\025\000" }, - { "right_ptr", 94, 10, 16, 8, 1, + { "right_ptr", NULL, 94, 10, 16, 8, 1, "\000\000\120\000\031\000\006\220\001\251\000\152\220\032\251\006" "\252\221\252\251\152\252\225\132\251\001\246\220\151\031\006\220" "\121\244\000\032\100\000\120\000" }, - { "right_side", 96, 16, 15, 14, 7, + { "right_side", IDC_SIZEWE, 96, 16, 15, 14, 7, "\000\000\000\125\000\000\000\151\000\005\000\151\000\006\100\151" "\000\001\220\151\000\000\144\151\125\125\131\151\152\252\252\151" "\125\125\131\151\000\000\144\151\000\001\220\151\000\006\100\151" "\000\005\000\151\000\000\000\151\000\000\000\125" }, - { "right_tee", 98, 12, 16, 10, 8, + { "right_tee", NULL, 98, 12, 16, 10, 8, "\000\000\125\000\000\151\000\000\151\000\000\151\000\000\151\000" "\000\151\125\125\151\152\252\251\152\252\251\125\125\151\000\000" "\151\000\000\151\000\000\151\000\000\151\000\000\151\000\000\125" }, - { "rightbutton", 100, 16, 16, 8, 8, + { "rightbutton", NULL, 100, 16, 16, 8, 8, "\025\125\125\120\152\252\252\244\152\252\252\244\145\145\145\144" "\146\146\145\144\146\146\145\144\146\146\145\144\146\146\145\144" "\145\145\145\144\152\252\252\244\152\252\252\244\152\252\252\244" "\152\252\252\244\152\252\252\244\152\252\252\244\025\125\125\120" }, - { "rtl_logo", 102, 16, 16, 7, 7, + { "rtl_logo", NULL, 102, 16, 16, 7, 7, "\125\125\125\125\152\252\252\251\145\125\131\131\144\000\031\031" "\145\125\131\031\152\252\251\031\145\145\131\031\144\144\031\031" "\144\144\031\031\144\145\131\131\144\152\252\251\144\145\125\131" "\144\144\000\031\145\145\125\131\152\252\252\251\125\125\125\125" }, - { "sailboat", 104, 16, 16, 8, 0, + { "sailboat", NULL, 104, 16, 16, 8, 0, "\000\000\120\000\000\000\124\000\000\001\144\000\000\005\145\000" "\000\006\151\000\000\026\151\000\000\032\151\100\000\132\152\100" "\000\152\152\100\001\152\152\120\001\252\152\220\005\252\152\220" "\006\252\152\225\026\252\152\245\132\251\132\200\025\125\124\000" }, - { "sb_down_arrow", 106, 9, 16, 4, 15, + { "sb_down_arrow", NULL, 106, 9, 16, 4, 15, "\005\124\001\231\000\146\100\031\220\006\144\001\231\000\146\100" "\031\220\006\144\001\231\005\146\125\131\225\052\252\002\252\000" "\052\000\002\000" }, - { "sb_h_double_arrow", 108, 15, 9, 7, 4, + { "sb_h_double_arrow", IDC_SIZEWE, 108, 15, 9, 7, 4, "\001\100\005\000\031\000\031\001\245\125\151\032\252\252\251\252" "\125\126\251\252\252\252\221\245\125\151\001\220\001\220\001\100" "\005\000" }, - { "sb_left_arrow", 110, 16, 9, 0, 4, + { "sb_left_arrow", NULL, 110, 16, 9, 0, 4, "\000\120\000\000\001\220\000\000\006\225\125\125\032\252\252\252" "\152\225\125\125\032\252\252\252\006\225\125\125\001\220\000\000" "\000\120\000\000" }, - { "sb_right_arrow", 112, 16, 9, 15, 4, + { "sb_right_arrow", NULL, 112, 16, 9, 15, 4, "\000\000\005\000\000\000\006\100\125\125\126\220\252\252\252\244" "\125\125\126\251\252\252\252\244\125\125\126\220\000\000\006\100" "\000\000\005\000" }, - { "sb_up_arrow", 114, 9, 16, 4, 0, + { "sb_up_arrow", NULL, 114, 9, 16, 4, 0, "\000\200\000\250\000\252\200\252\250\126\145\125\231\120\146\100" "\031\220\006\144\001\231\000\146\100\031\220\006\144\001\231\000" "\146\100\025\120" }, - { "sb_v_double_arrow", 116, 9, 15, 4, 7, + { "sb_v_double_arrow", IDC_SIZENS, 116, 9, 15, 4, 7, "\001\220\001\251\001\252\221\252\251\126\145\101\231\000\146\100" "\031\220\006\144\001\231\005\146\125\252\251\032\251\001\251\000" "\031\000" }, - { "shuttle", 118, 16, 16, 11, 0, + { "shuttle", NULL, 118, 16, 16, 11, 0, "\000\000\006\100\000\000\032\220\000\000\152\244\000\000\251\252" "\000\030\251\252\000\144\251\252\001\224\251\252\001\224\251\252" "\001\224\251\252\001\224\251\252\006\224\251\252\032\224\251\252" "\152\250\251\252\025\244\145\144\000\120\032\244\000\000\006\220" }, - { "sizing", 120, 16, 16, 8, 8, + { "sizing", IDC_SIZENWSE, 120, 16, 16, 8, 8, "\125\125\120\000\152\252\220\000\145\125\120\000\144\000\000\000" "\144\125\125\000\144\152\251\000\144\145\131\025\144\144\031\031" "\144\144\031\031\124\145\131\031\000\152\251\031\000\125\126\131" "\000\000\001\231\000\005\125\151\000\006\252\251\000\005\125\125" }, - { "spider", 122, 16, 16, 6, 7, + { "spider", NULL, 122, 16, 16, 6, 7, "\030\000\002\100\006\000\011\000\002\000\010\000\001\200\044\000" "\100\225\140\001\220\152\220\152\050\152\222\220\006\252\251\000" "\006\252\250\000\050\152\226\200\220\152\220\152\100\225\140\001" "\001\200\040\000\002\100\030\000\006\000\011\000\030\000\002\100" }, - { "spraycan", 124, 12, 16, 10, 2, + { "spraycan", NULL, 124, 12, 16, 10, 2, "\000\000\012\001\100\205\006\230\112\012\244\205\032\144\112\152" "\251\000\145\131\000\152\131\000\146\131\000\152\131\000\146\131" "\000\152\131\000\152\131\000\145\131\000\145\131\000\152\251\000" }, - { "star", 126, 16, 16, 7, 7, + { "star", NULL, 126, 16, 16, 7, 7, "\000\002\000\000\000\011\200\000\000\011\200\000\000\030\220\000" "\000\044\140\000\000\140\044\000\001\140\045\100\132\202\012\224" "\240\000\000\051\132\200\012\224\005\202\011\100\006\011\202\100" "\030\044\140\220\030\220\030\220\032\100\006\220\031\000\001\220" }, - { "target", 128, 16, 14, 7, 7, - "\000\032\220\000\000\252\250\000\002\245\152\000\012\120\026\200" - "\051\000\001\240\244\002\000\150\240\011\200\051\240\024\120\051" - "\140\005\100\045\130\001\000\224\026\000\002\120\005\240\051\100" - "\001\132\225\000\000\025\120\000" }, - { "tcross", 130, 15, 15, 7, 7, + { "target", NULL, 128, 16, 15, 7, 7, + "\000\025\120\000\000\132\224\000\001\252\251\000\006\240\052\100" + "\032\000\002\220\150\001\000\244\240\006\100\051\240\030\220\051" + "\240\006\100\051\150\001\000\244\032\000\002\220\006\240\052\100" + "\001\252\251\000\000\132\224\000\000\025\120\000" }, + { "tcross", IDC_CROSS, 130, 15, 15, 7, 7, "\000\005\100\000\000\031\000\000\000\144\000\000\001\220\000\000" "\006\100\000\000\031\000\005\125\145\125\132\252\252\251\125\126" "\125\124\000\031\000\000\000\144\000\000\001\220\000\000\006\100" "\000\000\031\000\000\000\124\000\000" }, - { "top_left_arrow", 132, 16, 16, 1, 1, + { "top_left_arrow", NULL, 132, 16, 16, 1, 1, "\124\000\000\000\151\100\000\000\152\224\000\000\032\251\100\000" "\032\252\224\000\006\252\251\120\006\252\252\220\001\252\225\120" "\001\252\220\000\000\151\144\000\000\151\031\000\000\031\006\100" "\000\031\001\220\000\025\000\144\000\000\000\031\000\000\000\005" }, - { "top_left_corner", 134, 16, 16, 1, 1, + { "top_left_corner", IDC_SIZENWSE, 134, 16, 16, 1, 1, "\125\125\125\125\152\252\252\251\152\252\252\251\151\125\125\125" "\151\000\000\000\151\025\125\120\151\032\252\220\151\032\125\120" "\151\031\220\000\151\031\144\000\151\031\031\000\151\031\006\100" "\151\031\001\220\151\025\000\120\151\000\000\000\125\000\000\000" }, - { "top_right_corner", 136, 16, 16, 14, 1, + { "top_right_corner", IDC_SIZENESW, 136, 16, 16, 14, 1, "\125\125\125\125\152\252\252\251\152\252\252\251\125\125\125\151" "\000\000\000\151\005\125\124\151\006\252\244\151\005\125\244\151" "\000\006\144\151\000\031\144\151\000\144\144\151\001\220\144\151" "\006\100\144\151\005\000\124\151\000\000\000\151\000\000\000\125" }, - { "top_side", 138, 15, 16, 7, 1, + { "top_side", IDC_SIZENS, 138, 15, 16, 7, 1, "\125\125\125\125\252\252\252\226\252\252\252\125\125\125\125\000" "\006\100\000\000\152\100\000\006\146\100\000\145\226\100\006\106" "\106\100\024\031\005\000\000\144\000\000\001\220\000\000\006\100" "\000\000\031\000\000\000\144\000\000\001\120\000" }, - { "top_tee", 140, 16, 12, 8, 1, + { "top_tee", NULL, 140, 16, 12, 8, 1, "\125\125\125\125\152\252\252\251\152\252\252\251\125\126\225\125" "\000\006\220\000\000\006\220\000\000\006\220\000\000\006\220\000" "\000\006\220\000\000\006\220\000\000\006\220\000\000\005\120\000" }, - { "trek", 142, 9, 16, 4, 0, + { "trek", NULL, 142, 9, 16, 4, 0, "\001\220\000\124\000\152\100\152\244\152\252\132\232\226\252\244" "\152\244\006\244\004\144\106\152\145\246\151\145\226\131\021\226" "\104\145\220\031" }, - { "ul_angle", 144, 12, 12, 1, 1, + { "ul_angle", NULL, 144, 12, 12, 1, 1, "\125\125\125\152\252\251\152\252\251\151\125\125\151\000\000\151" "\000\000\151\000\000\151\000\000\151\000\000\151\000\000\151\000" "\000\125\000\000" }, - { "umbrella", 146, 16, 16, 8, 2, + { "umbrella", NULL, 146, 16, 16, 8, 2, "\001\025\024\124\121\125\125\105\105\225\226\120\025\131\131\225" "\145\226\231\140\131\152\245\225\126\006\102\124\000\006\100\000" "\000\006\100\000\000\006\100\000\000\006\100\000\000\006\124\000" "\000\006\124\000\000\006\144\000\000\006\144\000\000\001\220\000" }, - { "ur_angle", 148, 12, 12, 10, 1, + { "ur_angle", NULL, 148, 12, 12, 10, 1, "\125\125\125\152\252\251\152\252\251\125\125\151\000\000\151\000" "\000\151\000\000\151\000\000\151\000\000\151\000\000\151\000\000" "\151\000\000\125" }, - { "watch", 150, 16, 16, 15, 9, + { "watch", IDC_WAIT, 150, 16, 16, 15, 9, "\006\252\251\000\006\252\251\000\006\252\251\000\032\252\252\100" "\151\126\126\220\245\126\125\245\225\126\125\152\225\132\225\152" "\225\132\225\152\225\145\125\152\245\225\125\245\151\125\126\220" "\032\252\252\100\006\252\251\000\006\252\251\000\006\252\251\000" }, - { "xterm", 152, 9, 16, 4, 8, + { "xterm", IDC_IBEAM, 152, 9, 16, 4, 8, "\125\025\132\232\225\152\124\026\120\001\220\000\144\000\031\000" "\006\100\001\220\000\144\000\031\000\006\100\005\224\025\251\126" "\246\245\124\125" }, diff -udpr gtk+-2.6.7_/gdk-pixbuf/gdk-pixbuf-private.h gtk+-2.6.7/gdk-pixbuf/gdk-pixbuf-private.h --- gtk+-2.6.7_/gdk-pixbuf/gdk-pixbuf-private.h 2004-11-16 06:01:57.000000000 +0300 +++ gtk+-2.6.7/gdk-pixbuf/gdk-pixbuf-private.h 2010-04-27 01:10:46.000000000 +0400 @@ -97,9 +97,9 @@ GdkPixbuf *_gdk_pixbuf_generic_image_loa GdkPixbufFormat *_gdk_pixbuf_get_format (GdkPixbufModule *image_module); #ifdef USE_GMODULE -#define MODULE_ENTRY(type,function) function +#define MODULE_ENTRY(type,function) __declspec(dllexport) function #else -#define MODULE_ENTRY(type,function) _gdk_pixbuf__ ## type ## _ ## function +#define MODULE_ENTRY(type,function) __declspec(dllexport) _gdk_pixbuf__ ## type ## _ ## function #endif #endif /* GDK_PIXBUF_ENABLE_BACKEND */ diff -udpr gtk+-2.6.7_/gdk-pixbuf/io-bmp.c gtk+-2.6.7/gdk-pixbuf/io-bmp.c --- gtk+-2.6.7_/gdk-pixbuf/io-bmp.c 2005-04-10 01:53:39.000000000 +0400 +++ gtk+-2.6.7/gdk-pixbuf/io-bmp.c 2010-04-27 01:56:37.000000000 +0400 @@ -1074,14 +1074,10 @@ gdk_pixbuf__bmp_image_load_increment(gpo gint BytesToCopy; - g_print ("load_inc\n"); if (context->read_state == READ_STATE_DONE) return TRUE; else if (context->read_state == READ_STATE_ERROR) - { - g_print ("ah\n"); return FALSE; - } while (size > 0) { if (context->BufferDone < context->BufferSize) { /* We still @@ -1107,37 +1103,25 @@ gdk_pixbuf__bmp_image_load_increment(gpo if (!DecodeHeader (context->buff, context->buff + 14, context, error)) - { - g_print ("bla\n"); return FALSE; - } break; case READ_STATE_PALETTE: if (!DecodeColormap (context->buff, context, error)) - { - g_print ("bleh\n"); return FALSE; - } break; case READ_STATE_BITMASKS: if (!decode_bitmasks (context->buff, context, error)) - { - g_print ("blurb\n"); return FALSE; - } break; case READ_STATE_DATA: if (context->Compressed == BI_RGB || context->Compressed == BI_BITFIELDS) OneLine (context); else if (!DoCompressed (context, error)) - { - g_print ("blurb\n"); return FALSE; - } break; case READ_STATE_DONE: diff -udpr gtk+-2.6.7_/gdk-pixbuf/io-pnm.c gtk+-2.6.7/gdk-pixbuf/io-pnm.c --- gtk+-2.6.7_/gdk-pixbuf/io-pnm.c 2005-02-16 06:39:27.000000000 +0300 +++ gtk+-2.6.7/gdk-pixbuf/io-pnm.c 2010-04-27 01:57:05.000000000 +0400 @@ -245,7 +245,7 @@ pnm_read_next_value (PnmIOBuffer *inbuf, /* get the value */ result = strtol (buf, &endptr, 10); - if (*endptr != '\0' || result < 0) { + if (*endptr != '\0' || result < 0 || result > G_MAXUINT) { g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, diff -udpr gtk+-2.6.7_/gdk-pixbuf/io-xpm.c gtk+-2.6.7/gdk-pixbuf/io-xpm.c --- gtk+-2.6.7_/gdk-pixbuf/io-xpm.c 2005-03-03 17:03:53.000000000 +0300 +++ gtk+-2.6.7/gdk-pixbuf/io-xpm.c 2010-04-27 01:57:28.000000000 +0400 @@ -1167,7 +1167,8 @@ file_buffer (enum buf_op op, gpointer ha /* Fall through to the xpm_read_string. */ case op_body: - xpm_read_string (h->infile, &h->buffer, &h->buffer_size); + if(!xpm_read_string (h->infile, &h->buffer, &h->buffer_size)) + return NULL; return h->buffer; default: @@ -1262,7 +1263,9 @@ pixbuf_create_from_xpm (const gchar * (* _("XPM has invalid number of chars per pixel")); return NULL; } - if (n_col <= 0 || n_col >= G_MAXINT / (cpp + 1)) { + if (n_col <= 0 || + n_col >= G_MAXINT / (cpp + 1) || + n_col >= G_MAXINT / sizeof (XPMColor)) { g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, diff -udpr gtk+-2.6.7_/gtk/gtkcombobox.c gtk+-2.6.7/gtk/gtkcombobox.c --- gtk+-2.6.7_/gtk/gtkcombobox.c 2005-04-09 02:03:53.000000000 +0400 +++ gtk+-2.6.7/gtk/gtkcombobox.c 2010-04-27 01:55:00.000000000 +0400 @@ -103,6 +103,7 @@ struct _GtkComboBoxPrivate guint changed_id; guint popup_idle_id; guint scroll_timer; + guint resize_idle_id; gint width; GSList *cells; @@ -2852,6 +2853,8 @@ list_popup_resize_idle (gpointer user_da gtk_window_move (GTK_WINDOW (combo_box->priv->popup_window), x, y); } + combo_box->priv->resize_idle_id = 0; + GDK_THREADS_LEAVE (); return FALSE; @@ -2860,7 +2863,9 @@ list_popup_resize_idle (gpointer user_da static void gtk_combo_box_list_popup_resize (GtkComboBox *combo_box) { - g_idle_add (list_popup_resize_idle, combo_box); + if (!combo_box->priv->resize_idle_id) + combo_box->priv->resize_idle_id = + g_idle_add (list_popup_resize_idle, combo_box); } static void @@ -3330,6 +3335,12 @@ gtk_combo_box_list_destroy (GtkComboBox combo_box->priv->scroll_timer = 0; } + if (combo_box->priv->resize_idle_id) + { + g_source_remove (combo_box->priv->resize_idle_id); + combo_box->priv->resize_idle_id = 0; + } + gtk_widget_destroy (combo_box->priv->tree_view); combo_box->priv->tree_view = NULL; @@ -3416,7 +3427,8 @@ gtk_combo_box_list_button_released (GtkW if (ewidget != combo_box->priv->tree_view) { - if (ewidget == combo_box->priv->button && + if ((ewidget == combo_box->priv->button || + ewidget == combo_box->priv->box ) && !popup_in_progress && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (combo_box->priv->button))) { @@ -3425,7 +3437,8 @@ gtk_combo_box_list_button_released (GtkW } /* released outside treeview */ - if (ewidget != combo_box->priv->button) + if (ewidget != combo_box->priv->button && + ewidget != combo_box->priv->box) { gtk_combo_box_popdown (combo_box); @@ -3618,10 +3631,10 @@ gtk_combo_box_list_auto_scroll (GtkCombo value = adj->value - (tree_view->allocation.y - y + 1); gtk_adjustment_set_value (adj, CLAMP (value, adj->lower, adj->upper - adj->page_size)); } - else if (y >= tree_view->allocation.y + tree_view->allocation.height && + else if (y >= tree_view->allocation.height && adj->upper - adj->page_size > adj->value) { - value = adj->value + (y - tree_view->allocation.y - tree_view->allocation.height + 1); + value = adj->value + (y - tree_view->allocation.height + 1); gtk_adjustment_set_value (adj, CLAMP (value, 0.0, adj->upper - adj->page_size)); } } diff -udpr gtk+-2.6.7_/gtk/gtkdnd.c gtk+-2.6.7/gtk/gtkdnd.c --- gtk+-2.6.7_/gtk/gtkdnd.c 2005-03-20 09:25:27.000000000 +0300 +++ gtk+-2.6.7/gtk/gtkdnd.c 2010-04-27 01:18:04.000000000 +0400 @@ -1949,11 +1949,7 @@ gtk_drag_begin_internal (GtkWidget return NULL; } - if (gdk_keyboard_grab (ipc_widget->window, FALSE, time) != 0) - { - gtk_drag_release_ipc_widget (ipc_widget); - return NULL; - } + gdk_keyboard_grab (ipc_widget->window, FALSE, time); /* We use a GTK grab here to override any grabs that the widget * we are dragging from might have held @@ -2145,6 +2141,9 @@ gtk_drag_source_set (GtkWidget g_signal_connect (widget, "button_press_event", G_CALLBACK (gtk_drag_source_event_cb), site); + g_signal_connect (widget, "button_release_event", + G_CALLBACK (gtk_drag_source_event_cb), + site); g_signal_connect (widget, "motion_notify_event", G_CALLBACK (gtk_drag_source_event_cb), site); @@ -2183,9 +2182,6 @@ gtk_drag_source_unset (GtkWidget g_signal_handlers_disconnect_by_func (widget, gtk_drag_source_event_cb, site); - g_signal_handlers_disconnect_by_func (widget, - gtk_drag_source_event_cb, - site); g_object_set_data (G_OBJECT (widget), "gtk-site-data", NULL); } } diff -udpr gtk+-2.6.7_/gtk/gtkentry.c gtk+-2.6.7/gtk/gtkentry.c --- gtk+-2.6.7_/gtk/gtkentry.c 2005-04-07 08:45:30.000000000 +0400 +++ gtk+-2.6.7/gtk/gtkentry.c 2010-04-27 01:35:21.000000000 +0400 @@ -3553,7 +3553,7 @@ gtk_entry_move_forward_word (GtkEntry *e /* Find the next word end */ new_pos++; - while (new_pos < n_attrs && !log_attrs[new_pos].is_word_end) + while (new_pos < n_attrs - 1 && !log_attrs[new_pos].is_word_end) new_pos++; g_free (log_attrs); @@ -4790,6 +4790,7 @@ cursor_blinks (GtkEntry *entry) gboolean blink; if (GTK_WIDGET_HAS_FOCUS (entry) && + entry->editable && entry->selection_bound == entry->current_pos) { g_object_get (settings, "gtk-cursor-blink", &blink, NULL); diff -udpr gtk+-2.6.7_/gtk/gtkfilesel.c gtk+-2.6.7/gtk/gtkfilesel.c --- gtk+-2.6.7_/gtk/gtkfilesel.c 2005-04-07 08:45:30.000000000 +0400 +++ gtk+-2.6.7/gtk/gtkfilesel.c 2010-04-27 01:10:46.000000000 +0400 @@ -2070,7 +2070,8 @@ win32_gtk_add_drives_to_dir_list (GtkLis while (*textPtr != '\0') { /* Ignore floppies (?) */ - if (GetDriveType (textPtr) != DRIVE_REMOVABLE) +// We need to see flash drives too - WJ +// if (GetDriveType (textPtr) != DRIVE_REMOVABLE) { /* Build the actual displayable string */ g_snprintf (formatBuffer, sizeof (formatBuffer), "%c:\\", toupper (textPtr[0])); diff -udpr gtk+-2.6.7_/gtk/gtkmain.c gtk+-2.6.7/gtk/gtkmain.c --- gtk+-2.6.7_/gtk/gtkmain.c 2005-03-20 09:25:28.000000000 +0300 +++ gtk+-2.6.7/gtk/gtkmain.c 2010-04-27 01:32:08.000000000 +0400 @@ -290,13 +290,46 @@ _gtk_get_libdir (void) return gtk_libdir; } +/* Lifted from HEAD GLib */ +static gchar * +g_win32_locale_filename_from_utf8 (const gchar *utf8filename) +{ + gchar *retval = g_locale_from_utf8 (utf8filename, -1, NULL, NULL, NULL); + + if (retval == NULL && G_WIN32_HAVE_WIDECHAR_API ()) + { + /* Conversion failed, so convert to wide chars, check if there + * is a 8.3 version, and use that. + */ + wchar_t *wname = g_utf8_to_utf16 (utf8filename, -1, NULL, NULL, NULL); + if (wname != NULL) + { + wchar_t wshortname[MAX_PATH + 1]; + if (GetShortPathNameW (wname, wshortname, G_N_ELEMENTS (wshortname))) + { + gchar *tem = g_utf16_to_utf8 (wshortname, -1, NULL, NULL, NULL); + retval = g_locale_from_utf8 (tem, -1, NULL, NULL, NULL); + g_free (tem); + } + g_free (wname); + } + } + return retval; +} + const gchar * _gtk_get_localedir (void) { static char *gtk_localedir = NULL; if (gtk_localedir == NULL) - gtk_localedir = g_win32_get_package_installation_subdirectory - (GETTEXT_PACKAGE, dll_name, "lib\\locale"); + { + gtk_localedir = g_win32_get_package_installation_subdirectory (GETTEXT_PACKAGE, dll_name, "lib\\locale"); + if (gtk_localedir != NULL) + gtk_localedir = g_win32_locale_filename_from_utf8 (gtk_localedir); + + if (gtk_localedir == NULL) + gtk_localedir = "\\"; /* Punt */ + } return gtk_localedir; } diff -udpr gtk+-2.6.7_/gtk/gtknotebook.c gtk+-2.6.7/gtk/gtknotebook.c --- gtk+-2.6.7_/gtk/gtknotebook.c 2005-04-07 08:45:30.000000000 +0400 +++ gtk+-2.6.7/gtk/gtknotebook.c 2010-04-27 01:17:37.000000000 +0400 @@ -4370,10 +4370,8 @@ gtk_notebook_insert_page_menu (GtkNotebo if (!notebook->first_tab) notebook->first_tab = notebook->children; - if (!notebook->cur_page) - gtk_widget_set_child_visible (child, TRUE); - else - gtk_widget_set_child_visible (child, FALSE); + /* child visible will be turned on by switch_page below */ + gtk_widget_set_child_visible (child, FALSE); if (tab_label) { diff -udpr gtk+-2.6.7_/gtk/gtkradiobutton.c gtk+-2.6.7/gtk/gtkradiobutton.c --- gtk+-2.6.7_/gtk/gtkradiobutton.c 2005-03-20 09:25:28.000000000 +0300 +++ gtk+-2.6.7/gtk/gtkradiobutton.c 2010-04-27 01:53:29.000000000 +0400 @@ -510,7 +510,7 @@ gtk_radio_button_focus (GtkWidget { GtkWidget *child = tmp_list->data; - if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_IS_SENSITIVE (child)) + if (GTK_WIDGET_REALIZED (child) && GTK_WIDGET_IS_SENSITIVE (child)) { new_focus = child; break; @@ -528,7 +528,7 @@ gtk_radio_button_focus (GtkWidget { GtkWidget *child = tmp_list->data; - if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_IS_SENSITIVE (child)) + if (GTK_WIDGET_REALIZED (child) && GTK_WIDGET_IS_SENSITIVE (child)) { new_focus = child; break; diff -udpr gtk+-2.6.7_/gtk/gtkscale.c gtk+-2.6.7/gtk/gtkscale.c --- gtk+-2.6.7_/gtk/gtkscale.c 2005-04-07 08:45:30.000000000 +0400 +++ gtk+-2.6.7/gtk/gtkscale.c 2010-04-27 01:53:49.000000000 +0400 @@ -265,10 +265,10 @@ gtk_scale_class_init (GtkScaleClass *cla add_slider_binding (binding_set, GDK_KP_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_DOWN); - add_slider_binding (binding_set, GDK_Page_Up, 0, + add_slider_binding (binding_set, GDK_Page_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_LEFT); - add_slider_binding (binding_set, GDK_KP_Page_Up, 0, + add_slider_binding (binding_set, GDK_KP_Page_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_LEFT); add_slider_binding (binding_set, GDK_Page_Up, 0, @@ -277,10 +277,10 @@ gtk_scale_class_init (GtkScaleClass *cla add_slider_binding (binding_set, GDK_KP_Page_Up, 0, GTK_SCROLL_PAGE_UP); - add_slider_binding (binding_set, GDK_Page_Down, 0, + add_slider_binding (binding_set, GDK_Page_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_RIGHT); - add_slider_binding (binding_set, GDK_KP_Page_Down, 0, + add_slider_binding (binding_set, GDK_KP_Page_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_RIGHT); add_slider_binding (binding_set, GDK_Page_Down, 0, diff -udpr gtk+-2.6.7_/gtk/gtkwindow.c gtk+-2.6.7/gtk/gtkwindow.c --- gtk+-2.6.7_/gtk/gtkwindow.c 2005-04-07 09:09:33.000000000 +0400 +++ gtk+-2.6.7/gtk/gtkwindow.c 2010-04-27 01:29:04.000000000 +0400 @@ -4695,16 +4695,20 @@ gtk_window_real_set_focus (GtkWindow *wi { GtkWidget *old_focus = window->focus_widget; gboolean had_default = FALSE; + gboolean focus_had_default = FALSE; + gboolean old_focus_had_default = FALSE; if (old_focus) { g_object_ref (old_focus); g_object_freeze_notify (G_OBJECT (old_focus)); + old_focus_had_default = GTK_WIDGET_HAS_DEFAULT (old_focus); } if (focus) { g_object_ref (focus); g_object_freeze_notify (G_OBJECT (focus)); + focus_had_default = GTK_WIDGET_HAS_DEFAULT (focus); } if (window->default_widget) @@ -4716,10 +4720,11 @@ gtk_window_real_set_focus (GtkWindow *wi (window->focus_widget != window->default_widget)) { GTK_WIDGET_UNSET_FLAGS (window->focus_widget, GTK_HAS_DEFAULT); - + gtk_widget_queue_draw (window->focus_widget); + if (window->default_widget) GTK_WIDGET_SET_FLAGS (window->default_widget, GTK_HAS_DEFAULT); - } + } window->focus_widget = NULL; @@ -4761,14 +4766,20 @@ gtk_window_real_set_focus (GtkWindow *wi if (window->default_widget && (had_default != GTK_WIDGET_HAS_DEFAULT (window->default_widget))) gtk_widget_queue_draw (window->default_widget); - + if (old_focus) { + if (old_focus_had_default != GTK_WIDGET_HAS_DEFAULT (old_focus)) + gtk_widget_queue_draw (old_focus); + g_object_thaw_notify (G_OBJECT (old_focus)); g_object_unref (old_focus); } if (focus) { + if (focus_had_default != GTK_WIDGET_HAS_DEFAULT (focus)) + gtk_widget_queue_draw (focus); + g_object_thaw_notify (G_OBJECT (focus)); g_object_unref (focus); } diff -udpr gtk+-2.6.7_/modules/engines/ms-windows/msw_style.c gtk+-2.6.7/modules/engines/ms-windows/msw_style.c --- gtk+-2.6.7_/modules/engines/ms-windows/msw_style.c 2005-03-21 01:40:58.000000000 +0300 +++ gtk+-2.6.7/modules/engines/ms-windows/msw_style.c 2010-04-27 01:10:46.000000000 +0400 @@ -1448,10 +1448,13 @@ draw_box (GtkStyle *style, } else if (detail && strcmp (detail, "menuitem") == 0) { shadow_type = GTK_SHADOW_NONE; +#if 0 + /* don't work with Vista */ if (xp_theme_draw (window, XP_THEME_ELEMENT_MENU_ITEM, style, x, y, width, height, state_type, area)) { return; } +#endif } else if (detail && !strcmp (detail, "trough")) { mtpaint-3.40/gtk/screenshot.ico0000644000175000000620000000427610344255666016115 0ustar muammarstaff ( @mmmIII$$$mtpaint-3.40/gtk/mtpaint.ico0000644000175000000620000000427610343632164015403 0ustar muammarstaff ( @ dTJ(_77```w`H0&]FFߧp)7)UrB\@PPUBǹ{rœĹ__wɽmm|óD[z;wD{jXTyb͵‹+jPP#VwwAAϛh |B \\22wP DEFGHIJKLMNO>89?@:;AB<=C8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==8899::;;<<==,-###./01###2345###67!&*#+)%!&*#+)%!&*#+)%&'#()&'#()&'#()!"#$%!"#$%!"#$%   mtpaint-3.40/gtk/gtkrc0000644000175000000620000000117710403741526014265 0ustar muammarstaffgtk-icon-sizes="gtk-menu=14,14:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32" gtk-toolbar-icon-size=large-toolbar #gtk-button-images=0 gtk-alternative-button-order=1 style "msw-default" { GtkWidget::interior_focus = 1 GtkOptionMenu::indicator_size = { 9, 5 } GtkOptionMenu::indicator_spacing = { 7, 5, 2, 2 } GtkToolbar::shadow-type = none GtkHandleBox::shadow-type = etched-in GtkSpinButton::shadow-type = in GtkComboBox::add-tearoffs = false GtkTreeView::allow-rules = 0 GtkTreeView::expander_size = 11 GtkUIManager::add-tearoffs = false engine "wimp" { } } class "*" style "msw-default" mtpaint-3.40/gtk/pango.aliases0000644000175000000620000000305111644661515015677 0ustar muammarstaff# Default pango.aliases file used on Windows courier = "courier new" # Segoe UI is the default system font on Vista "segoe ui" = "segoe ui,meiryo,malgun gothic,microsoft jhenghei,microsoft yahei,gisha,leelawadee,arial unicode ms,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" # Tahoma on XP tahoma = "tahoma,arial unicode ms,lucida sans unicode,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" # The standard pseudo fonts # It sucks to use the same GulimChe, MS Gothic, Sylfaen, Kartika, # Latha, Mangal and Raavi fonts for all three of sans, serif and # mono, but it isn't like there would be much choice. For most # non-Latin scripts that Windows includes any font at all for, it # has ony one. One solution is to install the free DejaVu fonts # that are popular on Linux. They are listed here first. sans = "dejavu sans,tahoma,arial unicode ms,lucida sans unicode,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" sans-serif = "dejavu sans,tahoma,arial unicode ms,lucida sans unicode,browallia new,mingliu,simhei,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" serif = "dejavu serif,georgia,angsana new,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" mono = "dejavu sans mono,courier new,lucida console,courier monothai,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" monospace = "dejavu sans mono,courier new,lucida console,courier monothai,mingliu,simsun,gulimche,ms gothic,sylfaen,kartika,latha,mangal,raavi" mtpaint-3.40/gtk/winbuild.sh0000644000175000000620000006715711677164420015421 0ustar muammarstaff#!/bin/sh # winbuild.sh - cross-compile GTK+ and its dependencies for Windows # Copyright (C) 2010,2011 Dmitry Groshev # 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 3 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 in the file COPYING. ########################## # CONFIGURATION SETTINGS # ########################## LIBS="giflib zlib xz libjpeg libpng libtiff freetype jasper lcms "\ "libiconv gettext glib atk pango gtk" PROGRAMS="gifsicle mtpaint mtpaint_handbook" PHONY="libs all" LOCALES="es cs fr pt pt_BR de pl tr zh_TW sk zh_CN ja ru gl nl it sv tl hu" # Applied only to GTK+ ATM OPTIMIZE="-march=i686 -O2 -fweb -fomit-frame-pointer -fmodulo-sched -Wno-pointer-sign" # Everything works OK with package-relative prefix, for now WPREFIX= SRCDIR=`pwd` TOPDIR="$SRCDIR/zad" # Directories for various parts WRKDIR="$TOPDIR/wrk" # Where sources are compiled INSDIR="$TOPDIR/ins" # Where files get installed PKGDIR="$TOPDIR/pkg" # Where package gets formed DEVDIR="$TOPDIR/dev" # Where dev files get collected # Also "$TOPDIR/bin", "$TOPDIR/include" & "$TOPDIR/lib", with symlinks to actual files UNPDIR="$WRKDIR/_000_" # Where archives are unpacked ######################## # CROSS-COMPILER PATHS # ######################## # SpeedBlue cross-MinGW or similar # http://www.speedblue.org/cross_compilation/ MPREFIX=/usr/i586-mingw32-4.2.4 MTARGET=i586-mingw32 # mingw-cross-env # http://mingw-cross-env.nongnu.org/ #MPREFIX=~/mingw-cross-env-2.18/usr #MTARGET=i686-pc-mingw32 LONGPATH="$TOPDIR:$MPREFIX/bin:$PATH" SHORTPATH="$TOPDIR:$TOPDIR/bin:$PATH" ALLPATH="$TOPDIR:$TOPDIR/bin:$MPREFIX/bin:$PATH" ######################## # Initialize vars COMPONENTS=" $LIBS $PROGRAMS $PHONY " for ZAD in $COMPONENTS do eval "DEP_$ZAD=" eval "NEED_$ZAD=" eval "HAVE_$ZAD=" done REBUILD= # Don't recompile by default INNER_DIRS=" bin include lib " # !!! Parameter shouldn't contain directory UNPACK () { local ZAD local CNT local FFILE local FNAME local FCMD # Identify the source archive for ZAD in "$SRCDIR"/$1 do if [ -f "$ZAD" ] then FFILE="$ZAD" break fi done if [ -z "$FFILE" ] then echo "ERROR: $1 not found in $SRCDIR" exit 1 fi # Prepare to unpack FNAME="${FFILE#$SRCDIR/}" case "$FFILE" in *.tar.bz2) FDIR=.tar.bz2 ; FCMD="tar $2 -xf" ;; *.tar.gz) FDIR=.tar.gz ; FCMD="tar $2 -xf" ;; *.zip) FDIR=.zip ; FCMD="unzip $2" ;; *) echo "ERROR: $FNAME unknown archive type" ; exit 1 ;; esac FDIR="$WRKDIR/${FNAME%$FDIR}" DESTDIR="$INSDIR/${FDIR##*/}" DEST="$DESTDIR$WPREFIX" [ -d "$DESTDIR" -a ! "$REBUILD" ] && return 1 # Prepare temp dir & unpack rm -rf "$UNPDIR" mkdir -p "$UNPDIR" cd "$UNPDIR" $FCMD "$FFILE" cd "$WRKDIR" # Find out if tarbombing happened CNT=0 for ZAD in "$UNPDIR"/* do CNT=$((CNT+1)) done # Check for unexpanded glob if [ $CNT = 1 ] && [ ! -e "$ZAD" ] then echo "ERROR: empty archive $FNAME" exit 1 fi # Move the files to regular location rm -rf "$FDIR" "$DESTDIR" if [ $CNT = 1 ] && [ -d "$ZAD" ] && \ [ "${INNER_DIRS%${ZAD##*/} *}" = "$INNER_DIRS" ] then # With enclosing directory mv "$ZAD/" "$FDIR" else # Tarbomb mv "$UNPDIR" "$FDIR" fi cd "$FDIR" # On return, source directory is current and FDIR holds it; # DESTDIR holds installation directory; and DEST , installdir+prefix return 0 } # Hardcoded direction - from current directory to DEST COPY_BINARIES () { mkdir -p "$DEST" cp -R ./ "$DEST" chmod -R a-x,a+X "$DEST" } # Hardcoded origin - DEST EXPORT () { cp -sfRT "$DEST/include/" "$TOPDIR/include/" cp -sfRT "$DEST/lib/" "$TOPDIR/lib/" rm -f "$TOPDIR/lib/"*.la # !!! These break some utils' compilation } # Tools TARGET_STRIP="$MPREFIX/bin/$MTARGET-strip" BUILD_giflib () { UNPACK "giflib-*.tar.*" || return 0 PATH="$LONGPATH" ./configure CPPFLAGS=-D_OPEN_BINARY LDFLAGS=-no-undefined \ --prefix="$WPREFIX" --host=$MTARGET make all make install-strip DESTDIR="$DESTDIR" "$TARGET_STRIP" --strip-unneeded "$DEST"/bin/*.dll EXPORT } BUILD_zlib () { UNPACK "zlib-*.tar.*" || return 0 PATH="$SHORTPATH" make -f win32/Makefile.gcc install INCLUDE_PATH="$DEST/include" \ LIBRARY_PATH="$DEST/lib" mkdir -p "$DEST/bin" cp -fp zlib1.dll "$DEST"/bin cp -fp libzdll.a "$DEST"/lib/libz.dll.a EXPORT } BUILD_xz () { UNPACK "xz-*.tar.*" || return 0 PATH="$LONGPATH" ./configure --prefix="$WPREFIX" --host=$MTARGET --disable-threads \ --disable-nls --enable-small --disable-scripts make make install-strip DESTDIR="$DESTDIR" EXPORT } BUILD_libjpeg () { UNPACK "jpegsrc.*.tar.*" || return 0 PATH="$LONGPATH" ./configure --prefix="$WPREFIX" --host=$MTARGET make make install-strip DESTDIR="$DESTDIR" EXPORT } DEP_libpng="zlib" BUILD_libpng () { UNPACK "libpng-*.tar.*" || return 0 # !!! Binutils 2.20 cannot create proper export libs if given a version # script; so any libpng version before 1.4.4 needs the below fix sed -i 's/have_ld_version_script=yes/have_ld_version_script=no/' ./configure # !!! Make libpng12 default DLL, same as it is default everything else sed -i 's/for ext in a la so sl/for ext in a dll.a la so sl/' ./Makefile.in PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --without-libpng-compat make make install-strip DESTDIR="$DESTDIR" EXPORT } DEP_libtiff="zlib xz libjpeg" BUILD_libtiff () { UNPACK "tiff-*.tar.*" || return 0 PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --disable-cxx \ --without-x make make install-strip DESTDIR="$DESTDIR" EXPORT } DEP_freetype="zlib" BUILD_freetype () { UNPACK "freetype-*.tar.*" || return 0 # !!! Cross-compile breaks down if cross-gcc named "gcc" is present in PATH PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET make "$TARGET_STRIP" --strip-unneeded objs/.libs/*.dll objs/.libs/*.a make install DESTDIR="$DESTDIR" EXPORT } DEP_jasper="libjpeg" BUILD_jasper () { UNPACK "jasper-*.zip" || return 0 patch -p1 <<- 'END' # Fix CVE-2007-2721 --- jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c 2007-01-19 22:43:07.000000000 +0100 +++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2007-04-06 01:29:02.000000000 +0200 @@ -982,7 +982,10 @@ static int jpc_qcx_getcompparms(jpc_qcxc compparms->numstepsizes = (len - n) / 2; break; } - if (compparms->numstepsizes > 0) { + if (compparms->numstepsizes > 3 * JPC_MAXRLVLS + 1) { + jpc_qcx_destroycompparms(compparms); + return -1; + } else if (compparms->numstepsizes > 0) { compparms->stepsizes = jas_malloc(compparms->numstepsizes * sizeof(uint_fast16_t)); assert(compparms->stepsizes); END patch -p1 <<- 'END' # Fix compilation diff -rup jasper-1.900.1/src/appl/tmrdemo.c jasper-1.900.1.new/src/appl/tmrdemo.c --- jasper-1.900.1/src/appl/tmrdemo.c 2007-01-19 16:43:08.000000000 -0500 +++ jasper-1.900.1.new/src/appl/tmrdemo.c 2008-09-09 09:14:21.000000000 -0400 @@ -1,4 +1,5 @@ #include +#include int main(int argc, char **argv) { @@ -43,7 +44,7 @@ int main(int argc, char **argv) printf("zero time %.3f us\n", t * 1e6); jas_tmr_start(&tmr); - sleep(1); + Sleep(1); jas_tmr_stop(&tmr); t = jas_tmr_get(&tmr); printf("time delay %.8f s\n", t); END PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-no-undefined -L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --enable-shared \ lt_cv_deplibs_check_method='match_pattern \.dll\.a$' # !!! Otherwise it tests for PE file format, which naturally fails # if no .la file is present to provide redirection make make install-strip DESTDIR="$DESTDIR" "$TARGET_STRIP" --strip-unneeded "$DEST"/bin/libjasper*.dll EXPORT } BUILD_lcms () { UNPACK "lcms2-*.tar.*" || return 0 PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET make make install-strip DESTDIR="$DESTDIR" EXPORT } # These were extracting prebuilt packages, instead of compiling from sources : << 'COMMENTED_OUT' BUILD_libiconv () { UNPACK "libiconv-1.9.1.bin.woe32.zip" || return 0 COPY_BINARIES local ZAD local PERED for ZAD in "$DEST"/lib/*.lib do PERED="${ZAD##*/}" mv -f "$ZAD" "${ZAD%$PERED}"lib"${PERED%.lib}".dll.a done EXPORT } BUILD_gettext () { UNPACK "gettext-0.14.5.zip" && COPY_BINARIES UNPACK "gettext-dev-0.14.5.zip" || return 0 mkdir -p "$DEST/include" "$DEST/lib" cp -fp include/libintl.h "$DEST"/include cp -fp lib/libintl.a "$DEST"/lib cp -fp lib/intl.lib "$DEST"/lib/libintl.dll.a chmod -R a-x,a+X "$DEST" EXPORT } BUILD_glib () { UNPACK "glib-2.6.*.zip" && COPY_BINARIES UNPACK "glib-dev-2.6.*.zip" || return 0 COPY_BINARIES rm -f "$DEST"/lib/*.def "$DEST"/lib/*.lib EXPORT } BUILD_atk () { UNPACK "atk-1.9.0.zip" && COPY_BINARIES UNPACK "atk-dev-1.9.0.zip" || return 0 COPY_BINARIES rm -f "$DEST"/lib/*.lib EXPORT } BUILD_pango () { UNPACK "pango-1.8.*.zip" && COPY_BINARIES UNPACK "pango-dev-1.8.*.zip" || return 0 COPY_BINARIES rm -f "$DEST"/lib/*.def "$DEST"/lib/*.lib EXPORT } COMMENTED_OUT BUILD_libiconv () { UNPACK "libiconv-*.tar.*" || return 0 PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET \ --enable-static make make install DESTDIR="$DESTDIR" "$TARGET_STRIP" --strip-unneeded "$DEST"/bin/* # For libiconv 1.9.2, first ever to have support for MinGW mv "$DEST"/bin/iconv "$DEST"/bin/iconv.exe || true EXPORT } DEP_gettext="libiconv" BUILD_gettext () { UNPACK "gettext-0.14.*.tar.*" || return 0 # git ec56ad8f2bf513a88efc3dba44953edff3909207 # Fix some incorrect SUBLANG_* values that were taken from glib's gwin32.c. patch -p1 <<- 'END' # Is needed to fix build failure with w32api 3.15+ --- a/gettext-runtime/intl/localename.c +++ b/gettext-runtime/intl/localename.c @@ -494,10 +494,10 @@ # define SUBLANG_AZERI_CYRILLIC 0x02 # endif # ifndef SUBLANG_BENGALI_INDIA -# define SUBLANG_BENGALI_INDIA 0x00 +# define SUBLANG_BENGALI_INDIA 0x01 # endif # ifndef SUBLANG_BENGALI_BANGLADESH -# define SUBLANG_BENGALI_BANGLADESH 0x01 +# define SUBLANG_BENGALI_BANGLADESH 0x02 # endif # ifndef SUBLANG_CHINESE_MACAU # define SUBLANG_CHINESE_MACAU 0x05 @@ -590,16 +590,16 @@ # define SUBLANG_NEPALI_INDIA 0x02 # endif # ifndef SUBLANG_PUNJABI_INDIA -# define SUBLANG_PUNJABI_INDIA 0x00 +# define SUBLANG_PUNJABI_INDIA 0x01 # endif # ifndef SUBLANG_PUNJABI_PAKISTAN -# define SUBLANG_PUNJABI_PAKISTAN 0x01 +# define SUBLANG_PUNJABI_PAKISTAN 0x02 # endif # ifndef SUBLANG_ROMANIAN_ROMANIA -# define SUBLANG_ROMANIAN_ROMANIA 0x00 +# define SUBLANG_ROMANIAN_ROMANIA 0x01 # endif # ifndef SUBLANG_ROMANIAN_MOLDOVA -# define SUBLANG_ROMANIAN_MOLDOVA 0x01 +# define SUBLANG_ROMANIAN_MOLDOVA 0x02 # endif # ifndef SUBLANG_SERBIAN_LATIN # define SUBLANG_SERBIAN_LATIN 0x02 @@ -607,12 +607,12 @@ # ifndef SUBLANG_SERBIAN_CYRILLIC # define SUBLANG_SERBIAN_CYRILLIC 0x03 # endif -# ifndef SUBLANG_SINDHI_INDIA -# define SUBLANG_SINDHI_INDIA 0x00 -# endif # ifndef SUBLANG_SINDHI_PAKISTAN # define SUBLANG_SINDHI_PAKISTAN 0x01 # endif +# ifndef SUBLANG_SINDHI_AFGHANISTAN +# define SUBLANG_SINDHI_AFGHANISTAN 0x02 +# endif # ifndef SUBLANG_SPANISH_GUATEMALA # define SUBLANG_SPANISH_GUATEMALA 0x04 # endif @@ -670,14 +670,14 @@ # ifndef SUBLANG_TAMAZIGHT_ARABIC # define SUBLANG_TAMAZIGHT_ARABIC 0x01 # endif -# ifndef SUBLANG_TAMAZIGHT_LATIN -# define SUBLANG_TAMAZIGHT_LATIN 0x02 +# ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN +# define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 # endif # ifndef SUBLANG_TIGRINYA_ETHIOPIA -# define SUBLANG_TIGRINYA_ETHIOPIA 0x00 +# define SUBLANG_TIGRINYA_ETHIOPIA 0x01 # endif # ifndef SUBLANG_TIGRINYA_ERITREA -# define SUBLANG_TIGRINYA_ERITREA 0x01 +# define SUBLANG_TIGRINYA_ERITREA 0x02 # endif # ifndef SUBLANG_URDU_PAKISTAN # define SUBLANG_URDU_PAKISTAN 0x01 @@ -1378,8 +1378,8 @@ _nl_locale_name_default (void) case LANG_SINDHI: switch (sub) { - case SUBLANG_SINDHI_INDIA: return "sd_IN"; case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; + case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF"; } return "sd"; case LANG_SINHALESE: return "si_LK"; @@ -1432,7 +1432,7 @@ _nl_locale_name_default (void) { /* FIXME: Adjust this when Tamazight locales appear on Unix. */ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; - case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin"; + case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin"; } return "ber_MA"; case LANG_TAMIL: END # !!! Try upgrading to latest version - *this* one dir shouldn't drag in much # (But disable threading then - for use with mtPaint, it's a complete waste) PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET \ --without-libexpat-prefix make -C gettext-runtime/intl make -C gettext-runtime/intl install DESTDIR="$DESTDIR" "$TARGET_STRIP" --strip-unneeded "$DEST"/bin/*.dll EXPORT } DEP_glib="libiconv gettext" BUILD_glib () { UNPACK "glib-2.6.*.tar.*" || return 0 # Derived from gettext's git ec56ad8f2bf513a88efc3dba44953edff3909207 # (Chosen instead of the route GLib 2.14+ has taken with svn 5257, to # preserve consistent behaviour across various Windows versions despite # their multiple bugs.) patch -p1 <<- 'END' # Is needed to fix build failure with w32api 3.15+ diff -udpr glib-2.6.6_/glib/gwin32.c glib-2.6.6/glib/gwin32.c --- glib-2.6.6_/glib/gwin32.c 2005-03-14 07:02:07.000000000 +0300 +++ glib-2.6.6/glib/gwin32.c 2011-01-14 00:52:49.000000000 +0300 @@ -416,10 +416,10 @@ g_win32_ftruncate (gint fd, #define SUBLANG_AZERI_CYRILLIC 0x02 #endif #ifndef SUBLANG_BENGALI_INDIA -#define SUBLANG_BENGALI_INDIA 0x00 +#define SUBLANG_BENGALI_INDIA 0x01 #endif #ifndef SUBLANG_BENGALI_BANGLADESH -#define SUBLANG_BENGALI_BANGLADESH 0x01 +#define SUBLANG_BENGALI_BANGLADESH 0x02 #endif #ifndef SUBLANG_CHINESE_MACAU #define SUBLANG_CHINESE_MACAU 0x05 @@ -512,16 +512,16 @@ g_win32_ftruncate (gint fd, #define SUBLANG_NEPALI_INDIA 0x02 #endif #ifndef SUBLANG_PUNJABI_INDIA -#define SUBLANG_PUNJABI_INDIA 0x00 +#define SUBLANG_PUNJABI_INDIA 0x01 #endif #ifndef SUBLANG_PUNJABI_PAKISTAN -#define SUBLANG_PUNJABI_PAKISTAN 0x01 +#define SUBLANG_PUNJABI_PAKISTAN 0x02 #endif #ifndef SUBLANG_ROMANIAN_ROMANIA -#define SUBLANG_ROMANIAN_ROMANIA 0x00 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 #endif #ifndef SUBLANG_ROMANIAN_MOLDOVA -#define SUBLANG_ROMANIAN_MOLDOVA 0x01 +#define SUBLANG_ROMANIAN_MOLDOVA 0x02 #endif #ifndef SUBLANG_SERBIAN_LATIN #define SUBLANG_SERBIAN_LATIN 0x02 @@ -529,12 +529,12 @@ g_win32_ftruncate (gint fd, #ifndef SUBLANG_SERBIAN_CYRILLIC #define SUBLANG_SERBIAN_CYRILLIC 0x03 #endif -#ifndef SUBLANG_SINDHI_INDIA -#define SUBLANG_SINDHI_INDIA 0x00 -#endif #ifndef SUBLANG_SINDHI_PAKISTAN #define SUBLANG_SINDHI_PAKISTAN 0x01 #endif +#ifndef SUBLANG_SINDHI_AFGHANISTAN +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#endif #ifndef SUBLANG_SPANISH_GUATEMALA #define SUBLANG_SPANISH_GUATEMALA 0x04 #endif @@ -592,14 +592,14 @@ g_win32_ftruncate (gint fd, #ifndef SUBLANG_TAMAZIGHT_ARABIC #define SUBLANG_TAMAZIGHT_ARABIC 0x01 #endif -#ifndef SUBLANG_TAMAZIGHT_LATIN -#define SUBLANG_TAMAZIGHT_LATIN 0x02 +#ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 #endif #ifndef SUBLANG_TIGRINYA_ETHIOPIA -#define SUBLANG_TIGRINYA_ETHIOPIA 0x00 +#define SUBLANG_TIGRINYA_ETHIOPIA 0x01 #endif #ifndef SUBLANG_TIGRINYA_ERITREA -#define SUBLANG_TIGRINYA_ERITREA 0x01 +#define SUBLANG_TIGRINYA_ERITREA 0x02 #endif #ifndef SUBLANG_URDU_PAKISTAN #define SUBLANG_URDU_PAKISTAN 0x01 @@ -922,8 +922,8 @@ g_win32_getlocale (void) case LANG_SINDHI: l = "sd"; switch (sub) { - case SUBLANG_SINDHI_INDIA: sl = "IN"; break; case SUBLANG_SINDHI_PAKISTAN: sl = "PK"; break; + case SUBLANG_SINDHI_AFGHANISTAN: sl = "AF"; break; } break; case LANG_SINHALESE: l = "si"; sl = "LK"; break; END # Remove traces of existing install - just to be on the safe side rm -rf "$TOPDIR/include/glib-2.0" "$TOPDIR/lib/glib-2.0" rm -f "$TOPDIR/lib/pkgconfig"/glib*.pc "$TOPDIR/lib/pkgconfig"/gmodule*.pc rm -f "$TOPDIR/lib/pkgconfig"/gobject*.pc "$TOPDIR/lib/pkgconfig"/gthread*.pc rm -f "$TOPDIR/lib"/libglib*.dll.a "$TOPDIR/lib"/libgmodule*.dll.a rm -f "$TOPDIR/lib"/libgobject*.dll.a "$TOPDIR/lib"/libgthread*.dll.a PATH="$ALLPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib -mno-cygwin" \ CFLAGS="-mno-cygwin -mms-bitfields $OPTIMIZE" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --enable-all-warnings \ --disable-static --disable-gtk-doc --enable-debug=yes \ --enable-explicit-deps=no \ --with-threads=win32 glib_cv_stack_grows=no # !!! See about "-fno-strict-aliasing": is it needed here with GCC 4, or not? make make install-strip DESTDIR="$DESTDIR" find "$DEST/" -name '*.dll' -exec "$TARGET_STRIP" --strip-unneeded {} + mv "$DEST/share/locale" "$DEST/lib/locale" echo 'PKG="$PKG bin/gspawn-win32-helper.exe"' > "$DESTDIR.install" echo 'DEV="$DEV lib/glib-2.0/"' >> "$DESTDIR.install" EXPORT } DEP_atk="glib gettext" BUILD_atk () { UNPACK "atk-1.9.*.tar.*" || return 0 # Remove traces of existing install - just to be on the safe side rm -rf "$TOPDIR/include/atk-1.0" rm -f "$TOPDIR/lib/pkgconfig"/atk.pc "$TOPDIR/lib"/libatk*.dll.a PATH="$ALLPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib -mno-cygwin" \ CFLAGS="-mno-cygwin -mms-bitfields $OPTIMIZE" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --enable-all-warnings \ --disable-static --disable-gtk-doc --enable-debug=yes \ --enable-explicit-deps=no make make install-strip DESTDIR="$DESTDIR" find "$DEST/" -name '*.dll' -exec "$TARGET_STRIP" --strip-unneeded {} + mv "$DEST/share/locale" "$DEST/lib/locale" EXPORT } DEP_pango="glib" BUILD_pango () { UNPACK "pango-1.8.*.tar.*" || return 0 patch -p1 -i "$SRCDIR/pango182_1wj.patch" # !!! Remove traces of existing install - else confusion will result rm -rf "$TOPDIR/include/pango-1.0" rm -f "$TOPDIR/lib/pkgconfig"/pango*.pc "$TOPDIR/lib"/libpango*.dll.a # !!! The only way to disable Fc backend is to report Fontconfig missing rm -f "$TOPDIR/lib/pkgconfig/fontconfig.pc" PATH="$ALLPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib -mno-cygwin" \ CFLAGS="-mno-cygwin -mms-bitfields $OPTIMIZE" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --enable-all-warnings \ --disable-static --disable-gtk-doc --enable-debug=yes \ --enable-explicit-deps=no \ --without-x --with-usp10=$TOPDIR/include make make install-strip DESTDIR="$DESTDIR" find "$DEST/" -name '*.dll' -exec "$TARGET_STRIP" --strip-unneeded {} + find "$DEST/lib/pango/1.4.0/" \( -name '*.dll.a' -o -name '*.la' \) -delete mkdir -p "$DEST/etc/pango" cp -p "$SRCDIR/pango.aliases" "$DEST/etc/pango" || true cp -p "$SRCDIR/pango.modules" "$DEST/etc/pango" || true echo 'PKG="$PKG lib/pango/"' > "$DESTDIR.install" EXPORT } DEP_gtk="glib gettext libtiff libpng libjpeg atk pango" BUILD_gtk () { UNPACK "wtkit*.zip" -LL && COPY_BINARIES touch "$DEST.exclude" # Do not package the contents local WTKIT WTKIT="$DEST" UNPACK "gtk+-2.6.7.tar.*" || return 0 patch -p1 -i "$SRCDIR/gtk267_5wj.patch" # !!! Remove traces of existing install - else confusion will result rm -rf "$TOPDIR/include/gtk-2.0" "$TOPDIR/lib/gtk-2.0" rm -f "$TOPDIR/lib/pkgconfig"/g[dt]k*.pc "$TOPDIR/lib"/libg[dt]k*.dll.a PATH="$ALLPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib -mno-cygwin" \ CFLAGS="-mno-cygwin -mms-bitfields $OPTIMIZE" \ ./configure --prefix="$WPREFIX" --host=$MTARGET --enable-all-warnings \ --disable-static --disable-gtk-doc --enable-debug=yes \ --enable-explicit-deps=no \ --with-gdktarget=win32 --with-wintab="$WTKIT" make make install-strip DESTDIR="$DESTDIR" find "$DEST/" -name '*.dll' -exec "$TARGET_STRIP" --strip-unneeded {} + find "$DEST/lib/gtk-2.0/2.4.0/" \( -name '*.dll.a' -o -name '*.la' \) -delete mv "$DEST/share/locale" "$DEST/lib/locale" rm -f "$DEST/lib/locale"/*/LC_MESSAGES/gtk20-properties.mo mkdir -p "$DEST/etc/gtk-2.0" cp -p "$SRCDIR/gdk-pixbuf.loaders" "$DEST/etc/gtk-2.0" || true cp -p "$SRCDIR/gtkrc" "$DEST/etc/gtk-2.0" || true printf '%s%s\n' 'PKG="$PKG lib/gtk-2.0/2.4.0/engines/libwimp.dll ' \ 'lib/gtk-2.0/2.4.0/loaders/"' > "$DESTDIR.install" echo 'DEV="$DEV lib/gtk-2.0/include/"' >> "$DESTDIR.install" EXPORT } BUILD_gifsicle () { UNPACK "gifsicle-*.tar.*" || return 0 PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET \ --without-x make make install-strip DESTDIR="$DESTDIR" echo 'PKG="$PKG bin/gifsicle.exe"' > "$DESTDIR.install" echo 'DEV=' >> "$DESTDIR.install" } DEP_mtpaint="$LIBS gifsicle" BUILD_mtpaint () { UNPACK "mtpaint-*.tar.bz2" || return 0 PATH="$LONGPATH" CPPFLAGS="-isystem $TOPDIR/include" LDFLAGS="-L$TOPDIR/lib" \ ./configure --prefix="$WPREFIX" --host=$MTARGET \ release intl make make install DESTDIR="$DESTDIR" # Now prepare Windows-specific package parts local ZAD for ZAD in COPYING NEWS README do # Convert to CRLF sed -e 's/$/\x0D/g' ./$ZAD >"$DESTDIR/$ZAD.txt" done cp -a -t "$DESTDIR" "$SRCDIR/"*.ico ZAD="${DESTDIR##*mtpaint-}" # Version number sed -e "s/%VERSION%/$ZAD/g" "$SRCDIR/mtpaint-setup.iss" \ > "$DESTDIR/mtpaint-setup.iss" ZAD='[InternetShortcut]\r\nURL=http://mtpaint.sourceforge.net/\r\n' echo -en "$ZAD" > "$DESTDIR/mtpaint.url" echo 'PKG="./"' > "$DESTDIR.install" echo 'DEV=' >> "$DESTDIR.install" } BUILD_mtpaint_handbook () { UNPACK "mtpaint_handbook-*.zip" || return 0 mkdir -p "$DESTDIR" cp -ar -t "$DESTDIR" docs echo 'PKG="docs/"' > "$DESTDIR.install" echo 'DEV=' >> "$DESTDIR.install" } # Collect compiled files and drop them into runtime and development packages INST_all () { rm -rf "$PKGDIR"/* "$DEVDIR"/* local ZAD local PERED local FILE local DIR local DEST local PKG local DEV # Support locales only of GLib-based libs local LOCALES_SV LOCALES_SV="$LOCALES" LOCALES="" for ZAD in $LOCALES_SV do LOCALES="$LOCALES lib/locale/$ZAD/" done LOCALES="${LOCALES# }" for ZAD in "$INSDIR"/* do [ ! -d "$ZAD" -o -e "$ZAD.exclude" ] && continue echo "$ZAD" # Progress indicator PKG="bin/*.dll etc/ $LOCALES" DEV="include/ lib/*.a lib/pkgconfig/" if [ -f "$ZAD.install" ] then # !!! REMEMBER TO CREATE THESE FOR PACKAGES WITH NONDEFAULT CONTENT . "$ZAD.install" fi DIR="$PKGDIR" while [ -n "$PKG" -o -n "$DEV" ] do PKG="$PKG " while [ -n "$PKG" ] do PERED="${PKG%% *}" PKG="${PKG#$PERED }" [ -z "$PERED" ] && continue for FILE in "$ZAD$WPREFIX"/$PERED do [ -e "$FILE" ] || continue DEST="$DIR/${FILE#$ZAD}" mkdir -p "${DEST%/?*}" cp -fpRT "$FILE" "$DEST" done done DIR="$DEVDIR" PKG="$DEV" DEV= done done LOCALES="$LOCALES_SV" cd "$PKGDIR/bin" if [ ! -f "$PKGDIR/etc/pango/pango.modules" ] then mkdir -p "$PKGDIR/etc/pango" wine "$INSDIR"/pango-*"$WPREFIX"/bin/pango-querymodules.exe | \ sed -e 's|\\\\\?|/|g' \ -e "s|.:.\+\($WPREFIX/lib/pango\)|\1|" > \ "$PKGDIR/etc/pango/pango.modules" fi if [ ! -f "$PKGDIR/etc/gtk-2.0/gdk-pixbuf.loaders" ] then mkdir -p "$PKGDIR/etc/gtk-2.0" wine "$INSDIR"/gtk+-*"$WPREFIX"/bin/gdk-pixbuf-query-loaders.exe | \ sed -e '/:/ s|\\\\\?|/|g' \ -e "s|.:.\+\($WPREFIX/lib/gtk-2\)|\1|" > \ "$PKGDIR/etc/gtk-2.0/gdk-pixbuf.loaders" fi } DEP_libs="$LIBS" BUILD_libs () { INST_all } DEP_all="$LIBS $PROGRAMS" BUILD_all () { INST_all } # Ctrl+C terminates script trap exit INT # Parse commandline if [ "$1" = new ] then REBUILD=1 shift fi ZAD= for ZAD in "$@" do case "$ZAD" in only-?* | no-?* ) DEP="${ZAD#*-}";; * ) DEP="$ZAD";; esac if [ "${COMPONENTS#* $DEP }" = "$COMPONENTS" ] then echo "Unknown parameter: '$ZAD'" continue fi if [ "${ZAD%$DEP}" = "no-" ] then # Without component eval "HAVE_$DEP=1" elif [ "${ZAD%$DEP}" = "only-" ] then # Without dependencies eval "NEED_$DEP=2" # Force compile eval "DEPS=\$DEP_$DEP" for DEP in $DEPS do eval "HAVE_$DEP=1" done else # With component eval "NEED_$DEP=2" fi done if [ -z "$ZAD" ] then # Build "all" by default NEED_all=2 fi set -e # "set -eu" feels like overkill # Prepare build directories mkdir -p "$WRKDIR" "$INSDIR" "$PKGDIR" "$DEVDIR" test -d "$TOPDIR/include" || cp -sR "$MPREFIX/include/" "$TOPDIR/include/" test -d "$TOPDIR/lib" || cp -sR "$MPREFIX/lib/" "$TOPDIR/lib/" # Create links for what misconfigured cross-compilers fail to provide mkdir -p "$TOPDIR/bin" LONGCC=`PATH="$LONGPATH" which $MTARGET-gcc` for BINARY in ${LONGCC%/*}/$MTARGET-* do ln -sf "$BINARY" "$TOPDIR/bin/${BINARY##*/$MTARGET-}" done # Prepare fake pkg-config OLD_PKGCONFIG=`which pkg-config` PKG_CONFIG="$TOPDIR/pkg-config" export PKG_CONFIG rm -f "$PKG_CONFIG" cat << PKGCONFIG > "$PKG_CONFIG" #!/bin/sh export PKG_CONFIG_LIBDIR="$TOPDIR/lib/pkgconfig" export PKG_CONFIG_PATH= # pkg-config doesn't like --define-variable with these if [ "x\${*#*--atleast-pkgconfig-version}" != "x\${*#*--atleast-version}" ] then exec "$OLD_PKGCONFIG" "\$@" else exec "$OLD_PKGCONFIG" --define-variable=prefix="$TOPDIR" "\$@" fi PKGCONFIG chmod +x "$PKG_CONFIG" # Not actually needed for the packages in here, but why not ln -sf pkg-config "$TOPDIR/$MTARGET-pkg-config" # Provide (stripped-down) GLib 2.6.6 scripts for ATK & Pango SCRIPTDIR="$WRKDIR/glib/build/win32" mkdir -p "$SCRIPTDIR" cat << 'END' > "$SCRIPTDIR/compile-resource" #!/bin/sh rcfile=$1 resfile=$2 if [ -f $rcfile ]; then basename=`basename $rcfile .rc` if [ -f $basename-build.stamp ]; then read number <$basename-build.stamp buildnumber=`expr $number + 1` echo Build number $buildnumber echo $buildnumber >$basename-build.stamp else echo Using zero as build number buildnumber=0 fi m4 -DBUILDNUMBER=$buildnumber <$rcfile >$$.rc && ${WINDRES-windres} $$.rc $resfile && rm $$.rc else exit 1 fi END cat << 'END' > "$SCRIPTDIR/lt-compile-resource" #!/bin/sh rcfile=$1 lo=$2 case "$lo" in *.lo) resfile=.libs/`basename $lo .lo`.o ;; *) echo libtool object name should end with .lo exit 1 ;; esac d=`dirname $0` [ ! -d .libs ] && mkdir .libs o_files_in_dotlibs=`echo .libs/*.o` case "$o_files_in_dotlibs" in .libs/\*.o) use_script=false ;; *) use_script=true ;; esac o_files_in_dot=$(echo ./*.o) case "$o_files_in_dot" in ./\*.o) ;; *) use_script=true ;; esac $d/compile-resource $rcfile $resfile && { if [ $use_script = true ]; then (echo "# $lo" echo "# Generated by lt-compile-resource, compatible with libtool" echo "pic_object=$resfile" echo "non_pic_object=none") >$lo else mv $resfile $lo fi exit 0 } exit 1 END chmod +x "$SCRIPTDIR"/* # A little extra safety LIBS= PROGRAMS= PHONY= # Do the build in proper order READY= while [ "$READY" != 2 ] do READY=2 for ZAD in $COMPONENTS do if ((NEED_$ZAD<=HAVE_$ZAD)) then continue fi READY=1 eval "DEPS=\$DEP_$ZAD" for DEP in $DEPS do eval "NEED_$DEP=\${NEED_$DEP:-1}" if ((NEED_$DEP>HAVE_$DEP)) then # echo "$ZAD needs $DEP" READY= fi done if [ $READY ] then echo "Build $ZAD" eval "BUILD_$ZAD" eval "HAVE_$ZAD=\$NEED_$ZAD" fi done done mtpaint-3.40/gtk/README0000644000175000000620000002313711677046532014121 0ustar muammarstaff----------- The History ----------- For simpler installation and more consistent behaviour, official Windows build of mtPaint is packaged with its own copy of GTK+ runtime environment. Prior to version 3.40, it was GTK+ 2.6.4 - or more accurately, a mix of DLLs from official Windows distributions of GTK+ 2.6.4 and 2.6.9, with libgdk and libgtk being from 2.6.4. This allowed mtPaint to continue to support Windows 98, which became unsupported with GTK+ 2.8. But since version 2.6.4 had been released in 2005, some improvements in Windows support in GTK+ have been made which are really desirable. Moreover, libraries such as libpng, libjpeg, LibTIFF, FreeType, and even zlib have undergone multiple version changes in the meantime, with bugfixes and other improvements. Still, upgrading the package to a newer official distribution of GTK+ would mean exposing the program to a new set of GTK+ bugs and quirks - which would be hard to detect and counter in time, because I myself do not run Windows. For this reason, mtPaint 3.40 comes with a custom build of GTK+ based on version 2.6.7 with a set of patches backported from the later versions, compiled from source along with all its dependencies. ------------- The Specifics ------------- Original patches from GTK+ tree contained in the cumulative patch: - svn 7886 / git d73fa807875951d0240dce572398992d395bbe77 Use GetDriveType() to recognize removable drives (in order to avoid (REVERTED: was making flash drives inaccessible from file selector) - svn 12881 / git 0604a90098416694c1d26bfa920e34c3f5d61493 Remove debugging output. (#302404, Frederic Crozat) (APPLIED: cleans up BMP loader) - svn 12899 / git cf5324d980fcddad8318bf52f5315d39fc4221f6 Don't grab focus to unrealized widgets. (#302240, Philip Langdale) (APPLIED: fixes possible glitch in radiobutton groups) - svn 12903 / git 0ae5528968af2b0e28eebdb9c4b38f76af129707 Take multi-monitor offset into account. (#302525) (APPLIED) - svn 12946 / git 35f75bd3401d498201327fe00fa454deb351cee1 Always initialize child-visible to FALSE, otherwise we may end up with the (PARTIALLY APPLIED: fixes possible glitch in GtkNotebook) - svn 12968 / git ff576e3fe7dce780f2b892967fb16c073656d29d Check that GDK_IS_SCREEN(screen) (like the X11 backend does), not screen (APPLIED) - svn 12991 / git 7c337b69f23d4200d4975cc35da13d1d3c00cc1f Don't blink the cursor if the entry is not editable. (#304171,Nikos (APPLIED) - svn 12992 / git ef25506011d6bfa67294cdcc8bbdd40185f0bfaa Don't bind GDK_Page_Up and GDK_Page_Down twice. (#168333, Hazael Maldonado (APPLIED: fixes reaction to PageUp & PageDown keys in sliders) - svn 12994 / git f4fc3fee869d901eba7b6eaf22a4794b15659a2e Keep the popup posted if the button is released over the cellview. This (APPLIED: fixes GtkComboBox) - svn 13027 / git a9c0d119133ea9c22017cf7bb567b5de54b538c0 If the keysym isn't one of the special cases this function takes care of, (APPLIED) - svn 13057 / git 67f3c556626c6e9fa06b2143c87633e635ed733c If blitting from the root window, take the multi-monitor offset into (APPLIED) - svn 13062 / git b27c1cc6ee8e5d86a628a3a96a8c3d56bdc00b7e Make autoscrolling work at the bottom of the screen. (APPLIED: fixes GtkComboBox) - svn 13095 / git 36c4c40f8822aa519aa33fa3222f42fc6563dfa8 Check for overflow. (#306394, Morten Welinder) (APPLIED: fixes PNM loader) - svn 13200 / git 5e575c6df3a3e407042a666a9ba9cbb1e01c0b6c [Win32] Borrow this function from GLib HEAD. (_gtk_get_localedir): [Win32] (APPLIED: fixes possible problem with non-ASCII installation path) - svn 13219 / git 4a37701aa1615c30d80a6840fbc836fc2896adaa Queue a draw on the old and new focus widgets, if their defaultness (APPLIED) - svn 13224 / git c943c3552a7a8f2aee2bad0d3d694b67c6c8e41c Set the actions and suggested_action fields in the GdkDragContext to (APPLIED) - svn 13267 / git 406be320feec1adec2e5794150cb3eea351cb1fb Connect to button-release-event as well, to handle touchscreen scenarios (APPLIED) - svn 13438 / git 5454441a8336a0f96a3999143903e394ce1498cd Fix handling of Aiptek and Aiptek-like graphical tablets such as Trust on (APPLIED) - svn 13493 / git 91f2fb2d4d3b8f5474121a396c1b191938ad3887 don't iterate past the end of the string, so pango_layout_get_cursor_pos() (APPLIED: fixes a glitch in GtkEntry) - svn 13498 / git 24d63ffe74df3b5f5780c8c9a8058c341f26da93 Don't fail if we can't get a keyboard grab. (#168351) (APPLIED) - svn 13588 / git 1cabe720eb48eb0fd29421b4dcdf8c3f58eaf71e Avoid spurious core pointer events when the tablet pen is lifted. (APPLIED) - svn 13738 / git bd80abab9f749698ad034aa2a3b313ac62344b9c Backport from 2.8. (APPLIED: fixes possible crash in GtkComboBox) - svn 14261 / git 21b6ed0024a44054d99c4930914f4eb81dfdd05b 2.8.7 (PARTIALLY APPLIED: fixes two vulnerabilities in XPM loader) - svn 14527 / git 3750d5da6b2dc7e104b9cc19f60b5724032e67c2 Get the invalidated region from ScrollWindowEx() instead of an incorrect (APPLIED: fixes scrolling of partially covered windows) - svn 15720 / git f93e5455e983144e133e18b5041aab29afc97360 [WM_WINDOWPOSCHANGED] Replace identical code as in (APPLIED: prerequisite for svn 17834) - svn 17096 / git 8d601fbde30fd28f9d9fc5e5ebc47cba5e56f351 New file. Downloaded from freedesktop.org's webcvs. Slighly edited cursors (APPLIED: changes to several builtin cursors) - svn 17299 / git ea7cc8d95eade637c67c5331a9f98863210ad8f1 Fix Win32 resize events and flickering (APPLIED) - svn 17615 / git f251591cf8d1d6c399485a4b0f95811e628e6b6f Fix menuitem rendering in Vista (BACKPORTED) - svn 17645 / git 2cf71073edccd5a445a3baef5a158d85caf16520 Use native Win32 cursors where it makes sense (APPLIED) - svn 17834 / git 50af49319ad07682cd15913d264cb4a9570e1f8c Fix context iterations for handle_configure_event() (APPLIED) - svn 20250 / git 710c9619b944e993f5402e04dc08846851b11f38 leak of GDI region in function 'handle_wm_paint' (APPLIED) - svn 20726 / git 0d0f9a7fc184db3ff8ce76e49256fee397de3d35 Windows' System Menu blocks main loop (APPLIED) - svn 20881 / git c8fef535b20ad75f82739f68fce2216c1d62f6ab Repaint glitches in widgets (APPLIED) - svn 22511 / git 703a18c25fc4b1e8f06c4b9c8ea7cb74c06b3871 Can not resize shaped windows on Windows (APPLIED) In addition, there are couple of my own patches, solving the build problems arising from use of recent MinGW on a Linux box (in GTK+ 2.6.x time, official Windows packages were built with MSVC on Windows). Patch from Pango tree: - svn 2489 / git d686e1d4ae80b64390149e7336329c0254479161 On Windows store the default aliases file in a string array. (#492517) (BACKPORTED: needed to handle 'pango.aliases' for Windows Vista & Windows 7) --------- The Build --------- The build was done on a Slackware Linux system using MinGW cross-compiler installation combined of the following parts: - TDM-GCC 4.2.4 ( http://www.tdragon.net/recentgcc/ ) - binutils 2.19 ( http://mingw.sourceforge.net/ ) - MinGW runtime 3.15.2 ( http://mingw.sourceforge.net/ ) - Win32 API 3.13 ( http://mingw.sourceforge.net/ ) To replicate it, you need the following source packages: - GTK+ 2.6.7 (this specific version and no other): gtk+-2.6.7.tar.bz2 http://ftp.gtk.org/pub/gtk/v2.6/gtk+-2.6.7.tar.bz2 - Wintab development package: wtkit126.zip http://www.wacomeng.com/devsupport/downloads/pc/wtkit126.zip - Pango 1.8.2 (this specific version and no other): pango-1.8.2.tar.bz2 http://ftp.gtk.org/pub/gtk/v2.6/pango-1.8.2.tar.bz2 - ATK 1.9.0: atk-1.9.0.tar.bz2 http://ftp.gtk.org/pub/gtk/v2.6/atk-1.9.0.tar.bz2 - GLib 2.6.6: glib-2.6.6.tar.bz2 http://ftp.gtk.org/pub/gtk/v2.6/glib-2.6.6.tar.bz2 - GNU gettext 0.14.5: gettext-0.14.5.tar.gz http://ftp.gnu.org/gnu/gettext/gettext-0.14.5.tar.gz - GNU libiconv 1.9.2: libiconv-1.9.2.tar.gz http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.2.tar.gz - zlib 1.2.5: zlib-1.2.5.tar.bz2 http://zlib.net/zlib-1.2.5.tar.bz2 - XZ Utils 5.0.3: xz-5.0.3.tar.bz2 http://tukaani.org/xz/xz-5.0.3.tar.bz2 - libpng 1.2.46: libpng-1.2.46.tar.gz ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.46.tar.gz - libjpeg 8c: jpegsrc.v8c.tar.gz http://www.ijg.org/files/jpegsrc.v8c.tar.gz - LibTIFF 4.0.0: tiff-4.0.0.tar.gz http://download.osgeo.org/libtiff/tiff-4.0.0.tar.gz - FreeType 2.4.8: freetype-2.4.8.tar.bz2 http://download.savannah.gnu.org/releases/freetype/freetype-2.4.8.tar.bz2 - giflib 4.1.6: giflib-4.1.6.tar.bz2 http://heanet.dl.sourceforge.net/project/giflib/giflib%204.x/giflib-4.1.6/giflib-4.1.6.tar.bz2 - JasPer 1.900.1 (this specific version and no other): jasper-1.900.1.zip http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.zip - Little CMS 2.3: lcms2-2.3.tar.gz http://heanet.dl.sourceforge.net/project/lcms/lcms/2.3/lcms2-2.3.tar.gz - Gifsicle 1.64: gifsicle-1.64.tar.gz http://www.lcdf.org/gifsicle/gifsicle-1.64.tar.gz - mtPaint 3.40 (or later): mtpaint-3.40.tar.bz2 Also you need the following files from 'gtk' subdirectory of mtPaint source package: winbuild.sh gtk267_5wj.patch gtkrc pango182_1wj.patch pango.aliases To recreate the "etc/pango/pango.modules" and "etc/gtk-2.0/gdk-pixbuf.loaders" files, you additionally need a working install of Wine. To do the build, put all requisite files into same directory, adjust the variables in "CONFIGURATION SETTINGS" section of 'winbuild.sh' if necessary, and run 'winbuild.sh'. Subdirectory 'zad' will be created for use in the build process; if the build succeeds, executables and runtime files will be placed under 'zad/pkg', and development libraries and headers, under 'zad/dev'. --------------------------------- Copyright (C) 2010,2011 Dmitry Groshev mtpaint-3.40/gtk/mtpaint-setup.iss0000644000175000000620000000762611677154001016567 0ustar muammarstaff; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] AppName=mtPaint AppVerName=mtPaint %VERSION% AppPublisher=Dmitry Groshev AppPublisherURL=http://mtpaint.sourceforge.net/ AppSupportURL=http://mtpaint.sourceforge.net/ AppUpdatesURL=http://mtpaint.sourceforge.net/ DefaultDirName={pf}\mtPaint-%VERSION% DefaultGroupName=mtPaint AllowNoIcons=yes LicenseFile=.\COPYING.txt OutputDir=C:\ OutputBaseFilename=mtpaint-%VERSION%-setup ;SetupIconFile=C:\Program Files\mtPaint\mtpaint.ico Compression=lzma SolidCompression=yes [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" Name: "dscreenicon"; Description: "Create a desktop screenshot icon"; GroupDescription: "{cm:AdditionalIcons}" ;Name: "dhandbook"; Description: "Create a desktop Handbook icon"; GroupDescription: "{cm:AdditionalIcons}" Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}" Name: "qlscreenicon"; Description: "Create a Quick Launch screenshot icon"; GroupDescription: "{cm:AdditionalIcons}" ;Name: "qlhandbook"; Description: "Create a Quick Launch Handbook icon"; GroupDescription: "{cm:AdditionalIcons}" Name: "sendtoicon"; Description: "Create a Send To icon"; GroupDescription: "{cm:AdditionalIcons}" [Files] Source: ".\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [INI] Filename: "{app}\mtpaint.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://mtpaint.sourceforge.net/" [Icons] Name: "{group}\mtPaint"; Filename: "{app}\bin\mtpaint.exe"; IconFilename: "{app}\mtpaint.ico"; WorkingDir: "{app}\bin" Name: "{group}\mtPaint Handbook"; Filename: "{app}\docs\index.html"; WorkingDir: "{app}\docs" Name: "{group}\{cm:ProgramOnTheWeb,mtPaint}"; Filename: "{app}\mtpaint.url"; Name: "{group}\{cm:UninstallProgram,mtPaint}"; Filename: "{uninstallexe}"; Name: "{userdesktop}\mtPaint"; Filename: "{app}\bin\mtpaint.exe"; Tasks: desktopicon; IconFilename: "{app}\mtpaint.ico"; WorkingDir: "{app}\bin" Name: "{userdesktop}\mtPaint Screenshot"; Filename: "{app}\bin\mtpaint.exe"; Parameters: "-s"; Tasks: dscreenicon; IconFilename: "{app}\screenshot.ico"; WorkingDir: "{app}\bin" ;Name: "{userdesktop}\mtPaint Handbook"; Filename: "{app}\docs\index.html"; Tasks: dhandbook; WorkingDir: "{app}\docs" Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\mtPaint"; Filename: "{app}\bin\mtpaint.exe"; Tasks: quicklaunchicon; IconFilename: "{app}\mtpaint.ico"; WorkingDir: "{app}\bin" Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\mtPaint Screenshot"; Filename: "{app}\bin\mtpaint.exe"; Parameters: "-s"; Tasks: qlscreenicon; IconFilename: "{app}\screenshot.ico"; WorkingDir: "{app}\bin" ;Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\mtPaint Handbook"; Filename: "{app}\docs\index.html"; Tasks: qlhandbook; WorkingDir: "{app}\docs" Name: "{sendto}\mtPaint"; Filename: "{app}\bin\mtpaint.exe"; Tasks: sendtoicon; IconFilename: "{app}\mtpaint.ico"; WorkingDir: "{app}\bin" [Run] Filename: "{app}\bin\mtpaint.exe"; Description: "{cm:LaunchProgram,mtPaint}"; Flags: nowait postinstall skipifsilent Filename: "{app}\NEWS.txt"; Description: "View the NEWS file"; Flags: postinstall nowait shellexec skipifsilent Filename: "{app}\README.txt"; Description: "View the README file"; Flags: postinstall nowait shellexec skipifsilent unchecked Filename: "{app}\CREDITS.txt"; Description: "View the CREDITS file"; Flags: postinstall nowait shellexec skipifsilent unchecked Filename: "{app}\docs\index.html"; Description: "Read the mtPaint Handbook"; Flags: postinstall nowait shellexec skipifsilent unchecked [UninstallDelete] Type: files; Name: "{app}\mtpaint.url" mtpaint-3.40/configure0000755000175000000620000004576511677126221014370 0ustar muammarstaff#!/bin/sh # Mini configure script # 26-01-2011 echo MT_V="3.40" MT_DATE="2011-12-30" MT_VERSION="mtPaint $MT_V" MT_LANG=NO MT_MAN=NO MT_POD=NO MT_CPICK=mtpaint MT_FPICK=mtpaint MT_ANIM=Gifsicle ICON_SET=icons1 GTK_FILE=_conf.txt HELP=1 OS= MARCH= OPTS=YES USE_THREADS=YES AS_NEEDED= DEFS= # Path overrides MT_BINDIR= MT_DATAROOT= MT_DOCDIR= MT_LOCDIR= MT_MANDIR= MT_PO= MT_HOST= # Initialize library-tracking vars STATICLIBS= for A in PNG GIF JPEG JP2 TIFF FT CMS do eval "N$A=" eval "STATIC_$A=" STATICLIBS="$STATICLIBS \$STATIC_$A" done GTK= GTK2VERSION= # Prevent nasty surprises from locale unset LC_ALL export LC_COLLATE=C # LC_CTYPE=C LC_NUMERIC=C for A in "$@" do case "$A" in "staticpng" ) STATIC_PNG=PNG;; "GIF" ) NGIF=GIF;; "gif" ) NGIF=YES;; "nogif" ) NGIF=NO;; "staticgif" ) STATIC_GIF=GIF;; "jpeg" ) NJPEG=YES;; "nojpeg" ) NJPEG=NO;; "staticjpeg" ) STATIC_JPEG=JPEG;; "jp2" ) NJP2=OpenJPEG;; "jasper" ) NJP2=JasPer;; "nojp2" ) NJP2=NO;; "staticjp2" ) STATIC_JP2=JPEG2000;; "tiff" ) NTIFF=YES;; "notiff" ) NTIFF=NO;; "statictiff" ) STATIC_TIFF=TIFF;; "noft" ) NFT=NO;; "staticft" ) STATIC_FT=FreeType;; "lcms" ) NCMS=LittleCMS;; "lcms2" ) NCMS=LittleCMS2;; "nolcms" ) NCMS=NO;; "staticlcms" ) STATIC_CMS=LittleCMS;; "gtk1" ) GTK=1;; "gtk2"* ) GTK=2 # Override minor version of installed GTK+2 GTK2VERSION="`echo "$A" | sed -e 's/gtk2\.\?\([0-9]*\).*/\1/'`";; "intl" ) MT_LANG=YES;; "man" ) MT_MAN=YES;; "pod" ) MT_POD=YES;; "gtkfilesel" ) MT_FPICK=gtkfilesel;; "gtkcolsel" ) MT_CPICK=gtkcolsel;; "imagick" ) MT_ANIM=ImageMagick;; "icons"* ) ICON_SET=$A;; "win" ) OS="MinGW/MSYS" GTK=2;; "cflags" ) OPTS=CFLAGS;; "386" ) MARCH='-march=i386';; "486" ) MARCH='-march=i486';; "586" ) MARCH='-march=i586';; "686" ) MARCH='-march=i686';; "--cpu="* ) MARCH="-march=${A#*=}";; "slow" ) OPTS=NO;; "debug" ) OPTS=DEBUG;; "release" ) OPTS=RELEASE;; "thread" ) USE_THREADS=YES;; "nothread" ) USE_THREADS=NO;; "asneeded" ) AS_NEEDED=-Wl,--as-needed;; "--help" ) HELP=0;; "--prefix="* ) MT_PREFIX="${A#*=}";; "--bindir="* ) MT_BINDIR="${A#*=}";; "--datarootdir="* ) MT_DATAROOT="${A#*=}";; "--docdir="* ) MT_DOCDIR="${A#*=}";; "--localedir="* ) MT_LOCDIR="${A#*=}";; "--mandir="* ) MT_MANDIR="${A#*=}";; "--host="* ) MT_HOST="${A#*=}";; "--fakeroot="* ) FAKE_ROOT="${A#*=}";; "flush" ) echo Clearing out directory to original state echo make clean echo rm $GTK_FILE rm po/mtpaint.pot rm -rf src/graphics exit;; "merge" ) xgettext src/*.c src/*.h --keyword=_ -o po/mtpaint.pot cd po NEW_DIR=trans_ mkdir $NEW_DIR`date +%d-%m-%Y-%H-%M-%S` for file in *.po do echo New file = $file-a mv "$file" "$file-a" msgmerge -N "$file-a" mtpaint.pot > "$file" mv "$file-a" $NEW_DIR* done rm mtpaint.pot mv $NEW_DIR* ../../old_trans exit;; "newpo" ) xgettext src/*.c src/*.h --keyword=_ -o po/mtpaint.pot exit;; # Override variable [!=]*=* ) MT_VAR=${A%%=*} if [ "$MT_VAR" != "${MT_VAR#*[!A-Za-z0-9_]}" ] then echo "Invalid variable: '$MT_VAR'" else eval $MT_VAR=\${A#*=} export $MT_VAR fi;; esac done if [ "$HELP" = 0 ] then cat << 'EOF' ; exit Usage: ./configure [OPTION] ... [VAR=VALUE] ... Options: win .............. Configure for Windows MinGW / MSYS gtk1 ............. Configure for GTK+1 gtk2 ............. Configure for GTK+2 gtk2.VER ......... Configure for GTK+2, minor version VER gtkfilesel ....... Use GtkFileSelection file picker gtkcolsel ........ Use GtkColorSelection colour picker imagick .......... Use ImageMagick for GIF animation tasks thread ........... Use multithreading nothread ......... Don't use multithreading cflags ........... Use CFLAGS environment variable --cpu= ........... Target a specific CPU, e.g. athlon-xp, x86-64 686 .............. Target 686 machines 586 .............. Target 586 machines 486 .............. Target 486 machines 386 .............. Target 386 machines slow ............. Don't use compiler optimizations asneeded ......... Use linker optimization --as-needed release .......... Use the set of optimizations which work best for mtPaint code debug ............ Include debugging info in binary --host= .......... Cross-compile with a specific toolchain, e.g. i586-mingw32 staticpng ........ Statically link PNG library GIF .............. Use libgif gif .............. Use libungif nogif ............ Don't use libgif and libungif staticgif ........ Statically link GIF library jpeg ............. Use libjpeg nojpeg ........... Don't use libjpeg staticjpeg ....... Statically link JPEG library jp2 .............. Use libopenjpeg jasper............ Use libjasper nojp2 ............ Don't use libopenjpeg and libjasper staticjp2 ........ Statically link JPEG 2000 library tiff ............. Use libtiff notiff ........... Don't use libtiff statictiff ....... Statically link TIFF library noft ............. Don't use FreeType staticft ......... Statically link FreeType library lcms ............. Use LittleCMS lcms2............. Use LittleCMS2 nolcms ........... Don't use LittleCMS staticlcms ....... Statically link LittleCMS library intl ............. Use internationalized po files man .............. Install the mtPaint man page --fakeroot=DIR ... DIR = location of library and include files to use for cross-compilation icons ............ Compile with alternative icon set - see ./src/icons1/README for details --prefix=DIR ..... DIR = prefix location of all installs, e.g. /usr or /usr/local (default) --bindir=DIR ..... DIR = location of bin file to install, ${prefix}/bin by default --docdir=DIR ..... DIR = location of documentation to install, ${prefix}/share/doc/mtpaint by default --localedir=DIR .. DIR = location of locale files to install, ${prefix}/share/locale by default --mandir=DIR ..... DIR = location of man page to install, ${prefix}/share/man/man1 by default flush ............ Flush directories to initial state newpo ............ Create ./po/mtpaint.pot merge ............ Update all po files with new strings - developers only Environment variables: CC ............... C compiler (defaults to gcc) CFLAGS ........... C compiler flags (not recommended; for enabling better optimizations use 'release' option instead) LDFLAGS .......... linker flags, e.g. -L CPPFLAGS ......... C preprocessor flags, e.g. -I CCLD ............. "test link" command (defaults to $CC -nostartfiles) Default settings: GNU/Linux system, O2 optimizations, English only version, mtpaint file picker, mtpaint colour picker. pkg-config gtk+-2.0 is checked to determine GTK+2 availability in GNU/Linux EOF fi ### Detect the OS if [ -n "$OS" ] ; then : # Do nothing elif [ "$OSTYPE" = "msys" ] ; then OS="MinGW/MSYS" elif [ -z "$MT_HOST" ] ; then OS="GNU/Linux" elif [ "$MT_HOST" != "${MT_HOST%mingw32*}" ] ; then OS="MinGW/GNU/Linux" else OS="Other/GNU/Linux" fi ### Prepare to use selected icon set mkdir -p src/graphics cp src/$ICON_SET/*.xpm src/$ICON_SET/*.xbm src/graphics ### Choose which sub-makefiles to run MAKE_DIRS=src [ "$MT_LANG" = YES ] && MAKE_DIRS="$MAKE_DIRS po" # translations [ "$MT_MAN" = YES ] && MAKE_DIRS="$MAKE_DIRS doc" # man page ### Setup directories if [ "$OS" != "${OS#MinGW/}" ] then EXEEXT=".exe" MT_PREFIX="${MT_PREFIX-/c/Program Files/mtPaint}" else MT_PREFIX="${MT_PREFIX-/usr/local}" fi MT_BINDIR="${MT_BINDIR:-$MT_PREFIX/bin}" MT_DATAROOT="${MT_DATAROOT:-$MT_PREFIX/share}" MT_DOCDIR="${MT_DOCDIR:-$MT_DATAROOT/doc/mtpaint}" MT_MANDIR="${MT_MANDIR:-$MT_DATAROOT/man}" if [ "$OS" != "${OS#MinGW/}" ] then MT_LOCDIR="${MT_LOCDIR:-$MT_BINDIR/locale}" # Want package-relative path on Windows MT_PKGDIR=${MT_BINDIR%/bin} [ "$MT_PKGDIR" = "$MT_BINDIR" ] && MT_PKGDIR=${MT_BINDIR%/lib} MT_PKGDIR="$MT_PKGDIR/" MT_PO="/" while [ "$MT_LOCDIR" = "${MT_LOCDIR#$MT_PKGDIR}" ] do MT_PO="/..$MT_PO" if [ "$MT_PKGDIR" = "${MT_PKGDIR%/[!/]*/}" ] then # Cannot relativize path - leave it be MT_PO= break fi MT_PKGDIR="${MT_PKGDIR%/[!/]*/}/" done MT_PO="$MT_PO${MT_LOCDIR#$MT_PKGDIR}" else MT_LOCDIR="${MT_LOCDIR:-$MT_DATAROOT/locale}" MT_PO="$MT_LOCDIR" fi ### Set feature flags [ "$USE_THREADS" = "YES" ] && DEFS="$DEFS -DU_THREADS" if [ "$MT_FPICK" = mtpaint ] then DEFS="$DEFS -DU_FPICK_MTPAINT" else # "$MT_FPICK" = gtkfilesel DEFS="$DEFS -DU_FPICK_GTKFILESEL" fi if [ "$MT_CPICK" = mtpaint ] then DEFS="$DEFS -DU_CPICK_MTPAINT" else # "$MT_CPICK" = gtkcolsel DEFS="$DEFS -DU_CPICK_GTK" fi [ "$MT_ANIM" = ImageMagick ] && DEFS="$DEFS -DU_ANIM_IMAGICK" # mtPaint version DEFS="$DEFS -DMT_VERSION='\"$MT_VERSION\"'" ### Setup compiler (only GCC is really supported at this time) INCLUDES= LIBS= if [ "$OS" != "${OS%GNU/Linux}" ] then CC=${CC:-`which ${MT_HOST:+$MT_HOST-}gcc`} PKG_CONFIG=${PKG_CONFIG:-${MT_HOST:+$MT_HOST-}pkg-config} fi CC=${CC:-gcc} # Use compiler as linker in tests - this way, both accept "-Wl," in LDFLAGS CCLD=${CCLD:-$CC -nostartfiles} # Get GCC version GCCVER=`$CC -dumpversion` # Get target architecture GCCARCH=`$CC -dumpmachine` # For eternally misconfigured, Windows-hosted MinGW [ "$GCCARCH" != "${GCCARCH#mingw32}" ] && GCCARCH=i586-mingw32 # For any properly built toolchain ARCH=${ARCH:-${GCCARCH%%-*}} if [ -n "$FAKE_ROOT" ] # A way to replace just some libraries, leaving others be then PKGCONFIG () # Check both locations in turn { PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR="$FAKE_ROOT/lib/pkgconfig" \ pkg-config --define-variable=prefix="$FAKE_ROOT" "$@" \ 2> /dev/null || "$PKG_CONFIG" "$@" } MT_TESTLINK="$CCLD -L$FAKE_ROOT/lib -Wl,--unresolved-symbols=ignore-in-shared-libs $LDFLAGS" MT_TESTCOMP="$CC -fno-builtin -isystem $FAKE_ROOT/include $CPPFLAGS ${MT_TESTLINK#$CCLD}" else PKGCONFIG () { "$PKG_CONFIG" "$@" } MT_TESTLINK="$CCLD $LDFLAGS" MT_TESTCOMP="$CC -fno-builtin $CPPFLAGS $LDFLAGS" fi if [ "$OS" != "${OS%/MSYS}" ] then MT_TESTLINK="redir -e /dev/null $MT_TESTLINK -L/lib" MT_TESTCOMP="redir -e /dev/null $MT_TESTCOMP -L/lib" INCLUDES="-I/include" LIBS="-L/lib" fi IS_LIB() { $MT_TESTLINK -$1 -o _conf.tmp > /dev/null 2>&1 } HAVE_FUNC() { echo "main() { $1(); }" > _conf.c $MT_TESTCOMP _conf.c -o _conf.tmp > /dev/null 2>&1 } HAVE_GCC_VER() { # First 2 parts of GCC version MT_VN0=${GCCVER%%.*} MT_VN1=${GCCVER#$MT_VN0} MT_VN0=${MT_VN0%%[!0-9]*} MT_VN1=${MT_VN1#.} MT_VN1=${MT_VN1%%[!0-9]*} # Compare them to given version [ ${1%%.*} -eq "$MT_VN0" ] && [ ${1#*.} -le "$MT_VN1" ] || \ [ ${1%%.*} -lt "$MT_VN0" ] } ### Detect libraries and functions if HAVE_FUNC "mkdtemp" then DEFS="$DEFS -DHAVE_MKDTEMP" fi if IS_LIB "lgif" then NGIF=${NGIF:-GIF} fi if IS_LIB "lungif" then NGIF=${NGIF:-YES} fi NGIF=${NGIF:-NO} if IS_LIB "ljpeg" then NJPEG=${NJPEG:-YES} fi NJPEG=${NJPEG:-NO} if IS_LIB "lopenjpeg" then NJP2=${NJP2:-OpenJPEG} fi if IS_LIB "ljasper" then NJP2=${NJP2:-JasPer} fi NJP2=${NJP2:-NO} if IS_LIB "ltiff" then NTIFF=${NTIFF:-YES} fi NTIFF=${NTIFF:-NO} if IS_LIB "lfreetype" then NFT=${NFT:-YES} fi NFT=${NFT:-NO} if IS_LIB "llcms2" then NCMS=${NCMS:-LittleCMS2} fi if IS_LIB "llcms" then NCMS=${NCMS:-LittleCMS} fi NCMS=${NCMS:-NO} ### Setup optimizations if [ "$OPTS" = RELEASE ] then # Target i386 when compiling for any x86 CPU; # this produces smallest *AND* fastest binary case $ARCH in i?86) CFLAGS="-O2 ${MARCH:--march=i386}";; *) CFLAGS="-O2 $MARCH";; esac # Add optimizations which are proven to really make mtPaint code faster if HAVE_GCC_VER 4.0 then # GCC 4.x CFLAGS="$CFLAGS -fweb -fomit-frame-pointer -fmodulo-sched" else # GCC 3.x CFLAGS="$CFLAGS -fweb" fi # Do not add unneeded dependencies AS_NEEDED="-Wl,--as-needed" # Disable GTK+ debug code DEFS="$DEFS -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS" elif [ "$OPTS" = DEBUG ] then CFLAGS="-ggdb" elif [ "$OPTS" = YES ] then CFLAGS="-O2 $MARCH" elif [ "$OPTS" = NO ] then CFLAGS="$MARCH" else # $OPTS = CFLAGS MARCH= # And leave CFLAGS alone fi [ "$OPTS" != DEBUG ] && LDFLAGS="-s $LDFLAGS" # Strip debug info # Set Windows-specific flags if [ "$OS" != "${OS#MinGW/}" ] then CFLAGS="-mms-bitfields $CFLAGS" LDFLAGS="-mwindows $LDFLAGS" fi # Enable warnings if HAVE_GCC_VER 4.0 then # Tell gcc 4.x to shut up WARN="-Wall -Wno-pointer-sign" else WARN="-Wall" fi ### Setup libraries MT_DLIBS= MT_SLIBS= LIB_NAME () # ( lib_ID , static_mode , libs ) { if [ "$2" ] then MT_SLIBS="$MT_SLIBS ${1:+-l$1}$3" else MT_DLIBS="$MT_DLIBS ${1:+-l$1}$3" fi } if [ "$NGIF" != NO ] then if [ "$NGIF" = GIF ] then LIB_NAME gif "$STATIC_GIF" else LIB_NAME ungif "$STATIC_GIF" fi DEFS="$DEFS -DU_GIF" fi if [ "$NJP2" = OpenJPEG ] then LIB_NAME openjpeg "$STATIC_JP2" # !!! If isn't found in include path, use CPPFLAGS or symlink; # I'm not inclined to scan all the places where different packagers can put it DEFS="$DEFS -DU_JP2" if [ "$STATIC_JP2" ] || [ "$OS" != "GNU/Linux" ] then DEFS="$DEFS -DOPJ_STATIC" fi fi if [ "$NJP2" = JasPer ] then LIB_NAME jasper "$STATIC_JP2" DEFS="$DEFS -DU_JASPER" fi if [ "$NTIFF" = YES ] then LIB_NAME tiff "$STATIC_TIFF" DEFS="$DEFS -DU_TIFF" fi if [ "$NJPEG" = YES ] then LIB_NAME jpeg "$STATIC_JPEG" DEFS="$DEFS -DU_JPEG" fi if [ "$NFT" = YES ] then DEFS="$DEFS -DU_FREETYPE" if [ "$OS" = "GNU/Linux" ] then # Do it the old way, for native builds on *very* old distros INCLUDES="$INCLUDES `freetype-config --cflags`" LIB_NAME "" "$STATIC_FT" "`freetype-config --libs`" elif [ "$OS" != "${OS%/MSYS}" ] then # pkg-config may be missing on Windows - hardcode its results INCLUDES="$INCLUDES -I/include/freetype2" LIB_NAME "" "$STATIC_FT" "-lfreetype -lz" else # Use pkg-config INCLUDES="$INCLUDES `PKGCONFIG freetype2 --cflags`" LIB_NAME "" "$STATIC_FT" "`PKGCONFIG freetype2 --libs`" fi # libiconv may be separate, or part of libc HAVE_FUNC "iconv_open" || LIB_NAME iconv "$STATIC_FT" fi if [ "$NCMS" = LittleCMS2 ] then LIB_NAME lcms2 "$STATIC_CMS" DEFS="$DEFS -DU_LCMS=2" fi if [ "$NCMS" = LittleCMS ] then LIB_NAME lcms "$STATIC_CMS" DEFS="$DEFS -DU_LCMS" fi LIB_NAME png "$STATIC_PNG" LIB_NAME z "$STATIC_PNG" LIB_NAME m if [ "$MT_LANG" = YES ] then HAVE_FUNC "gettext" || LIB_NAME intl DEFS="$DEFS -DU_NLS -DMT_LANG_DEST='\"$MT_PO\"'" fi # !!! Would be nice to subtract MT_SLIBS from MT_DLIBS first LIBS="$LIBS $MT_DLIBS${MT_SLIBS:+ -Wl,-dn $MT_SLIBS -Wl,-dy}" rm -f _conf.c _conf.tmp ### Setup GTK+ FOUND_GTK= [ "$OS" != "${OS#MinGW/}" ] && GTK=2 [ "$GTK" != 1 ] && PKGCONFIG gtk+-2.0 --cflags > /dev/null 2>&1 && FOUND_GTK=2 GTK=2 [ "$GTK" != 2 ] && PKGCONFIG gtk+ --cflags > /dev/null 2>&1 && FOUND_GTK=1 GTK=1 GTK=${GTK:-1} if [ "$USE_THREADS" = NO ] ; then THREADS= elif [ "$GTK" = 2 ] ; then THREADS="gthread-2.0" else # "$GTK" = 1 THREADS="gthread" fi # !!! It is assumed that the nondefault install prefix is the one GTK+ lives in if [ "$FOUND_GTK" = 2 ] then GTKPREFIX=`PKGCONFIG gtk+-2.0 --variable=prefix` INCLUDES="$INCLUDES `PKGCONFIG gtk+-2.0 $THREADS --cflags`" LIBS="$LIBS `PKGCONFIG gtk+-2.0 $THREADS --libs`" elif [ "$FOUND_GTK" = 1 ] then # !!! Full equivalent to "gtk-config gtk" would be "pkg-config gtk+ gmodule", # but for mtPaint, 'gmodule' is nothing but a nuisance anyway GTKPREFIX=`PKGCONFIG gtk+ --variable=prefix` INCLUDES="$INCLUDES `PKGCONFIG gtk+ $THREADS --cflags`" LIBS="$LIBS `PKGCONFIG gtk+ $THREADS --libs`" elif [ "GTK" = 2 ] && [ "$OS" != "${OS%/MSYS}" ] then # Windows system w/o working pkg-config GTKPREFIX=/ INCLUDES="$INCLUDES -I/include/gtk-2.0 -I/lib/gtk-2.0/include -I/include/atk-1.0 -I/include/pango-1.0 -I/include/freetype2 -I/include/glib-2.0 -I/lib/glib-2.0/include" LIBS="$LIBS -lgtk-win32-2.0 -lgdk-win32-2.0 -lpango-1.0 -lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 ${THREADS:+-lgthread-2.0}" elif [ "GTK" = 1 ] && gtk-config --cflags > /dev/null then # Very old GNU/Linux system GTKPREFIX=`gtk-config gtk --prefix` INCLUDES="$INCLUDES `gtk-config gtk $THREADS --cflags`" LIBS="$LIBS `gtk-config gtk $THREADS --libs | sed 's/-rdynamic//'`" elif [ "GTK" = 1 ] then # Even older GNU/Linux system GTKPREFIX=/opt/gnome GTK_INCLUDE="-I$GTKPREFIX/include/gtk-1.2 -I$GTKPREFIX/include/glib-1.2 -I$GTKPREFIX/lib/glib/include -I/usr/X11R6/include" GTK_LIB="-L/usr/lib -L/usr/X11R6/lib -L$GTKPREFIX/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm" echo echo I have not been able to find gtk-config so I am assuming the following: echo echo GTK_INCLUDE = $GTK_INCLUDE echo GTK_LIB = $GTK_LIB echo echo If these values are not right for your system, edit the configure script echo INCLUDES="$INCLUDES $GTK_INCLUDE" LIBS="$LIBS $GTK_LIB" else echo "Failed to find required GTK+$GTK libraries" 1>&2 exit 1 fi # Also need to add "-lX11" on GTK+2/X systems [ "$GTK" = 2 ] && [ "$LIBS" != "${LIBS#*gdk-x11}" ] && LIBS="$LIBS -lX11" # GTK+2 version to use DEFS="$DEFS${GTK2VERSION:+ -DGTK2VERSION=$GTK2VERSION}" ### ### Rebase the paths, for '--fakeroot' substitutions to work FAKE_PATHS () # variable, key { FAKE_KEYS=" " for A in $1 do [ "$A" = "${A#$2/}" ] && continue for B in "$GTKPREFIX/include" "$GTKPREFIX/lib"\ /usr/include /usr/lib /usr/local/include /usr/local/lib do [ "$A" != "${A#$2$B}" ] || continue C="$2$FAKE_ROOT${A#$2${B%/*}}" [ "$C" != "$A" ] && [ "$FAKE_KEYS" = "${FAKE_KEYS#* $C }" ] &&\ FAKE_KEYS="$FAKE_KEYS$C " break done done echo "$FAKE_KEYS" } if [ "$FAKE_ROOT" ] then # !!! Spaces in paths will NOT be well received here FAKE_PATHS "$LIBS" -L LIBS="-L$FAKE_ROOT/lib $FAKE_KEYS $LIBS" FAKE_PATHS "$INCLUDES" -I INCLUDES="-isystem $FAKE_ROOT/include $FAKE_KEYS $INCLUDES" AS_NEEDED="-Wl,--as-needed,--no-add-needed,--unresolved-symbols=ignore-in-shared-libs" fi ### Write config cat << CONFIG > "$GTK_FILE" CC = $CC $WARN EXEEXT = $EXEEXT MT_VERSION=$MT_VERSION MT_DATE=$MT_DATE MT_PREFIX="$MT_PREFIX" MT_DATAROOT="$MT_DATAROOT" MT_LANG_DEST="$MT_LOCDIR" MT_MAN_DEST="$MT_MANDIR" LDFLAG = $AS_NEEDED $LIBS $LDFLAGS CFLAG = $DEFS $INCLUDES $CPPFLAGS $CFLAGS subdirs = $MAKE_DIRS BIN_INSTALL="$MT_BINDIR" CONFIG HAVE_GCC_VER 3.3 && echo "HAVE_RANDSEED=1" >> $GTK_FILE ### Report config eval STATICLIBS=\"$STATICLIBS\" STATICLIBS=`echo -n "$STATICLIBS" | sed -e 's/ */ /g' -e 's/^ //'` cat << CONFIG --------------------- mtPaint Configuration --------------------- ------- General ------- Version $MT_V System $OS Toolkit GTK+$GTK${GTK2VERSION:+.$GTK2VERSION} File Picker $MT_FPICK Colour Picker $MT_CPICK Animation Package $MT_ANIM Use FreeType $NFT Use CMS $NCMS Icon set $ICON_SET Internationalized $MT_LANG Multithreaded $USE_THREADS -------- Compiler -------- Optimizations $OPTS CFLAGS $CFLAGS LDFLAGS ${AS_NEEDED:+$AS_NEEDED }$LDFLAGS Static libraries ${STATICLIBS:-NONE} ---------- File Types ---------- Use GIF $NGIF Use JPEG $NJPEG Use JPEG 2000 $NJP2 Use TIFF $NTIFF ------------ Installation ------------ Binary install $MT_BINDIR CONFIG [ "$MT_LANG" = YES ] && cat << CONFIG Locale install $MT_LOCDIR Locale program $MT_PO CONFIG cat << CONFIG Install man page $MT_MAN CONFIG [ "$MT_MAN" = YES ] && cat << CONFIG Man page install $MT_MANDIR CONFIG echo mtpaint-3.40/doc/0000755000175000000620000000000011517543446013212 5ustar muammarstaffmtpaint-3.40/doc/Makefile0000644000175000000620000000120611517540411014636 0ustar muammarstaffinclude ../_conf.txt MAN_PAGE=mtpaint.1 all: $(MAN_PAGE) $(MAN_PAGE): mtpaint.pod pod2man "--release=$(MT_VERSION)" "--date=$(MT_DATE)" "--center=Mark Tyler's Painting Program" mtpaint.pod > $(MAN_PAGE) install: mkdir -p $(DESTDIR)$(MT_MAN_DEST)/man1 $(DESTDIR)$(MT_DATAROOT)/applications $(DESTDIR)$(MT_DATAROOT)/pixmaps cp $(MAN_PAGE) $(DESTDIR)$(MT_MAN_DEST)/man1 cp mtpaint.desktop $(DESTDIR)$(MT_DATAROOT)/applications cp mtpaint.png $(DESTDIR)$(MT_DATAROOT)/pixmaps uninstall: rm $(DESTDIR)$(MT_MAN_DEST)/man1/$(MAN_PAGE) rm $(DESTDIR)$(MT_DATAROOT)/applications/mtpaint.desktop rm $(DESTDIR)$(MT_DATAROOT)/pixmaps/mtpaint.png mtpaint-3.40/doc/mtpaint.png0000644000175000000620000000225010727414466015374 0ustar muammarstaffPNG  IHDR00W'PLTE2PPhmmժLo[ ˭ ȋ՘hll,JzѷȭL`40,wo\j_uKRT ,ml1YSŪztTbmw]O~:?C^ ]P8K5s}W+CGLjo9 p֮gGf",9(y|:VX}0/HCnnQM81C^wAp|$%yQ] g33cҭUl8@vBeuVa>K#ߚpc8 f5(@B) _QqP Ct]@t]@t]@t]@t sMЃ"cᰶE>1mp&.)pLS8!OMŋ0:ON̖/Y˪|HN,z'Սq+, )DI&q\KRlA6YL'UcܸCRXb@x/9f^0@D7>B#r gW hXFiIENDB`mtpaint-3.40/doc/mtpaint.pod0000644000175000000620000000220010514673610015355 0ustar muammarstaff=pod =head1 NAME mtpaint - A pixel based painting program =head1 SYNOPSIS S =head1 DESCRIPTION mtPaint is a GTK+1/2 based painting program designed for creating icons and pixel based artwork. It can edit indexed palette or 24 bit RGB images and offers painting and palette manipulation tools. Its main file format is PNG, although it can also handle JPEG, GIF, TIFF, BMP, XPM, and XBM files. Due to its simplicity and lack of dependencies it runs well on GNU/Linux, Windows and older PC hardware. There is full documentation of mtPaint's features contained in a handbook. If you don't already have this, you can download it from the mtPaint website. =head1 OPTIONS mtPaint can accept one of the following options: --help Output usage information --version Output version information -s Grab a screenshot -v Start mtPaint in viewer mode =head1 HOMEPAGE http://mtpaint.sourceforge.net/ =head1 ORIGINAL AUTHOR Mark Tyler The development of mtPaint has been helped by various people from the free software community. See "Credits" in the README or the mtPaint help system for details. =cut mtpaint-3.40/doc/alien-desc0000644000175000000620000000041610551660166015136 0ustar muammarstaffmtPaint - Mark Tyler's Painting Program mtPaint is a GTK+2 based painting program designed for creating icons and pixel based artwork. It can edit indexed palette or 24 bit RGB images and offers painting and palette manipulation tools. http://mtpaint.sourceforge.net/ mtpaint-3.40/doc/slack-desc0000644000175000000620000000056110514673610015141 0ustar muammarstaffmtpaint: mtPaint - Mark Tyler's Painting Program mtpaint: mtpaint: mtPaint is a GTK+1/2 based painting program designed for creating mtpaint: icons and pixel based artwork. It can edit indexed palette or 24 bit mtpaint: RGB images and offers painting and palette manipulation tools. mtpaint: mtpaint: http://mtpaint.sourceforge.net/ mtpaint: mtpaint: mtpaint: mtpaint: mtpaint-3.40/doc/mtpaint.desktop0000644000175000000620000000116411504636664016264 0ustar muammarstaff[Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=mtPaint GenericName=Image Editor Comment=Painting program to create pixel art and manipulate digital photos TryExec=mtpaint Exec=mtpaint %F Icon=mtpaint Terminal=false Categories=Graphics;2DGraphics;RasterGraphics;GTK; MimeType=image/bmp;image/x-bmp;image/x-ms-bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/x-pcx;image/png;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/svg;image/svg+xml;image/x-tga;image/tiff;image/xbm;image/x-xbm;image/x-xbitmap;image/xpm;image/x-xpm;image/x-xpixmap; mtpaint-3.40/doc/README0000644000175000000620000000067610225214142014062 0ustar muammarstaffThis directory contains the mtPaint man page. Users of mtPaint should not need to edit or make anything here - just use the configure script as normal. Package maintainers may wish to put their details into the man page for their users. Put these lines near the end of mtpaint.pod, just before the '=cut' at the end: =head1 MAINTAINER Your Name Eyour.name@email.addressE Then from the command line: ./configure pod ... make etc. mtpaint-3.40/doc/mtpaint.10000644000175000000620000001202410725607622014744 0ustar muammarstaff.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MTPAINT 1" .TH MTPAINT 1 "2007-12-27" "mtPaint 3.20" "Mark Tyler's Painting Program" .SH "NAME" mtpaint \- A pixel based painting program .SH "SYNOPSIS" .IX Header "SYNOPSIS" mtpaint\ [option]\ [imagefile\ ...\ ] .SH "DESCRIPTION" .IX Header "DESCRIPTION" mtPaint is a \s-1GTK+1/2\s0 based painting program designed for creating icons and pixel based artwork. It can edit indexed palette or 24 bit \s-1RGB\s0 images and offers painting and palette manipulation tools. Its main file format is \s-1PNG\s0, although it can also handle \s-1JPEG\s0, \s-1GIF\s0, \s-1TIFF\s0, \s-1BMP\s0, \s-1XPM\s0, and \s-1XBM\s0 files. Due to its simplicity and lack of dependencies it runs well on GNU/Linux, Windows and older \s-1PC\s0 hardware. There is full documentation of mtPaint's features contained in a handbook. If you don't already have this, you can download it from the mtPaint website. .SH "OPTIONS" .IX Header "OPTIONS" mtPaint can accept one of the following options: .PP .Vb 4 \& --help Output usage information \& --version Output version information \& -s Grab a screenshot \& -v Start mtPaint in viewer mode .Ve .SH "HOMEPAGE" .IX Header "HOMEPAGE" http://mtpaint.sourceforge.net/ .SH "ORIGINAL AUTHOR" .IX Header "ORIGINAL AUTHOR" Mark Tyler .PP The development of mtPaint has been helped by various people from the free software community. See \*(L"Credits\*(R" in the \s-1README\s0 or the mtPaint help system for details. mtpaint-3.40/README0000444000175000000620000002305411646642261013325 0ustar muammarstaff-------------------------------------------------- mtPaint 3.40 - Copyright (C) 2004-2011 The Authors -------------------------------------------------- See 'Credits' section for a list of the authors. mtPaint 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 3 of the License, or (at your option) any later version. mtPaint 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. mtPaint is a simple GTK+1/2 painting program designed for creating icons and pixel based artwork. It can edit indexed palette or 24 bit RGB images and offers basic painting and palette manipulation tools. It also has several other more powerful features such as channels, layers and animation. Due to its simplicity and lack of dependencies it runs well on GNU/Linux, Windows and older PC hardware. There is full documentation of mtPaint's features contained in a handbook. If you don't already have this, you can download it from the mtPaint website. If you like mtPaint and you want to keep up to date with new releases, or you want to give some feedback, then the mailing lists may be of interest to you: http://sourceforge.net/mail/?group_id=155874 ----------- Compilation ----------- In order to compile mtPaint on a GNU/Linux system you will need to have the libraries and headers for GTK+1 and/or GTK+2, libpng and zlib. If you want to load or save GIF, JPEG and TIFF files you will also need libungif, libjpeg and libtiff. If you want to compile the international version you will need to have the gettext system and headers installed. You may then adjust the Makefile/sources to cater for your needs and then: For GTK+2 ========= ./configure make su -c "make install" For GTK+1 ========= ./configure gtk1 make su -c "make install" If you want to uninstall these files from your system, you should type: su -c "make uninstall" There are various configure options that may be useful for some people. Use "./configure --help" to find out what options are available. If you are compiling a binary for distribution to other peoples systems, the option 'asneeded' is particularly useful (if the gcc option -Wl,--as-needed is available, i.e. binutils >=2.17), as it only creates links to libraries which are absolutely necessary to mtPaint. For example, without this option if you compile mtPaint against GTK+2.10 you will find it will not run on GTK+2.6 systems because Cairo doesn't exist on the older system. Use "./configure release" to compile mtPaint with the same optimizations we use for distribution packages; this includes the "asneeded" option. To enable internationalization, add the "intl" option. If you are compiling mtPaint on an older system without gtk-config, you may need to adjust the configure script so that the GTK+1 settings are done manually. I have provided an example in the configure script to demonstrate. You can call mtpaint with the -v option and the program will start in viewer mode so there will be no palette, menu bar, etc. You can restore these items by pressing the "Home" key. After installation you can create a symlink to add a viewer command, e.g. su -c "ln -s mtpaint /usr/local/bin/mtv" Then you can open some graphics files with "mtv *.jpg". This is a shortcut to writing "mtpaint -v *.jpg". mtPaint can only edit one image at a time, but when you have more than one filename in the command line a window will appear with all of the filenames in a list. If you select one of the names, it will be loaded. I find this is helpful for editing several icons or digital photos. After running mtPaint for the first time, a new file is created to store your preferred settings and previously used files etc. This file is named ".mtpaint" and stored in the user's home directory. If you rename or remove this file then the next time mtPaint is run it will use the default settings. The easiest way to compile mtPaint for Windows is using MinGW cross-compiler on a GNU/Linux system, and the included "winbuild.sh" shell script. The script will compile mtPaint and all required runtime files from source code, and prepare a binary package and a separate development package, with headers and development libraries; see "gtk/README" for details. Another alternative is doing a manual build with MinGW on GNU/Linux, for which you'll need to have installed requisite library and header files, corresponding to the runtime libraries you intend to use. Since version 3.40, the official mtPaint package for Windows uses custom-built runtime files, and development libraries and headers, produced in the automated build process described above; with version 3.31 and earlier, you could use the packages listed below for MinGW/MSYS build. Either way, after the headers and libraries are installed where MinGW expects them, you configure mtPaint for cross-compiling, then run "make" as usual. Like this: PATH=/usr/i586-mingw32/bin:$PATH ./configure --host=i586-mingw32 [options] make It should also still be possible to compile mtPaint for Windows the old way, using MinGW/MSYS on a Windows system. However this wasn't done for quite some time, so the description below still refers to older versions of MinGW, MSYS and library packages. mtpaint.exe compiled according to it, will only be compatible with runtime libraries packaged with mtPaint 3.31 or older; to use the newer runtime (of version 3.40+), you'll need to use library and header files produced while cross-compiling the runtime (see above). If you want to do this you must first download the mtPaint 3.31 setup program and install the files to "C:/Program Files/mtPaint/" and then: 1) Install MinGW and MSYS - http://www.mingw.org/ MinGW-3.1.0-1.exe - to c:/MinGW/ MSYS-1.0.10.exe - to c:/msys/ 2) Install the GTK+2 developer packages (and dependencies like libpng) - ftp://ftp.gtk.org/pub/gtk/v2.6/win32/ and http://gnuwin32.sourceforge.net/packages.html For GTK+2 you will need to download and extract the following zip files to c:/msys: gtk+-dev-2.6.4.zip pango-dev-1.8.0.zip atk-dev-1.9.0.zip You will also need to download and extract the following zip files to c:/msys: glib-dev-2.6.4.zip libpng-1.2.7-lib.zip zlib-1.2.1-1-lib.zip libungif-4.1.4-lib.zip jpeg-6b-3-lib.zip tiff-3.6.1-2-lib.zip If you want to compile the internationlized version you will need to download and extract to c:/msys the following zip files from http://sourceforge.net/projects/gettext : gettext-runtime-0.13.1.bin.woe32.zip gettext-tools-0.13.1.bin.woe32.zip libiconv-1.9.1.bin.woe32.zip For some reason I needed to move c:/msys/bin/msgfmt & xgettext to c:/msys/local/bin/ in order to get it to run properly. If you have trouble running msgfmt you may need to do the same. 3) Download the latest mtPaint sources and unpack them to c:/msys. 4) To compile the code you must then use MSYS to "./configure", then "make" and "make install" 5) If all goes well, you should have mtpaint.exe which you can run using the same method described above. You may have compiled mtPaint using more recent versions of libraries so you may need to change the filenames, such as libpng12.dll -> libpng13.dll and libungif.dll -> libungif4.dll. Because I very rarely use Windows, I am sadly unable to support any other version of GTK+ but the one in the official package. That is, while mtPaint should in principle be able to compile and run with any version of GTK+2, only the packaged version has undergone real testing on Windows, and has been patched to fix all known Windows-specific bugs in it. ------- Credits ------- mtPaint is maintained by Dmitry Groshev. wjaguar@users.sourceforge.net http://mtpaint.sourceforge.net/ The following people (in alphabetical order) have contributed directly to the project, and are therefore worthy of gracious thanks for their generosity and hard work: Authors Dmitry Groshev - Contributing developer for version 2.30. Lead developer and maintainer from version 3.00 to the present. Mark Tyler - Original author and maintainer up to version 3.00, occasional contributor thereafter. Xiaolin Wu - Wrote the Wu quantizing method - see wu.c for more information. General Contributions (Feedback and Ideas for improvements unless otherwise stated) Abdulla Al Muhairi - Website redesign April 2005 Alan Horkan Alexandre Prokoudine Antonio Andrea Bianco Dennis Lee Donald White Ed Jason Eddie Kohler - Created Gifsicle which is needed for the creation and viewing of animated GIF files http://www.lcdf.org/gifsicle/ Guadalinex Team (Junta de Andalucia) - man page, Launchpad/Rosetta registration Lou Afonso Magnus Hjorth Martin Zelaia Pasi Kallinen Pavel Ruzicka Puppy Linux (Barry Kauler) Vlastimil Krejcir William Kern Translations Brazilian Portuguese - Paulo Trevizan, Valter Nazianzeno Czech - Pavel Ruzicka, Martin Petricek, Roman Hornik Dutch - Hans Strijards French - Nicolas Velin, Pascal Billard, Sylvain Cresto, Johan Serre, Philippe Etienne Galician - Miguel Anxo Bouzada German - Oliver Frommel, B. Clausius, Ulrich Ringel Hungarian - Ur Balazs Italian - Angelo Gemmi Japanese - Norihiro YONEDA Polish - Bartosz Kaszubowski, LucaS Portuguese - Israel G. Lugo, Tiago Silva Russian - Sergey Irupin, Dmitry Groshev Simplified Chinese - Cecc Slovak - Jozef Riha Spanish - Guadalinex Team (Junta de Andalucia), Antonio Sanchez Leon, Miguel Anxo Bouzada, Francisco Jose Rey, Adolfo Jayme Swedish - Daniel Nylander, Daniel Eriksson Tagalog - Anjelo delCarmen Taiwanese Chinese - Wei-Lun Chao Turkish - Muhammet Kara, Tutku Dalmaz