Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef _RASTER_H_
Toshihiro Shimizu 890ddd
#define _RASTER_H_
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tmacro.h"
Toshihiro Shimizu 890ddd
//#include "img.h"
Toshihiro Shimizu 890ddd
#include "tcm.h"
Toshihiro Shimizu 890ddd
//#include "affine.h"
Toshihiro Shimizu 890ddd
#include "machine.h"
Toshihiro Shimizu 890ddd
#include "pixel.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <string></string>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef TNZAPI
Toshihiro Shimizu 890ddd
#ifdef TNZ_IS_RASTERLIB
Toshihiro Shimizu 890ddd
#define TNZAPI TNZ_EXPORT_API
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define TNZAPI TNZ_IMPORT_API
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef enum {
Shinya Kitaoka 120a6e
  RAS_NONE,
Shinya Kitaoka 120a6e
  RAS_GR8,    /* grey tones, 8 bits */
Shinya Kitaoka 120a6e
  RAS_GR16,   /* grey tones, 16 bits */
Shinya Kitaoka 120a6e
  RAS_RGBM,   /* LPIXEL, matte channel considered */
Shinya Kitaoka 120a6e
  RAS_RGBM64, /* SPIXEL, matte channel considered */
Shinya Kitaoka 120a6e
  RAS_RGB_64, /* SPIXEL, matte channel ignored */
Shinya Kitaoka 120a6e
  RAS_CM32,   /* cmapped, 12+12+8 bits (ink, paint, ramp) */
Shinya Kitaoka 120a6e
  RAS_HOW_MANY
Toshihiro Shimizu 890ddd
} RAS_TYPE;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef VECCHIO
Shinya Kitaoka fd19c4
typedef enum {
Shinya Kitaoka fd19c4
  RAS_NONE,
Shinya Kitaoka fd19c4
  RAS_BW,       // 1 bit, B=0, W=1, first pixel in bit 7
Shinya Kitaoka fd19c4
  RAS_WB,       // "    , W=0, B=1, "
Shinya Kitaoka fd19c4
  RAS_GR8,      // grey tones, 8 bits
Shinya Kitaoka fd19c4
  RAS_CM8,      // color-mapped,  8 bits
Shinya Kitaoka fd19c4
  RAS_GR16,     // grey tones, 16 bits
Shinya Kitaoka fd19c4
  RAS_RGB16,    // RGB 5+6+5 bits, red most significant
Shinya Kitaoka fd19c4
  RAS_RLEBW,    // 1 bit compressed(quick casm format)
Shinya Kitaoka fd19c4
  RAS_RGB,      // 1 byte per color channel/
Shinya Kitaoka fd19c4
  RAS_RGB_,     // LPIXEL, matte channel ignored, for display
Shinya Kitaoka fd19c4
  RAS_RGBM,     // LPIXEL, matte channel considered
Shinya Kitaoka fd19c4
  RAS_RGBM64,   // SPIXEL, matte channel considered
Shinya Kitaoka fd19c4
  RAS_RGB_64,   // SPIXEL, matte channel ignored
Shinya Kitaoka fd19c4
  RAS_MBW16,    // 16 images of 1 bit per pixel, B=0, W=1
Shinya Kitaoka fd19c4
  RAS_CM8S4,    // cmapped,  8 bits, standard SGI  16-color colormap
Shinya Kitaoka fd19c4
  RAS_CM8S8,    // cmapped,  8 bits, standard SGI 256-color colormap
Shinya Kitaoka fd19c4
  RAS_CM16S4,   // cmapped, 16 bits, standard SGI  16-color colormap
Shinya Kitaoka fd19c4
  RAS_CM16S8,   // cmapped, 16 bits, standard SGI 256-color colormap
Shinya Kitaoka fd19c4
  RAS_CM16S12,  // cmapped, 16 bits, standard SGI+Toonz 4096-color colormap
Shinya Kitaoka fd19c4
  // RAS_CM24, // cmapped, 8+8+8 bits (ink, paint, ramp), +8 bits extra (MSB)
Shinya Kitaoka fd19c4
  RAS_CM16,  // color-mapped, 16 bits
Shinya Kitaoka fd19c4
  RAS_CM32,  // cmapped, 12+12+8 bits (ink, paint, ramp)
Shinya Kitaoka fd19c4
  RAS_HOW_MANY
Shinya Kitaoka fd19c4
} RAS_TYPE;
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
typedef struct {
Shinya Kitaoka 120a6e
  LPIXEL *buffer; /* colormap buffer for <= 16 bits or for 32 bits (otherwise
Shinya Kitaoka 120a6e
                     NIL) */
Shinya Kitaoka 120a6e
  TCM_INFO info;  /* toonz colormap info, see tcm.h */
Toshihiro Shimizu 890ddd
} RAS_CMAP;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef struct _RASTER {
Shinya Kitaoka 120a6e
  RAS_TYPE type;       /* image type */
Shinya Kitaoka 120a6e
  void *native_buffer; /* allocated buffer, if != NIL free this one */
Shinya Kitaoka 120a6e
  void *buffer;        /* (sub)image start address */
Shinya Kitaoka 120a6e
  UCHAR *native_extra; /* allocated extra, if != NIL free this one */
Shinya Kitaoka 120a6e
  UCHAR *extra;        /* (sub)extra information (patches...) start addr */
Shinya Kitaoka 120a6e
  UCHAR extra_mask;    /* used extra bits in buffer (for CM24) or extra */
Shinya Kitaoka 120a6e
  int bit_offs;        /* for bw/wb only: bit offset of first pixel */
Shinya Kitaoka 120a6e
  int multimask;       /* for multibw only: ith bit==1 -> img in ith pos */
Shinya Kitaoka 120a6e
  int wrap;            /* pixel wrap for y direction */
Shinya Kitaoka 120a6e
  int lx, ly;          /* x and y lengths */
Shinya Kitaoka 120a6e
  RAS_CMAP cmap;
Shinya Kitaoka 120a6e
  char *cacheId;
Shinya Kitaoka 120a6e
  int cacheIdLength;
Toshihiro Shimizu 890ddd
} RASTER;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef enum {
Shinya Kitaoka 120a6e
  FLT_NONE,
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  FLT_TRIANGLE, /* triangle filter */
Shinya Kitaoka 120a6e
  FLT_MITCHELL, /* Mitchell-Netravali filter */
Shinya Kitaoka 120a6e
  FLT_CUBIC_5,  /* cubic convolution, a = .5 */
Shinya Kitaoka 120a6e
  FLT_CUBIC_75, /* cubic convolution, a = .75 */
Shinya Kitaoka 120a6e
  FLT_CUBIC_1,  /* cubic convolution, a = 1 */
Shinya Kitaoka 120a6e
  FLT_HANN2,    /* Hann window, rad = 2 */
Shinya Kitaoka 120a6e
  FLT_HANN3,    /* Hann window, rad = 3 */
Shinya Kitaoka 120a6e
  FLT_HAMMING2, /* Hamming window, rad = 2 */
Shinya Kitaoka 120a6e
  FLT_HAMMING3, /* Hamming window, rad = 3 */
Shinya Kitaoka 120a6e
  FLT_LANCZOS2, /* Lanczos window, rad = 2 */
Shinya Kitaoka 120a6e
  FLT_LANCZOS3, /* Lanczos window, rad = 3 */
Shinya Kitaoka 120a6e
  FLT_GAUSS,    /* Gaussian convolution */
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  FLT_HOW_MANY
Toshihiro Shimizu 890ddd
} FLT_TYPE;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define RASRAS(type1, type2) ((type1)*RAS_HOW_MANY + (type2))
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define RASRASRAS(type1, type2, type3) RASRAS(RASRAS((type1), (type2)), (type3))
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define RASRASRASRAS(type1, type2, type3, type4)                               \
Shinya Kitaoka 120a6e
  RASRAS(RASRASRAS((type1), (type2), (type3)), (type4))
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*===========================================================================*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* About extra information:
Toshihiro Shimizu 890ddd
 * If the raster is of type RAS_CM24, the extra information is contained
