13ed852eea50f9d4cd633efb8c2b054b8e33c253cristy/* 27ce65e7125a4e1df1a274ce373c537a9df9c16cdCristy Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization 33ed852eea50f9d4cd633efb8c2b054b8e33c253cristy dedicated to making software imaging solutions freely available. 43ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 53ed852eea50f9d4cd633efb8c2b054b8e33c253cristy You may not use this file except in compliance with the License. 63ed852eea50f9d4cd633efb8c2b054b8e33c253cristy obtain a copy of the License at 73ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 83ed852eea50f9d4cd633efb8c2b054b8e33c253cristy http://www.imagemagick.org/script/license.php 93ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Unless required by applicable law or agreed to in writing, software 113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy distributed under the License is distributed on an "AS IS" BASIS, 123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy See the License for the specific language governing permissions and 143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy limitations under the License. 153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickCore private image drawing methods. 173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy*/ 1883bceaa5d7a1196e05c1ccba443f90f4b032fca6Cristy#ifndef MAGICKCORE_DRAW_PRIVATE_H 1983bceaa5d7a1196e05c1ccba443f90f4b032fca6Cristy#define MAGICKCORE_DRAW_PRIVATE_H 203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 214c08aed51c5899665ade97263692328eea4af106cristy#include "MagickCore/cache.h" 224c08aed51c5899665ade97263692328eea4af106cristy#include "MagickCore/image.h" 234c08aed51c5899665ade97263692328eea4af106cristy#include "MagickCore/memory_.h" 243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 256398ec777e91813b64767e25358b7062a7de56cbcristy#if defined(__cplusplus) || defined(c_plusplus) 266398ec777e91813b64767e25358b7062a7de56cbcristyextern "C" { 276398ec777e91813b64767e25358b7062a7de56cbcristy#endif 286398ec777e91813b64767e25358b7062a7de56cbcristy 2950be538de7d724dfbd0cba7d434d1404b49ce90ddirkstatic inline void GetFillColor(const DrawInfo *draw_info,const ssize_t x, 3050be538de7d724dfbd0cba7d434d1404b49ce90ddirk const ssize_t y,PixelInfo *fill,ExceptionInfo *exception) 313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 322ed42f6d7c2245432767ea446742977ee87e963ccristy if (draw_info->fill_pattern == (Image *) NULL) 333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 342ed42f6d7c2245432767ea446742977ee87e963ccristy *fill=draw_info->fill; 3550be538de7d724dfbd0cba7d434d1404b49ce90ddirk return; 363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 372ed42f6d7c2245432767ea446742977ee87e963ccristy { 382ed42f6d7c2245432767ea446742977ee87e963ccristy Image 392ed42f6d7c2245432767ea446742977ee87e963ccristy *pattern; 402ed42f6d7c2245432767ea446742977ee87e963ccristy 412ed42f6d7c2245432767ea446742977ee87e963ccristy pattern=draw_info->fill_pattern; 4250be538de7d724dfbd0cba7d434d1404b49ce90ddirk (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ 435201002e1ba0118594060d26142b48bdfb1320a2cristy pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception); 442ed42f6d7c2245432767ea446742977ee87e963ccristy } 453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4750be538de7d724dfbd0cba7d434d1404b49ce90ddirkstatic inline void GetStrokeColor(const DrawInfo *draw_info,const ssize_t x, 4850be538de7d724dfbd0cba7d434d1404b49ce90ddirk const ssize_t y,PixelInfo *stroke,ExceptionInfo *exception) 493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 502ed42f6d7c2245432767ea446742977ee87e963ccristy if (draw_info->stroke_pattern == (Image *) NULL) 513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 522ed42f6d7c2245432767ea446742977ee87e963ccristy *stroke=draw_info->stroke; 5350be538de7d724dfbd0cba7d434d1404b49ce90ddirk return; 543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 552ed42f6d7c2245432767ea446742977ee87e963ccristy { 562ed42f6d7c2245432767ea446742977ee87e963ccristy Image 572ed42f6d7c2245432767ea446742977ee87e963ccristy *pattern; 582ed42f6d7c2245432767ea446742977ee87e963ccristy 592ed42f6d7c2245432767ea446742977ee87e963ccristy pattern=draw_info->stroke_pattern; 6050be538de7d724dfbd0cba7d434d1404b49ce90ddirk (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+ 615201002e1ba0118594060d26142b48bdfb1320a2cristy pattern->tile_offset.x,y+pattern->tile_offset.y,stroke,exception); 622ed42f6d7c2245432767ea446742977ee87e963ccristy } 633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#if defined(__cplusplus) || defined(c_plusplus) 663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#endif 683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#endif 70