mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-23 13:01:42 +00:00
9529e1e696
2000-05-29 Sven Neumann <sven@gimp.org> * app/Makefile.am * app/paint_core.c * app/paint_core_kernels.h: moved brush subsampling kernels into its own header file and generated a slightly different kernel (using the new kernelgen tool, see below). The new kernel simulates a circular brush instead of a rectangular one and gives slightly different (lighter) results. * app/gimage_mask.c: when stroking a selection, offset the points by 0.5 to align the brushes with the pixel grid. This lets you create 1-pixel wide rectangles and ellipses. * tools/Makefile.am * tools/kernelgen.c: simple hack to generate subsampling kernels.
50 lines
1.6 KiB
C
50 lines
1.6 KiB
C
/* paint_core_kernels.h
|
|
*
|
|
* This file was generated using kernelgen as found in the tools dir.
|
|
* (threshold = 0.25)
|
|
*/
|
|
|
|
#define KERNEL_WIDTH 3
|
|
#define KERNEL_HEIGHT 3
|
|
#define SUBSAMPLE 4
|
|
|
|
|
|
/* Brush pixel subsampling kernels */
|
|
static const int subsample[5][5][9] = {
|
|
{
|
|
{ 64, 64, 0, 64, 64, 0, 0, 0, 0, },
|
|
{ 25, 102, 0, 25, 102, 0, 0, 0, 0, },
|
|
{ 0, 128, 0, 0, 128, 0, 0, 0, 0, },
|
|
{ 0, 102, 25, 0, 102, 25, 0, 0, 0, },
|
|
{ 0, 64, 64, 0, 64, 64, 0, 0, 0, }
|
|
},
|
|
{
|
|
{ 25, 25, 0, 102, 102, 0, 0, 0, 0, },
|
|
{ 6, 43, 0, 43, 162, 0, 0, 0, 0, },
|
|
{ 0, 50, 0, 0, 205, 0, 0, 0, 0, },
|
|
{ 0, 43, 6, 0, 162, 43, 0, 0, 0, },
|
|
{ 0, 25, 25, 0, 102, 102, 0, 0, 0, }
|
|
},
|
|
{
|
|
{ 0, 0, 0, 128, 128, 0, 0, 0, 0, },
|
|
{ 0, 0, 0, 50, 205, 0, 0, 0, 0, },
|
|
{ 0, 0, 0, 0, 256, 0, 0, 0, 0, },
|
|
{ 0, 0, 0, 0, 205, 50, 0, 0, 0, },
|
|
{ 0, 0, 0, 0, 128, 128, 0, 0, 0, }
|
|
},
|
|
{
|
|
{ 0, 0, 0, 102, 102, 0, 25, 25, 0, },
|
|
{ 0, 0, 0, 43, 162, 0, 6, 43, 0, },
|
|
{ 0, 0, 0, 0, 205, 0, 0, 50, 0, },
|
|
{ 0, 0, 0, 0, 162, 43, 0, 43, 6, },
|
|
{ 0, 0, 0, 0, 102, 102, 0, 25, 25, }
|
|
},
|
|
{
|
|
{ 0, 0, 0, 64, 64, 0, 64, 64, 0, },
|
|
{ 0, 0, 0, 25, 102, 0, 25, 102, 0, },
|
|
{ 0, 0, 0, 0, 128, 0, 0, 128, 0, },
|
|
{ 0, 0, 0, 0, 102, 25, 0, 102, 25, },
|
|
{ 0, 0, 0, 0, 64, 64, 0, 64, 64, }
|
|
}
|
|
};
|