Toshihiro Shimizu 890ddd
 * in the extra upper byte (XUB) of the longword containing pixel information.
Toshihiro Shimizu 890ddd
 * For all other buffer types, the extra information is contained in the extra
Toshihiro Shimizu 890ddd
 * buffer, which is a byte buffer. If a bit in the extra_mask is 0, then all
Toshihiro Shimizu 890ddd
 * corresponding bits of the extra are to be considered as 0, even if they are
Toshihiro Shimizu 890ddd
 * not 0. In other words, the extra_mask must be ANDed with all extra bytes
Toshihiro Shimizu 890ddd
 * before they are used. If the whole extra_mask is 0, then the extra buffer
Toshihiro Shimizu 890ddd
 * may be NIL (unless the type is RAS_CM24, in which case the extra buffer
Toshihiro Shimizu 890ddd
 * is always NIL because the XUB is used).
Toshihiro Shimizu 890ddd
 * No raster operation may change the extra_mask of an argument.
Toshihiro Shimizu 890ddd
 * Unless otherwise stated, raster operations having one input raster
Toshihiro Shimizu 890ddd
 * and one output raster copy or transform those bits of extra information
Toshihiro Shimizu 890ddd
 * which are set in both input and output extra_masks, and zero those bits
Toshihiro Shimizu 890ddd
 * which are set in the output extra_mask but not in the input extra_mask.
