blob: aa39b2210cf33069c8d2df44b92fbcff8eb375d2 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
Cristyf6ff9ea2016-12-05 09:53:35 -05002 Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
Cristyf19d4142017-04-24 11:34:30 -04008 https://www.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
58 GetCacheViewStorageClass(const CacheView *);
59
60extern MagickExport ColorspaceType
61 GetCacheViewColorspace(const CacheView *);
62
cristye7516622012-04-29 14:22:45 +000063extern MagickExport const Image
64 *GetCacheViewImage(const CacheView *);
65
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
72 *GetCacheViewVirtualMetacontent(const CacheView *);
73
cristy3ed852e2009-09-05 21:47:34 +000074extern MagickExport MagickBooleanType
cristy99ed6692015-05-31 17:11:33 +000075 GetOneCacheViewAuthenticPixel(const CacheView *,const ssize_t,const ssize_t,
76 Quantum *,ExceptionInfo *),
cristy2ed42f62011-10-02 19:49:57 +000077 GetOneCacheViewVirtualMethodPixel(const CacheView *,const VirtualPixelMethod,
78 const ssize_t,const ssize_t,Quantum *,ExceptionInfo *),
cristy99ed6692015-05-31 17:11:33 +000079 GetOneCacheViewVirtualPixel(const CacheView *,const ssize_t,const ssize_t,
80 Quantum *,ExceptionInfo *),
cristyf05d4942012-03-17 16:26:09 +000081 GetOneCacheViewVirtualPixelInfo(const CacheView *,const ssize_t,const ssize_t,
82 PixelInfo *,ExceptionInfo *),
cristyc82a27b2011-10-21 01:07:16 +000083 SetCacheViewStorageClass(CacheView *,const ClassType,ExceptionInfo *),
dirk05d2ff72015-11-18 23:13:43 +010084 SetCacheViewVirtualPixelMethod(CacheView *magick_restrict,
85 const VirtualPixelMethod),
86 SyncCacheViewAuthenticPixels(CacheView *magick_restrict,ExceptionInfo *)
cristya29f2b82015-05-30 14:10:30 +000087 magick_hot_spot;
cristy3ed852e2009-09-05 21:47:34 +000088
89extern MagickExport MagickSizeType
90 GetCacheViewExtent(const CacheView *);
91
cristy4c08aed2011-07-01 19:47:50 +000092extern MagickExport Quantum
cristy19596d62012-02-19 00:24:59 +000093 *GetCacheViewAuthenticPixelQueue(CacheView *) magick_hot_spot,
cristybb503372010-05-27 20:51:26 +000094 *GetCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t,
cristy19596d62012-02-19 00:24:59 +000095 const size_t,const size_t,ExceptionInfo *) magick_hot_spot,
cristybb503372010-05-27 20:51:26 +000096 *QueueCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t,
cristy19596d62012-02-19 00:24:59 +000097 const size_t,const size_t,ExceptionInfo *) magick_hot_spot;
cristy3ed852e2009-09-05 21:47:34 +000098
cristy4c08aed2011-07-01 19:47:50 +000099extern MagickExport void
100 *GetCacheViewAuthenticMetacontent(CacheView *);
101
cristy3ed852e2009-09-05 21:47:34 +0000102#if defined(__cplusplus) || defined(c_plusplus)
103}
104#endif
105
106#endif