1 /*$ 2 Copyright (C) 2016-2020 Azel. 3 4 This file is part of AzPainterB. 5 6 AzPainterB is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 AzPainterB is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 $*/ 19 20 /******************************** 21 * TileImage 内部処理 22 ********************************/ 23 24 #ifndef TILEIMAGE_PV_H 25 #define TILEIMAGE_PV_H 26 27 typedef struct _TileImage TileImage; 28 typedef union _PixelRGBA PixelRGBA; 29 30 31 /* 作業用データ */ 32 33 typedef struct 34 { 35 uint8_t *blendbuf; //色合成テーブル (256*256) 36 int blend_curmode; //現在バッファにセットされている合成モード 37 38 PixelRGBA *finger_buf; //指先用バッファ 39 int finger_cursize; //指先用バッファの現在サイズ 40 41 int dotpen_subx, //ドット形状描画時のサブ位置 42 dotpen_suby; 43 }TileImageWorkData; 44 45 extern TileImageWorkData g_tileimage_work; 46 47 /* 合成用情報 */ 48 49 typedef struct 50 { 51 uint8_t *tile,*dst; 52 int sx,sy,dx,dy,w,h,pitch_dst,opacity; 53 uint8_t use_blendtable; 54 }TileImageBlendInfo; 55 56 57 /* TileImage_pv.c */ 58 59 TileImage *__TileImage_create(int type,int tilew,int tileh); 60 61 mBool __TileImage_allocTileBuf(TileImage *p); 62 uint8_t **__TileImage_allocTileBuf_new(int w,int h,mBool clear); 63 64 mBool __TileImage_resizeTileBuf(TileImage *p,int movx,int movy,int neww,int newh); 65 mBool __TileImage_resizeTileBuf_clone(TileImage *p,TileImage *src); 66 67 void __TileImage_setBlendInfo(TileImageBlendInfo *info,int px,int py,mRect *rcclip); 68 69 /* TileImage_pixel.c */ 70 71 uint8_t *__TileImage_getPixelBuf_new(TileImage *p,int x,int y); 72 73 /* TileImage_blendcolor.c */ 74 75 mBool __TileImage_setBlendColorTable(int mode); 76 void __TileImage_getBlendColor(int mode,PixelRGBA *src,PixelRGBA *dst); 77 78 #endif 79