Toshihiro Shimizu 890ddd
 * All other raster operations leave the extra information of the output
Toshihiro Shimizu 890ddd
 * raster untouched (unless otherwise stated).
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef LEVO
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
/* The RASTER structures in these functions must have already been allocated
Toshihiro Shimizu 890ddd
 * (can be automatic vars)
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void create_raster(RASTER *raster, int xsize, int ysize, RAS_TYPE type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* also allocates the extra buffer if needed
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void create_raster_with_extra(RASTER *raster, int xsize, int ysize,
Shinya Kitaoka 120a6e
                                     RAS_TYPE type, UCHAR extra_mask);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* does NOT allocate a buffer for rout, only adjusts the pointer in the buffer
Toshihiro Shimizu 890ddd
 * (and maybe in the extra buffer) of rin.
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI int create_subraster(RASTER *rin, RASTER *rout, int x0, int y0, int x1,
Shinya Kitaoka 120a6e
                            int y1);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* DOES allocate a new buffer (and maybe a new extra buffer),
Toshihiro Shimizu 890ddd
 * but does NOT create [a] new colormap buffer[s].
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void clone_raster(RASTER *rin, RASTER *rout);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void convert_raster(RASTER *r, RAS_TYPE type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* The RASTER structure is zeroed but not freed (can be an automatic var)
Shinya Kitaoka 120a6e
 * It is recommended to use release_raster if the raster was created with
Toshihiro Shimizu 890ddd
 * the function create_raster.
Toshihiro Shimizu 890ddd
 * Also calls rop_clear_extra()
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void release_raster(RASTER *raster);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Zeroes extra_mask and releases the extra buffer if present.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_clear_extra(RASTER *raster);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Zeroes the patch bits in extra_mask and releases the extra buffer
Toshihiro Shimizu 890ddd
 * if extra_mask becomes zero and the extra buffer exists.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_clear_patches(RASTER *raster);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Zeroes the non-patch bits in extra_mask and releases the extra buffer
Toshihiro Shimizu 890ddd
 * if extra_mask becomes zero and the extra buffer exists.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_clear_extra_but_not_patches(RASTER *raster);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* The following two functions do NOT copy image buffers, nor extra buffers.
Toshihiro Shimizu 890ddd
 * For cmapped images, the pointers to the cmap buffers are left to NIL
Toshihiro Shimizu 890ddd
 * unless build_cmap is TRUE, in which case [a] new cmap buffer[s] is/are
Toshihiro Shimizu 890ddd
 * allocated and filled.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_image_to_raster(IMAGE *img, RASTER *ras, int build_cmap);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_subimage_to_raster(IMAGE *img, int img_x0, int img_y0,
Shinya Kitaoka 120a6e
                                   int img_x1, int img_y1, RASTER *ras,
Shinya Kitaoka 120a6e
                                   int build_cmap);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* number of bits per pixel
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI int rop_pixbits(RAS_TYPE rastertype);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* number of bytes per pixel (rounded up)
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI int rop_pixbytes(RAS_TYPE rastertype);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* whether or not there may be unused bits at the end of the line
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI int rop_fillerbits(RAS_TYPE rastertype);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI RAS_TYPE rop_standard_ras_type_of_pix_type(PIX_TYPE pix_type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI PIX_TYPE rop_pix_type_of_ras_type(RAS_TYPE ras_type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* premultiply fullcolor rasters; lx and ly must be equal.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_premultiply(RASTER *rin, RASTER *rout);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* copy region delimited by (x1,y1) and (x2,y2) onto region
Toshihiro Shimizu 890ddd
 * with first pixel in (newx,newy);
Toshihiro Shimizu 890ddd
 * when used to color quantize images, image buffer of rout may be same
Toshihiro Shimizu 890ddd
 * of rin;
Shinya Kitaoka 120a6e
 * also calls rop_copy_extra (or acts equivalently).
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_copy(RASTER *rin, RASTER *rout, int x1, int y1, int x2, int y2,
Shinya Kitaoka 120a6e
                     int newx, int newy);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_copy, but only on the extra information
Toshihiro Shimizu 890ddd
 * (extra buffers may be NIL).
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_copy_extra(RASTER *rin, RASTER *rout, int x1, int y1, int x2,
Shinya Kitaoka 120a6e
                           int y2, int newx, int newy);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* copy region delimited by (x1,y1) and (x2,y2) onto region
Toshihiro Shimizu 890ddd
 * with first pixel in (newx,newy),
Toshihiro Shimizu 890ddd
 * mirroring horizontally if mirror is odd,
Toshihiro Shimizu 890ddd
 * then rotating counterclockwise by given multiple of ninety (may be <0).
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_copy_90(RASTER *rin, RASTER *rout, int x1, int y1, int x2,
Shinya Kitaoka 120a6e
                        int y2, int newx, int newy, int mirror, int ninety);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_copy, but reduce by the given linear factor by subsampling.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_shrink(RASTER *rin, RASTER *rout, int x1, int y1, int x2,
Shinya Kitaoka 120a6e
                       int y2, int newx, int newy, int factor);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_copy, but zoom out by averaging some of the pixels
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_zoom_out(RASTER *rin, RASTER *rout, int x1, int y1, int x2,
Shinya Kitaoka 120a6e
                         int y2, int newx, int newy, int abs_zoom_level);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* see both rop_zoom_out and rop_copy_90 (combined effect)
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_zoom_out_90(RASTER *rin, RASTER *rout, int x1, int y1, int x2,
Shinya Kitaoka 120a6e
                            int y2, int newx, int newy, int abs_zoom_level,
Shinya Kitaoka 120a6e
                            int mirror, int ninety);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* clear region delimited by (x1,y1) and (x2,y2) (extra is not altered)
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_clear(RASTER *r, int x1, int y1, int x2, int y2);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* does not alter nor consider extra_mask,
Toshihiro Shimizu 890ddd
 * simply returns if type is not RAS_CM24 and the extra buffer is NIL.
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
void rop_and_extra_bits(RASTER *ras, UCHAR and_mask, int x1, int y1, int x2,
Shinya Kitaoka 120a6e
                        int y2);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_sharpen(RASTER *rin, RASTER *rout, int sharpen_max_corr);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
/* perform a female matte operation, the result raster may coincide with
Toshihiro Shimizu 890ddd
 * the bottom raster,lx and ly are the ones of the result raster,
Toshihiro Shimizu 890ddd
 * rasters must have a matte channel.
Toshihiro Shimizu 890ddd
 * female: pixmatte.m == 0 -> pixmatted.m = 0.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_female_matte(RASTER *rmatted, RASTER *rmatte, RASTER *rres);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
/* perform a male matte operation, the result raster may coincide with
Toshihiro Shimizu 890ddd
 * the bottom raster, lx and ly are the ones of the result raster,
Toshihiro Shimizu 890ddd
 * rasters must have a matte channel.
Toshihiro Shimizu 890ddd
 * male: pixmatte.m == 0 -> pixmatted.m = 255.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_male_matte(RASTER *rmatted, RASTER *rmatte, RASTER *rres);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* overlay a raster on a color (a colorcard),
Toshihiro Shimizu 890ddd
 * the result raster may coincide with the bottom raster,
Toshihiro Shimizu 890ddd
 * lx and ly are the ones of the result raster.
Toshihiro Shimizu 890ddd
 * From the point of view of extra information, behaves like a function
Toshihiro Shimizu 890ddd
 * with three raster arguments.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_ovr_rgbm(int r, int g, int b, int m, RASTER *rtop,
Shinya Kitaoka 120a6e
                         RASTER *rovr);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* overlay two rasters, the result raster may coincide with the bottom raster,
Toshihiro Shimizu 890ddd
 * lx and ly are the ones of the result raster,
Toshihiro Shimizu 890ddd
 * if the bottom raster is opaque but is RAS_RGBM, it should be temporarily
Toshihiro Shimizu 890ddd
 * set to RAS_RGB_ for increased speed.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_ovr_2(RASTER *rbot, RASTER *rtop, RASTER *rovr);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
/* overlay two rasters, one of them is a greytones one.
Toshihiro Shimizu 890ddd
 * the result raster may coincide with the bottom raster,
Toshihiro Shimizu 890ddd
 * lx and ly are the ones of the result raster,
Toshihiro Shimizu 890ddd
 * if the bottom raster is opaque but is RAS_RGBM, it should be temporarily
Toshihiro Shimizu 890ddd
 * set to RAS_RGB_ for increased speed.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_ovr_gr_2(RASTER *rbot, RASTER *rtop, RASTER *rovr,
Shinya Kitaoka 120a6e
                         LPIXEL color);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_ovr_2, but only those patches which correspond to set bits in
Toshihiro Shimizu 890ddd
 * botmask and topmask are selected, unselected pixels are set to transparent
Toshihiro Shimizu 890ddd
 * (rop_ovr_2 is the special case with both masks set to 0xff) (masks are not
Toshihiro Shimizu 890ddd
 * to be confused with extra_masks, which have only 3 bits for patches).
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_ovr_patches(RASTER *rbot, UCHAR botmask, RASTER *rtop,
Shinya Kitaoka 120a6e
                            UCHAR topmask, RASTER *rovr);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_ovr_patches with a transparent second buffer:
Toshihiro Shimizu 890ddd
 * only those patches which correspond to set bits in mask are selected.
Toshihiro Shimizu 890ddd
 * Only non-patch extra information is copied, provided that the corresponding
Toshihiro Shimizu 890ddd
 * bits are set in rout->extra_mask.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_filter_patches(RASTER *rin, UCHAR mask, RASTER *rout);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* overlay 3 rasters, the result raster may coincide with the bottom raster,
Toshihiro Shimizu 890ddd
 * lx and ly are the ones of the result raster,
Toshihiro Shimizu 890ddd
 * if the bottom raster is opaque but is RAS_RGBM, it should be temporarily
Toshihiro Shimizu 890ddd
 * set to RAS_RGB_ for increased speed.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_ovr_3(RASTER *rbot, RASTER *rmid, RASTER *rtop, RASTER *rovr);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* overlay n rasters, the result raster may coincide with the bottom raster,
Toshihiro Shimizu 890ddd
 * rtop[n-1] is the topmost raster,
Toshihiro Shimizu 890ddd
 * lx and ly are the ones of the result raster,
Toshihiro Shimizu 890ddd
 * if the bottom raster is opaque but is RAS_RGBM, it should be temporarily
Toshihiro Shimizu 890ddd
 * set to RAS_RGB_ for increased speed.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
TNZAPI void rop_ovr_n(RASTER *rbot, RASTER **rtop, int n, RASTER *rovr);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_ovr_2, but zooming out at the same time (see rop_zoom_out)
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_zoom_out_ovr_2(RASTER *rbot, RASTER *rtop, RASTER *rovr,
Shinya Kitaoka 120a6e
                               int abs_zoom_level);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_ovr_3, but zooming out at the same time (see rop_zoom_out)
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_zoom_out_ovr_3(RASTER *rbot, RASTER *rmid, RASTER *rtop,
Shinya Kitaoka 120a6e
                               RASTER *rovr, int abs_zoom_level);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_ovr_n, but zooming out at the same time (see rop_zoom_out)
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
TNZAPI void rop_zoom_out_ovr_n(RASTER *rbot, RASTER **rtop, int n, RASTER *rovr,
Shinya Kitaoka 120a6e
                               int abs_zoom_level);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_ovr_2, but simply computes 1/4*bottom + 3/4*top;
Toshihiro Shimizu 890ddd
 * if the bottom buffer is NIL, white is assumed
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_onion(RASTER *rbot, RASTER *rtop, RASTER *rovr);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* like rop_zoom_out_ovr_2, but simply computes 1/4*bottom + 3/4*top;
Toshihiro Shimizu 890ddd
 * if the bottom buffer is NIL, white is assumed
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_zoom_out_onion(RASTER *rbot, RASTER *rtop, RASTER *rovr,
Shinya Kitaoka 120a6e
                               int abs_zoom_level);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* convolve with a 3x3 matrix, mapping point (dx,dy) onto (0,0),
Toshihiro Shimizu 890ddd
 * using floating point calculations
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_conv_3(RASTER *rin, RASTER *rout, int dx, int dy,
Shinya Kitaoka 120a6e
                       double conv[]);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* convolve with a 3x3 matrix, mapping point (dx,dy) onto (0,0),
Toshihiro Shimizu 890ddd
 * using integer calculations
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_conv_3_i(RASTER *rin, RASTER *rout, int dx, int dy,
Shinya Kitaoka 120a6e
                         double conv[]);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* move by dx in x direction and by dy in y direction
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_fracmove(RASTER *rin, RASTER *rout, double dx, double dy);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* scale by sx in x direction and by sy in y direction,
Toshihiro Shimizu 890ddd
 * mapping point (cxin,cyin) onto (cxout,cyout),
Toshihiro Shimizu 890ddd
 * using given filtertype and blur factor (1 means normal filter width)
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
TNZAPI void rop_scale(RASTER *rin, RASTER *rout, double sx, double sy,
Shinya Kitaoka 120a6e
                      double cxin, double cyin, double cxout, double cyout,
Shinya Kitaoka 120a6e
                      FLT_TYPE filtertype, double blur);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* rotate by angle in radians (infinite range), mapping point (cxin,cyin)
Toshihiro Shimizu 890ddd
 * onto (cxout,cyout)
Toshihiro Shimizu 890ddd
 */
