1 module dmagick.c.monitor; 2 3 import dmagick.c.image; 4 import dmagick.c.magickType; 5 6 extern(C) 7 { 8 alias MagickBooleanType function(const(char)*, const MagickOffsetType, const MagickSizeType, void*) MagickProgressMonitor; 9 10 MagickProgressMonitor SetImageProgressMonitor(Image*, const MagickProgressMonitor, void*); 11 MagickProgressMonitor SetImageInfoProgressMonitor(ImageInfo*, const MagickProgressMonitor, void*); 12 } 13 14 static pure nothrow MagickBooleanType QuantumTick(const MagickOffsetType offset, const MagickSizeType span) 15 { 16 if (span <= 100) 17 return(true); 18 if (offset == cast(MagickOffsetType) (span-1)) 19 return(true); 20 if ((offset % (span/100)) == 0) 21 return(true); 22 return(false); 23 }