From 9d2ddc506ef3ad96a545539ef56cb3a3c9033cc4 Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Sat, 17 Sep 2011 17:46:28 +0200 Subject: Add animationDelay, animationIterrations, avarage, clone and display. --- dmagick/Image.d | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dmagick/Image.d') diff --git a/dmagick/Image.d b/dmagick/Image.d index c191a2b..f449011 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -12,6 +12,7 @@ import std.string; import std.typecons : Tuple; import core.memory; import core.runtime; +import core.time; import core.stdc.string; import core.sys.posix.sys.types; @@ -3076,18 +3077,17 @@ class Image } /** - * Number of ticks which must expire before displaying the - * next image in an animated sequence. The default number - * of ticks is 0. By default there are 100 ticks per second. + * Number time which must expire before displaying the + * next image in an animated sequence. */ - void animationDelay(ushort delay) + void animationDelay(Duration delay) { - imageRef.delay = delay; + imageRef.delay = delay.total!"seconds"() * imageRef.ticks_per_second; } ///ditto - ushort annimationDelay() const + Duration annimationDelay() const { - return cast(ushort)imageRef.delay; + return dur!"seconds"(imageRef.delay * imageRef.ticks_per_second); } /** -- cgit v1.2.3