1 module dmagick.c.cacheView;
2 
3 import dmagick.c.colorspace;
4 import dmagick.c.exception;
5 import dmagick.c.image;
6 import dmagick.c.magickType;
7 import dmagick.c.magickVersion;
8 import dmagick.c.pixel;
9 
10 alias ptrdiff_t ssize_t;
11 
12 extern(C)
13 {
14 	/**
15 	 * Specify contents of virtual pixels.
16 	 */
17 	enum VirtualPixelMethod
18 	{
19 		/** */
20 		UndefinedVirtualPixelMethod,
21 
22 		/**
23 		 * The area surrounding the image is the background color.
24 		 */
25 		BackgroundVirtualPixelMethod,
26 		
27 		/** */
28 		ConstantVirtualPixelMethod,
29 		
30 		/**
31 		 * Non-random 32x32 dithered pattern.
32 		 */
33 		DitherVirtualPixelMethod,
34 		
35 		/**
36 		 * Extend the edge pixel toward infinity.
37 		 */
38 		EdgeVirtualPixelMethod,
39 		
40 		/**
41 		 * Mirror tile the image.
42 		 */
43 		MirrorVirtualPixelMethod,
44 		
45 		/**
46 		 * Choose a random pixel from the image.
47 		 */
48 		RandomVirtualPixelMethod,
49 		
50 		/**
51 		 * Tile the image.
52 		 */
53 		TileVirtualPixelMethod,
54 		
55 		/**
56 		 * The area surrounding the image is transparent blackness.
57 		 */
58 		TransparentVirtualPixelMethod,
59 		
60 		/** */
61 		MaskVirtualPixelMethod,
62 		
63 		/**
64 		 * The area surrounding the image is black.
65 		 */
66 		BlackVirtualPixelMethod,
67 		
68 		/**
69 		 * The area surrounding the image is gray.
70 		 */
71 		GrayVirtualPixelMethod,
72 		
73 		/**
74 		 * The area surrounding the image is white.
75 		 */
76 		WhiteVirtualPixelMethod,
77 		
78 		/**
79 		 * Horizontally tile the image, background color above/below.
80 		 */
81 		HorizontalTileVirtualPixelMethod,
82 		
83 		/**
84 		 * Vertically tile the image, sides are background color.
85 		 */
86 		VerticalTileVirtualPixelMethod,
87 		
88 		/**
89 		 * Horizontally tile the image and replicate the side edge pixels.
90 		 */
91 		HorizontalTileEdgeVirtualPixelMethod,
92 		
93 		/**
94 		 * Vertically tile the image and replicate the side edge pixels.
95 		 */
96 		VerticalTileEdgeVirtualPixelMethod,
97 		
98 		/**
99 		 * Alternate squares with image and background color.
100 		 */
101 		CheckerTileVirtualPixelMethod
102 	}
103 
104 	struct CacheView {}
105 
106 	static if ( MagickLibVersion >= 0x677 )
107 	{
108 		CacheView* AcquireAuthenticCacheView(const(Image)*, ExceptionInfo*);
109 	}
110 
111 	CacheView* AcquireCacheView(const(Image)*);
112 
113 	static if ( MagickLibVersion >= 0x677 )
114 	{
115 		CacheView* AcquireVirtualCacheView(const(Image)*, ExceptionInfo*);
116 	}
117 
118 	CacheView* CloneCacheView(const(CacheView)*);
119 	CacheView* DestroyCacheView(CacheView*);
120 
121 	ClassType GetCacheViewStorageClass(const(CacheView)*);
122 
123 	ColorspaceType GetCacheViewColorspace(const(CacheView)*);
124 
125 	const(IndexPacket)* GetCacheViewVirtualIndexQueue(const(CacheView)*);
126 
127 	const(PixelPacket)* GetCacheViewVirtualPixels(const(CacheView)*, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo*);
128 	const(PixelPacket)* GetCacheViewVirtualPixelQueue(const(CacheView)*);
129 
130 	ExceptionInfo* GetCacheViewException(const(CacheView)*);
131 
132 	IndexPacket* GetCacheViewAuthenticIndexQueue(CacheView*);
133 
134 	MagickBooleanType GetOneCacheViewVirtualPixel(const(CacheView)*, const ssize_t, const ssize_t, PixelPacket*, ExceptionInfo*);
135 	MagickBooleanType GetOneCacheViewVirtualMethodPixel(const(CacheView)*, const VirtualPixelMethod, const ssize_t, const ssize_t, PixelPacket*, ExceptionInfo*);
136 	MagickBooleanType GetOneCacheViewAuthenticPixel(const(CacheView)*, const ssize_t, const ssize_t, PixelPacket*, ExceptionInfo*);
137 	MagickBooleanType SetCacheViewStorageClass(CacheView*, const ClassType);
138 	MagickBooleanType SetCacheViewVirtualPixelMethod(CacheView*, const VirtualPixelMethod);
139 	MagickBooleanType SyncCacheViewAuthenticPixels(CacheView*, ExceptionInfo*);
140 
141 	MagickSizeType GetCacheViewExtent(const(CacheView)*);
142 
143 	static if ( MagickLibVersion >= 0x670 )
144 	{
145 		size_t GetCacheViewChannels(const(CacheView)*);
146 	}
147 
148 	PixelPacket* GetCacheViewAuthenticPixelQueue(CacheView*);
149 	PixelPacket* GetCacheViewAuthenticPixels(CacheView*, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo*);
150 	PixelPacket* QueueCacheViewAuthenticPixels(CacheView*, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo*);
151 }