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 #include "MagickCore/cache.h"
00022 #include "MagickCore/image.h"
00023 #include "MagickCore/memory_.h"
00024
00025 #if defined(__cplusplus) || defined(c_plusplus)
00026 extern "C" {
00027 #endif
00028
00029 static inline void GetFillColor(const DrawInfo *draw_info,const ssize_t x,
00030 const ssize_t y,PixelInfo *fill,ExceptionInfo *exception)
00031 {
00032 if (draw_info->fill_pattern == (Image *) NULL)
00033 {
00034 *fill=draw_info->fill;
00035 return;
00036 }
00037 {
00038 Image
00039 *pattern;
00040
00041 pattern=draw_info->fill_pattern;
00042 (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+
00043 pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception);
00044 if (fabs(draw_info->fill_alpha-TransparentAlpha) >= MagickEpsilon)
00045 fill->alpha*=QuantumScale*draw_info->fill_alpha;
00046 }
00047 }
00048
00049 static inline void GetStrokeColor(const DrawInfo *draw_info,const ssize_t x,
00050 const ssize_t y,PixelInfo *stroke,ExceptionInfo *exception)
00051 {
00052 if (draw_info->stroke_pattern == (Image *) NULL)
00053 {
00054 *stroke=draw_info->stroke;
00055 return;
00056 }
00057 {
00058 Image
00059 *pattern;
00060
00061 pattern=draw_info->stroke_pattern;
00062 (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+
00063 pattern->tile_offset.x,y+pattern->tile_offset.y,stroke,exception);
00064 if (fabs(draw_info->stroke_alpha-TransparentAlpha) >= MagickEpsilon)
00065 stroke->alpha*=QuantumScale*draw_info->stroke_alpha;
00066 }
00067 }
00068
00069 #if defined(__cplusplus) || defined(c_plusplus)
00070 }
00071 #endif
00072
00073 #endif