This source file includes following definitions.
- GetFillColor
- GetStrokeColor
#ifndef _MAGICKCORE_DRAW_PRIVATE_H
#define _MAGICKCORE_DRAW_PRIVATE_H
#include "magick/cache.h"
#include "magick/image.h"
#include "magick/memory_.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
static inline MagickBooleanType GetFillColor(const DrawInfo *draw_info,
const ssize_t x,const ssize_t y,PixelPacket *pixel)
{
Image
*pattern;
MagickBooleanType
status;
pattern=draw_info->fill_pattern;
if (pattern == (Image *) NULL)
{
*pixel=draw_info->fill;
return(MagickTrue);
}
status=GetOneVirtualMethodPixel(pattern,TileVirtualPixelMethod,
x+pattern->tile_offset.x,y+pattern->tile_offset.y,pixel,
&pattern->exception);
if (pattern->matte == MagickFalse)
pixel->opacity=OpaqueOpacity;
return(status);
}
static inline MagickBooleanType GetStrokeColor(const DrawInfo *draw_info,
const ssize_t x,const ssize_t y,PixelPacket *pixel)
{
Image
*pattern;
MagickBooleanType
status;
pattern=draw_info->stroke_pattern;
if (pattern == (Image *) NULL)
{
*pixel=draw_info->stroke;
return(MagickTrue);
}
status=GetOneVirtualMethodPixel(pattern,TileVirtualPixelMethod,
x+pattern->tile_offset.x,y+pattern->tile_offset.y,pixel,
&pattern->exception);
if (pattern->matte == MagickFalse)
pixel->opacity=OpaqueOpacity;
return(status);
}
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif