diff options
author | Albert Astals Cid <aacid@kde.org> | 2022-04-05 16:40:38 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2022-04-05 16:41:56 +0200 |
commit | d55f9ee33ea3a7d233b9e40a548345bc0ca7653f (patch) | |
tree | 2c99c0aa37d109dac8dccca007cfda357b960b16 /cpp | |
parent | 069f5c9c1e165aedbf9cf44813bff7ee70c9fd45 (diff) |
cpp: Add page_transition::durationReal
The duration is really a double, so add a function that doesn't turns
that double into an int
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/poppler-page-transition.cpp | 7 | ||||
-rw-r--r-- | cpp/poppler-page-transition.h | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/cpp/poppler-page-transition.cpp b/cpp/poppler-page-transition.cpp index 211ed051..7d19e910 100644 --- a/cpp/poppler-page-transition.cpp +++ b/cpp/poppler-page-transition.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2009-2010, Pino Toscano <pino@kde.org> - * Copyright (C) 2011, 2021, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2011, 2021, 2022, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -82,6 +82,11 @@ page_transition::type_enum page_transition::type() const int page_transition::duration() const { + return static_cast<int>(d->pt.getDuration()); +} + +double page_transition::durationReal() const +{ return d->pt.getDuration(); } diff --git a/cpp/poppler-page-transition.h b/cpp/poppler-page-transition.h index d4d6ddf5..68447508 100644 --- a/cpp/poppler-page-transition.h +++ b/cpp/poppler-page-transition.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2009, Pino Toscano <pino@kde.org> - * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2021, 2022, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -64,7 +64,8 @@ public: ~page_transition(); type_enum type() const; - int duration() const; + [[deprecated]] int duration() const; + double durationReal() const; alignment_enum alignment() const; direction_enum direction() const; int angle() const; |