widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #08821
Re: [Merge] lp:~widelands-dev/widelands/animation_scaling into lp:widelands
Review: Approve
height(): ack.
the other answered inline.
Diff comments:
>
> === modified file 'src/graphic/animation.h'
> --- src/graphic/animation.h 2016-10-25 08:14:28 +0000
> +++ src/graphic/animation.h 2016-11-18 17:52:33 +0000
> @@ -57,8 +58,17 @@
> }
>
> /// The dimensions of this animation.
> - virtual uint16_t width() const = 0;
> - virtual uint16_t height() const = 0;
> + virtual float height() const = 0;
> +
> + /// The size of the animation source images. Use 'percent_from_bottom' to crop the animation.
Sorry, I meant the units from the returned Rectangle. 'scale' seems fine.
> + virtual Rectf source_rectangle(int percent_from_bottom) const = 0;
> +
> + /// Calculates the destination rectangle for blitting the animation.
> + /// 'position' is where the top left corner of the animation will end up,
> + /// 'source_rect' is the rectangle calculated by source_rectangle,
> + /// 'scale' is the zoom scale.
> + virtual Rectf
> + destination_rectangle(const Vector2f& position, const Rectf& source_rect, float scale) const = 0;
>
> /// The number of animation frames of this animation.
> virtual uint16_t nr_frames() const = 0;
--
https://code.launchpad.net/~widelands-dev/widelands/animation_scaling/+merge/310718
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/animation_scaling.
References