% The format of the GetOneVirtualMagickPixel() method is:
%
% MagickBooleanType GetOneVirtualMagickPixel(const Image image,
-% const ssize_t x,const ssize_t y,PixelInfo *pixel,
-% ExceptionInfo exception)
+% const VirtualPixelMethod virtual_pixel_method,const ssize_t x,
+% const ssize_t y,PixelInfo *pixel,ExceptionInfo exception)
%
% A description of each parameter follows:
%
% o image: the image.
%
+% o virtual_pixel_method: the virtual pixel method.
+%
% o x,y: these values define the location of the pixel to return.
%
% o pixel: return a pixel at the specified (x,y) location.
%
*/
MagickExport MagickBooleanType GetOneVirtualMagickPixel(const Image *image,
- const ssize_t x,const ssize_t y,PixelInfo *pixel,ExceptionInfo *exception)
+ const VirtualPixelMethod virtual_pixel_method,const ssize_t x,const ssize_t y,
+ PixelInfo *pixel,ExceptionInfo *exception)
{
CacheInfo
*cache_info;
cache_info=(CacheInfo *) image->cache;
assert(cache_info->signature == MagickSignature);
assert(id < (int) cache_info->number_threads);
- p=GetVirtualPixelsFromNexus(image,GetPixelCacheVirtualMethod(image),x,y,
- 1UL,1UL,cache_info->nexus_info[id],exception);
+ p=GetVirtualPixelsFromNexus(image,virtual_pixel_method,x,y,1UL,1UL,
+ cache_info->nexus_info[id],exception);
GetPixelInfo(image,pixel);
if (p == (const Quantum *) NULL)
return(MagickFalse);
*GetVirtualMetacontent(const Image *);
extern MagickExport MagickBooleanType
- GetOneVirtualMagickPixel(const Image *,const ssize_t,const ssize_t,
- PixelInfo *,ExceptionInfo *),
+ GetOneVirtualMagickPixel(const Image *,const VirtualPixelMethod,
+ const ssize_t,const ssize_t,PixelInfo *,ExceptionInfo *),
GetOneVirtualPixel(const Image *,const ssize_t,const ssize_t,Quantum *,
ExceptionInfo *),
GetOneVirtualMethodPixel(const Image *,const VirtualPixelMethod,const ssize_t,
#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/cache.h"
+#include "MagickCore/cache-private.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/client.h"
#include "MagickCore/color.h"
}
default:
{
- (void) GetOneVirtualMagickPixel(composite_image,x-x_offset,y-
+ (void) GetOneVirtualMagickPixel(composite_image,
+ GetPixelCacheVirtualMethod(composite_image),x-x_offset,y-
y_offset,&composite,exception);
break;
}
#include "MagickCore/artifact.h"
#include "MagickCore/blob.h"
#include "MagickCore/cache.h"
+#include "MagickCore/cache-private.h"
#include "MagickCore/client.h"
#include "MagickCore/color.h"
#include "MagickCore/colorspace.h"
/*
Update color information using floodfill algorithm.
*/
- (void) GetOneVirtualMagickPixel(*image,(ssize_t) x_offset,
- (ssize_t) y_offset,&target,exception);
+ (void) GetOneVirtualMagickPixel(*image,
+ GetPixelCacheVirtualMethod(*image),(ssize_t) x_offset,(ssize_t)
+ y_offset,&target,exception);
if (method == FillToBorderMethod)
{
target.red=(MagickRealType)
/*
Update matte information using floodfill algorithm.
*/
- (void) GetOneVirtualMagickPixel(*image,(ssize_t) x_offset,
- (ssize_t) y_offset,&target,exception);
+ (void) GetOneVirtualMagickPixel(*image,
+ GetPixelCacheVirtualMethod(*image),(ssize_t) x_offset,(ssize_t)
+ y_offset,&target,exception);
if (method == FillToBorderMethod)
{
target.red=(MagickRealType) ScaleShortToQuantum(
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
#pragma omp critical
#endif
- status=GetOneVirtualMagickPixel(pattern,x+pattern->tile_offset.x,
- y+pattern->tile_offset.y,fill,exception);
+ status=GetOneVirtualMagickPixel(pattern,TileVirtualPixelMethod,x+
+ pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception);
return(status);
}
}
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
#pragma omp critical
#endif
- status=GetOneVirtualMagickPixel(pattern,x+pattern->tile_offset.x,y+
- pattern->tile_offset.y,stroke,exception);
+ status=GetOneVirtualMagickPixel(pattern,TileVirtualPixelMethod,x+
+ pattern->tile_offset.x,y+pattern->tile_offset.y,stroke,exception);
return(status);
}
}
PixelInfo
target;
- (void) GetOneVirtualMagickPixel(image,x,y,&target,exception);
+ (void) GetOneVirtualMagickPixel(image,TileVirtualPixelMethod,x,y,
+ &target,exception);
if (primitive_info->method == FillToBorderMethod)
{
target.red=(MagickRealType) draw_info->border_color.red;
PixelInfo
target;
- (void) GetOneVirtualMagickPixel(image,x,y,&target,exception);
+ (void) GetOneVirtualMagickPixel(image,TileVirtualPixelMethod,x,y,
+ &target,exception);
if (primitive_info->method == FillToBorderMethod)
{
target.red=(MagickRealType) draw_info->border_color.red;
/*
Show center pixel color.
*/
- (void) GetOneVirtualMagickPixel(windows->image.image,(ssize_t)
- windows->magnify.x,(ssize_t) windows->magnify.y,&pixel,exception);
+ (void) GetOneVirtualMagickPixel(windows->image.image,TileVirtualPixelMethod,
+ (ssize_t) windows->magnify.x,(ssize_t) windows->magnify.y,&pixel,exception);
(void) FormatLocaleString(tuple,MaxTextExtent,"%d,%d: ",
windows->magnify.x,windows->magnify.y);
(void) ConcatenateMagickString(tuple,"(",MaxTextExtent);
ThrowWandException(WandError,"ContainsNoImages",wand->name);
draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
PixelGetQuantumPacket(fill,&draw_info->fill);
- (void) GetOneVirtualMagickPixel(wand->images,x % wand->images->columns,
- y % wand->images->rows,&target,wand->exception);
+ (void) GetOneVirtualMagickPixel(wand->images,TileVirtualPixelMethod,x %
+ wand->images->columns,y % wand->images->rows,&target,wand->exception);
if (bordercolor != (PixelWand *) NULL)
PixelGetMagickColor(bordercolor,&target);
wand->images->fuzz=fuzz;