| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | #ifndef _MAGICKCORE_DRAW_PRIVATE_H |
|---|
| 19 | #define _MAGICKCORE_DRAW_PRIVATE_H |
|---|
| 20 | |
|---|
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | #include "magick/cache.h" |
|---|
| 26 | #include "magick/image.h" |
|---|
| 27 | #include "magick/memory_.h" |
|---|
| 28 | |
|---|
| 29 | static inline PixelPacket GetFillColor(const DrawInfo *draw_info, |
|---|
| 30 | const long x,const long y) |
|---|
| 31 | { |
|---|
| 32 | Image |
|---|
| 33 | *pattern; |
|---|
| 34 | |
|---|
| 35 | PixelPacket |
|---|
| 36 | fill_color; |
|---|
| 37 | |
|---|
| 38 | pattern=draw_info->fill_pattern; |
|---|
| 39 | if (pattern == (Image *) NULL) |
|---|
| 40 | return(draw_info->fill); |
|---|
| 41 | #pragma omp critical |
|---|
| 42 | fill_color=AcquireOneVirtualPixel(pattern,TileVirtualPixelMethod, |
|---|
| 43 | x+pattern->tile_offset.x,y+pattern->tile_offset.y,&pattern->exception); |
|---|
| 44 | return(fill_color); |
|---|
| 45 | } |
|---|
| 46 | |
|---|
| 47 | static inline PixelPacket GetStrokeColor(const DrawInfo *draw_info, |
|---|
| 48 | const long x,const long y) |
|---|
| 49 | { |
|---|
| 50 | Image |
|---|
| 51 | *pattern; |
|---|
| 52 | |
|---|
| 53 | PixelPacket |
|---|
| 54 | stroke_color; |
|---|
| 55 | |
|---|
| 56 | pattern=draw_info->stroke_pattern; |
|---|
| 57 | if (pattern == (Image *) NULL) |
|---|
| 58 | return(draw_info->stroke); |
|---|
| 59 | #pragma omp critical |
|---|
| 60 | stroke_color=AcquireOneVirtualPixel(pattern,TileVirtualPixelMethod, |
|---|
| 61 | x+pattern->tile_offset.x,y+pattern->tile_offset.y,&pattern->exception); |
|---|
| 62 | return(stroke_color); |
|---|
| 63 | } |
|---|
| 64 | |
|---|
| 65 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 66 | } |
|---|
| 67 | #endif |
|---|
| 68 | |
|---|
| 69 | #endif |
|---|