/src/imagemagick/MagickCore/draw-private.h
Line | Count | Source |
1 | | /* |
2 | | Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization |
3 | | dedicated to making software imaging solutions freely available. |
4 | | |
5 | | You may not use this file except in compliance with the License. You may |
6 | | obtain a copy of the License at |
7 | | |
8 | | https://imagemagick.org/script/license.php |
9 | | |
10 | | Unless required by applicable law or agreed to in writing, software |
11 | | distributed under the License is distributed on an "AS IS" BASIS, |
12 | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | | See the License for the specific language governing permissions and |
14 | | limitations under the License. |
15 | | |
16 | | MagickCore private image drawing methods. |
17 | | */ |
18 | | #ifndef MAGICKCORE_DRAW_PRIVATE_H |
19 | | #define MAGICKCORE_DRAW_PRIVATE_H |
20 | | |
21 | | #include "MagickCore/cache.h" |
22 | | #include "MagickCore/image.h" |
23 | | #include "MagickCore/memory_.h" |
24 | | |
25 | | #if defined(__cplusplus) || defined(c_plusplus) |
26 | | extern "C" { |
27 | | #endif |
28 | | |
29 | | static inline void GetFillColor(const DrawInfo *draw_info,const ssize_t x, |
30 | | const ssize_t y,PixelInfo *fill,ExceptionInfo *exception) |
31 | 404M | { |
32 | 404M | if (draw_info->fill_pattern == (Image *) NULL) |
33 | 404M | { |
34 | 404M | *fill=draw_info->fill; |
35 | 404M | return; |
36 | 404M | } |
37 | 649k | { |
38 | 649k | Image |
39 | 649k | *pattern; |
40 | | |
41 | 649k | pattern=draw_info->fill_pattern; |
42 | 649k | (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ |
43 | 649k | pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception); |
44 | 649k | if (fabs(draw_info->fill_alpha-(double) TransparentAlpha) >= MagickEpsilon) |
45 | 591k | fill->alpha*=QuantumScale*draw_info->fill_alpha; |
46 | 649k | } |
47 | 649k | } Line | Count | Source | 31 | 387M | { | 32 | 387M | if (draw_info->fill_pattern == (Image *) NULL) | 33 | 387M | { | 34 | 387M | *fill=draw_info->fill; | 35 | 387M | return; | 36 | 387M | } | 37 | 0 | { | 38 | 0 | Image | 39 | 0 | *pattern; | 40 | |
| 41 | 0 | pattern=draw_info->fill_pattern; | 42 | 0 | (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ | 43 | 0 | pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception); | 44 | 0 | if (fabs(draw_info->fill_alpha-(double) TransparentAlpha) >= MagickEpsilon) | 45 | 0 | fill->alpha*=QuantumScale*draw_info->fill_alpha; | 46 | 0 | } | 47 | 0 | } |
Unexecuted instantiation: attribute.c:GetFillColor Line | Count | Source | 31 | 15.3M | { | 32 | 15.3M | if (draw_info->fill_pattern == (Image *) NULL) | 33 | 14.7M | { | 34 | 14.7M | *fill=draw_info->fill; | 35 | 14.7M | return; | 36 | 14.7M | } | 37 | 644k | { | 38 | 644k | Image | 39 | 644k | *pattern; | 40 | | | 41 | 644k | pattern=draw_info->fill_pattern; | 42 | 644k | (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ | 43 | 644k | pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception); | 44 | 644k | if (fabs(draw_info->fill_alpha-(double) TransparentAlpha) >= MagickEpsilon) | 45 | 586k | fill->alpha*=QuantumScale*draw_info->fill_alpha; | 46 | 644k | } | 47 | 644k | } |
Line | Count | Source | 31 | 1.81M | { | 32 | 1.81M | if (draw_info->fill_pattern == (Image *) NULL) | 33 | 1.81M | { | 34 | 1.81M | *fill=draw_info->fill; | 35 | 1.81M | return; | 36 | 1.81M | } | 37 | 5.00k | { | 38 | 5.00k | Image | 39 | 5.00k | *pattern; | 40 | | | 41 | 5.00k | pattern=draw_info->fill_pattern; | 42 | 5.00k | (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ | 43 | 5.00k | pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception); | 44 | 5.00k | if (fabs(draw_info->fill_alpha-(double) TransparentAlpha) >= MagickEpsilon) | 45 | 4.91k | fill->alpha*=QuantumScale*draw_info->fill_alpha; | 46 | 5.00k | } | 47 | 5.00k | } |
Unexecuted instantiation: caption.c:GetFillColor Unexecuted instantiation: pango.c:GetFillColor |
48 | | |
49 | | static inline void GetStrokeColor(const DrawInfo *draw_info,const ssize_t x, |
50 | | const ssize_t y,PixelInfo *stroke,ExceptionInfo *exception) |
51 | 14.2M | { |
52 | 14.2M | if (draw_info->stroke_pattern == (Image *) NULL) |
53 | 13.7M | { |
54 | 13.7M | *stroke=draw_info->stroke; |
55 | 13.7M | return; |
56 | 13.7M | } |
57 | 531k | { |
58 | 531k | Image |
59 | 531k | *pattern; |
60 | | |
61 | 531k | pattern=draw_info->stroke_pattern; |
62 | 531k | (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ |
63 | 531k | pattern->tile_offset.x,y+pattern->tile_offset.y,stroke,exception); |
64 | 531k | if (fabs(draw_info->stroke_alpha-(double) TransparentAlpha) >= MagickEpsilon) |
65 | 457k | stroke->alpha*=QuantumScale*draw_info->stroke_alpha; |
66 | 531k | } |
67 | 531k | } Unexecuted instantiation: annotate.c:GetStrokeColor Unexecuted instantiation: attribute.c:GetStrokeColor Line | Count | Source | 51 | 14.2M | { | 52 | 14.2M | if (draw_info->stroke_pattern == (Image *) NULL) | 53 | 13.7M | { | 54 | 13.7M | *stroke=draw_info->stroke; | 55 | 13.7M | return; | 56 | 13.7M | } | 57 | 531k | { | 58 | 531k | Image | 59 | 531k | *pattern; | 60 | | | 61 | 531k | pattern=draw_info->stroke_pattern; | 62 | 531k | (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ | 63 | 531k | pattern->tile_offset.x,y+pattern->tile_offset.y,stroke,exception); | 64 | 531k | if (fabs(draw_info->stroke_alpha-(double) TransparentAlpha) >= MagickEpsilon) | 65 | 457k | stroke->alpha*=QuantumScale*draw_info->stroke_alpha; | 66 | 531k | } | 67 | 531k | } |
Unexecuted instantiation: paint.c:GetStrokeColor Unexecuted instantiation: caption.c:GetStrokeColor Unexecuted instantiation: pango.c:GetStrokeColor |
68 | | |
69 | | #if defined(__cplusplus) || defined(c_plusplus) |
70 | | } |
71 | | #endif |
72 | | |
73 | | #endif |