From: cristy Date: Fri, 21 Oct 2011 18:07:37 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6765 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5201002e1ba0118594060d26142b48bdfb1320a2;p=imagemagick --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 63c806354..0b8e0b612 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -2255,13 +2255,15 @@ static MagickBooleanType GetOneAuthenticPixelFromCache(Image *image, % 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. @@ -2270,7 +2272,8 @@ static MagickBooleanType GetOneAuthenticPixelFromCache(Image *image, % */ 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; @@ -2287,8 +2290,8 @@ MagickExport MagickBooleanType GetOneVirtualMagickPixel(const Image *image, 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); diff --git a/MagickCore/cache.h b/MagickCore/cache.h index 95fd84d22..f83e15ff9 100644 --- a/MagickCore/cache.h +++ b/MagickCore/cache.h @@ -33,8 +33,8 @@ extern MagickExport const void *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, diff --git a/MagickCore/composite.c b/MagickCore/composite.c index 7ce26528f..a2e4ab2df 100644 --- a/MagickCore/composite.c +++ b/MagickCore/composite.c @@ -43,6 +43,7 @@ #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" @@ -2258,7 +2259,8 @@ MagickExport MagickBooleanType CompositeImage(Image *image, } 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; } diff --git a/MagickCore/display.c b/MagickCore/display.c index 797b385ec..e89f51e4d 100644 --- a/MagickCore/display.c +++ b/MagickCore/display.c @@ -43,6 +43,7 @@ #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" @@ -3822,8 +3823,9 @@ static MagickBooleanType XColorEditImage(Display *display, /* 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) @@ -10162,8 +10164,9 @@ static MagickBooleanType XMatteEditImage(Display *display, /* 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( diff --git a/MagickCore/draw-private.h b/MagickCore/draw-private.h index def387d4c..963abdd5f 100644 --- a/MagickCore/draw-private.h +++ b/MagickCore/draw-private.h @@ -45,8 +45,8 @@ static inline MagickBooleanType GetFillColor(const DrawInfo *draw_info, #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); } } @@ -70,8 +70,8 @@ static inline MagickBooleanType GetStrokeColor(const DrawInfo *draw_info, #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); } } diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 3f12950f0..b3ed8197e 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4235,7 +4235,8 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image, 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; @@ -4363,7 +4364,8 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image, 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; diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index 0e434908f..7e47c6682 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -7522,8 +7522,8 @@ MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows, /* 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); diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index fa030552d..4aa0cdbfe 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -3046,8 +3046,8 @@ WandExport MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand, 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;