blob: 162d7d5a5f5315a500ea78dafcab831758176f3f [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
Cristyd8420112021-01-01 14:52:00 -05002 Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 dedicated to making software imaging solutions freely available.
4
Cristy57b308b2019-01-19 17:53:40 -05005 You may not use this file except in compliance with the License. You may
cristy3ed852e2009-09-05 21:47:34 +00006 obtain a copy of the License at
7
Cristy9ddfcca2018-09-09 19:46:34 -04008 https://imagemagick.org/script/license.php
cristy3ed852e2009-09-05 21:47:34 +00009
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 MagickCore cache view methods.
17*/
Cristy83bceaa2016-06-03 20:39:35 -040018#ifndef MAGICKCORE_CACHE_VIEW_H
19#define MAGICKCORE_CACHE_VIEW_H
cristy3ed852e2009-09-05 21:47:34 +000020
cristy6398ec72013-11-28 02:00:27 +000021#include "MagickCore/pixel.h"
22
cristy3ed852e2009-09-05 21:47:34 +000023#if defined(__cplusplus) || defined(c_plusplus)
24extern "C" {
25#endif
26
cristy3ed852e2009-09-05 21:47:34 +000027typedef enum
28{
29 UndefinedVirtualPixelMethod,
30 BackgroundVirtualPixelMethod,
cristy3ed852e2009-09-05 21:47:34 +000031 DitherVirtualPixelMethod,
32 EdgeVirtualPixelMethod,
33 MirrorVirtualPixelMethod,
34 RandomVirtualPixelMethod,
35 TileVirtualPixelMethod,
36 TransparentVirtualPixelMethod,
37 MaskVirtualPixelMethod,
38 BlackVirtualPixelMethod,
39 GrayVirtualPixelMethod,
40 WhiteVirtualPixelMethod,
41 HorizontalTileVirtualPixelMethod,
42 VerticalTileVirtualPixelMethod,
43 HorizontalTileEdgeVirtualPixelMethod,
44 VerticalTileEdgeVirtualPixelMethod,
45 CheckerTileVirtualPixelMethod
46} VirtualPixelMethod;
47
48typedef struct _CacheView
49 CacheView;
50
cristy0d267172011-04-25 20:13:48 +000051extern MagickExport CacheView
cristy46ff2672012-12-14 15:32:26 +000052 *AcquireAuthenticCacheView(const Image *,ExceptionInfo *),
53 *AcquireVirtualCacheView(const Image *,ExceptionInfo *),
cristy0d267172011-04-25 20:13:48 +000054 *CloneCacheView(const CacheView *),
55 *DestroyCacheView(CacheView *);
56
cristy3ed852e2009-09-05 21:47:34 +000057extern MagickExport ClassType
Cristy94eb2ec2018-11-11 10:46:30 -050058 GetCacheViewStorageClass(const CacheView *) magick_attribute((__pure__));
cristy3ed852e2009-09-05 21:47:34 +000059
60extern MagickExport ColorspaceType
Cristy94eb2ec2018-11-11 10:46:30 -050061 GetCacheViewColorspace(const CacheView *) magick_attribute((__pure__));
cristy3ed852e2009-09-05 21:47:34 +000062
cristye7516622012-04-29 14:22:45 +000063extern MagickExport const Image
Cristy94eb2ec2018-11-11 10:46:30 -050064 *GetCacheViewImage(const CacheView *) magick_attribute((__pure__));
cristye7516622012-04-29 14:22:45 +000065
cristy4c08aed2011-07-01 19:47:50 +000066extern MagickExport const Quantum
cristybb503372010-05-27 20:51:26 +000067 *GetCacheViewVirtualPixels(const CacheView *,const ssize_t,const ssize_t,
cristy19596d62012-02-19 00:24:59 +000068 const size_t,const size_t,ExceptionInfo *) magick_hot_spot,
69 *GetCacheViewVirtualPixelQueue(const CacheView *) magick_hot_spot;
cristy3ed852e2009-09-05 21:47:34 +000070
cristy4c08aed2011-07-01 19:47:50 +000071extern MagickExport const void
Cristy94eb2ec2018-11-11 10:46:30 -050072 *GetCacheViewVirtualMetacontent(const CacheView *)
73 magick_attribute((__pure__));
cristy4c08aed2011-07-01 19:47:50 +000074
cristy3ed852e2009-09-05 21:47:34 +000075extern MagickExport MagickBooleanType
cristy99ed6692015-05-31 17:11:33 +000076 GetOneCacheViewAuthenticPixel(const CacheView *,const ssize_t,const ssize_t,
77 Quantum *,ExceptionInfo *),
cristy2ed42f62011-10-02 19:49:57 +000078 GetOneCacheViewVirtualMethodPixel(const CacheView *,const VirtualPixelMethod,
79 const ssize_t,const ssize_t,Quantum *,ExceptionInfo *),
cristy99ed6692015-05-31 17:11:33 +000080 GetOneCacheViewVirtualPixel(const CacheView *,const ssize_t,const ssize_t,
81 Quantum *,ExceptionInfo *),
cristyf05d4942012-03-17 16:26:09 +000082 GetOneCacheViewVirtualPixelInfo(const CacheView *,const ssize_t,const ssize_t,
83 PixelInfo *,ExceptionInfo *),
cristyc82a27b2011-10-21 01:07:16 +000084 SetCacheViewStorageClass(CacheView *,const ClassType,ExceptionInfo *),
dirk05d2ff72015-11-18 23:13:43 +010085 SetCacheViewVirtualPixelMethod(CacheView *magick_restrict,
86 const VirtualPixelMethod),
87 SyncCacheViewAuthenticPixels(CacheView *magick_restrict,ExceptionInfo *)
cristya29f2b82015-05-30 14:10:30 +000088 magick_hot_spot;
cristy3ed852e2009-09-05 21:47:34 +000089
90extern MagickExport MagickSizeType
Cristy94eb2ec2018-11-11 10:46:30 -050091 GetCacheViewExtent(const CacheView *) magick_attribute((__pure__));
cristy3ed852e2009-09-05 21:47:34 +000092
cristy4c08aed2011-07-01 19:47:50 +000093extern MagickExport Quantum
cristy19596d62012-02-19 00:24:59 +000094 *GetCacheViewAuthenticPixelQueue(CacheView *) magick_hot_spot,
cristybb503372010-05-27 20:51:26 +000095 *GetCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t,
cristy19596d62012-02-19 00:24:59 +000096 const size_t,const size_t,ExceptionInfo *) magick_hot_spot,
cristybb503372010-05-27 20:51:26 +000097 *QueueCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t,
cristy19596d62012-02-19 00:24:59 +000098 const size_t,const size_t,ExceptionInfo *) magick_hot_spot;
cristy3ed852e2009-09-05 21:47:34 +000099
cristy4c08aed2011-07-01 19:47:50 +0000100extern MagickExport void
101 *GetCacheViewAuthenticMetacontent(CacheView *);
102
cristy3ed852e2009-09-05 21:47:34 +0000103#if defined(__cplusplus) || defined(c_plusplus)
104}
105#endif
106
107#endif