PageRenderTime 16ms CodeModel.GetById 1ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/dmagick/c/cacheView.d

http://github.com/MikeWey/DMagick
D | 151 lines | 65 code | 35 blank | 51 comment | 3 complexity | 8d995070d3b6690480c54631ccafa642 MD5 | raw file
  1module dmagick.c.cacheView;
  2
  3import dmagick.c.colorspace;
  4import dmagick.c.exception;
  5import dmagick.c.image;
  6import dmagick.c.magickType;
  7import dmagick.c.magickVersion;
  8import dmagick.c.pixel;
  9
 10alias ptrdiff_t ssize_t;
 11
 12extern(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}