Shinya Kitaoka 120a6e
TNZAPI void rop_rotate(RASTER *rin, RASTER *rout, double angle, double cxin,
Shinya Kitaoka 120a6e
                       double cyin, double cxout, double cyout);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_rotate_sin(RASTER *rin, RASTER *rout, double sin, double cos,
Shinya Kitaoka 120a6e
                           double cxin, double cyin, double cxout,
Shinya Kitaoka 120a6e
                           double cyout);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void get_flt_fun_rad(FLT_TYPE flt_type, double (**flt_fun)(double),
Shinya Kitaoka 120a6e
                            double *flt_rad);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_resample(RASTER *rin, RASTER *rout, AFFINE aff,
Shinya Kitaoka 120a6e
                         FLT_TYPE flt_type, double blur);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_resample_tcm(RASTER *rin, RASTER *rout, AFFINE aff,
Shinya Kitaoka 120a6e
                             FLT_TYPE flt_type, double blur, TCM_INFO tcm_info);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*---------------------------------------------------------------------------*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_add_white_to_cmap(RASTER *ras);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_remove_white_from_cmap(RASTER *ras);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI LPIXEL premult_lpixel(LPIXEL lpixel);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI LPIXEL unpremult_lpixel(LPIXEL lpixel);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_fill_cmap_ramp(RASTER *ras, TCM_INFO info, LPIXEL color,
Shinya Kitaoka 120a6e
                               LPIXEL pencil, int color_index, int pencil_index,
Shinya Kitaoka 120a6e
                               int already_premultiplied);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_fill_cmap_colramp(RASTER *ras, TCM_INFO info, LPIXEL color,
Shinya Kitaoka 120a6e
                                  int color_index, int already_premultiplied);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_fill_cmap_penramp(RASTER *ras, TCM_INFO info, LPIXEL pencil,
Shinya Kitaoka 120a6e
                                  int pencil_index, int already_premultiplied);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_custom_fill_cmap_ramp(RASTER *ras, TCM_INFO info, LPIXEL color,
Shinya Kitaoka 120a6e
                                      LPIXEL pencil, int color_index,
Shinya Kitaoka 120a6e
                                      int pencil_index,
Shinya Kitaoka 120a6e
                                      int already_premultiplied,
Shinya Kitaoka 120a6e
                                      int *custom_tone);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_custom_fill_cmap_colramp(RASTER *ras, TCM_INFO info,
Shinya Kitaoka 120a6e
                                         LPIXEL color, int color_index,
Shinya Kitaoka 120a6e
                                         int already_premultiplied,
Shinya Kitaoka 120a6e
                                         int *custom_tone);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_custom_fill_cmap_penramp(RASTER *ras, TCM_INFO info,
Shinya Kitaoka 120a6e
                                         LPIXEL pencil, int pencil_index,
Shinya Kitaoka 120a6e
                                         int already_premultiplied,
Shinya Kitaoka 120a6e
                                         int *custom_tone);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_fill_cmap_buffer(RASTER *ras, TCM_INFO info, LPIXEL *color,
Shinya Kitaoka 120a6e
                                 LPIXEL *pencil, int already_premultiplied);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_fill_cmap_colbuffer(RASTER *ras, TCM_INFO info, LPIXEL *color,
Shinya Kitaoka 120a6e
                                    int already_premultiplied);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_fill_cmap_penbuffer(RASTER *ras, TCM_INFO info, LPIXEL *pencil,
Shinya Kitaoka 120a6e
                                    int already_premultiplied);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_custom_fill_cmap_buffer(RASTER *ras, TCM_INFO info,
Shinya Kitaoka 120a6e
                                        LPIXEL *color, LPIXEL *pencil,
Shinya Kitaoka 120a6e
                                        int already_premultiplied,
Shinya Kitaoka 120a6e
                                        int *custom_tone);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_custom_fill_cmap_colbuffer(RASTER *ras, TCM_INFO info,
Shinya Kitaoka 120a6e
                                           LPIXEL *color,
Shinya Kitaoka 120a6e
                                           int already_premultiplied,
Shinya Kitaoka 120a6e
                                           int *custom_tone);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_custom_fill_cmap_penbuffer(RASTER *ras, TCM_INFO info,
Shinya Kitaoka 120a6e
                                           LPIXEL *pencil,
Shinya Kitaoka 120a6e
                                           int already_premultiplied,
Shinya Kitaoka 120a6e
                                           int *custom_tone);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*---------------------------------------------------------------------------*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI TDRECT rop_transform_region(TDRECT src, AFFINE placement);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TNZAPI void rop_lineart_fullcolor(RASTER *r, LPIXEL *colors, int num_colors,
Shinya Kitaoka 120a6e
                                  TBOOL only_edges);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_lineart_palette(IMAGE *plt, int threshold, TBOOL only_edges);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*---------------------------------------------------------------------------*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* N.B rin and rout can be the same */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void rop_mirror(RASTER *rin, RASTER *rout, TBOOL is_vertical);
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif