00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef _MAGICKCORE_DRAW_PRIVATE_H
00019 #define _MAGICKCORE_DRAW_PRIVATE_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include "magick/cache.h"
00026 #include "magick/image.h"
00027 #include "magick/memory_.h"
00028 
00029 static inline PixelPacket GetFillColor(const DrawInfo *draw_info,
00030   const long x,const long y)
00031 {
00032   Image
00033     *pattern;
00034 
00035   PixelPacket
00036     fill_color;
00037 
00038   pattern=draw_info->fill_pattern;
00039   if (pattern == (Image *) NULL)
00040     return(draw_info->fill);
00041   fill_color=AcquireOneVirtualPixel(pattern,TileVirtualPixelMethod,
00042     x+pattern->tile_offset.x,y+pattern->tile_offset.y,&pattern->exception);
00043   return(fill_color);
00044 }
00045 
00046 static inline PixelPacket GetStrokeColor(const DrawInfo *draw_info,
00047   const long x,const long y)
00048 {
00049   Image
00050     *pattern;
00051 
00052   PixelPacket
00053     stroke_color;
00054 
00055   pattern=draw_info->stroke_pattern;
00056   if (pattern == (Image *) NULL)
00057     return(draw_info->stroke);
00058   stroke_color=AcquireOneVirtualPixel(pattern,TileVirtualPixelMethod,
00059     x+pattern->tile_offset.x,y+pattern->tile_offset.y,&pattern->exception);
00060   return(stroke_color);
00061 }
00062 
00063 #if defined(__cplusplus) || defined(c_plusplus)
00064 }
00065 #endif
00066 
00067 #endif