The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Rotate background images

These changes was commited to the Birdfont repository Wed, 09 Dec 2015 09:15:39 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 09 Dec 2015 09:15:39 +0000 (10:15 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 09 Dec 2015 09:15:39 +0000 (10:15 +0100)
commit 410c17b1f9582d92edfecdd1518946abd30dba8b
tree dcc544b99c8811a8ad096c24cae91ae810e7bac0
parent 9ae0f4c71ab0aaface5a7c208b8f2604c471a66b
Rotate background images

libbirdfont/BackgroundImage.vala
--- a/libbirdfont/BackgroundImage.vala +++ b/libbirdfont/BackgroundImage.vala @@ -472,6 +472,13 @@ // add it cr.save (); + + if (img_rotation != 0) { + cr.translate (Glyph.xc (), Glyph.xc ()); + cr.rotate (img_rotation); + cr.translate (-Glyph.xc (), -Glyph.xc ()); + } + cr.set_source_surface (scaled_image, 0, 0); cr.paint (); cr.restore ();